Unable to view data on auspice

Hi, I’m just starting out with this programme, and I’m trying to create a pathogen workflow step-by-step as for the zika tutorial, but with my own data. I had a few initial problems with viewing the tree and receiving an error saying “Failed to fetch frequencies”. However, after fixing these issues I don’t get a tree, only a single node in the bottom-left hand corner.

Has anyone else encountered this issue? And how should I go forwards in solving this?

Thank you.

Hi @jmenadue, welcome! Sorry to hear you’re having trouble with Auspice. If they don’t contain private information, could you share your dataset JSON(s) so we can troubleshoot? You should be able to upload them here. Sharing more details about how you generated the JSONs (your Snakefile, input data, Augur commands, etc) would also be useful. Without the actual files or more details about them, it’s hard to say what might be wrong.

Yes, here is the exported json and also the tip frequencies json files.

The following are the augur commands I used:

Prepare the Sequences

  Index the Sequences

augur index \
--sequences data/paris_sequences.fasta \
--output results/sequence_index.tsv

  Align the Sequences

augur align \
--sequences data/paris_sequences.fasta \
--reference-sequence config/reference_seq.gb \
--output results/aligned.fasta \

Construct the Phylogeny

  Make a Raw Tree

augur tree \
--alignment results/aligned.fasta \
--output results/tree_raw.nwk

  Get a Time-Resolved Tree

augur refine \
--tree results/tree_raw.nwk \
--alignment results/aligned.fasta \
--metadata data/paris_metadata.tsv \
--output-tree results/tree.nwk \
--output-node-data results/branch_lengths.json \
--timetree \
--coalescent opt \
--date-confidence \
--date-inference marginal \
--clock-filter-iqd 4

Metadata Frequencies

augur frequencies \
--method kde \
--metadata data/paris_metadata.tsv \
--tree results/tree.nwk \
--output-format auspice \
--output auspice/paris_tip-frequencies.json

Annotate the Phylogeny

  Reconstruct Ancestral Traits

augur traits \
--tree results/tree.nwk \
--metadata data/paris_metadata.tsv \
--output-node-data results/traits.json \
--columns region country \

  Infer Ancestral Sequences

augur ancestral \
--tree results/tree.nwk \
--alignment results/aligned.fasta \
--output-node-data results/nt_muts.json \
--inference joint

  Identify Amino Acid Mutations

augur translate \
--tree results/tree.nwk \
--ancestral-sequences results/nt_muts.json \
--reference-sequence config/reference_seq.gb \
--output-node-data results/aa_muts.json

Export the Results

augur export v2 \
--tree results/tree.nwk \
--metadata data/paris_metadata.tsv \
--node-data results/branch_lengths.json \
--node-data results/traits.json \
--node-data results/nt_muts.json \
--node-data results/aa_muts.json \
--colors config/color_ordering.tsv \
--colors config/color_schemes.tsv \
--lat-longs config/lat_longs.tsv \
--auspice-config config/auspice_config.json \
--include-root-sequence \
--output auspice/paris.json

Exit docker

Visualise the Results
nextstrain view auspice/

Note that I did not use the augur filter command because I filtered the data to a specific place (Paris) and time on GISAID, and so I felt I didn’t need to use this. This dataset is also just a practice one with ~100 sequences, so I can understand the codes and get it right for the real data for my Master’s project.

I hope this helps!

The “single node in the corner” symptom had me thinking your exported JSON was lacking branch lengths (divergence or dates) or all lengths were zero/identical or something similar. Indeed, there are no branch length attributes (e.g. div in any node_attrs) in the exported JSON you shared. But, your commands showed that you are generating those with augur refine and passing the results/branch_lengths.json file into augur export v2.

So what’s going wrong? Well, it turns out that while the --node-data option can take one or more filenames as values, like so:

--node-data results/branch_lengths.json \
            results/traits.json \
            results/nt_muts.json \
            results/aa_muts.json \

but if the actual option itself is repeated, like in your commands, then the last option’s value overrides all the previous values:

--node-data results/branch_lengths.json \
--node-data results/traits.json \
--node-data results/nt_muts.json \
--node-data results/aa_muts.json \

The above results in only results/aa_muts.json being included in the exported JSON. None of the other node data files will be.

To fix this, switch to the first syntax.

We can also fix this in Augur so both work, which I think would be less surprising!

(Proposed Augur fix, cross-linking for posterity.)