augur.ancestral module

Infer ancestral sequences based on a tree.

augur.ancestral.ancestral_sequence_inference(tree=None, aln=None, ref=None, infer_gtr=True, marginal=False, fill_overhangs=True)

infer ancestral sequences using TreeTime

Parameters
  • tree (Bio.Phylo tree or str) – tree or filename of tree

  • aln (Bio.Align.MultipleSeqAlignment or str) – alignment or filename of alignment

  • infer_gtr (bool, optional) – Description

  • marginal (bool, optional) – Description

  • fill_overhangs (bool) – In some cases, the missing data on both ends of the alignment is filled with the gap character (‘-‘). If set to True, these end-gaps are converted to “ambiguous” characters (‘N’ for nucleotides, ‘X’ for aminoacids). Otherwise, the alignment is treated as-is

Returns

treetime.TreeAnc instance

Return type

TreeAnc

augur.ancestral.collect_sequences_and_mutations(T, is_vcf=False)

iterates of the tree and produces dictionaries with mutations and sequences for each node.

Parameters
  • T (Bio.Phylo.Tree) – Phylogenetic tree decorated with sequences and mutations as output by treetime.

  • is_vcf (bool, optional) – specifies whether input alignment was vcf type (implying long genomes)

Returns

dictionary of mutations and sequences

Return type

dict

augur.ancestral.register_arguments(parser)
augur.ancestral.run(args)