5de752e3fa6fd4941978107956e2a87b4c5b46ee kate Thu Jul 16 12:04:16 2015 -0700 Add support for GTEX tissue color scheme. refs #15645 diff --git src/hg/inc/gtexTissue.h src/hg/inc/gtexTissue.h index da70f00..4c035a3 100644 --- src/hg/inc/gtexTissue.h +++ src/hg/inc/gtexTissue.h @@ -1,41 +1,56 @@ /* gtexTissue.h was originally generated by the autoSql program, which also * generated gtexTissue.c and gtexTissue.sql. This header links the database and * the RAM representation of objects. */ #ifndef GTEXTISSUE_H #define GTEXTISSUE_H +#include "jksql.h" #define GTEXTISSUE_NUM_COLS 5 extern char *gtexTissueCommaSepFieldNames; struct gtexTissue /* GTEx tissue information */ { struct gtexTissue *next; /* Next in singly linked list. */ unsigned id; /* internal id */ char *name; /* short UCSC identifier */ char *description; /* GTEX tissue type detail */ char *organ; /* GTEX tissue collection area */ unsigned color; /* GTEX assigned color */ }; void gtexTissueStaticLoad(char **row, struct gtexTissue *ret); /* Load a row from gtexTissue table into ret. The contents of ret will * be replaced at the next call to this function. */ +struct gtexTissue *gtexTissueLoadByQuery(struct sqlConnection *conn, char *query); +/* Load all gtexTissue 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 gtexTissueFreeList(). */ + +void gtexTissueSaveToDb(struct sqlConnection *conn, struct gtexTissue *el, char *tableName, int updateSize); +/* Save gtexTissue 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 gtexTissue *gtexTissueLoad(char **row); /* Load a gtexTissue from row fetched with select * from gtexTissue * from database. Dispose of this with gtexTissueFree(). */ struct gtexTissue *gtexTissueLoadAll(char *fileName); /* Load all gtexTissue from whitespace-separated file. * Dispose of this with gtexTissueFreeList(). */ struct gtexTissue *gtexTissueLoadAllByChar(char *fileName, char chopper); /* Load all gtexTissue from chopper separated file. * Dispose of this with gtexTissueFreeList(). */ #define gtexTissueLoadAllByTab(a) gtexTissueLoadAllByChar(a, '\t'); /* Load all gtexTissue from tab separated file. * Dispose of this with gtexTissueFreeList(). */