class Bio::PAML::Baseml


Bio::PAML::Baseml is a wrapper for running PAML baseml program.

Because most of the methods in this class are inherited from Bio::PAML::Common, see documents of Bio::PAML::Common for details.


Example 1:

require 'bio'
# Reads multi-fasta formatted file and gets a Bio::Alignment object.
alignment =,
# Reads newick tree from a file
tree =, 'example.tree').tree
# Creates a Baseml object
baseml =
# Sets parameters
baseml.parameters[:runmode] = 0
baseml.parameters[:RateAncestor] = 1
# You can also set many parameters at a time.
baseml.parameters.update({ :alpha => 0.5, :fix_alpha => 0 })
# Executes baseml with the alignment and the tree
report = baseml.query(alignment, tree)



Default parameters when running baseml.

The parameters whose values are different from the baseml defalut value (described in pamlDOC.pdf) in PAML 4.1 are:

seqfile, outfile, treefile, ndata, noisy, verbose

Default program name