ea5b4301814c1df9f2a0f3b2d9e0d2f06b22635e
braney
  Tue May 24 18:37:10 2016 -0700
hgTables support , some display changes, and a better hgc
page for longTabix

diff --git src/hg/hgTables/hgTables.c src/hg/hgTables/hgTables.c
index 30e3ea2..ca1c7eb 100644
--- src/hg/hgTables/hgTables.c
+++ src/hg/hgTables/hgTables.c
@@ -557,58 +557,62 @@
 	char buf[256];
 	safef(buf, sizeof(buf), "%s_%s", chrom, table);
 	return cloneString(buf);
 	}
     }
 }
 
 struct hTableInfo *hubTrackTableInfo(struct trackDb *tdb)
 /* Given trackDb entry for a hub track, wrap table info around it. */
 {
 struct hTableInfo *hti = NULL;
 if (tdb->subtracks == NULL)
     {
     if (startsWithWord("bigBed", tdb->type) || startsWithWord("bigGenePred", tdb->type))
 	hti = bigBedToHti(tdb->table, NULL);
+    else if (startsWithWord("longTabix", tdb->type))
+	hti = longTabixToHti(tdb->table);
     else if (startsWithWord("bam", tdb->type))
 	hti = bamToHti(tdb->table);
     else if (startsWithWord("vcfTabix", tdb->type))
 	hti = vcfToHti(tdb->table, TRUE);
     }
 if (hti == NULL)
     {
     AllocVar(hti);
     hti->rootName = cloneString(tdb->track);
     hti->isPos = TRUE;
     hti->type = cloneString(tdb->type);
     }
 return hti;
 }
 
 struct hTableInfo *maybeGetHti(char *db, char *table, struct sqlConnection *conn)
 /* Return primary table info, but don't abort if table not there. Conn should be open to db. */
 {
 struct hTableInfo *hti = NULL;
 boolean isTabix = FALSE;
 
 if (isHubTrack(table))
     {
     struct trackDb *tdb = hashMustFindVal(fullTableToTdbHash, table);
     hti = hubTrackTableInfo(tdb);
     }
 else if (isBigBed(database, table, curTrack, ctLookupName))
     hti = bigBedToHti(table, conn);
+else if (isLongTabixTable(table))
+    hti = longTabixToHti(table);
 else if (isBamTable(table))
     hti = bamToHti(table);
 else if (isVcfTable(table, &isTabix))
     {
     boolean isTabix = trackIsType(database, table, curTrack, "vcfTabix", ctLookupName);
     hti = vcfToHti(table, isTabix);
     }
 else if (isCustomTrack(table))
     {
     struct customTrack *ct = ctLookupName(table);
     hti = ctToHti(ct);
     }
 else if (sameWord(table, WIKI_TRACK_TABLE))
     {
     hti = wikiHti();
@@ -1155,55 +1159,59 @@
     }
 
 /* Do some error diagnostics for user. */
 if (outCount == 0)
     explainWhyNoResults(f);
 hashFree(&idHash);
 }
 
 
 void doTabOutTable( char *db, char *table, FILE *f, struct sqlConnection *conn, char *fields)
 /* Do tab-separated output on fields of a single table. */
 {
 boolean isTabix = FALSE;
 if (isBigBed(database, table, curTrack, ctLookupName))
     bigBedTabOut(db, table, conn, fields, f);
+else if (isLongTabixTable(table))
+    longTabixTabOut(db, table, conn, fields, f);
 else if (isBamTable(table))
     bamTabOut(db, table, conn, fields, f);
 else if (isVcfTable(table, &isTabix))
     vcfTabOut(db, table, conn, fields, f, isTabix);
 else if (isCustomTrack(table))
     {
     doTabOutCustomTracks(db, table, conn, fields, f);
     }
 else
     doTabOutDb(db, db, table, table, f, conn, fields);
 }
 
 struct slName *fullTableFields(char *db, char *table)
 /* Return list of fields in db.table.field format. */
 {
 char dtBuf[256];
 struct sqlConnection *conn=NULL;
 struct slName *fieldList = NULL, *dtfList = NULL, *field, *dtf;
 if (isBigBed(database, table, curTrack, ctLookupName))
     {
     if (!trackHubDatabase(database))
 	conn = hAllocConn(db);
     fieldList = bigBedGetFields(table, conn);
     hFreeConn(&conn);
     }
+else if (isLongTabixTable(table))
+    fieldList = getLongTabixFields(6);
 else if (isHalTable(table))
     fieldList = getBedFields(6);
 else if (isBamTable(table))
     fieldList = bamGetFields(table);
 else if (isVcfTable(table, NULL))
     fieldList = vcfGetFields(table);
 else if (isCustomTrack(table))
     {
     struct customTrack *ct = ctLookupName(table);
     char *type = ct->dbTrackType;
     if (type != NULL)
         {
 	conn = hAllocConn(CUSTOM_TRASH);
 	if (startsWithWord("maf", type) || startsWithWord("makeItems", type) || sameWord("bedDetail", type) || sameWord("pgSnp", type))
 	    fieldList = sqlListFields(conn, ct->dbTableName);