Back to index

python-biopython  1.60
Classes | Functions
Bio.Phylo.PAML.codeml Namespace Reference

Classes

class  CodemlError
class  Codeml

Functions

def read

Class Documentation

class Bio::Phylo::PAML::codeml::CodemlError
CODEML has failed. Run with verbose = True to view CODEML's error
message

Definition at line 14 of file codeml.py.


Function Documentation

def Bio.Phylo.PAML.codeml.read (   results_file)
Parse a CODEML results file.

Definition at line 197 of file codeml.py.

00197 
00198 def read(results_file):
00199     """Parse a CODEML results file."""
00200     results = {}
00201     if not os.path.exists(results_file):
00202         raise IOError, "Results file does not exist."
00203     handle = open(results_file)
00204     lines = handle.readlines()
00205     handle.close()
00206     (results, multi_models, multi_genes) = _parse_codeml.parse_basics(lines, 
00207             results)
00208     results = _parse_codeml.parse_nssites(lines, results, multi_models, 
00209             multi_genes)
00210     results = _parse_codeml.parse_pairwise(lines, results)
00211     results = _parse_codeml.parse_distances(lines, results)
00212     if len(results) == 0:
00213         raise ValueError, "Invalid results file"
00214     return results

Here is the call graph for this function:

Here is the caller graph for this function: