Skip to content

Duplications detection and supplementary records - #656

Draft
NicolasBuchin wants to merge 6 commits into
mainfrom
duplications
Draft

NicolasBuchin wants to merge 6 commits into
mainfrom
duplications

Conversation

@NicolasBuchin

Copy link
Copy Markdown
Collaborator

There are a few things done in this PR:

We now support reporting supplementary records, with a SA:Z tag 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_insertions which 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.
INS DUP method

(WORK IN PROGRESS)

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
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.

1 participant