15973bdabacf5ddf5dd9289d05e83a7cd4080dbb
braney
  Tue Nov 9 09:12:48 2021 -0800
support for bigRmsk from Robert Hubley robert.hubley@isbscience.org

diff --git src/hg/lib/trackHub.c src/hg/lib/trackHub.c
index ebc9352..043a4cd 100644
--- src/hg/lib/trackHub.c
+++ src/hg/lib/trackHub.c
@@ -990,47 +990,49 @@
 		tdb->track, hub->url, genome->name);
 	}
     }
 else
     {
     /* Check type field. */
     char *type = requiredSetting(hub, genome, tdb, "type");
     if (! isCustomComposite(tdb))
         {
         if (startsWithWord("mathWig", type) )
             {
             requiredSetting(hub, genome, tdb, "mathDataUrl");
             }
         else 
             {
+            /* RMH: Added bigRmsk to support RepeatMasker data in bigBed track hub format */
             if (!(startsWithWord("wig", type)||  startsWithWord("bedGraph", type)))
                 {
                 if (!(startsWithWord("bigWig", type) ||
                   startsWithWord("bigBed", type) ||
 #ifdef USE_HAL
                   startsWithWord("pslSnake", type) ||
                   startsWithWord("halSnake", type) ||
 #endif
                   startsWithWord("vcfTabix", type) ||
                   startsWithWord("vcfPhasedTrio", type) ||
                   startsWithWord("bigPsl", type) ||
                   startsWithWord("bigMaf", type) ||
                   startsWithWord("longTabix", type) ||
                   startsWithWord("bigGenePred", type) ||
                   startsWithWord("bigNarrowPeak", type) ||
                   startsWithWord("bigChain", type) ||
                   startsWithWord("bigLolly", type) ||
+                  startsWithWord("bigRmsk", type) ||
                   startsWithWord("bigBarChart", type) ||
                   startsWithWord("bigInteract", type) ||
                   startsWithWord("hic", type) ||
                   startsWithWord("bigDbSnp", type) ||
                   startsWithWord("bam", type)))
                     {
                     errAbort("Unsupported type '%s' in hub %s genome %s track %s", type,
                         hub->url, genome->name, tdb->track);
                     }
                 requiredSetting(hub, genome, tdb, "bigDataUrl");
                 }
             }
 
         if (sameString("barChart", type) || sameString("bigBarChart", type))
             requireBarChartBars(hub, genome, tdb);
@@ -1389,35 +1391,36 @@
     char *type = trackDbRequiredSetting(tdb, "type");
     char *bigDataUrl = trackHubRelativeUrl(genome->trackDbFile, relativeUrl);
 
     char *bigDataIndex = NULL;
     char *relIdxUrl = trackDbSetting(tdb, "bigDataIndex");
     if (relIdxUrl != NULL)
         bigDataIndex = trackHubRelativeUrl(genome->trackDbFile, relIdxUrl);
 
     verbose(2, "checking %s.%s type %s at %s\n", genome->name, tdb->track, type, bigDataUrl);
     if (startsWithWord("bigWig", type))
         {
         /* Just open and close to verify file exists and is correct type. */
         struct bbiFile *bbi = bigWigFileOpen(bigDataUrl);
         bbiFileClose(&bbi);
         }
+    /* RMH: Added support for bigRmsk track hub data type */
     else if (startsWithWord("bigNarrowPeak", type) || startsWithWord("bigBed", type) ||
                 startsWithWord("bigGenePred", type)  || startsWithWord("bigPsl", type)||
                 startsWithWord("bigChain", type)|| startsWithWord("bigMaf", type) ||
                 startsWithWord("bigBarChart", type) || startsWithWord("bigInteract", type) ||
-                startsWithWord("bigLolly", type))
+                startsWithWord("bigLolly", type) || startsWithWord("bigRmsk",type))
         {
         /* Just open and close to verify file exists and is correct type. */
         struct bbiFile *bbi = bigBedFileOpen(bigDataUrl);
         char *typeString = cloneString(type);
         nextWord(&typeString);
         if (startsWithWord("bigBed", type) && (typeString != NULL))
             {
             unsigned numFields = sqlUnsigned(nextWord(&typeString));
             if (numFields > bbi->fieldCount)
                 errAbort("fewer fields in bigBed (%d) than in type statement (%d) for track %s with bigDataUrl %s", bbi->fieldCount, numFields, trackHubSkipHubName(tdb->track), bigDataUrl);
             }
         bbiFileClose(&bbi);
         }
     else if (startsWithWord("vcfTabix", type) || startsWithWord("vcfPhasedTrio", type))
         {