Repository navigation
Duplications detection and supplementary records - #656
Draft
NicolasBuchin wants to merge 6 commits into
Draft
NicolasBuchin wants to merge 6 commits into
NicolasBuchin wants to merge 6 commits into
Conversation
A record can be flagged as supplementary and report the SA:Z tag to cross-reference the other records.
After the best alignment has been picked, an insertion of at least --dl bases (50 by default) is realigned against the reference on both sides of the insertion point. If that beats keeping the insertion, the inserted bases are a second copy of the reference around them, so the alignment is cut into one SAM record per copy: the best scoring one primary, the rest supplementary with SA:Z tags. Single-end only for now. --dl 0 turns detection off, and with --details du:i: reports how many insertions were re-interpreted. Is-new-baseline: yes
The two arms of a duplication stay close to the diagonal, so we bound them with --dw (20 by default) instead of filling the whole matrix. It's cheaper, and in practice it finds the true duplications better. Asking the split to score better than the insertion penalty was too simple a check on its own. Is-new-baseline: yes
The pruning only recognised two indels that cancel each other out. Sometimes it's possible to get a small matching segment inside a large insertion, which creates a staircase like shape on the chain, we now remove the matching segment. The aligner will decide if the matching region is worth bringing back or to only have one large indel. Is-new-baseline: yes
A less permissive condition to consider a valid duplication, instead of beating the insertion score, the alignments needs to be at least --dm (0.80 by default) matches. Is-new-baseline: yes
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.
There are a few things done in this PR:
We now support reporting supplementary records, with a
SA:Ztag necessary for most SV callers to understand which records belong together once a SAM file is compressed into a BAM file. This comes from the first commit.We have a duplication detection, it works as a post-alignment step: we find the primary alignment like usual, but after we pass it through

reinterpret_insertionswhich searches for Insertion events larger than--dl(default 50), and attempts to reinterpret them as duplications if they pass a threshold of--dm(default 0.80) matches on the query region. The reinterpretation is done by aligning the query against the 2 sides of the reference, starting on the right ending on the left maximizing the path to jump from one end to another. After that if the duplication passes the threshold, we report the duplication by splitting the primary into 2 segments, for which we need supplementary record support. Note that this means the 2 segments have 0 read overlap/gap, which gives us base level precise breakpoints.(WORK IN PROGRESS)