f3c7b669da695e4919410f08f0a3f6fa21778796 braney Thu Feb 15 15:13:10 2024 -0800 get hgTrackUi to do the right thing if "type bigBed" is specified. diff --git src/hg/lib/trackDbCustom.c src/hg/lib/trackDbCustom.c index 6ff6c00..0f9c8f0 100644 --- src/hg/lib/trackDbCustom.c +++ src/hg/lib/trackDbCustom.c @@ -712,60 +712,66 @@ cType = cfgInteract; else if (startsWith("bigLolly", type)) cType = cfgLollipop; else if (startsWith("bigRmsk", type)) cType = cfgBigRmsk; else if (sameWord("bigDbSnp", type)) cType = cfgBigDbSnp; else if(startsWith("longTabix", type)) cType = cfgLong; 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)) { - if (bedScoreHasCfgUi(tdb)) + if (bedScoreHasCfgUi(tdb, FALSE)dd ) cType = cfgBedScore; } else if (encodePeakHasCfgUi(tdb)) cType = cfgPeak; else if (startsWithWord("genePred",type) && !startsWith("encodeGencodeRaceFrags", tdb->track)) // SPECIAL CASE should fix in trackDb! cType = cfgGenePred; else if (sameWord("bedLogR",type) || sameWord("peptideMapping", type)) cType = cfgBedScore; // This is a catch-all for big* types that are not special-cased above. big* types after this // point are assumed to be flavors of bigBed. else if (startsWith("bed ", type) || startsWith("big", type) || startsWith("bedDetail", type)) { if (trackDbSetting(tdb, "bedFilter") != NULL) cType = cfgBedFilt; else if (!startsWith("big", type) || startsWith("bigBed", type)) { char *words[3]; int wordCount = chopLine(cloneString( type), words); - if (( ((wordCount > 1) && (atoi(words[1]) >= 5)) + if (sameString("bigBed", type) && (wordCount == 1)) // no following words + { + cType = cfgBedScore; + if (!bedScoreHasCfgUi(tdb, TRUE)) + cType = cfgNone; + } + else if (( ((wordCount > 1) && (atoi(words[1]) >= 5)) || trackDbSetting(tdb, "scoreMin") != NULL) && // Historically needed 'bed n .' but encode didn't follow bed n . ( (wordCount >= 3) || (!tdbIsTrackUiTopLevel(tdb) && trackDbSettingClosestToHome(tdb, "wgEncode")))) { cType = cfgBedScore; - if (!bedScoreHasCfgUi(tdb)) + if (!bedScoreHasCfgUi(tdb, FALSE)) cType = cfgNone; // FIXME: UGLY SPECIAL CASE should be handled in trackDb! else if (startsWith("encodeGencodeIntron", tdb->track)) cType = cfgNone; } } else cType = cfgBedScore; } else if (startsWith("bam", type)) cType = cfgBam; else if (sameWord("vcfPhasedTrio", type) || sameWord("vcfTabix",type) || sameWord("vcf", type)) cType = cfgVcf; else if (sameWord("halSnake",type))