def run(self, ctl_file=None, verbose=False, command="yn00", parse=True): Paml.run(self, ctl_file, verbose, command) if parse: results = read(self.out_file) else: results = None return results
def run(self, ctl_file = None, verbose = False, command = "yn00", parse = True): Paml.run(self, ctl_file, verbose, command) if parse: results = read(self.out_file) else: results = None return results
def _set_rel_paths(self): """Convert all file/directory locations to paths relative to the current working directory. BASEML requires that all paths specified in the control file be relative to the directory from which it is called rather than absolute paths. """ Paml._set_rel_paths(self) if self.tree is not None: self._rel_tree = _relpath(self.tree, self.working_dir)
def _set_rel_paths(self): """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. """ Paml._set_rel_paths(self) if self.tree is not None: self._rel_tree = _relpath(self.tree, self.working_dir)
def __init__(self, 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. """ Paml.__init__(self, alignment, working_dir, out_file) if tree is not None: if not os.path.exists(tree): raise IOError("The specified tree file does not exist.") self.tree = tree self.ctl_file = "codeml.ctl" self._options = { "noisy": None, "verbose": None, "runmode": None, "seqtype": None, "CodonFreq": None, "ndata": None, "clock": None, "aaDist": None, "aaRatefile": None, "model": None, "NSsites": None, "icode": None, "Mgene": None, "fix_kappa": None, "kappa": None, "fix_omega": None, "omega": None, "fix_alpha": None, "alpha": None, "Malpha": None, "ncatG": None, "getSE": None, "RateAncestor": None, "Small_Diff": None, "cleandata": None, "fix_blength": None, "method": None, "rho": None, "fix_rho": None }
def __init__(self, alignment = None, working_dir = None, out_file = None): """Initialize the Yn00 instance. The user may optionally pass in strings specifying the locations of the input alignment, the working directory and the final output file. """ Paml.__init__(self, alignment, working_dir, out_file) self.ctl_file = "yn00.ctl" self._options = {"verbose": None, "icode": None, "weighting": None, "commonf3x4": None, "ndata": None}
def __init__(self, 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. """ Paml.__init__(self, alignment, working_dir, out_file) if tree is not None: if not os.path.exists(tree): raise IOError, "The specified tree file does not exist." self.tree = tree self.ctl_file = "codeml.ctl" self._options = {"noisy": None, "verbose": None, "runmode": None, "seqtype": None, "CodonFreq": None, "ndata": None, "clock": None, "aaDist": None, "aaRatefile": None, "model": None, "NSsites": None, "icode": None, "Mgene": None, "fix_kappa": None, "kappa": None, "fix_omega": None, "omega": None, "fix_alpha": None, "alpha": None, "Malpha": None, "ncatG": None, "getSE": None, "RateAncestor": None, "Small_Diff": None, "cleandata": None, "fix_blength": None, "method": None, "rho": None, "fix_rho": None}
def __init__(self, alignment=None, tree=None, working_dir=None, out_file=None): """Initialize the Baseml 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. """ Paml.__init__(self, alignment, working_dir, out_file) if tree is not None: if not os.path.exists(tree): raise IOError("The specified tree file does not exist.") self.tree = tree self.ctl_file = "baseml.ctl" self._options = { "noisy": None, "verbose": None, "runmode": None, "model": None, "model_options": None, "Mgene": None, "ndata": None, "clock": None, "fix_kappa": None, "kappa": None, "fix_alpha": None, "alpha": None, "Malpha": None, "ncatG": None, "fix_rho": None, "rho": None, "nparK": None, "nhomo": None, "getSE": None, "RateAncestor": None, "Small_Diff": None, "cleandata": None, "icode": None, "fix_blength": None, "method": None }
def run(self, ctl_file=None, verbose=False, command="baseml", parse=True): """Run baseml 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 BASEML requires relative paths. """ if self.tree is None: raise ValueError("Tree file not specified.") if not os.path.exists(self.tree): raise IOError("The specified tree file does not exist.") Paml.run(self, ctl_file, verbose, command) if parse: results = read(self.out_file) else: results = None return results
def run(self, ctl_file = None, verbose = False, command = "codeml", parse = True): """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. """ if self.tree is None: raise ValueError, "Tree file not specified." if not os.path.exists(self.tree): raise IOError, "The specified tree file does not exist." Paml.run(self, ctl_file, verbose, command) if parse: results = read(self.out_file) else: results = None return results
def __init__(self, alignment = None, tree = None, working_dir = None, out_file = None): """Initialize the Baseml 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. """ Paml.__init__(self, alignment, working_dir, out_file) if tree is not None: if not os.path.exists(tree): raise IOError, "The specified tree file does not exist." self.tree = tree self.ctl_file = "baseml.ctl" self._options = {"noisy": None, "verbose": None, "runmode": None, "model": None, "model_options": None, "Mgene": None, "ndata": None, "clock": None, "fix_kappa": None, "kappa": None, "fix_alpha": None, "alpha": None, "Malpha": None, "ncatG": None, "fix_rho": None, "rho": None, "nparK": None, "nhomo": None, "getSE": None, "RateAncestor": None, "Small_Diff": None, "cleandata": None, "icode": None, "fix_blength": None, "method": None}