00001 #include "log.h" 00002 #include "format.h" 00003 #include "util.h" 00004 #include "gfr.h" 00005 #include "geneFusionsConfig.h" 00006 00007 00008 00009 int main (int argc, char *argv[]) 00010 { 00011 GfrEntry *currGE; 00012 Array kgXrefs; 00013 Stringa buffer; 00014 int count; 00015 00016 buffer = stringCreate (100); 00017 stringPrintf (buffer,"%s/%s",ANNOTATION_DIR,KNOWN_GENE_XREF_FILENAME); 00018 kgXrefs = util_readKnownGeneXrefs (string (buffer)); 00019 arraySort (kgXrefs,(ARRAYORDERF)sortKgXrefsByTranscriptName); 00020 stringDestroy (buffer); 00021 00022 count = 0; 00023 gfr_init ("-"); 00024 gfr_addNewColumnType (GFR_COLUMN_NAME_GENE_SYMBOL_TRANSCRIPT1); 00025 gfr_addNewColumnType (GFR_COLUMN_NAME_GENE_SYMBOL_TRANSCRIPT2); 00026 gfr_addNewColumnType (GFR_COLUMN_NAME_DESCRIPTION_TRANSCRIPT1); 00027 gfr_addNewColumnType (GFR_COLUMN_NAME_DESCRIPTION_TRANSCRIPT2); 00028 puts (gfr_writeHeader ()); 00029 while (currGE = gfr_nextEntry ()){ 00030 transcript2geneSymbolAndGeneDescription (kgXrefs,currGE->nameTranscript1,&currGE->geneSymbolTranscript1,&currGE->descriptionTranscript1); 00031 transcript2geneSymbolAndGeneDescription (kgXrefs,currGE->nameTranscript2,&currGE->geneSymbolTranscript2,&currGE->descriptionTranscript2); 00032 puts (gfr_writeGfrEntry (currGE)); 00033 count++; 00034 } 00035 gfr_deInit (); 00036 warn ("%s_numGfrEntries: %d",argv[0],count); 00037 return 0; 00038 } 00039