e14906744b1316f4d4c2abc81b69168ac070d5ad
max
  Wed Feb 5 03:10:21 2020 -0800
adding note about precooked gtf files to table browser, refs #24810

diff --git src/hg/hgTables/mainPage.c src/hg/hgTables/mainPage.c
index b78cd71..1c93157 100644
--- src/hg/hgTables/mainPage.c
+++ src/hg/hgTables/mainPage.c
@@ -363,43 +363,61 @@
 {
 struct outputType *ot;
 char *outputType = cartUsualString(cart, hgtaOutputType, otList->name);
 if (otDefault != NULL && otDefault != otList)
     {
     boolean otInOtList = FALSE;
     for (ot = otList; ot != NULL; ot = ot->next)
 	if (sameString(ot->name, outputType))
 	    {
 	    otInOtList = TRUE;
 	    break;
 	    }
     if (! otInOtList)
 	outputType = otDefault->name;
     }
-hPrintf("<SELECT NAME=\"%s\">", hgtaOutputType);
+hPrintf("<SELECT id='outputTypeDropdown' NAME=\"%s\">", hgtaOutputType);
 for (ot = otList; ot != NULL; ot = ot->next)
     {
     hPrintf(" <OPTION VALUE=%s", ot->name);
     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("</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/%s/bigZips/genes'>bigZips/genes</a> "
+        "directory on our download server.</DIV>", database);
+hPrintf(" ");
+
+jsInline("function checkGtfNote() {"
+    "if (document.getElementById('outputTypeDropdown').value==='gff') "
+    "    document.getElementById('gffNote').style.display=''; "
+    "else "
+    "    document.getElementById('gffNote').style.display='none'; "
+    "}"
+    "$(document).ready(checkGtfNote);\n"
+);
+jsOnEventById("change", "outputTypeDropdown", "checkGtfNote()");
+
 if (!cfgOptionBooleanDefault("hgta.disableSendOutput", FALSE))
     {
     hPrintf(" Send output to ");
     struct dyString *dy = dyStringNew(256);
     dyStringAppend(dy, 
 	"document.getElementById('checkboxGreat').checked=false;");
     if (isGenomeSpaceEnabled())
 	dyStringAppend(dy, 
 	      	  "document.getElementById('checkboxGenomeSpace').checked=false;");
     dyStringAppend(dy, 
 	      	  "return true;");
     cgiMakeCheckBoxWithId("sendToGalaxy", doGalaxy(), "checkboxGalaxy");
     jsOnEventById("click", "checkboxGalaxy", dy->string);
     hPrintf("<A HREF=\""GALAXY_URL_BASE"\" target=_BLANK>Galaxy</A>\n");
     nbSpaces(2);