Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

categorise mutations #1449

Merged
merged 5 commits into from
Feb 14, 2022
Merged

categorise mutations #1449

merged 5 commits into from
Feb 14, 2022

Conversation

jameshadfield
Copy link
Member

@jameshadfield jameshadfield commented Jan 28, 2022

Description of proposed changes

See #1444 for context & commit messages for further info. Or just look at the examples 😉

Testing

Unit tests added, as well as interactive testing

Examples

Branch Hover
I've grouped nucleotide mutations on branch hover, as I find it super useful for exploring the tree to see if mutations are homoplasic or reversions to the root (i.e. potentially backfilled). In the interest of keeping the size of the info-box manageable, I've kept the AA mutations unchanged.

image


Branch (shift+)click
Branches group mutations into unique vs homoplasies vs gaps vs Ns. They also report which are reversions to the root. Gaps and Ns are grouped into intervals.
image
image


Tip hover
When hovering over tips we no longer report the mutations on the branch leading to the tip, rather we report a summary of changes w.r.t the root. If you want to see the mutations on the branch leading to the tip, then you can still hover on the branch to see them.

image


Tip click
When clicking on a tip we list those changes between the root and this sample:
image

Questions

  • Should we restrict homoplasies to those which occur on non-terminal branches?
    • If so, if viewing a terminal branch with mutation X, which occurs on another non-terminal branch Y, would we classify this as a homoplasy? (we wouldn't when viewing branch Y)
  • Branch on-hover for AA mutations is unchanged - is there interest in grouping these? If so, how can we do it without using too much space?

Further work

I purposefully didn't spend a huge amount of time tweaking the aesthetics of the changes here, as I plan to incorporate the nextclade / CoVariants badges shortly.

This is in preparation for a forthcoming commit which will need this
information to decide whether a mutation is homoplasic.
@nextstrain-bot nextstrain-bot temporarily deployed to auspice-feat-categorise-mlvhxz January 28, 2022 05:21 Inactive
@jameshadfield jameshadfield temporarily deployed to auspice-feat-categorise-mlvhxz January 28, 2022 06:06 Inactive
These changes were motivated by issue #1444 [1] where separating
mutations into categories can aid both QC and biological interpretation.
I chose to use "mutations" to refer to mutations observed on a branch
and "changes" to refer to the collection of mutations between a tip
and the root.

The categories are not necessarily disjoint, as a mutation back
to the root will also be a homoplasy or a unique mutation.

Note that changes between a tip sequence and the root aren't grouped
into homoplasies, as a single change (A→C) may be the result of multiple
mutations (e.g. A→B→C) and thus we would need to check the tip state of
each position which is difficult with the current code.

On-hover panels are left unchanged in this commit.

[1] #1444
Previously we displayed the mutations on the branch leading to the tip,
which was inconsistent with the information shown when clicking on a
tip. Showing a summary of counts is a good compromise between visual
space and conveying all the information.

Note that hovering on the branch leading to the tip still shows the
mutations leading to the tip, if that info is desired.
Grouping nucleotide mutations (as per previous commits) while hovering
on branches is really helpful for understanding the tree. The penalty
is the use of more space, and so I've chosen to not group AA mutations
here; one can shift+click on the branch to see these grouped if needed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants