e1988a798585c610e2399538a900fd57cfa83d63
galt
  Tue Apr 22 11:19:22 2025 -0700
Fixes VCF does not work on extended case-color options in Get DNA for vcf, vcfTabix, and vcfPhasedTrio. fixes #16386

diff --git src/hg/lib/featureBits.c src/hg/lib/featureBits.c
index b3be45c444f..a155f388447 100644
--- src/hg/lib/featureBits.c
+++ src/hg/lib/featureBits.c
@@ -118,42 +118,64 @@
 return fetchQualifiers("endAll", qualifier, extra, retSize);
 }
 
 static boolean utr3Qualifier(char *qualifier, char *extra, int *retSize)
 /* Return TRUE if it's a utr3 qualifier. */
 {
 return fetchQualifiers("utr3", qualifier, extra, retSize);
 }
 
 static boolean utr5Qualifier(char *qualifier, char *extra, int *retSize)
 /* Return TRUE if it's a utr5 qualifier. */
 {
 return fetchQualifiers("utr5", qualifier, extra, retSize);
 }
 
+static struct hTableInfo *vcfToHti(char *table, boolean isTabix)
+/* Get standard fields of VCF into hti structure. */
+{
+struct hTableInfo *hti;
+AllocVar(hti);
+hti->rootName = cloneString(table);
+hti->isPos= TRUE;
+strcpy(hti->chromField, "chrom");
+strcpy(hti->startField, "pos");
+strcpy(hti->nameField, "id");
+hti->type = cloneString(isTabix ? "vcfTabix" : "vcf");
+return hti;
+}
 
 
 boolean fbUnderstandTrack(char *db, struct trackDb *tdb)
 /* Return TRUE if can turn track into a set of ranges or bits. */
 {
 if (startsWith("bigWig", tdb->type)) 
     return FALSE;
 
+
 if ((tdb != NULL) && startsWith("big", tdb->type) && !startsWith("bigWig", tdb->type)) 
 	return TRUE;
 
-struct hTableInfo *hti = hFindTableInfo(db, NULL, tdb->table);
+struct hTableInfo *hti = NULL;
+
+
+if (sameString("vcfTabix", tdb->type) || sameString("vcfPhasedTrio", tdb->type))
+    hti = vcfToHti(tdb->table, TRUE);
+else if (sameString("vcf", tdb->type))
+    hti = vcfToHti(tdb->table, FALSE);
+else
+    hti = hFindTableInfo(db, NULL, tdb->table);
 
 if (hti == NULL)
     return FALSE;
 else
     return hti->isPos;
 }
 
 static void fbAddFeature(char *db, struct featureBits **pList, char *name,
 	char *chrom, int start, int size, char strand, 
 	int winStart, int winEnd)
 /* Add new feature to head of list.  Name can be NULL. */
 {
 struct featureBits *fb;
 int s, e;
 char nameBuf[512];