33c3087e49e2af7bbad960879e12797933ea7ab5 kate Thu Feb 11 17:15:04 2016 -0800 Make GTEx V6 the default. refs #16545 diff --git src/hg/lib/gtexInfo.c src/hg/lib/gtexInfo.c index e307845..ed99419 100644 --- src/hg/lib/gtexInfo.c +++ src/hg/lib/gtexInfo.c @@ -177,41 +177,40 @@ { 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 *gtexVersion(char *table) +/* Return version string based on table suffix */ +{ +char *suffix = gtexVersionSuffix(table); +// Currently the V4 tables have no suffix +return (sameString(suffix, "")) ? GTEX_DEFAULT_VERSION : suffix; +} + double gtexMaxMedianScore(char *version) /* Retrieve max median score for latest (or named) version */ { char query[1024]; struct sqlConnection *conn = hAllocConn("hgFixed"); if (!conn) return 0; // TODO: trackDB setting for this if (!version || sameString(version, "")) - version = "V4"; + version = GTEX_DEFAULT_VERSION; sqlSafef(query, sizeof query, "select maxMedianScore from gtexInfo where version='%s'", version); double score = sqlQuickDouble(conn, query); if (score == 0.0) errAbort("Internal error: GTEx version \"%s\" not found in gtexInfo table", version); hFreeConn(&conn); return score; } - -char *gtexVersion(char *table) -/* Return version string based on table suffix */ -{ -char *suffix = gtexVersionSuffix(table); -// Currently the V4 tables have no suffix -return (sameString(suffix, "")) ? "V4" : suffix; -} -