Diploid map long read changes - #4994
Draft
Sagorikanag wants to merge 6 commits into
Draft
Conversation
Make sure tail annotations come through GAF for new surject features
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.
Changelog Entry
To be copied to the draft changelog by merger:
vg surjectnow supports haplotype-aware surjection with--diploid-map, jointly processing a read's graph placements, selecting one overall primary alignment, and reporting a global quality along with haplotype and alignment confidence in thehp,hq, andaqtags.Description
This PR adds haplotype-aware diploid surjection for long-read GAM and GAF
input through the new
--diploid-map NAMEoption.vg surjectprocesses each input graph alignment independently.However,
vg giraffeoutput can contain a primary graph placement andone or more secondary graph placements for the same read. Processing these
records independently does not allow all haplotype-path surjections to be compared
at the read level.
With
--diploid-map, consecutive GAM or GAF records sharing a read name areprocessed together. Each graph placement is surjected to all overlapping
paths belonging to the requested reference assembly. The resulting
haplotype-path surjections are annotated individually and then pooled so that
one overall primary alignment and one read-level Global Quality can be
selected across the complete candidate set.
Specifying
--diploid-map NAME:NAME, similarly to--into-ref;available;
hp,hq, andaqtags.Output tags
The following lowercase tags are added to non-supplementary surjections:
hp:Z:pri_haporhp:Z:sec_hapidentifies the preferred and alternativehaplotype-path surjections for each source graph placement.
hq:i:<quality>reports confidence in the haplotype choice.aq:i:<quality>preserves the original Giraffe MAPQ before output MAPQ isreplaced with Global Quality.
Haplotype quality is calculated within each source graph placement. After
all graph placements and haplotype surjections for a read are pooled, the
highest-scoring candidate becomes the overall primary and the remaining
candidates become secondary.
Global Quality measures confidence in that overall primary relative to all
other non-supplementary candidates. It is written to the output MAPQ field,
restricted to 0-60, and capped by
aqso surjection cannot report greaterconfidence than the original graph mapping. Equal top scores use vg's
deterministic Giraffe-style tie-breaking.
Dependencies
disjoint-interval classification changes. The branch will be rebased onto
masterafter those changes merge.