beastcommentparser
extracts and formats data from BEAST summary trees for use in downstream analyses.
- Python 2.7
- DendroPy
The simplest way is to use Homebrew. With Homebrew:
brew install python
pip install dendropy
pip install https://github.com/jonchang/beastcommentparser/archive/master.zip
An example BEAST summary tree, arctoid.tree
, is included in the examples/
directory.
bcp.py examples/arctoid.tree
#=> Output written to arctoid.txt
Running the program with only a tree as the argument will create a text file of the same name in the current directory. You can then view this file in a spreadsheet program or analzyze it further in R, Python, etc.
Only report on leaf nodes:
bcp.py --report=leaf examples/arctoid.tree
For more options, consult the help:
python bcp.py --help
There is also preliminary support for summary trees from phylogeographic analyses.