Custom newick to JSON

Hello Everyone!,
I have a Newick file with cosine distance between different strains of Covid and I’m trying to use auspice for visualization. But I came to know that auspice doesn’t support Newick, so can anybody guide me on how should modify my Newick or create an auspice supported JSON file.

2 Likes

You should be able to drop the newick onto https://auspice.us, as well as any metadata you have (see help on that page). Let me know if this doesn’t work!

Hello @james, I’m not able to use auspice for my Newick file.
Here is the error message:
Screenshot 2022-02-25 at 16.54.16

I’m sending you my Newick file through direct message to verify. FYI, I’m able to create a dendrogram using this file on ITOL

Hi @Sourabh7211 – the tree you sent me is missing a root-branch length. Defining the root as zero length for your tree allows it to load correctly in auspice.us (i.e. the end of the newick string is 4.17232505e-07):0;).

P.S. This is Newick trees without a root branch length fail to load · Issue #13 · nextstrain/auspice.us · GitHub and will be fixed eventually.

2 Likes

Thanks, @james. I’m now able to use the Newick file on auspice.
However, if auspice reads JSON files, it should be converting my Newick to JSON, right? If yes, can I get this JSON file with metadata info, because I want to host auspice on my server, I will need a JSON file for that. I tried using augur refine to convert my custom Newick to JSON, but it needs additional parameters like aligned fasta which is not required while I’m dragging and dropping my custom Newick on auspice.us.
Thanks, your help is very much appreciated.

However, if auspice reads JSON files, it should be converting my Newick to JSON, right? If yes, can I get this JSON file with metadata info, because I want to host auspice on my server, I will need a JSON file for that.

Here’s the code auspice.us uses which you could adapt to your use-case.

You should also be able to use augur commands (augur export v2 is what produces the dataset JSON), but as you point out you may need extra files here.

1 Like