a67410efc5799d4df0cf424a5bd5b3c9dd5ab7f7 kate Thu Feb 4 20:10:09 2016 -0800 Load GTEx V6 gene table in hg19. refs #15645 diff --git src/hg/inc/gtexTranscript.h src/hg/inc/gtexTranscript.h new file mode 100644 index 0000000..422a059 --- /dev/null +++ src/hg/inc/gtexTranscript.h @@ -0,0 +1,79 @@ +/* gtexTranscript.h was originally generated by the autoSql program, which also + * generated gtexTranscript.c and gtexTranscript.sql. This header links the database and + * the RAM representation of objects. */ + +#ifndef GTEXTRANSCRIPT_H +#define GTEXTRANSCRIPT_H + +#include "jksql.h" +#define GTEXTRANSCRIPT_NUM_COLS 2 + +extern char *gtexTranscriptCommaSepFieldNames; + +struct gtexTranscript +/* GTEx Transcript */ + { + struct gtexTranscript *next; /* Next in singly linked list. */ + char *geneId; /* Ensembl Gene ID */ + char *transcriptName; /* Ensembl Transcript Name */ + }; + +void gtexTranscriptStaticLoad(char **row, struct gtexTranscript *ret); +/* Load a row from gtexTranscript table into ret. The contents of ret will + * be replaced at the next call to this function. */ + +struct gtexTranscript *gtexTranscriptLoadByQuery(struct sqlConnection *conn, char *query); +/* Load all gtexTranscript from table that satisfy the query given. + * Where query is of the form 'select * from example where something=something' + * or 'select example.* from example, anotherTable where example.something = + * anotherTable.something'. + * Dispose of this with gtexTranscriptFreeList(). */ + +void gtexTranscriptSaveToDb(struct sqlConnection *conn, struct gtexTranscript *el, char *tableName, int updateSize); +/* Save gtexTranscript as a row to the table specified by tableName. + * As blob fields may be arbitrary size updateSize specifies the approx size + * of a string that would contain the entire query. Arrays of native types are + * converted to comma separated strings and loaded as such, User defined types are + * inserted as NULL. This function automatically escapes quoted strings for mysql. */ + +struct gtexTranscript *gtexTranscriptLoad(char **row); +/* Load a gtexTranscript from row fetched with select * from gtexTranscript + * from database. Dispose of this with gtexTranscriptFree(). */ + +struct gtexTranscript *gtexTranscriptLoadAll(char *fileName); +/* Load all gtexTranscript from whitespace-separated file. + * Dispose of this with gtexTranscriptFreeList(). */ + +struct gtexTranscript *gtexTranscriptLoadAllByChar(char *fileName, char chopper); +/* Load all gtexTranscript from chopper separated file. + * Dispose of this with gtexTranscriptFreeList(). */ + +#define gtexTranscriptLoadAllByTab(a) gtexTranscriptLoadAllByChar(a, '\t'); +/* Load all gtexTranscript from tab separated file. + * Dispose of this with gtexTranscriptFreeList(). */ + +struct gtexTranscript *gtexTranscriptCommaIn(char **pS, struct gtexTranscript *ret); +/* Create a gtexTranscript out of a comma separated string. + * This will fill in ret if non-null, otherwise will + * return a new gtexTranscript */ + +void gtexTranscriptFree(struct gtexTranscript **pEl); +/* Free a single dynamically allocated gtexTranscript such as created + * with gtexTranscriptLoad(). */ + +void gtexTranscriptFreeList(struct gtexTranscript **pList); +/* Free a list of dynamically allocated gtexTranscript's */ + +void gtexTranscriptOutput(struct gtexTranscript *el, FILE *f, char sep, char lastSep); +/* Print out gtexTranscript. Separate fields with sep. Follow last field with lastSep. */ + +#define gtexTranscriptTabOut(el,f) gtexTranscriptOutput(el,f,'\t','\n'); +/* Print out gtexTranscript as a line in a tab-separated file. */ + +#define gtexTranscriptCommaOut(el,f) gtexTranscriptOutput(el,f,',',','); +/* Print out gtexTranscript as a comma separated list including final comma. */ + +/* -------------------------------- End autoSql Generated Code -------------------------------- */ + +#endif /* GTEXTRANSCRIPT_H */ +