#include <stdio.h>#include "blast.h"Include dependency graph for dustApp.c:

Go to the source code of this file.
Functions | |
| int | main (int argc, char *argv[]) |
| int main | ( | int | argc, | |
| char * | argv[] | |||
| ) |
Definition at line 11 of file dustApp.c.
References dust_dustSequence(), encoding_initialize(), encoding_nucleotide, global_malloc(), readFasta_descriptionBuffer, readFasta_open(), readFasta_readSequence(), readFasta_sequenceBuffer, and readFasta_sequenceLength.
00012 { 00013 char *filename, *sequence, *description, *sequenceCopy; 00014 int sequenceLength; 00015 00016 // User must provide FASTA format file at command line 00017 if (argc < 2) 00018 { 00019 fprintf(stderr, "Useage: dust <FASTA file>\n"); 00020 exit(-1); 00021 } 00022 filename = argv[1]; 00023 00024 // Initialize encoding routines 00025 encoding_initialize(encoding_nucleotide); 00026 00027 // Open FASTA file for reading 00028 readFasta_open(filename); 00029 00030 // Read each sequence from the file 00031 while (readFasta_readSequence()) 00032 { 00033 // Get sequence just read 00034 sequence = readFasta_sequenceBuffer; 00035 description = readFasta_descriptionBuffer; 00036 sequenceLength = readFasta_sequenceLength; 00037 00038 // Make in-memory copy of it 00039 sequenceCopy = (char*)global_malloc(sequenceLength); 00040 strcpy(sequenceCopy, sequence); 00041 00042 // Perform dust filtering 00043 dust_dustSequence(sequence); 00044 00045 // Print description and filtering sequence 00046 printf(">%s\n%s\n", description, sequence); 00047 } 00048 }
Here is the call graph for this function:

1.5.2