Bio.Phylo.PAML.codeml module

Classes for the support of CODEML.

Maximum likelihood analysis using codon substitution models.

exception Bio.Phylo.PAML.codeml.CodemlError

Bases: OSError

CODEML failed. Run with verbose=True to view CODEML’s error message.

class Bio.Phylo.PAML.codeml.Codeml(alignment=None, tree=None, working_dir=None, out_file=None)

Bases: Paml

An interface to CODEML, part of the PAML package.

__init__(alignment=None, tree=None, working_dir=None, out_file=None)

Initialize the codeml instance.

The user may optionally pass in strings specifying the locations of the input alignment and tree files, the working directory and the final output file. Other options found in the CODEML control have typical settings by default to run site class models 0, 1 and 2 on a nucleotide alignment.

write_ctl_file()

Dynamically build a CODEML control file from the options.

The control file is written to the location specified by the ctl_file property of the codeml class.

read_ctl_file(ctl_file)

Parse a control file and load the options into the Codeml instance.

print_options()

Print out all of the options and their current settings.

run(ctl_file=None, verbose=False, command='codeml', parse=True)

Run codeml using the current configuration.

If parse is True then read and return the results, otherwise return None.

The arguments may be passed as either absolute or relative paths, despite the fact that CODEML requires relative paths.

Bio.Phylo.PAML.codeml.read(results_file)

Parse a CODEML results file.