Sniffles icon indicating copy to clipboard operation
Sniffles copied to clipboard

Why are BNDs filtered differently in primary and supplementary alignments?

Open HillJamie opened this issue 2 years ago • 0 comments

When finding leads from split primary alignments, a mapq filter is applied (read_itersplits method) https://github.com/fritzsedlazeck/Sniffles/blob/595a27a55f7d2619c6bdd647de694e737f290315/src/sniffles/leadprov.py#L449

The same filter is commented out for supplementary alignments (see read_itersplits_bnd method). https://github.com/fritzsedlazeck/Sniffles/blob/595a27a55f7d2619c6bdd647de694e737f290315/src/sniffles/leadprov.py#L285

Does this mean that reads will sometimes generate a BND for a supplementary alignment but not for the corresponding primary alignment? Then a BND might be called on the chromosome of the supplementary alignment, but without a corresponding BND on the chromosome of the primary alignment, even if all the reads have higher mapq for the primary alignment.

Perhaps the filter should only be used for non-BND types? If so, it could be moved to L470:

elif svtype!="NOSV" and not config.dev_keep_lowqual_splits and min_mapq < config.mapq:

Thank you for great software! Jamie

HillJamie avatar Sep 06 '23 12:09 HillJamie