48 lines
983 B
C
48 lines
983 B
C
#ifndef GODIST_H
|
|
#define GODIST_H
|
|
|
|
#include <search.h>
|
|
|
|
#define MAX_NODES 15000
|
|
#define MAX_PARENTS 100
|
|
#define MAX_CHILDREN 100
|
|
|
|
struct node;
|
|
struct node {
|
|
/* GO term id. E.g: "GO:0005180" */
|
|
char term[11];
|
|
/* Information content */
|
|
float ic;
|
|
/* Depth in tree */
|
|
int depth;
|
|
/* Evidence codes */
|
|
int evidence[12];
|
|
/* Accumulated evidence codes */
|
|
int acc_evidence[12];
|
|
|
|
/* Parent count and parents */
|
|
int parentc;
|
|
struct node *parents[MAX_PARENTS];
|
|
|
|
/* Child count and children */
|
|
int childrenc;
|
|
struct node *children[MAX_CHILDREN];
|
|
};
|
|
|
|
struct node* term_array[MAX_NODES];
|
|
long term_array_size;
|
|
int link_count;
|
|
|
|
/* Ontology initialisation functions. */
|
|
int godist_init();
|
|
int godist_read_assoc(FILE *fd);
|
|
int godist_read_term(FILE *fd);
|
|
void accumulate_evidence(struct node*);
|
|
|
|
/* Distance metric functions */
|
|
float resnik_distance(char *term1, char *term2);
|
|
float fussimeg_distance(char *term1, char *term2);
|
|
|
|
#endif
|
|
|