Is there any way to locally view the result like clades.nextstrain.org?

  1. in case nextstrain, there’s a command “nextstrain view …”. but I cannot find any command from docs or help message. is there another way to get around this issue?

  2. I hope to use community service on nextclade like nextstrain’s. is it on development? or never planned?

thank you.

Hi @duxx,

Thanks for getting in touch. Can you explain your request in a bit more detail, I’m not sure I understand.

In particular:

  1. in case nextstrain, there’s a command “nextstrain view …”. but I cannot find any command from docs or help message. is there another way to get around this issue?

“Any command from docs or help message” → which docs or help for which program?

“This issue” → What issue exactly? What are you trying to do?

  1. I hope to use community service on nextclade like nextstrain’s. is it on development? or never planned?

“Community service” → what exactly do you mean by that, what’s your use case?

Regarding your title: “Is there any way to locally view the result like clades.nextstrain.org?”, which view do you mean? Can you take and share a screenshot to be concrete?

Thanks!

First of all, I am not English native. so please bear with me.
My question is about “using NextClade”.

  1. After building nextstrain phylogenetic tree, I can see the result locally by command below
    $ nextstrain view auspice_directory

#screenshot

so I can check phylogenetic tree through locally.

but I cannot find any command like “nextclade view…” on Nextclade docs or Nextclade help message.
After running nextclade_cli, I want to view the result locally like clades.nextstrain.org webpage.

That’s what I mean for first question.

  1. In case Nextstrain, I can view a phylogenetic tree by “nextstrain/community” after putting auspice file on github public repository.
    Share via Community on GitHub — Nextstrain documentation

I want to know there is such a function like above for nextclade.

That’s what I mean for second question. I hope you understand.

if you still feel not comfortable with my question, please retry me asking.

Thank you.

1 Like

Hi Duxx! I’m not a native English speaker myself, I totally understand :blush:

Thanks for your very helpful clarifications, now I understand much better and can give a proper answer.

I will rephrase your questions - let me know if my understanding is incorrect:

I want to visualise the results of a Nextclade CLI run in the Nexclade web app

This is currently not possible. There is a feature request on Github: ENH: Allow nextclade web to import pre-analyzed outputs · Issue #716 · nextstrain/nextclade · GitHub

There are two possible workarounds:

  1. (Simplest) Just use the web app to analyse your sequences
  2. (No internet required) Build and serve the web app locally, see nextclade/developer-guide.md at master · nextstrain/nextclade · GitHub

My question is: Why would you use a command like this and not just drop the Fasta on the website? Analysis is so fast now, the issue is more with RAM of the web app rather than running the alignment. Or do you have issues with browser compatibility? I would love to hear more from you on the reasons behind your request!

I want to allow others to view Nextclade results for a given set of sequences I control via a link

If we implemented a Nextclade JSON output viewer feature as requested above, this would be one simple side-effect.

However, given that the Nextclade JSON is much bigger than the input data (if zstd compressed) you can already do this in a way using Nextclade web’s URL parameters, see Nextclade Web — Nextclade documentation

For example, the following should direct the user straight to Nextclade web with a FASTA being auto downloaded and analyses: https://clades.nextstrain.org/?dataset-name=sars-cov-2&input-fasta=https://data.clades.nextstrain.org/datasets/sars-cov-2/references/MN908947/versions/2022-01-05T19:54:31Z/files/sequences.fasta

So you in a way already use Nextclade community, by simply hosting your fasta somewhere on the internet, then crafting a URL that points at that fasta (see the docs). Just beware, you need to have CORS enabled - which isn’t by default on using Github (I think). So you may need to use a CORS proxy.

For example, I sometimes use regular Nextstrain builds are reference trees for fun in the following way:
https://clades.nextstrain.org/?dataset-name=sars-cov-2-21L&input-tree=https://api.codetabs.com/v1/proxy?quest=https://nextstrain.org/charon/getDataset?prefix=staging/nextclade/sars-cov-2/21L&input-fasta=https://data.clades.nextstrain.org/datasets/sars-cov-2/references/MN908947/versions/latest/files/sequences.fasta

I hope this helps - feel free to share more about your particular use cases - that’s what I can’t guess. You may have good use cases that we just haven’t thought about!

Best,

Cornelius

I forgot to mention - you can view at least part of Nextclade results locally: the tree!

But you need to output the tree using -T {tree_output_path} and then you can view it with nextstrain view as usual.

Thank you very much. It was very helpful.

I realized that I need to read document more carefully, you pointed out many things that I roughly read. I guess most problems that I met will be solved.

Has your problem been solved? I have the same problem as you.

@ljy could you please explain your problem in some more detail? Does my answer above not address your problem? If so why not?

I would also add that you can use https://auspice.us to view the output Auspice tree.json file generated by Nextclade.

For results table, there is no replacement, but you can open output CSV or TSV file in your favorite spreadsheet software to approximate it.

The output fasta sequences and genes can be visualized by using one of the MSA (multiple sequence alignment) viewers, for example AliView.

1 Like