00001 #include "log.h" 00002 #include "format.h" 00003 #include "gfr.h" 00004 00005 00006 00007 int main (int argc, char *argv[]) 00008 { 00009 GfrEntry *currGE; 00010 int count; 00011 int countRemoved; 00012 00013 if (argc != 2) { 00014 usage ("%s <string>",argv[0]); 00015 } 00016 count = 0; 00017 countRemoved = 0; 00018 gfr_init ("-"); 00019 puts (gfr_writeHeader ()); 00020 while (currGE = gfr_nextEntry ()){ 00021 if (currGE->descriptionTranscript1 == NULL || 00022 currGE->descriptionTranscript2 == NULL) { 00023 die ("Transcript description is missing"); 00024 } 00025 if (strCaseStr (currGE->descriptionTranscript1,argv[1]) || 00026 strCaseStr (currGE->descriptionTranscript2,argv[1])) { 00027 countRemoved++; 00028 continue; 00029 } 00030 puts (gfr_writeGfrEntry (currGE)); 00031 count++; 00032 } 00033 gfr_deInit (); 00034 warn ("%s_string: %s",argv[0],argv[1]); 00035 warn ("%s_numRemoved: %d",argv[0],countRemoved); 00036 warn ("%s_numGfrEntries: %d",argv[0],count); 00037 return 0; 00038 } 00039