677b513b231891e30d32024de7ded7766ef72058
braney
  Wed May 24 14:09:42 2017 -0700
add mathWig track type which is an arithmetic combination of bigWi.

diff --git src/hg/lib/trackHub.c src/hg/lib/trackHub.c
index b6b31f9..3b7487f 100644
--- src/hg/lib/trackHub.c
+++ src/hg/lib/trackHub.c
@@ -771,49 +771,56 @@
 
     if (!(trackDbSetting(tdb, "compositeTrack") ||
           trackDbSetting(tdb, "container") || 
 	  isSuper))
         {
 	errAbort("Parent track %s is not compositeTrack, container, or superTrack in hub %s genome %s", 
 		tdb->track, hub->url, genome->name);
 	}
     }
 else
     {
     /* Check type field. */
     char *type = requiredSetting(hub, genome, tdb, "type");
     if (!( isCustomComposite(tdb) && startsWithWord("wig", type)))
         {
+        if (startsWithWord("mathWig", type) )
+            {
+            requiredSetting(hub, genome, tdb, "mathDataUrl");
+            }
+        else 
+            {
             if (!(startsWithWord("bigWig", type) ||
               startsWithWord("bigBed", type) ||
 #ifdef USE_HAL
               startsWithWord("pslSnake", type) ||
               startsWithWord("halSnake", type) ||
 #endif
               startsWithWord("vcfTabix", type) ||
               startsWithWord("bigPsl", type) ||
               startsWithWord("bigMaf", type) ||
               startsWithWord("longTabix", type) ||
               startsWithWord("bigGenePred", type) ||
               startsWithWord("bigChain", type) ||
               startsWithWord("bigBarChart", 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);
         }
     }
 }
 
 static void markContainers( struct trackHub *hub, 
     struct trackHubGenome *genome, struct trackDb *tdbList)
 /* Mark containers that are parents, or have them. */
 {
 struct hash *hash = hashNew(0);
 struct trackDb *tdb;
 
 // add all the track names to a hash