Orthologs.Phylogenetics.ETE3PAML
Integration of ETE3 for using PAML’s codeml.
Usage
Orthologs.Phylogenetics.ETE3PAML(
infile,
species_tree,
workdir,
pamlsrc=None,
)M1 model is best for orthology inferences.
Methods
| Name | Description |
|---|---|
| __init__() | Initialize main variables/files to be used. |
| prune_tree() | Prune branches for species not in the alignment file. |
| run() | Run PAML using ETE. |
__init__()
Initialize main variables/files to be used.
Usage
__init__(infile, species_tree, workdir, pamlsrc=None)Ensure that you have the correct path to your codeml binary. It should be in the paml /bin.
Parameters
infile: str-
The input fasta file.
species_tree: str-
The newick-formatted species tree.
workdir: str-
The working directory for input and output.
pamlsrc: (str, optional) = None- The path to your codeml src if not in PATH, defaults to None
prune_tree()
Prune branches for species not in the alignment file.
Usage
prune_tree(organisms_list, organisms_file=None, column_header="Organisms")Keep branches in the species tree for species in the alignment file Some species may not be present in the alignment file due to lack of matching with blast or simply the gene not being in the genome.
Parameters
organisms_list: str-
A list of species used to create the species tree.
organisms_file: (str, optional) = None-
A file of the organisms in case in list is not provided, defaults to None
column_header: (str, optional) = "Organisms"- The name of the column in the file, defaults to “Organisms”
run()
Run PAML using ETE.
Usage
run(outfile, tree="temptree.nw", model="M1")The default model is M1 as it is best for orthology inference in our case. You can use models M2, M0, M3.
Parameters
outfile: str-
The output PAML file.
tree: (str, optional) = "temptree.nw"-
A newick-formatted species tree, defaults to “temptree.nw”
model: (str, optional) = "M1"- The PAML model to be run, defaults to “M1”