6992d44bfe238ffb2c2d559b23cf739bee503fda chmalee Fri May 11 15:27:50 2018 -0700 Adding a clear button to phyloPng and changing the default tree, refs #17322 diff --git src/hg/phyloPng/phyloPng.c src/hg/phyloPng/phyloPng.c index 3fc4ce7..811a411 100644 --- src/hg/phyloPng/phyloPng.c +++ src/hg/phyloPng/phyloPng.c @@ -442,53 +442,48 @@ puts("  How many decimal places?"); cartMakeIntVar(cart, "phyloPng_branchDecimals", branchDecimals,1); puts(""); puts("  Multiply branch length by factor?"); cartMakeIntVar(cart, "phyloPng_branchMultiplier", branchMultiplier,5); puts(""); puts("Strip underscore-suffixes?"); cartMakeCheckBox(cart, "phyloPng_undersuff_strip", stripUnderscoreSuff); puts(""); puts("Change dash to space?"); cartMakeCheckBox(cart, "phyloPng_dash_to_space", dashToSpace); puts(""); puts("Change underscore to space?"); cartMakeCheckBox(cart, "phyloPng_under_to_space", underToSpace); puts(""); puts("Wrap in html page?"); cartMakeCheckBox(cart, "phyloPng_htmlPage", htmlPageWrapper); puts(""); puts("Monospace font?"); cartMakeCheckBox(cart, "phyloPng_monospace", monospace); puts(""); printf("TREE:"); puts("

"); puts(""); puts(""); puts(" "); puts(""); + cgiMakeClearButtonNoSubmit("mainForm", "phyloPng_tree"); puts(""); puts(""); puts(""); webNewSection("Notes"); puts( "\n" "1. Length-ruler and length-values cannot be shown unless use-branch-lengths is also checked.
\n" "
\n" "2. If \"Strip underscore-suffixes?\" is checked, underscores and anything following them are stripped from node labels.
\n" "
\n" "3. For backwards compatibility, options exist to convert a dash or underscore to a space in a node label.
\n" "
\n" "4. The tree is in the phastCons or .nh format name:length. Parentheses create a parent.\n" "Parents must have two children. Length is not required if use-branch-lengths is not checked.\n" "The length of the root branch is usually not specified.
\n" @@ -574,30 +569,31 @@ if (stripUnderscoreSuff) printf("&phyloPng_underscores=1"); if (dashToSpace) printf("&phyloPng_dash_to_space=1"); if (underToSpace) printf("&phyloPng_under_to_space=1"); if (monospace) printf("&phyloPng_monospace=1"); puts("\">"); freez(&phyloData); return 0; } + if (!onWeb && phyloData[0] != '(') { int fd = 0; /* default to stdin */ if (!sameString(phyloData,"stdin")) fd = open(phyloData,O_RDONLY); struct dyString *dy = netSlurpFile(fd); if (fd) close(fd); freez(&phyloData); phyloData = dyStringCannibalize(&dy); } /* remove carriage returns which are a side-effect of html forms */ if (strchr(phyloData,'\r')) {