00001 #ifndef DEF_GENE_ONTOLOGY_H 00002 #define DEF_GENE_ONTOLOGY_H 00003 00004 00011 #define MULTIPLE_TESTING_CORRECTION_BENJAMINI_HOCHBERG 1 00012 #define MULTIPLE_TESTING_CORRECTION_BONFERRONI 2 00013 00014 00015 00019 typedef struct { 00020 char* tag; 00021 char* value; 00022 } GoTagValue; 00023 00024 00025 00029 typedef struct { 00030 char* id; 00031 char* name; 00032 char* namespace; 00033 Texta altIds; 00034 char* definition; 00035 Texta synonyms; 00036 Texta subsets; 00037 int isGenericGoSlim; 00038 char* comment; 00039 int isObsolete; 00040 Texta considers; 00041 Array xrefs; // of type TagValue 00042 Array relationships; // of type TagValue 00043 Texta parents; 00044 } GoTerm; 00045 00046 00047 00051 typedef struct { 00052 char* id; 00053 GoTerm *goTerm; 00054 Array parents; // of type GoNode* 00055 Array children; // of type GoNode* 00056 Texta associatedGenes; 00057 Texta genesOfInterest; 00058 } GoNode; 00059 00060 00061 00065 typedef struct { 00066 char* db; 00067 char* dbGeneName; 00068 char* geneName; 00069 Texta goIds; 00070 } GoGeneAssociation; 00071 00072 00073 00077 typedef struct { 00078 GoNode* goNode; 00079 Texta genesOfInterest; // Names of the genes of interest of goNode and its children 00080 int numberOfAnnotatedGenes; 00081 int numberOfGenesOfInterest; 00082 double pvalue; 00083 double pvalueCorrected; 00084 } GoStatistic; 00085 00086 00087 00088 extern void geneOntology_init (char* geneOntologyFileName); 00089 extern void geneOntology_mapGeneAnnotationsToGeneOntology (char* goGeneAssociationFileName); 00090 extern Texta geneOntology_mapGenesOfInterestToGeneOntology (Texta genesOfInterest); 00091 extern GoNode* geneOntology_getBiologicalProcessRoot (void); 00092 extern GoNode* geneOntology_getMolecularFunctionRoot (void); 00093 extern GoNode* geneOntology_getCellularComponentRoot (void); 00094 extern Array geneOntology_getBiologicalProcessGoNodes (void); 00095 extern Array geneOntology_getMolecularFunctionGoNodes (void); 00096 extern Array geneOntology_getCellularComponentGoNodes (void); 00097 extern Array geneOntology_getGenericGoSlimNodes (void); 00098 extern Array geneOntology_getAllGoNodes (void); 00099 extern int geneOntology_getNumberOfAssociatedGenes (void); 00100 extern int geneOntology_getNumberOfGenesOfInterest (void); 00101 extern void geneOntology_resetGenesOfInterest (void); 00102 extern GoNode* geneOntology_findGoNode (char* id); 00103 extern GoGeneAssociation* geneOntology_findGoGeneAssociation (char* geneName); 00104 extern Array geneOntology_calculateGeneEnrichment (Array goNodePointers, int multipleTestingCorrectionMethod); 00105 extern Array geneOntology_calculateGeneDepletion (Array goNodePointers, int multipleTestingCorrectionMethod); 00106 extern Array geneOntology_getChildrenAtSpecifiedHierarchyLevel (GoNode* currGoNode, int level); 00107 00108 00109 00110 #endif