/* knownToSuper.h was originally generated by the autoSql program, which also * generated knownToSuper.c and knownToSuper.sql. This header links the database and * the RAM representation of objects. */ #ifndef KNOWNTOSUPER_H #define KNOWNTOSUPER_H #define KNOWNTOSUPER_NUM_COLS 5 struct knownToSuper /* Map protein superfamilies to known genes */ { struct knownToSuper *next; /* Next in singly linked list. */ char *gene; /* Known gene ID */ int superfamily; /* Superfamily ID */ int start; /* Start of superfamily domain in protein (0 based) */ int end; /* End (noninclusive) of superfamily domain */ float eVal; /* E value of superfamily assignment */ }; void knownToSuperStaticLoad(char **row, struct knownToSuper *ret); /* Load a row from knownToSuper table into ret. The contents of ret will * be replaced at the next call to this function. */ struct knownToSuper *knownToSuperLoad(char **row); /* Load a knownToSuper from row fetched with select * from knownToSuper * from database. Dispose of this with knownToSuperFree(). */ struct knownToSuper *knownToSuperLoadAll(char *fileName); /* Load all knownToSuper from whitespace-separated file. * Dispose of this with knownToSuperFreeList(). */ struct knownToSuper *knownToSuperLoadAllByChar(char *fileName, char chopper); /* Load all knownToSuper from chopper separated file. * Dispose of this with knownToSuperFreeList(). */ #define knownToSuperLoadAllByTab(a) knownToSuperLoadAllByChar(a, '\t'); /* Load all knownToSuper from tab separated file. * Dispose of this with knownToSuperFreeList(). */ struct knownToSuper *knownToSuperCommaIn(char **pS, struct knownToSuper *ret); /* Create a knownToSuper out of a comma separated string. * This will fill in ret if non-null, otherwise will * return a new knownToSuper */ void knownToSuperFree(struct knownToSuper **pEl); /* Free a single dynamically allocated knownToSuper such as created * with knownToSuperLoad(). */ void knownToSuperFreeList(struct knownToSuper **pList); /* Free a list of dynamically allocated knownToSuper's */ void knownToSuperOutput(struct knownToSuper *el, FILE *f, char sep, char lastSep); /* Print out knownToSuper. Separate fields with sep. Follow last field with lastSep. */ #define knownToSuperTabOut(el,f) knownToSuperOutput(el,f,'\t','\n'); /* Print out knownToSuper as a line in a tab-separated file. */ #define knownToSuperCommaOut(el,f) knownToSuperOutput(el,f,',',','); /* Print out knownToSuper as a comma separated list including final comma. */ /* -------------------------------- End autoSql Generated Code -------------------------------- */ #endif /* KNOWNTOSUPER_H */