TreeAnnotator from command line

3,067 views
Skip to first unread message

mixam85

unread,
Aug 10, 2010, 2:19:38 AM8/10/10
to beast-users
Hi,

How is t possible to use the 'Maximum clade credibility' function of
TreeAnnotator from the command line ( without using the gui ) ?
the -help :
Usage: treeannotator [-heights <keep|median|mean>] [-burnin <i>] [-
limit <r>] [-target <target_file_name>] [-help] <input-file-name>
[<output-file-name>]
-heights an option of 'keep' (default), 'median' or 'mean'
-burnin the number of states to be considered as 'burn-in'
-limit the minimum posterior probability for a node to be annoated
-target specifies a user target tree to be annotated
-help option to print this message

Example: treeannotator test.trees out.txt
Example: treeannotator -burnin 100 -heights mean test.trees out.txt
Example: treeannotator -burnin 100 -target map.tree test.trees
out.txt

Specifies how to use our own target tree but not the 'Maximum clade
credibility'.

Thanks.

Jamie Oaks

unread,
Aug 12, 2010, 9:09:26 AM8/12/10
to beast-users
Hi,

If you don't specify a target tree, treeannotator will default to the
MCC tree, as in the examples in help message. Hope this helps,

Jamie

harish epuri

unread,
Mar 27, 2015, 4:01:36 AM3/27/15
to beast...@googlegroups.com
Hi Jamie,

I have one doubt, how to give "Maximum clade credibility, Maximum sum of clade credibility" in command line 
thanks
harish

Santiago Sanchez

unread,
Mar 27, 2015, 8:36:10 AM3/27/15
to beast...@googlegroups.com
Hi Harish,

First you need the bin executables in your system path. So if you have a Unix based machine it would be in the /usr/bin folder. You would also need to copy the core beast programs (they are in the lib folder) to /usr/lib . Once you have this set up you can call any BEAST program from any command line shell as:

beauti (will open a java GUI)
beast -beagle your.xml
loganalyser your.log
logcombiner -burnin 50000 your.run1.log your.run2.log your.comb.log
treeannotator -burnin 100 -heights mean your.trees your.mcc.tre

Cheers,
Santiago



Santiago Sanchez-Ramirez
Ecology and Evolutionary Biology, University of Toronto
Natural History (Mycology), Royal Ontario Museum
100 Queen's Park
Toronto, ON
M5S 2C6
Canada
--
You received this message because you are subscribed to the Google Groups "beast-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beast-users...@googlegroups.com.
To post to this group, send email to beast...@googlegroups.com.
Visit this group at http://groups.google.com/group/beast-users.
For more options, visit https://groups.google.com/d/optout.

Miller, Mark

unread,
Mar 27, 2015, 8:47:59 AM3/27/15
to beast...@googlegroups.com

Just to add a little more from my recent experience, the instructions below will work as long as the default settings in the shell script are fine.

But in my case, I needed more memory. I found you can also call the program directly,

 

> The command line argument I used is java -Xms296m -Xmx16384m -Djava.library.path="/opt/beast/1.8.1/lib"-cp "/opt/beast/1.8.1/lib/beast.jar" dr.app.tools.TreeAnnotator –burnin 3000 -heights mean test2.trees.txt test2.MCC.tree

> java -Xms296m (this sets the startup jvm space)  -Xmx16384m (this sets the maximum heap space to 16GB)

 

Just replace the path to beast.jar in my implementation “/opt/beast/1.8.1/lib” with the correct path in yours.

 

Mark

Reply all
Reply to author
Forward
0 new messages