dellytools / delly

DELLY2: Structural variant discovery by integrated paired-end and split-read analysis
BSD 3-Clause "New" or "Revised" License
430 stars 136 forks source link

Realignment and break points #354

Open mmnikolic opened 1 year ago

mmnikolic commented 1 year ago

Hi @tobiasrausch ! I have a question about "SV genotyping where reads are realigned to the REF and ALT allele.". (originally posted in https://github.com/dellytools/delly/issues/273#issuecomment-1027697099).

Can this change the break-point position? Or is the break-point position already established in the first step (SV discovery (BAM is taken as is)) where no realignment is applied?

I am curious if the realignment could cause discrepancy in visualising the reads from the BAM and the break points.

Thank you!

tobiasrausch commented 1 year ago

Delly realigns reads to the REF and ALT (INFO/CONSENSUS) allele. This does not change the breakpoint position in the VCF file but if reads align equally good to REF and ALT they are uninformative for genotyping. In addition, this realignment uses dynamic programming which may produce an alignment that differs from the original read mapping.

mmnikolic commented 1 year ago

Thank you @tobiasrausch! What I am curious about specifically is that for some breakpoints, soft-clipped part of supporting reads are not exactly aligned with those breakpoints (breakpoint can be outside of the soft-clipped part or inside, not on the end of soft-clipped part). Is this expected? Does it relate to CONSENSUS sequence?

tobiasrausch commented 1 year ago

Yes, delly computes a consensus to reference alignment using dynamic programming. If you compile from source you can also output this alignment to stderr:

Consensus to reference alignment code