nextstrain / nextclade

Viral genome alignment, mutation calling, clade assignment, quality checks and phylogenetic placement

Home Page:https://clades.nextstrain.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

When using `?input-fasta=` url query param without specifying dataset, web auto-starts analysis (prematurely)

corneliusroemer opened this issue · comments

When you just pass the input-fasta URL param, Nextclade web autostarts the analysis, but it shouldn't.

It should instead just load the sequences and do auto-dataset-detection

Repro:

  1. Load https://clades.nextstrain.org/?dataset-url=gh:alex-ranieri/denvLineages@main@/Nextclade_V3_data/DENV1 to set up the storage/cookies
  2. Load https://clades.nextstrain.org/?input-fasta=https://raw.githubusercontent.com/inrb-labgenpath/Mpox_sequencing_Kamituga/main/submission01_mpox47_2024.fasta

Instead the dataset that's set in browser storage/cookies is used (wrongly)

It's possible that in order to reproduce it, it's necessary to first load a custom dataset (so that the storage is set appropriately

Per Ivan this works as intended. So what I'm suggesting is to change behavior to the following:

  • when someone passes URL params, don’t use state
  • only use state when people are not using URL params

Note for myself: "not using state", selected dataset in this case, implies dataset autodetection at boot and then running with it. Not entirely straightforward with the current code organization. Need to move things around probabaly.

Ah autodetect is a state that should be kept, states that shouldn't be used are all the ones that can be URL param configured, assume they are unset for a reason.

I'm not sure autodetect behavior is very crucial here one way or another.

I mean the situation if you decide we don't use dataset saved in local storage, and when it's not passed as URL param, but input-fasta is passed. Then what dataset would you use?

Or you propose to not start unless both input-fasta and dataset-name is passed?

There are so many possible combinations that I am confused now.

I mean the situation if you decide we don't use dataset saved in local storage, and when it's not passed as URL param, but input-fasta is passed. Then what dataset would you use?

Don't assume one, I'd say? Only use autorun when people specify a dataset to be safe. Yeah this might technically be breaking some people's links but I don't think many people use just input fasta and no specified dataset. We could check logs just in case :)

Or you propose to not start unless both input-fasta and dataset-name is passed?

Indeed!