yatisht / usher

Ultrafast Sample Placement on Existing Trees
MIT License
120 stars 40 forks source link

USher: have been mutations displayed on the branch changed? or is it a bug ? #366

Open FedeGueli opened 4 months ago

FedeGueli commented 4 months ago

Me and others noticed that today Usher (dev) not showing the private mutations of each branch while instead showing all the mutations of the sample at the end of the branch :

Screenshot 2024-02-16 alle 10 06 09

https://nextstrain.org/fetch/genome-test.gi.ucsc.edu/trash/ct/subtreeAuspice1_genome_test_4d5a0_f1caa0.json?label=id:node_3753494

Screenshot 2024-02-16 alle 10 08 08

I dunno if it is a choice or something went wrong with some update. In the case it is wanted, i suggest to revert to previous setting cause it was much more useful. @AngieHinrichs

FedeGueli commented 4 months ago

It seems back to old version now.

FedeGueli commented 4 months ago

It works with branches but not with singlets

FedeGueli commented 4 months ago

could it a nextstrain issue? cc @corneliusroemer

AngieHinrichs commented 4 months ago

@FedeGueli as far as I can tell the behavior has not changed recently -- Nextstrain's Auspice viewer shows all mutations for a particular sample, but shows only the node's mutations for an internal node. Branch labels have the same behavior: they appear only for internal nodes, not for branches to single samples. Now that you mention it, it would be nice to have a way to see only the private mutations for a sample, but I don't know of a way to get that in Auspice.

@corneliusroemer is this related to the feature request that you just made in https://github.com/nextstrain/auspice/issues/1752 ?

FedeGueli commented 4 months ago

Thx @AngieHinrichs , maybe @aviczhl2 or @ryhisner would like to add their ideas this morning it didnt work as usual. Re singlets: i dont recall how it wss before. If it was already this way to.me this issue is solved.

FedeGueli commented 4 months ago

@AngieHinrichs i checked and it is not the same than before: look clicking with shift up on the branch leading to a singlet i see all the mutations of the singlet. Before i would have seen just the ones related to that node. @ryhisner @corneliusroemer could you confirm please ? https://nextstrain.org/fetch/genome-test.gi.ucsc.edu/trash/ct/subtreeAuspice1_genome_test_51cf9_fd3ad0.json

Screenshot 2024-02-16 alle 22 32 06
FedeGueli commented 4 months ago

And also: before scrolling over the branch to a singlet i would see partially mutations to singlet, now i get this that has no or little interest

Screenshot 2024-02-16 alle 22 36 38
ryhisner commented 4 months ago

I agree with Fede here. It's not possible to view the mutations on any given branch now, which makes it extremely hard to tell what mutations are unique to a given sequence. Right now I'm having to take screenshots of the mutations in a sequence at the base of a branch and the end of a branch and compare them to try to figure out what mutations are on that branch, which is extremely time-consuming and also likely to lead me top make mistakes.

ryhisner commented 4 months ago

Right now, for example, I'm having to go through mutations one by one from the screenshots below to figure out the new nucleotide mutations in the second one. And once I'm done with the nucleotide mutations, I'll have to do the same for AA mutations. What previously took about one minute is going to take me >15 minutes.

image
AngieHinrichs commented 4 months ago

Right now I'm having to take screenshots of the mutations in a sequence at the base of a branch and the end of a branch and compare them to try to figure out what mutations are on that branch, which is extremely time-consuming and also likely to lead me top make mistakes.

Wow, that sounds awful @ryhisner. I have not made any changes to usher.bio / hgPhyloPlace, so I guess this must be a change to Auspice. @corneliusroemer @jameshadfield is there any way in Auspice to see only the private mutations on a sample, instead of all mutations from root?

AngieHinrichs commented 4 months ago

Meanwhile @ryhisner there are alternatives to manually comparing all mutations, even if they're not ideal. nextstrain.org (Auspice) is displaying a JSON file (just text in a special format) generated by usher.bio. The file includes the private mutations for each sample. You can view that file by removing the "nextstrain.org/fetch/" part of a link like this: https://nextstrain.org/fetch/genome-test.gi.ucsc.edu/trash/ct/subtreeAuspice1_genome_test_51cf9_fd3ad0.json -- to get a link like this: https://genome-test.gi.ucsc.edu/trash/ct/subtreeAuspice1_genome_test_51cf9_fd3ad0.json That will give you a "wall of text" unless you have a browser extension that pretty-prints it. If you use Ctrl-F to search for a sample ID like PG-592993 (keep searching if you first hit the title: "Subtree with hCoV-19/Japan/PG-592993 part), you should see something like this:

{ "name": "hCoV-19\/Japan\/PG-592993\/2024|EPI_ISL_18900467|2024-01-23", "branch_attrs": { "mutations": { "S": [ "N61S", "L256S", "Y508H"] , "nuc": [ 744G", "T22329C", "T23084C", "A24676G"] } }

-- not pretty, but I hope not as bad as manually comparing those lists. If you have a browser extension that pretty-prints JSON files, it may take a minute to digest it all, but then it should look something like this:

name: "hCoV-19/Japan/PG-592993/2024|EPI_ISL_18900467|2024-01-23",
branch_attrs: {
  mutations: {
    S: [
         "N61S",
         "L256S",
         "Y508H"
       ],
    nuc: [
         "A21744G",
         "T22329C",
         "T23084C",
         "A24676G"
       ]

Easier on the eyes. Anyway, the private mutations are in there, we'll find some way to extract them for you. 🙂

ryhisner commented 4 months ago

Thank you, @AngieHinrichs! I hope this issue gets fixed, but in the meantime your tip will definitely save me time.