6c19a52350eb826034160d10f751358437bedd93
angie
  Wed Aug 2 12:04:54 2017 -0700
Root names of split table sets, e.g. intronEst for chr*_intronEst, were falling into the !hTableExists check in maybeGetHti and were mistakenly given hti with root name as table name.  Instead of assuming that any 'table' that does not exist as a table is bigWig, check for bigWig similarly to the way we check for other bigFile types and create a more accurate hti.  refs #19930

diff --git src/hg/lib/hdb.c src/hg/lib/hdb.c
index a35e977..aa9d1fc 100644
--- src/hg/lib/hdb.c
+++ src/hg/lib/hdb.c
@@ -3225,61 +3225,30 @@
 	else if (hti->endField[0] != 0)
 	    hti->type = cloneString("bed 3");
 	else
 	    {
 	    hti->type = cloneString("chromGraph");
 	    safef(hti->endField, sizeof(hti->endField), "%s+1",
 	    	hti->startField);
 	    }
 	}
     else
 	hti->type = NULL;
     }
 return hti;
 }
 
-struct hTableInfo *hFindBigWigTrackInfo(char *db, char *chrom, char *rootName)
-/* Get track information on a big* file that has no table */
-{
-struct sqlConnection *conn;
-conn = hAllocConn(db);
-static struct hash *dbHash = NULL; 
-struct hash *hash;
-struct hTableInfo *hti;
-char fullName[HDB_MAX_TABLE_STRING];
-chrom = hDefaultChrom(db);
-dbHash = newHash(8);
-hash = hashFindVal(dbHash, db);
-if (hash == NULL)
-    {
-    hash = newHash(8);
-    hashAdd(dbHash, db, hash);
-    }
-if ((hti = hashFindVal(hash, rootName)) == NULL)
-    {
-    safecpy(fullName, sizeof(fullName), rootName);
-    safef(fullName, sizeof(fullName), "%s_%s", chrom, rootName);
-    AllocVar(hti);
-    hashAddSaveName(hash, rootName, hti, &hti->rootName);
-    hti->isSplit = FALSE;
-    hFreeConn(&conn);
-    return hti; 
-    }
-hFreeConn(&conn);
-return hti; 
-}
-
 int hTableInfoBedFieldCount(struct hTableInfo *hti)
 /* Return number of BED fields needed to save hti. */
 {
 if (hti->hasBlocks)
     return 12;
 else if (hti->hasCDS)
     return 8;
 else if (hti->strandField[0] != 0)
     return 6;
 else if (hti->scoreField[0] != 0)
     return 5;
 else if (hti->nameField[0] != 0)
     return 4;
 else
     return 3;