pylogeny.executable module

Defines an interface to manage interfacing with the system for respective application calls and implements some of these for executables such as FastTree and RAxML. Currently requires a UNIX-like environment (e.g., Mac OS X or a Linux-based environment).

class pylogeny.executable.aTemporaryDirectory(dir=None)[source]

Bases: object

A class intended to be used as a context manager that allows Python to run in a temporary directory for a finite period of time.

__init__(dir=None)[source]
class pylogeny.executable.consel(treeset, alignment, name)[source]

Bases: pylogeny.executable.executable

Denotes a single run of the CONSEL workflow in order to acquire a confidence interval and perform an AU test on a set of trees. Requires CONSEL to be installed.

__init__(treeset, alignment, name)[source]
getInstructionString()[source]

Get the instruction string.

Returns:a string (of a UNIX command)
getInterval()[source]

Compute the AU test. Return the interval of trees as a tree set.

Returns:a tree.treeSet object
getRejected()[source]

If an AU test has already been performed, return the set of trees that were rejected by the test.

Returns:a tree.treeSet object or None if no test was done yet
pylogeny.executable.exeExists(cmd)[source]

Determines whether a function exists in a UNIX environment.

class pylogeny.executable.executable[source]

Bases: object

An abstract class for the instantation and running of a single instance for a given application.

exeName = None
getInstructionString()[source]
run()[source]

Perform a run of this application.

class pylogeny.executable.fasttree(inp_align, out_file=None, isProtein=True)[source]

Bases: pylogeny.executable.executable

Denotes a single run of the FastTree executable in order to acquire an approximate maximum likelihood tree for the input alignment. See http://www.microbesonline.org/fasttree/ for more information on FastTree. Requires FastTree to be installed.

__init__(inp_align, out_file=None, isProtein=True)[source]
exeName = 'fasttree'
getInstructionString()[source]
class pylogeny.executable.raxml(inp_align, out_file, model=None, is_Protein=True, interTrees=False, alg=None, startingTree=None, rapid=False, slow=False, optimizeBootstrap=False, numboot=100, log=None, wdir=None)[source]

Bases: pylogeny.executable.executable

Denotes a single run of the RAxML executable. See http://sco.h-its.org/exelixis/software.html for more information on RAxML. Requires RAxML to be installed.

__init__(inp_align, out_file, model=None, is_Protein=True, interTrees=False, alg=None, startingTree=None, rapid=False, slow=False, optimizeBootstrap=False, numboot=100, log=None, wdir=None)[source]
exeName = 'raxmlHPC'
getInstructionString()[source]
runFunction(alg)[source]
class pylogeny.executable.rspr(treeA, treeB, algorithm='', overlap=True)[source]

Bases: pylogeny.executable.executable

Denotes a single run of the rSPR executable by Dr. Chris Whidden (2014), a software package for computing rooted subtree-prune-and-regraft (SPR) distances. See http://kiwi.cs.dal.ca/Software/RSPR. Requires the executable to be on PATH.

RSPR_ALG_APPROX = '-approx'
RSPR_ALG_BB = '-bb'
RSPR_ALG_DEFAULT = ''
RSPR_ALG_FPT = '-fpt'
__init__(treeA, treeB, algorithm='', overlap=True)[source]

Algorithm choices are defined in this class. If overlap is set to True, will attempt to consolidate taxa names such that they are overlapping (otherwise, RSPR will return an error if they do not match).

exeName = 'rspr'
getInstructionString()[source]
getSPRDistance()[source]
class pylogeny.executable.treepuzzle(ali, treefile)[source]

Bases: pylogeny.executable.executable

Wrap TREE-PUZZLE in order to create an intermediate file for CONSEL to read and assign confidence to a set of trees. Requires TREE-PUZZLE to be installed.

__init__(ali, treefile)[source]
exeName = 'puzzle'
getInstructionString()[source]
getSiteLikelihoodFile()[source]

Previous topic

pylogeny.database module

Next topic

pylogeny.heuristic module

This Page