RAxMLΒΆ

The raxml module provides the RaxmlRunner class, which is a lighweight (i.e., mostly “pass-through”) wrapper to the RAxML maximum-likelihood tree estimation program. RAxML needs to be installed in the system for this class to be used.

The class handles the exporting of the DendroPy dataset in a format suitable for RAxML analysis, and re-reading the resulting tree back into a DendroPy object.

The basic call assumes nucleotide data and estimates a tree under the GTRCAT model:

#! /usr/bin/env python
# -*- coding: utf-8 -*-

import dendropy
from dendropy.interop import raxml

data = dendropy.DnaCharacterMatrix.get(
    path="pythonidae.nex",
    schema="nexus")
rx = raxml.RaxmlRunner()
tree = rx.estimate_tree(
        char_matrix=data,
        raxml_args=["--no-bfgs"])
print(tree.as_string(schema="newick"))

Currently, the only way to customize the call to the underlying RAxML program using estimate_tree is to pass it a list of command-line arguments, with each argument token a separate list element. So, for example, to include invariant sites in the substitutio model and run 250 independent tree searches:

>>> tree = rx.estimate_tree(data, ['-m', 'GTRCATI', '-N', '250'])

Obviously, while this works, it is neither ideal nor very Pythonic. Future releases will polish up the interface.

Previous topic

PAUP

Next topic

DendroPy Library Reference

Documentation

Obtaining

DiscussionGoogle Groups

Join the " DendroPy Users" group to follow and participate in discussion, troubleshooting, help, information, suggestions, etc. on the usage and development of the DendroPy phylogenetic computing library.

Enter your e-mail address in the box above and click the "subscribe" button to subscribe to the "dendropy-users" group, or click here to visit this group page directly.

AnnouncementsGoogle Groups

Join the " DendroPy Announcements" group to receive announcements of new releases, updates, changes and other news of interest to DendroPy users and developers.

Enter your e-mail address in the box above and click the "subscribe" button to subscribe to the " dendropy-announce" group, or click here to visit this group page directly.

DevelopmentGitHub

  • Issues - Report bugs or request features
  •  Watch - Follow development activity
  •   Fork - Contribute and collaborate
  •   Star - Throw some glitter, add some glamour