Package Bio :: Package Phylo :: Package PAML :: Module codeml :: Class Codeml
[hide private]
[frames] | no frames]

Class Codeml

source code

object --+    
         |    
_paml.Paml --+
             |
            Codeml

This class implements an interface to CODEML, part of the PAML package.

Instance Methods [hide private]
 
__init__(self, alignment=None, tree=None, working_dir=None, out_file=None)
Initialize the codeml instance.
source code
 
write_ctl_file(self)
Dynamically build a CODEML control file from the options.
source code
 
read_ctl_file(self, ctl_file)
Parse a control file and load the options into the Codeml instance.
source code
 
print_options(self)
Print out all of the options and their current settings.
source code
 
_set_rel_paths(self)
Convert all file/directory locations to paths relative to the current working directory.
source code
 
run(self, ctl_file=None, verbose=False, command='codeml', parse=True)
Run codeml using the current configuration and then parse the results.
source code

Inherited from _paml.Paml: get_all_options, get_option, set_options

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

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

source code 
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.

Overrides: object.__init__

write_ctl_file(self)

source code 
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.

Overrides: _paml.Paml.write_ctl_file

read_ctl_file(self, ctl_file)

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

Overrides: _paml.Paml.read_ctl_file

print_options(self)

source code 
Print out all of the options and their current settings.

Overrides: _paml.Paml.print_options

_set_rel_paths(self)

source code 
Convert all file/directory locations to paths relative to the current working directory.

CODEML requires that all paths specified in the control file be
relative to the directory from which it is called rather than
absolute paths.

Overrides: _paml.Paml._set_rel_paths

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

source code 
Run codeml using the current configuration and then parse the results.

Return a process signal so the user can determine if
the execution was successful (return code 0 is successful, -N
indicates a failure). The arguments may be passed as either
absolute or relative paths, despite the fact that CODEML
requires relative paths.

Overrides: _paml.Paml.run