2b92068862c6ab7a42e909ea5c914d67c953122a max Thu Feb 9 02:09:23 2023 -0800 tweak wiggle output in TB, remove the BED option and add a note helping users who don't know the wiggle data format. refs #30585 diff --git src/hg/hgTables/mainPage.c src/hg/hgTables/mainPage.c index 242d096..a74c918 100644 --- src/hg/hgTables/mainPage.c +++ src/hg/hgTables/mainPage.c @@ -383,41 +383,49 @@ if (sameString(ot->name, outputType)) hPrintf(" SELECTED"); if (sameString(ot->name, outBed) || sameString(ot->name, outWigBed)) hPrintf(" id=\"outBed\""); hPrintf(">%s\n", ot->label); } hPrintf("\n"); hPrintf(" "); hPrintf("", database); +hPrintf(""); hPrintf(" "); -jsInline("function checkGtfNote(event) {\n" - "if (document.getElementById('outputTypeDropdown').value==='gff')\n" +// we should make an hgTables.js one day, this is ugly +jsInline("function checkOutputNotes(event) {\n" + "var outType=document.getElementById('outputTypeDropdown').value;\n" + "if (outType==='gff')\n" " document.getElementById('gffNote').style.display='';\n" + "else if (outType==='wigData')\n" + " document.getElementById('wigNote').style.display='';\n" "else\n" - " document.getElementById('gffNote').style.display='none';\n" + " $('.outputNote').hide();\n" // a lot shorter with Jquery than without "}\n" - "$(document).ready(checkGtfNote);\n" + "$(document).ready(checkOutputNotes);\n" ); -jsAddEventForId("change", "outputTypeDropdown", "checkGtfNote"); +jsAddEventForId("change", "outputTypeDropdown", "checkOutputNotes"); jsInline("function checkSnpTablesNote(event) {\n" "var trackName = document.getElementById('hgta_track').value;\n" "if (trackName.startsWith('dbSnp') || trackName.startsWith('snp'))\n" " document.getElementById('snpTablesNote').style.display='';\n" "else\n" " document.getElementById('snpTablesNote').style.display='none';\n" "}\n" "$(document).ready(checkSnpTablesNote);\n" ); jsAddEventForId("change", "outputTypeDropdown", "checkSnpTablesNote"); jsInlineF("function checkForCsv(event) {\n" "var outputType = document.getElementById('outputTypeDropdown').value;\n" "if (outputType === 'primaryTable' || outputType === 'selectedFields') {\n" @@ -494,31 +502,31 @@ if (isBedGr) { if (! bedifiedOnly) { slAddTail(&otList, &otAllFields); slAddTail(&otList, &otSelected); } slAddTail(&otList, &otWigData); slAddTail(&otList, &otWigBed); slAddTail(&otList, &otCustomTrack); slAddTail(&otList, &otHyperlinks); } else if (isWig) { slAddTail(&otList, &otWigData); - slAddTail(&otList, &otWigBed); + // slAddTail(&otList, &otWigBed); removed in 2022 as output is not bedgraph and has no data points slAddTail(&otList, &otCustomTrack); // hyperlinks output works for db-wiggle but not for bigWig } else if (isHalSnake) { slAddTail(&otList, &otMaf); } else if (isMaf) { slAddTail(&otList, &otMaf); if (! bedifiedOnly) slAddTail(&otList, &otAllFields); } else if (isChromGraphCt) {