augur ancestral

Infer ancestral sequences based on a tree.

The ancestral sequences are inferred using TreeTime. Each internal node gets assigned a nucleotide sequence that maximizes a likelihood on the tree given its descendants and its parent node. Each node then gets assigned a list of nucleotide mutations for any position that has a mismatch between its own sequence and its parent’s sequence. The node sequences and mutations are output to a node-data JSON file.

If amino acid options are provided, the ancestral amino acid sequences for each requested gene are inferred with the same method as the nucleotide sequences described above. The inferred amino acid mutations will be included in the output node-data JSON file, with the format equivalent to the output of augur translate.

The nucleotide and amino acid sequences are inferred separately in this command, which can potentially result in mismatches between the nucleotide and amino acid mutations. If you want amino acid mutations based on the inferred nucleotide sequences, please use augur translate.


The mutation positions in the node-data JSON are one-based.

usage: augur ancestral [-h] --tree TREE [--alignment ALIGNMENT]
                       [--vcf-reference VCF_REFERENCE]
                       [--root-sequence ROOT_SEQUENCE]
                       [--inference {joint,marginal}]
                       [--keep-ambiguous | --infer-ambiguous]
                       [--keep-overhangs] [--annotation ANNOTATION]
                       [--genes GENES [GENES ...]]
                       [--translations TRANSLATIONS]
                       [--output-node-data OUTPUT_NODE_DATA]
                       [--output-sequences OUTPUT_SEQUENCES]
                       [--output-translations OUTPUT_TRANSLATIONS]
                       [--output-vcf OUTPUT_VCF]


Tree and sequences to use for ancestral reconstruction

--tree, -t

prebuilt Newick

--alignment, -a

alignment in FASTA or VCF format


FASTA file of the sequence the VCF was mapped to (only used if a VCF is provided as the alignment)


FASTA/genbank file of the sequence that is used as root for mutation calling. Differences between this sequence and the inferred root will be reported as mutations on the root branch.

global options

Options to configure reconstruction of both nucleotide and amino acid sequences


Possible choices: joint, marginal

calculate joint or marginal maximum likelihood ancestral sequence states

Default: “joint”

nucleotide options

Options to configure reconstruction of ancestral nucleotide sequences


do not infer nucleotides at ambiguous (N) sites on tip sequences (leave as N).

Default: False


infer nucleotides at ambiguous (N,W,R,..) sites on tip sequences and replace with most likely state.

Default: True


do not infer nucleotides for gaps (-) on either side of the alignment

Default: False

amino acid options

Options to configure reconstruction of ancestral amino acid sequences. All arguments are required for ancestral amino acid sequence reconstruction.


GenBank or GFF file containing the annotation


genes to translate (list or file containing list)


translated alignments for each CDS/Gene. Currently only supported for FASTA-input. Specify the file name via a template like ‘aa_sequences_%GENE.fasta’ where %GENE will be replaced by the gene name.


Outputs supported for reconstructed ancestral sequences


name of JSON file to save mutations and ancestral sequences to


name of FASTA file to save ancestral nucleotide sequences to (FASTA alignments only)


name of the FASTA file(s) to save ancestral amino acid sequences to. Specify the file name via a template like ‘ancestral_aa_sequences_%GENE.fasta’ where %GENE will be replaced bythe gene name.


name of output VCF file which will include ancestral seqs

Example Node Data JSON

Here’s an example of the output node-data JSON where NODE_1 has no mutations compared to it’s parent and NODE_2 has multiple mutations.

    "nodes": {
        "NODE_1": {
            "muts": [],
            "sequence": "TCCAAACAAAGT..."
        "NODE_2": {
            "muts": [
            "sequence": "TCCAAACAAAGT..."