Skip to content
Perl scripts for manipulating output from phylogenetic MCMC software (MrBayes, BEAST, PhyloBayes, etc)
Perl HTML OpenEdge ABL
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Perl script for printing and manipulating MrBayes tree files (.t, .con), MrBayes parameter files (.p), or other Nexus-formatted tree files. Also tested with output from BEAST/BEAST2 (.trees, .log), and PhyloBayes (.trace, .treelist).

Written by:

Johan Nylander


(See documentaion for more)

  • Burnin 10 trees --burnin=10 data.t > out.t
  • Burnin 50% --pburnin=50 data.t
  • Get trees 11 to 30 --start=11 --end=30 data.t
  • Thin by sampling every 10th tree --jump=10 data.t
  • Get trees only --treesonly data.t
  • Get info on samples (after the burnin of 10) --getinfo -b=10 data.t
  • Remove branch lengths from trees --rmbrlens data.t
  • Remove comments from trees --rmcomments data.t
  • Sample every tree with prob 0.5 --ifeellucky=0.50 data.t
  • Burnin 10, thin by 10, trees only, remove branch lengths -b=10 -j=10 -t -rmb data.t
  • Burnin 10 from a parameter file -b=10 data.p
  • Burnin 10, remove headers from a parameter file --treesonly -b=10 data.p
  • Convert trees to altnexus format --format=altnexus data.t
  • Convert trees to Phylip (Newick) format, save to file -f=phylip --outfile=data.phy data.t
  • Get second tree from MrBayes .con.tre file in Phylip format -f=p -b=1 data.con.tre
  • Change branch length format from scientific to numerical (three decimals) --sci2norm=3 data.con.tre


  • -- the Perl script

  • burntrees.txt -- documentation in text format

  • burntrees.html -- documentation in html format

  • -- Perl script for concatenating files using

  • catmb.txt -- documentation in text format

  • catmb.html -- documentation in html format

  • data.t, data.p -- test data

Get started

Make sure the file is executable (chmod +x and



Perl script for concatenating several MCMC runs.

In order for to work, must be installed in the PATH. Alternatively, the full path to can be specified by editing (Then chmod +x and

You can’t perform that action at this time.