PanACoTA.tree_module
package¶
PanACoTA tree_module
fastme_func
submodule¶
Functions to infer a phylogenetic tree with fastME
@author gem June 2017
- PanACoTA.tree_module.fastme_func.convert2phylip(infile, outfile)¶
Input alignment is in fasta format. Input of fastME must be in Phylip-relaxed format. Convert it here.
- Parameters:
- infile: str
Path to file in fasta format
- outfile: str
Path to file to generate, in Phylip-relaxed format
- PanACoTA.tree_module.fastme_func.run_fastme(alignfile, boot, write_boot, write_matrix, threads, model, outdir, quiet)¶
Run fastME on the given alignment.
- Parameters:
- alignfile: str
Path to file containing alignments of persistent families grouped by genome
- boot: int or None
Number of bootstraps to compute. None if no bootstrap asked
- write_boot: bool
True if all bootstrap pseudo-trees must be saved into a file, False otherwise
- threads: int
Maximum number of threads to use
- model: str or None
DNA substitution model chosen by user. None if default one
- outdir: str
output directory to save all results
- quiet: bool
True if nothing must be printed to stderr/stdout, False otherwise
- PanACoTA.tree_module.fastme_func.run_tree(alignfile, boot, outdir, quiet, threads, **kwargs)¶
Run fastme for the given alignment file and options
- Parameters:
- alignfile: str
Path to file containing alignments of persistent families grouped by genome
- boot: int or None
Number of bootstraps to compute. None if no bootstrap asked
- outdir: str
output directory to save all results
- quiet: bool
True if nothing must be printed to stderr/stdout, False otherwise
- threads: int
Maximum number of threads to use
- kwargs[“model”]: str
DNA substitution model chosen by user
- kwargs[“matrix”]: bool
True if matrix file must be written, False otherwise
- kwargs[“wb”]: bool
True if all bootstrap pseudo-trees must be saved into a file, False otherwise
fasttree_func
submodule¶
Function to infer a phylogenetic tree from a persistent genome, using FastTree
@author gem June 2017
- PanACoTA.tree_module.fasttree_func.define_nb_threads(threads)¶
With FastTree, number of threads to use must be defined before running the script, by changing an environment variable.
- Parameters:
- threads: int
Maximal number of threads to use
- PanACoTA.tree_module.fasttree_func.run_fasttree(alignfile, boot, outdir, model, quiet)¶
Run FastTree on given alignment
- Parameters:
- alignfile: str
Path to file containing all families aligned, grouped by genome
- boot: int or None
Number of bootstraps to calculate (None if no bootstrap asked)
- treefile: str or None
Path to the tree file that must be created
- model: str
DNA substitution model
- quiet: bool
True if nothing must be printed to stderr/stdout, False otherwise
- PanACoTA.tree_module.fasttree_func.run_tree(alignfile, boot, outdir, quiet, threads, **kwargs)¶
Run FastTree for the given alignment file and options
- Parameters:
- alignfile: str
path to file containing all persistent families aligned, and grouped by genome
- boot: int or None
number of bootstraps to calculate, None if no bootstrap asked
- outdir: str or None
Path to the tree file that must be created
- quiet: bool
True if nothing must be printed to stderr/stdout, False otherwise
- threads: int
Maximum number of threads to use
- model: str
DNA substitution model chosen by user
- kwargs: Object
Used to be compatible with the ‘run_tree’ function of other softs like fastME and quicktree, which require more arguments
quicktree_func
submodule¶
Functions to infer a phylogenetic tree with quicktree
@author gem June 2017
- PanACoTA.tree_module.quicktree_func.convert2stockholm(infile, outfile)¶
Input alignment is in fasta format. Input of quicktree must be in stockholm format. Convert it here.
- Parameters:
- infile: str
Path to file containing alignments in fasta
- outfile: str
Path to file which will contain the alignments converted to Stockholm format
- PanACoTA.tree_module.quicktree_func.run_quicktree(alignfile, boot, outdir)¶
Run quicktree on the given alignment.
- Parameters:
- alignfile: str
Path to file containing alignments of persistent families grouped by genome, in Stockholm format
- boot: int or None
Number of bootstraps to compute. None if no bootstrap asked
- outdir: str or None
Path to the tree file that must be created
- PanACoTA.tree_module.quicktree_func.run_tree(alignfile, boot, outdir, *args, **kwargs)¶
Run quicktree for the given alignment file and options
- Parameters:
- alignfile: str
Path to file containing alignments of persistent families grouped by genome
- boot: int or None
Number of bootstraps to compute. None if no bootstrap asked
- outdir: str or None
Path to the tree file that must be created
- args: tuple
Used to be compatible with the ‘run_tree’ function of other softs like fastME and fastTree which require more arguments like the DNA substitution model, the number of threads to use, etc.
- kwargs: dict
Used to be compatible with the ‘run_tree’ function of other softs like fastME and fastTree which require more arguments like the DNA substitution model, the number of threads to use, etc.