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</OPTION>\n", ot->label); } hPrintf("</SELECT>\n"); hPrintf(" "); hPrintf("<DIV style='display:none; opacity:0.9; border: 1px solid #EEE; margin: 2px; padding: 4px' id='gffNote'>" "<b>Note:</b> Table Browser GTF files contain transcripts, but no gene identifiers or symbols.<br> " "If you are looking for fully formatted " "gene model files for use in genome analysis pipelines,<br>check the " "<a href='https://hgdownload.soe.ucsc.edu/goldenPath/%s/bigZips/genes'>bigZips/genes</a> " "directory on our download server.</DIV>", database); +hPrintf("<DIV style='display:none; opacity:0.9; border: 1px solid #EEE; margin: 2px; padding: 4px' id='wigNote'>" + "<b>Signal data points format:</b> The Table Browser at the moment outputs signal track data points in wiggle text format. " + "If you need the output in BED/bedGraph format, use our <a href=\"../goldenPath/help/bigWig.html#Extract\" " + "target=_blank>bigWigToBedGraph</a> command line tool or contact us at genome@soe.ucsc.edu if that poses a problem.</div>"); 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) {