0f62f220d9099e6db7b4f3423caf5e0595831f4c
braney
  Wed Jul 16 16:43:36 2025 -0700
add table browser support for bedMethyl

diff --git src/hg/hgTables/custom.c src/hg/hgTables/custom.c
index 1b8559883fb..068ed7cd015 100644
--- src/hg/hgTables/custom.c
+++ src/hg/hgTables/custom.c
@@ -487,45 +487,48 @@
 struct customTrack *ct = ctLookupName(name);
 struct bedFilter *bf = NULL;
 struct bed *bedList = NULL;
 struct hash *idHash = NULL;
 struct region *region;
 int fieldCount;
 
 if (ct == NULL)
     errAbort("Can't find custom track %s", name);
 char *type = ct->dbTrackType;
 
 if (type != NULL && (startsWithWord("makeItems", type) || 
         sameWord("bedDetail", type) || 
         sameWord("barChart", type) || 
         sameWord("interact", type) || 
+        sameWord("bedMethyl", type) || 
         sameWord("pgSnp", type)))
     {
     struct sqlConnection *conn = hAllocConn(CUSTOM_TRASH);
     bedList = dbGetFilteredBedsOnRegions(conn, CUSTOM_TRASH, db, ct->dbTableName, name,
     	regionList, lm, retFieldCount);
     hFreeConn(&conn);
     fieldCount = 9;
     if (sameWord("bedDetail", type))
         fieldCount = *retFieldCount;
     else if (sameWord("pgSnp", type))
         fieldCount = 4;
     else if (sameWord("barChart", type))
         fieldCount = 6;
     else if (sameWord("interact", type))
         fieldCount = 5;
+    else if (sameWord("bedMethyl", type))
+        fieldCount = 5;
     }
 else if (ct->wiggle)
     {
     struct bed *wigBedList = NULL, *bed;
 
     /* Grab filtered beds for each region. */
     for (region = regionList; region != NULL; region = region->next)
 	{
 	wigBedList = getWiggleAsBed(NULL, name, region, NULL, NULL, lm, NULL);
 	for (bed = wigBedList; bed != NULL; bed = bed->next)
 	    {
 	    struct bed *copy = lmCloneBed(bed, lm);
 	    slAddHead(&bedList, copy);
 	    }
 	/*bedFree(&wigBedList); do not free local memory*/
@@ -594,30 +597,31 @@
 if (count == 0)
     explainWhyNoResults(f);
 }
 
 void doTabOutCustomTracks(char *db, char *table, struct sqlConnection *conn,
 	char *fields, FILE *f, char outSep)
 /* Print out selected fields from custom track.  If fields
  * is NULL, then print out all fields. */
 {
 struct customTrack *ct = ctLookupName(table);
 char *type = ct->tdb->type;
 if (startsWithWord("makeItems", type) || 
         sameWord("bedDetail", type) || 
         sameWord("barChart", type) ||
         sameWord("interact", type) ||
+        sameWord("bedMethyl", type) ||
         sameWord("pgSnp", type))
     {
     struct sqlConnection *conn = hAllocConn(CUSTOM_TRASH);
     doTabOutDb(CUSTOM_TRASH, db, ct->dbTableName, table, f, conn, fields, outSep);
     hFreeConn(&conn);
     }
 else
     doTabOutBedLike(ct, table, conn, fields, f, outSep);
 }
 
 
 void removeNamedCustom(struct customTrack **pList, char *name)
 /* Remove named custom track from list if it's on there. */
 {
 struct customTrack *newList = NULL, *ct, *next;