Repository navigation
feat: mark each mutation pattern match and allow patterns without clusters - #1780
Merged
Merged
Conversation
- Patterns for scattered processes such as APOBEC3-like editing in mpox need matches without clusters; `false` states this explicitly, the same as omitting the rule - `cluster: true` is rejected because it names no window or cutoff
…e to parent only - Scattered patterns such as APOBEC3-like editing in mpox have no clusters, so each matched mutation gets its own dark triangle, and frames remain for clusters - Match triangles point down from the top of their lane, because insertion markers are triangles pointing up from the bottom of the row - Patterns are found among private mutations, so they are shown only when the view is relative to the parent - Hovering a pattern marker fades all other markers in every row, because nucleotide colors hide the matched mutations otherwise - The mutations tooltip lists all matches and cluster ranges, truncated like the other mutation lists, and the marker tooltips widen to fit their badges - The marker height setting is renamed to "Mutation patterns", since it covers match marks as well as cluster frames
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a follow-up to the mutation pattern analysis, based on feedback from users who tried it on mpox and ebolavirus datasets. The sibling data pull request adds example pattern configurations for the ebolavirus datasets, covering adenosine deaminase acting on RNA (ADAR) and apolipoprotein B mRNA-editing catalytic polypeptide-like 3 (APOBEC3) editing, and an APOBEC3-like pattern with
"cluster": falsefor the mpox datasets.Bundibugyo ebolavirus (bdbv), example sequences with ADAR and APOBEC3 signatures:
video-bdbv-mutation-patterns.mp4
Mpox, all clades, with the APOBEC3 pattern set to
"cluster": false:video-mpox-mutation-patterns.mp4
Create:
clusterobject fills in undocumented defaults and accepts misspelled fieldsChange: Nextclade Web now marks every mutation pattern match with its own triangle in the sequence view [src], and draws frames only for real clusters. Pattern results appear only when the view is relative to "Parent" [src], because the analysis runs on private mutations. A pattern can now state
"cluster": false[src], which means the same as omittingcluster.Context: Before this change, the web application showed only cluster frames. A pattern without
clusterstill produced matches in the JSON and TSV outputs, but nothing in the web application, so it looked as if the pattern did not work. The workaround,"cutoff": 0, turned every match into a one-mutation cluster. For processes that leave scattered substitutions, such as APOBEC3 editing in mpox, this filled the view with frames and the mutations tooltip with one card per match.Justification: Scattered and clustered signatures are different questions about the same matches. Every match is always marked, so no match is hidden by the cluster rule, and a frame means a real dense group. Matches are private mutations relative to the nearest node on the reference tree, so drawing them over mutations relative to the reference or a clade founder would put them next to substitutions they were never computed from. The labeled substitutions list already follows the same rule.
Feedback addressed
clusterdid not appear in the web application: every match now has its own mark and is listed in the mutations tooltip, with or without clustering"cutoff": 0produced many one-mutation clusters:"cluster": false, or nocluster, gives the list of matches without frames, and frames appear only where a dataset asks for clustersAdditional improvements:
"cluster": truewas ambiguous: it is rejected with an error that asks forwindowSizeandcutoff, because no window or cutoff suits every virus [src]Work items
clusteras a cluster rule,false, or absent, and rejecttrue; update the JSON schemas, the pathogen config documentation and the tests [src]Possible improvements
clusterobject (kb/issues/N-mutation-patterns-cluster-hidden-defaults.md)Screenshots
Bundibugyo ebolavirus (bdbv), example sequences with ADAR and APOBEC3 signatures:
"Parent" view: frames mark clusters, triangles mark each match
ADAR cluster tooltip, with other markers faded in every row
Tooltip of a scattered match, with its motif
Two patterns on one sequence, each in its own lane
Mutations tooltip with one section per pattern
"Reference" view: no pattern marks, and a hint to switch to "Parent"
Mpox, all clades, with the APOBEC3 pattern set to
"cluster": false:"Parent" view with scattered APOBEC3 matches
Tooltip of an APOBEC3 match in W(G)A context
Mutations tooltip listing the matches without clusters
Zaire ebolavirus (ebov), public example sequences:
"Parent" view across the example sequences
An ADAR hypermutation cluster of T>C substitutions
A match of the second pattern (C>T in CpG context)