augur.tree module
Build a tree using a variety of methods.
- exception augur.tree.ConflictingArgumentsException
Bases:
Exception
Exception when user-provided tree builder arguments conflict with the requested tree builder’s hardcoded defaults (e.g., the path to the alignment, etc.).
- augur.tree.build_fasttree(aln_file, out_file, clean_up=True, nthreads=1, tree_builder_args=None)
build tree using fasttree
- augur.tree.build_iqtree(aln_file, out_file, substitution_model='GTR', clean_up=True, nthreads=1, tree_builder_args=None)
build tree using IQ-Tree :param aln_file file name of input aligment: :param out_file file name to write tree to:
- augur.tree.build_raxml(aln_file, out_file, clean_up=True, nthreads=1, tree_builder_args=None)
build tree using RAxML
- augur.tree.check_conflicting_args(tree_builder_args, defaults)
Checks the given user-provided tree builder arguments for hardcoded default arguments and raise an exception with a list of any that are found.
- Parameters:
- Raises:
ConflictingArgumentsException – When any user-provided arguments match those in the defaults.
Examples
>>> defaults = ("--threads-max", "-m", "-s") >>> check_conflicting_args("--polytomy -n 2", defaults) >>> check_conflicting_args("--polytomy --threads-max 2", defaults) Traceback (most recent call last): ... augur.tree.ConflictingArgumentsException: The following tree builder arguments conflict with hardcoded defaults. Remove these arguments and try again: --threads-max
- augur.tree.find_executable(names, default=None)
Return the path to the first executable found in PATH from the given list of names.
Raises a (hopefully helpful) error if no executable is found. Provide a value for the “default” parameter to instead return a value.
- augur.tree.mask_sites_in_multiple_sequence_alignment(alignment_file, excluded_sites_file)
Creates a new multiple sequence alignment FASTA file from which the given excluded sites have been removed and returns the filename of the new alignment.
- augur.tree.register_parser(parent_subparsers)
- augur.tree.run(args)
- augur.tree.write_out_informative_fasta(compress_seq, alignment, stripFile=None)