ba33f2c600399d5b4b97dd5fd987ed2db3c891ba chmalee Tue May 19 13:40:42 2026 -0700 myVariants related fixes from code review. Standardize how the code determines we are about to do something myVariants related by #defining some strings and using sameOk to check for them, remove a dead code block, and have hgc use autoSql to load the myVariants item rather than check the raw sql result, refs #37528 diff --git src/hg/lib/trackDbCustom.c src/hg/lib/trackDbCustom.c index f01d44c8ac6..77927d3a81d 100644 --- src/hg/lib/trackDbCustom.c +++ src/hg/lib/trackDbCustom.c @@ -7,30 +7,31 @@ #include #include "common.h" #include "linefile.h" #include "jksql.h" #include "trackDb.h" #include "hdb.h" #include "hui.h" #include "ra.h" #include "hash.h" #include "net.h" #include "sqlNum.h" #include "obscure.h" #include "hgMaf.h" #include "customTrack.h" +#include "myVariants.h" #include "regexHelper.h" #include "fieldedTable.h" #include "tagRepo.h" struct trackDb *trackDbNew() /* Allocate a new trackDb with just very minimal stuff filled in. */ { struct trackDb *tdb; AllocVar(tdb); tdb->canPack = 2; /* Unknown value. */ return tdb; } int trackDbCmp(const void *va, const void *vb) /* Compare to sort based on priority; use shortLabel as secondary sort key. @@ -221,31 +222,31 @@ struct hashEl *hel; struct hashCookie hc = hashFirst(overTd->overrides); while ((hel = hashNext(&hc)) != NULL) { overrideField(td, overTd, hel->name); } } static boolean packableType(char *type) /* Return TRUE if we can pack this type. */ { char *t = cloneString(type); char *s = firstWordInLine(t); boolean canPack = (sameString("psl", s) || sameString("chain", s) || sameString("bed", s) || sameString("genePred", s) || - sameString("myVariants", s) || + isMyVariantsType(s) || sameString("expRatio", s) || sameString("wigMaf", s) || sameString("factorSource", s) || sameString("bed5FloatScore", s) || sameString("bed6FloatScore", s) || sameString("altGraphX", s) || sameString("bam", s) || sameString("bedDetail", s) || sameString("bed8Attrs", s) || sameString("gvf", s) || sameString("vcfTabix", s) || sameString("vcf", s) || sameString("pgSnp", s) || sameString("narrowPeak", s) || sameString("broadPeak", s) || sameString("bigLolly", s) || sameString("bedMethyl", s) || sameString("bigRmsk", s) || sameString("peptideMapping", s) || sameString("barChart", s) || sameString("interact", s) || sameString("hic", s) || (!startsWithWord("bigWig", s) && startsWith("big", s)) ); freeMem(t);