ea8b7de586447b28fdcf004a045d94891f213250 braney Tue Jan 11 11:58:02 2011 -0800 gencode metadata autoSql diff --git src/hg/inc/wgEncodeGencodeSource.h src/hg/inc/wgEncodeGencodeSource.h new file mode 100644 index 0000000..1e29dfb --- /dev/null +++ src/hg/inc/wgEncodeGencodeSource.h @@ -0,0 +1,68 @@ +/* wgEncodeGencodeSource.h was originally generated by the autoSql program, which also + * generated wgEncodeGencodeSource.c and wgEncodeGencodeSource.sql. This header links the database and + * the RAM representation of objects. */ + +#ifndef WGENCODEGENCODESOURCE_H +#define WGENCODEGENCODESOURCE_H + +#define WGENCODEGENCODESOURCE_NUM_COLS 2 + +enum wgEncodeGencodeSourceSource + { + wgEncodeGencodeSourceEnsembl = 0, + wgEncodeGencodeSourceShares_CDS = 1, + wgEncodeGencodeSourceShares_CDS_and_UTR = 2, + }; +struct wgEncodeGencodeSource +/* Gencode metadata table of the source of Gencode Gene transcripts */ + { + struct wgEncodeGencodeSource *next; /* Next in singly linked list. */ + char *transcriptId; /* Transcript ID for Gencode gene */ + enum wgEncodeGencodeSourceSource source; /* Source of transcript */ + }; + +void wgEncodeGencodeSourceStaticLoad(char **row, struct wgEncodeGencodeSource *ret); +/* Load a row from wgEncodeGencodeSource table into ret. The contents of ret will + * be replaced at the next call to this function. */ + +struct wgEncodeGencodeSource *wgEncodeGencodeSourceLoad(char **row); +/* Load a wgEncodeGencodeSource from row fetched with select * from wgEncodeGencodeSource + * from database. Dispose of this with wgEncodeGencodeSourceFree(). */ + +struct wgEncodeGencodeSource *wgEncodeGencodeSourceLoadAll(char *fileName); +/* Load all wgEncodeGencodeSource from whitespace-separated file. + * Dispose of this with wgEncodeGencodeSourceFreeList(). */ + +struct wgEncodeGencodeSource *wgEncodeGencodeSourceLoadAllByChar(char *fileName, char chopper); +/* Load all wgEncodeGencodeSource from chopper separated file. + * Dispose of this with wgEncodeGencodeSourceFreeList(). */ + +#define wgEncodeGencodeSourceLoadAllByTab(a) wgEncodeGencodeSourceLoadAllByChar(a, '\t'); +/* Load all wgEncodeGencodeSource from tab separated file. + * Dispose of this with wgEncodeGencodeSourceFreeList(). */ + +struct wgEncodeGencodeSource *wgEncodeGencodeSourceCommaIn(char **pS, struct wgEncodeGencodeSource *ret); +/* Create a wgEncodeGencodeSource out of a comma separated string. + * This will fill in ret if non-null, otherwise will + * return a new wgEncodeGencodeSource */ + +void wgEncodeGencodeSourceFree(struct wgEncodeGencodeSource **pEl); +/* Free a single dynamically allocated wgEncodeGencodeSource such as created + * with wgEncodeGencodeSourceLoad(). */ + +void wgEncodeGencodeSourceFreeList(struct wgEncodeGencodeSource **pList); +/* Free a list of dynamically allocated wgEncodeGencodeSource's */ + +void wgEncodeGencodeSourceOutput(struct wgEncodeGencodeSource *el, FILE *f, char sep, char lastSep); +/* Print out wgEncodeGencodeSource. Separate fields with sep. Follow last field with lastSep. */ + +#define wgEncodeGencodeSourceTabOut(el,f) wgEncodeGencodeSourceOutput(el,f,'\t','\n'); +/* Print out wgEncodeGencodeSource as a line in a tab-separated file. */ + +#define wgEncodeGencodeSourceCommaOut(el,f) wgEncodeGencodeSourceOutput(el,f,',',','); +/* Print out wgEncodeGencodeSource as a comma separated list including final comma. */ + +/* -------------------------------- End autoSql Generated Code -------------------------------- */ + +#endif /* WGENCODEGENCODESOURCE_H */ +