96962227b59e566541cf63670087bbed487a4682
kate
  Mon Apr 27 15:37:26 2020 -0700
Straighten out tables names wrt versioning and add track for GTEx Gene track update to V8 (final). refs #25130

diff --git src/hg/lib/gtexInfo.c src/hg/lib/gtexInfo.c
index 7220b14..96b4c3a 100644
--- src/hg/lib/gtexInfo.c
+++ src/hg/lib/gtexInfo.c
@@ -178,34 +178,45 @@
 char query[1024];
 
 sqlSafef(query, sizeof(query),
 "CREATE TABLE %s (\n"
 "    version varchar(255) not null,	# GTEX data release (e.g. V4, V6)\n"
 "    releaseDate varchar(255) not null,	# Release date\n"
 "    maxScore double not null,	# Maximum score observed (use to scale display)\n"
 "    maxMedianScore double not null,	# Maximum score observed for a tissue median (use to scale display)\n"
 "        #Indices\n"
 "    PRIMARY KEY(version)\n"
 ")\n",   table);
 sqlRemakeTable(conn, table, query);
 }
 
 char *gtexVersionSuffix(char *table)
-/* Return version string for a GTEx track table.  For now, just supporting V4 and V6 (default, no suffix )*/                                        
+/* Return version string for a GTEx track table.  Supporting V4, V6, V8 (default, no suffix )*/                                        
 {
-if (table && endsWith(table, "V4"))
+if (table)
+    {
+    if (endsWith(table, "V4"))
         return("V4");
+/* 
+    TODO: Handle default case more generically
+    
+    if (endsWith(table, "V6"))
+        return("V6");
+*/
+    if (endsWith(table, "V8"))
+        return("V8");
+    }
 return("");
 }
 
 char *gtexVersion(char *table)
 /* Return version string based on table suffix. Default version tables have no suffix */
 {
 char *suffix = gtexVersionSuffix(table);
 return (sameString(suffix, "")) ? GTEX_DEFAULT_VERSION : suffix;
 }
 
 char *gtexVersionSuffixFromVersion(char *version)
 /* Return version table suffix for a version */
 {
 if (!version)
     version = GTEX_DEFAULT_VERSION;