56aff44eacee07bc3679dd18fe70ad621f6142d5 hiram Mon Sep 1 23:45:50 2025 -0700 allow stdin as argument to asciiTree and updated perl issues for binaryTree diff --git src/hg/utils/phyloTrees/binaryTree.pl src/hg/utils/phyloTrees/binaryTree.pl index ae6a11c7ea3..346587ba353 100755 --- src/hg/utils/phyloTrees/binaryTree.pl +++ src/hg/utils/phyloTrees/binaryTree.pl @@ -61,31 +61,32 @@ # This 'string' becomes the internal node 'name' of this branch, and # the distance is recorded. The 'parent' of this branch becomes # the 'current' node. # 4 effectively ignoring the commas. They are supposed to mean the next # element goes into the left, but we are keeping track of this # with the nextLeft boolean. The polytomys are a series of elements # more than two, with commas at the ends of the element names # # Tree print: recursive function: # 1. if right pointer exists output ( and print right tree then # if left pointer, output )nodeName:length, and print left tree # 2. no pointers, this is a leaf, print name:length when parent right # pointer got here, else print ,name:length when left pointer got here use strict; -use warnings; +use warnings FATAL => 'all'; +no warnings 'recursion'; use Getopt::Long; ############################################################################## sub usage() { printf STDERR "usage: binaryTree.pl [options] file.phy options: -noInternal - do not output internal node names -defaultDistance=0.1 - use this distance when not given in input -allDistances=0.1 - use this distance for everything, default use input -lineOutput - output one line per leaf output, indented per depth -quoteNames - add 'quotes' on node names, default not quoted -nameTranslate=<file> - two column file, translate names from input file, first column is name in input file, second column is output name tab separation columns -bothNames - during nameTranslate, use both names in output: name1/name2