ff6ca2d3f51184034c9430ce91dd15773d2d661e
tdreszer
  Wed Oct 5 09:20:07 2011 -0700
More screw tightening.  Encode peaks are not configurable unless there are additional trackDb settings that say so.
diff --git src/hg/lib/trackDbCustom.c src/hg/lib/trackDbCustom.c
index 0f1f0bc..8e5dbad 100644
--- src/hg/lib/trackDbCustom.c
+++ src/hg/lib/trackDbCustom.c
@@ -689,34 +689,31 @@
 
 if(startsWith("wigMaf", type))
     cType = cfgWigMaf;
 else if(startsWith("wig", type))
     cType = cfgWig;
 else if(startsWith("bigWig", type))
     cType = cfgWig;
 else if(startsWith("bedGraph", type))
     cType = cfgWig;
 else if(startsWith("netAlign", type)
      || startsWith("net", tdb->track)) // SPECIAL CASE from hgTrackUi which might not be needed
     cType = cfgNetAlign;
 else if(sameWord("bed5FloatScore",       type)
      || sameWord("bed5FloatScoreWithFdr",type))
     cType = cfgBedScore;
-else if(sameWord("narrowPeak",type)
-     || sameWord("broadPeak", type)
-     || sameWord("encodePeak",type)
-     || sameWord("gappedPeak",type))
+else if(encodePeakHasCfgUi(tdb))
     cType = cfgPeak;
 else if(startsWithWord("genePred",type))
         cType = cfgGenePred;
 else if(sameWord("bedLogR",type)
      || sameWord("peptideMapping", type))
     cType = cfgBedScore;
 else if(startsWithWord("bed", type))
     {
     char *words[3];
     int wordCount = chopLine(cloneString( type), words);
     if (trackDbSetting(tdb, "bedFilter") != NULL)
 	   cType = cfgBedFilt;
     else if ((atoi(words[1]) >= 5 || trackDbSetting(tdb, "scoreMin") != NULL)
          && (wordCount == 3 || !tdbIsTrackUiTopLevel(tdb))) // Historically needed 'bed n .'
         {