Projects/laydi
Projects
/
laydi
Archived
7
0
Fork 0
This repository has been archived on 2024-07-04. You can view files and clone it, but cannot push or open issues or pull requests.
laydi/scripts/geneontology/go-distance/godist.h

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