1084bf14211e7e4ace072d7a213672f3a8f98be1
kate
  Fri Jul 24 17:30:21 2015 -0700
Scale wrt all genes, not just those in window.  We now save the max tissue median score in the gtexInfo table. refs #15645

diff --git src/hg/inc/gtexInfo.h src/hg/inc/gtexInfo.h
new file mode 100644
index 0000000..931376a
--- /dev/null
+++ src/hg/inc/gtexInfo.h
@@ -0,0 +1,71 @@
+/* gtexInfo.h was originally generated by the autoSql program, which also 
+ * generated gtexInfo.c and gtexInfo.sql.  This header links the database and
+ * the RAM representation of objects. */
+
+#ifndef GTEXINFO_H
+#define GTEXINFO_H
+
+#define GTEXINFO_NUM_COLS 3
+
+extern char *gtexInfoCommaSepFieldNames;
+
+struct gtexInfo
+/* GTEx general information */
+    {
+    struct gtexInfo *next;  /* Next in singly linked list. */
+    char *version;	/* GTEX data release (e.g. V4, V6) */
+    char *releaseDate;	/* Release date */
+    double maxMedianScore;	/* Maximum score observed for a tissue median (use to scale display) */
+    };
+
+void gtexInfoStaticLoad(char **row, struct gtexInfo *ret);
+/* Load a row from gtexInfo table into ret.  The contents of ret will
+ * be replaced at the next call to this function. */
+
+struct gtexInfo *gtexInfoLoad(char **row);
+/* Load a gtexInfo from row fetched with select * from gtexInfo
+ * from database.  Dispose of this with gtexInfoFree(). */
+
+struct gtexInfo *gtexInfoLoadAll(char *fileName);
+/* Load all gtexInfo from whitespace-separated file.
+ * Dispose of this with gtexInfoFreeList(). */
+
+struct gtexInfo *gtexInfoLoadAllByChar(char *fileName, char chopper);
+/* Load all gtexInfo from chopper separated file.
+ * Dispose of this with gtexInfoFreeList(). */
+
+#define gtexInfoLoadAllByTab(a) gtexInfoLoadAllByChar(a, '\t');
+/* Load all gtexInfo from tab separated file.
+ * Dispose of this with gtexInfoFreeList(). */
+
+struct gtexInfo *gtexInfoCommaIn(char **pS, struct gtexInfo *ret);
+/* Create a gtexInfo out of a comma separated string. 
+ * This will fill in ret if non-null, otherwise will
+ * return a new gtexInfo */
+
+void gtexInfoFree(struct gtexInfo **pEl);
+/* Free a single dynamically allocated gtexInfo such as created
+ * with gtexInfoLoad(). */
+
+void gtexInfoFreeList(struct gtexInfo **pList);
+/* Free a list of dynamically allocated gtexInfo's */
+
+void gtexInfoOutput(struct gtexInfo *el, FILE *f, char sep, char lastSep);
+/* Print out gtexInfo.  Separate fields with sep. Follow last field with lastSep. */
+
+#define gtexInfoTabOut(el,f) gtexInfoOutput(el,f,'\t','\n');
+/* Print out gtexInfo as a line in a tab-separated file. */
+
+#define gtexInfoCommaOut(el,f) gtexInfoOutput(el,f,',',',');
+/* Print out gtexInfo as a comma separated list including final comma. */
+
+/* -------------------------------- End autoSql Generated Code -------------------------------- */
+
+void gtexInfoCreateTable(struct sqlConnection *conn, char *table);
+/* Create GTEx info table */
+
+double gtexMaxMedianScore(char *version);
+/* Retrieve max median score for latest (or named) version */
+
+#endif /* GTEXINFO_H */
+