{"id":25977616,"url":"https://github.com/nylander/burntrees","last_synced_at":"2025-03-05T04:38:44.525Z","repository":{"id":3348379,"uuid":"4393229","full_name":"nylander/Burntrees","owner":"nylander","description":"Perl scripts for manipulating output from phylogenetic MCMC software (MrBayes, BEAST, PhyloBayes, etc) ","archived":false,"fork":false,"pushed_at":"2020-04-15T16:43:21.000Z","size":108,"stargazers_count":10,"open_issues_count":2,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-10-20T22:08:50.920Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"akonwi/git-plus","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nylander.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-05-21T12:18:45.000Z","updated_at":"2023-08-01T11:33:41.000Z","dependencies_parsed_at":"2022-09-16T04:41:00.920Z","dependency_job_id":null,"html_url":"https://github.com/nylander/Burntrees","commit_stats":null,"previous_names":[],"tags_count":4,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nylander%2FBurntrees","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nylander%2FBurntrees/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nylander%2FBurntrees/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nylander%2FBurntrees/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nylander","download_url":"https://codeload.github.com/nylander/Burntrees/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241966988,"owners_count":20050324,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-05T04:38:43.843Z","updated_at":"2025-03-05T04:38:44.519Z","avatar_url":"https://github.com/nylander.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Burntrees\n\nPerl script for printing and manipulating output from phylogenetic MCMC\nprograms.\n\nCurrently, the script will handle tree- and parameters files from\n[MrBayes](https://github.com/NBISweden/MrBayes) (.t, .con, .p),\n[BEAST](http://beast.bio.ed.ac.uk/)/[BEAST2](http://beast2.org/) (.trees,\n.log), and [PhyloBayes](http://www.phylobayes.org/) (.trace, .treelist).\n\nThe script may also be able to handle other Newick- or Nexus-formatted tree\nfiles.\n\nFor usage and examples, please see the Documentation below.\n\n\n#### Files:\n\n- `burntrees.pl`   -- main script\n- `catmb.pl`       -- helper script for concatenating files using\n  `burntrees.pl`. In order for `catmb.pl` to work, `burntrees.pl` must be\n  installed in the PATH.  Alternatively, the full path to `burntrees.pl` can be\n  specified by editing `catmb.pl`.\n- `data.t`, `data.p` -- test data\n\n\n## Documentation\n\n\n### NAME\n\nburntrees.pl\n\n### VERSION\n\nDocumentation for burntrees.pl version 0.3.1\n\n### SYNOPSIS\n\n    burntrees.pl [--burnin=\u003cnumber\u003e] [--pburnin=\u003cnumber\u003e] [--start=\u003cnumber\u003e]\n    [--end=\u003cnumber\u003e] [--jump=\u003cnumber\u003e] [--IFeelLucky=\u003cnumber\u003e] [--treesonly]\n    [--rmbrlens] [--rmcomments] [--rmsupport] [-R] [--sci2norm=\u003cnr\u003e]\n    [--seed=\u003cnr\u003e] [--myr] [--[no]close] [--getinfo] [--[no]labels]\n    [--format=altnexus|phylip] [--outfile=\u003cfile_name\u003e] FILE [\u003e OUTPUT]\n\n### DESCRIPTION\n\nScript for manipulating tree (.t, .trprobs, .con, .trees) and\nparameter (.p, .log) files from MrBayes (v.3), BEAST, and PhyloBayes.\n\nThe script extracts trees and (by default) the taxon translation table\nand the trailing \"end;\" from tree file.\n\nA number of options are available:\n\nAny contiguous interval of trees can be printed, as well as trees only\n(nothing other than tree descriptions).\n\nThe samples can be thinned by setting a value for how many trees to jump\nbefore next is printed.\n\nBranch lengths, support values, and comments can be removed from trees\nbefore printing.\n\nBranch lengths in scientific numeric format can be transformed to a\nfixed numeric format.\n\nMrBayes clock trees with branch lengths in substitutions per site can be\ntransformed to branch lengths in time units.\n\nA random set of trees can be printed from the tree file.\n\nLines can also be extracted from a MrBayes .p file.\n\nTrees can be printed in Phylip (Newick) format or as altnexus (sequence\nlabels instead of numbers), that is, the script can serve as an\nefficient tree format converter.\n\n### OPTIONS\n\nMandatory arguments to long options are mandatory for short options too\n\n    -b, --burnin=*number*\n            Start printing after tree *number*.\n\n    -c, --close\n            Forces a trailing \"end;\" to be printed after the last tree.\n            --noclose prevents the \"end;\" to be printed. Note that the\n            trailing \"end;\" in the tree file is printed by default unless\n            --noclose is given.\n\n    -co, --concatenate\n            Concatenate several files -- *Not yet implemented*. See USAGE\n            for alternatives.\n\n    -e, --end=*number*\n            End the printing of trees after tree *number* (inclusively). If\n            no --end is given, prints to last tree in file.\n\n    -f, --format=*format*\n            Trees are printed as specified by *format*, where *format* is\n            either *altnexus*: with sequence (taxon) labels instead of\n            numbers, or *phylip* (the Newick format).\n\n    -g, --getinfo\n            Print information about the number of trees (or samples in p\n            file), thinning, number of samples, presence of branch lengths\n            and support values in file and quit.\n\n    -h, --help\n            Prints help message and exits.\n\n    -i, --IFeelLucky=*number*\n            Specify a probability (value between 0 -- 1) for each tree to be\n            printed. That is, print each tree with prob. *number*. The -i\n            option can be combined with the option -seed to create\n            reproducible results. Note that --IFeelLucky has precedence over\n            --jump.\n\n    -j, --jump=*number*\n            Specify a thinning. That is, print every *number* tree.\n\n    -l, --labels\n            Print trees using sequence (taxon) labels instead of the\n            sequence numbers from the translation table. --nolabels (which\n            is the default) prevents the sequence numbers to be substituted.\n\n    -ma, --man\n            Displays the manual page.\n\n    -my, --myr\n            Transform branch lengths in a MrBayes clock tree from\n            substitutions per site to time units.\n\n    -o, --outfile=*file_name*\n            Print directly to file *file_name* instead of standard out.\n\n    -p, --pburnin=*number*\n            Start printing after a fraction of the run, where *number* is a\n            percentage (e.g. \"50\" for half the run).\n\n    -rmb, --rmbrlens\n            Remove branch lengths from trees.\n\n    -rmc, --rmcomments\n            Remove comments (text within, and the enclosing square brackets)\n            from trees.\n\n    -rms, --rmsupport\n            Remove support values (bootstrap/posterior probabilities) from\n            trees.\n\n    -R      Remove branch lengths, comments, and support values.\n\n    -sc, --sci2norm=*number*\n            Translate branch lengths from scientific to normal or fixed.\n            Change the precision by specifying the (optimal) *number*.\n\n    -se, --seed=*number*\n            Set a seed for the *-i* option to create reproducible sampling\n            results.\n\n    -st, --start=*number*\n            Start printing from tree *number* (inclusively).\n\n    -t, --treesonly\n            Print trees only (do not print taxon descriptions etc.). If used\n            on a *.p file it skips the \"ID\" line and the headers.\n\n    -v, --version\n            Prints version message and exits.\n\n    FILE    Reads a Nexus formatted tree FILE, preferrably MrBayes (v.3)\n            *.t, *.con, and *.trprobs files. FILE can also be a MrBayes\n            parameter file (*.p), or any Nexus formatted tree file, e.g.,\n            output from BEAST or other phylogenetic MCMC software (not\n            thoroughly tested!).\n\n    OUTPUT  Prints to STDOUT unless --outfile= is used.\n\n### USAGE\n\nExamples:\n\n      burntrees.pl --burnin=10 data.t \u003e out.t\n      burntrees.pl --pburnin=50 data.t\n      burntrees.pl --start=11 --end=30 data.t\n      burntrees.pl --jump=10 data.t\n      burntrees.pl --treesonly data.t\n      burntrees.pl --getinfo -b=10 data.t\n      burntrees.pl --rmbrlens data.t\n      burntrees.pl --rmcomments data.t\n      burntrees.pl --ifeellucky=0.50 data.t\n      burntrees.pl -b=10 -j=10 -t -rmb data.t\n      burntrees.pl --treesonly -b=10 data.p\n      burntrees.pl --format=altnexus data.t\n      burntrees.pl -f=phylip --outfile=data.phy data.t\n      burntrees.pl -f=p -b=1 data.con.tre\n\nFor concatenation of several files, use (note the append redirection,\n\"\u003e\u003e\". See also separate script catmb.pl):\n\n      burntrees.pl -b=10 -noc  data.run1.t \u003e  data.t\n      burntrees.pl -b=40 -t    data.run2.t \u003e\u003e data.t\n      burntrees.pl -b=20 -t -c data.run3.t \u003e\u003e data.t\n\nTo print the '#NEXUS', 'begin trees;', and the translation table only\n(no trees), or to print the header in .p, .trace, or .log files, use\n\n      burntrees.pl -i -noc data.t\n\nTo convert a MrBayes file to a 'altnexus' file or a 'phylip' file, use\n\n      burntrees.pl --format=altnexus data.t\n      burntrees.pl --format=phylip data.t\n\nTo concatenate several files in to one altnexus formatted file, use\n(note the combination of '--format' and '--labels')\n\n      burntrees.pl -b=10 -noc  -f=a data.run1.t \u003e  data.t\n      burntrees.pl -b=40 -t    -l   data.run2.t \u003e\u003e data.t\n      burntrees.pl -b=20 -t -c -l   data.run3.t \u003e\u003e data.t\n\nTo extract the 10th tree in phylip format, use\n\n      burntrees.pl --start=10 --end=10 --format=phylip data.t\n\nTo extract the second tree in the MrBayes .con.tre file (simple format)\nin phylip format, use\n\n      burntrees.pl -b=1 -f=p data.con.tre\n\nTo remove comments from tree descriptions (e.g. trees in \"figtree\"\nformat), use\n\n      burntrees.pl --rmcomments data.con.tre\n\nTo remove support values from tree description for the first tree in a\nMrBayes .con.tre file (simple format) while changng branch lengths from\nscientific to normal (three decimals), use\n\n      burntrees.pl --start=1 --end=1 --rmsupport --sci2norm=3 data.con.tre\n\nTo remove branch lengths from tree descriptions, use\n\n      burntrees.pl --rmbrlens data.t\n\nTo remove branch lengths, support values, and comments from tree descriptions, use\n\n      burntrees.pl -R data.t\n\nTo change the branch length format from scientific to numerical (three\ndecimals) use\n\n      burntrees.pl --sci2norm=3 data.con.tre\n\nTo change the MrBayes clock branch length format from substitutions per\nsite to time units (Myr) use\n\n      burntrees.pl --myr clock.t\n      burntrees.pl --myr --rmcomments clock.t\n\nTo (randomly) sample a specific number of trees, use burntrees.pl\ntogether with 'shuf'. Note that you could sample more trees than you\nhave in your tree file (i.e., performing a bootstrap)!\n\n      burntrees.pl -t data.t | shuf -rn 10\n      burntrees.pl -t -f p data.t | shuf -rn 1000\n\n### AUTHOR\n\nWritten by Johan A. A. Nylander\n\n### REPORTING BUGS\n\nPlease report any bugs to *Johan.Nylander @ nbis.se*.\n\n### DEPENDENCIES\n\nUses Perl modules Getopt::Long and Pod::Usage\n\n### DOWNLOAD\n\n\u003chttps://github.com/nylander/Burntrees\u003e\n\n### LICENSE AND COPYRIGHT\n\nCopyright (c) 2006-2020 Johan Nylander\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be included\nin all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n---\n\n### NAME\n\ncatmb.pl\n\n### VERSION\n\nDocumentation for catmb.pl version 0.1.2\n\n### SYNOPSIS\n\n    catmb.pl [--burnin=\u003cnumber\u003e] [--pburnin=\u003cnumber\u003e] [--jump=\u003cnumber\u003e]\n    FILE FILE [...] [\u003e OUTPUT]\n\n### DESCRIPTION\n\nScript for manipulating tree (.t) and parameter (.p) files from\nMrBayes (v.3). This script is a helper for concatenating several files\nin to one (using the same burnin) using the script 'burntrees.pl'.\nburntrees.pl needs to be installed for catmb.pl to work.\n\n### OPTIONS\n\nMandatory arguments to long options are mandatory for short options too\n\n    -b, --burnin=*number*\n            Start printing after tree *number*.\n\n    -p, --pburnin=*number*\n            Start printing after a fraction of the run, where *number* is a\n            percentage (e.g. \"50\" for half the run).\n\n    -j, --jump=*number*\n            Specify a thinning. That is, print every *number* tree.\n\n    FILE    Reads Nexus formatted tree FILEs, preferrably a MrBayes (v.3)\n            *.t file. Can also read and print a MrBayes parameter file (*.p\n            file).\n\n    OUTPUT  Prints to STDOUT.\n\n    -h, --help\n            Prints help message and exits\n\n    -v, --version\n            Prints version message and exits\n\n    -m, --man\n            Displays the manual page\n\n### USAGE\n\nExamples:\n\n      catmb.pl --burnin=10 run1.t run2.t run3.t \u003e out.t\n      catmb.pl --pburnin=50 run1.t run2.t run3.t \u003e out.t\n      catmb.pl --jump=10 run1.t run2.t run3.t \u003e out.t\n\n### AUTHOR\n\nWritten by Johan A. A. Nylander\n\n### REPORTING BUGS\n\nPlease report any bugs to *Johan.Nylander @ nrm.se*.\n\n### DEPENDENCIES\n\nNeeds burntrees.pl to run. Uses Perl modules Getopt::Long and Pod::Usage\n\n### DOWNLOAD\n\n\u003chttps://github.com/nylander/Burntrees\u003e\n\n### LICENSE AND COPYRIGHT\n\nCopyright (c) 2006-2020 Johan Nylander\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be included\nin all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnylander%2Fburntrees","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnylander%2Fburntrees","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnylander%2Fburntrees/lists"}