b6d356738ffdf5562cc71d22bacbfa1f0c5c65c4
angie
  Tue Sep 12 16:16:04 2023 -0700
Add linkout (per subtree) to MicrobeTrace (in addition to Nextstrain) if subtreeSize is at most 500.

diff --git src/hg/hgPhyloPlace/hgPhyloPlace.c src/hg/hgPhyloPlace/hgPhyloPlace.c
index e77277f..740553e 100644
--- src/hg/hgPhyloPlace/hgPhyloPlace.c
+++ src/hg/hgPhyloPlace/hgPhyloPlace.c
@@ -222,30 +222,39 @@
 "}\n"
 "td.qcFail {\n"
 "    background-color: #ff6666;\n"
 "}\n"
 ".gbSectionBannerLarge {\n"
 "    padding: 10px;\n"
 "    margin-top: 6px;\n"
 "    margin-right: 0;\n"
 "    background-color: #4c759c;  /* light blue */\n"
 "    color: white;\n"
 "    font-weight: bold;\n"
 "    font-size: 22px;\n"
 "}\n"
 "h2 { font-size: 18px; }\n"
 "h3 { font-size: 16px; }\n"
+"table.invisalign {\n"
+"    border: 0px;\n"
+"}\n"
+"table.invisalign td {\n "
+"    padding: 5px;\n"
+"}\n"
+"button.fullwidth {\n "
+"    width: 100%;\n"
+"}\n"
 "</style>\n"
      );
 
 
 
 // Container for bootstrap grid layout
 puts(
 "<div class='container-fluid'>\n");
 }
 
 static void newPageEndStuff()
 {
 puts(
 "</div>");
 jsIncludeFile("utils.js", NULL);
@@ -288,33 +297,37 @@
        seqFileVar, seqFileVar);
 printf("</p><p>or paste in sequence names/IDs:<br>\n");
 cgiMakeTextArea(pastedIdVar, "", 10, 70);
 struct treeChoices *treeChoices = loadTreeChoices(db);
 if (treeChoices)
     {
     puts("</p><p>");
     printf("Phylogenetic tree version: ");
     char *phyloPlaceTree = cartOptionalString(cart, "phyloPlaceTree");
     cgiMakeDropListWithVals("phyloPlaceTree", treeChoices->descriptions, treeChoices->protobufFiles,
                             treeChoices->count, phyloPlaceTree);
     }
 puts("</p><p>");
 printf("Number of samples per subtree showing sample placement: ");
 int subtreeSize = cartUsualInt(cart, "subtreeSize", 50);
-cgiMakeIntVarWithLimits("subtreeSize", subtreeSize,
-                        "Number of samples in subtree showing neighborhood of placement",
-                        5, 10, 5000);
+struct dyString *dy = dyStringCreate("Number of samples in subtree showing neighborhood of "
+                                     "placement (max: %d", MAX_SUBTREE_SIZE);
+if (microbeTraceHost() != NULL)
+    dyStringPrintf(dy, "; max for MicrobeTrace: %d)", MAX_MICROBETRACE_SUBTREE_SIZE);
+else
+    dyStringAppend(dy, ")");
+cgiMakeIntVarWithLimits("subtreeSize", subtreeSize, dy->string, 5, 10, MAX_SUBTREE_SIZE);
 puts("</p><p>");
 cgiMakeOnClickSubmitButton(CHECK_FILE_OR_PASTE_INPUT_JS(seqFileVar, pastedIdVar),
                            "submit", "Upload");
 char *exampleFile = phyloPlaceDbSettingPath(db, "exampleFile");
 if (isNotEmpty(exampleFile))
     {
     puts("&nbsp;&nbsp;");
     cgiMakeOnClickSubmitButton("{ loadingImage.run(); return true; }",
                                "exampleButton", "Upload Example File");
     if (sameString(db, "wuhCor1"))
         {
         puts("&nbsp;&nbsp;");
         puts("<a href='https://github.com/russcd/USHER_DEMO/' target=_blank>More example files</a>");
         }
     }