Skip to content

Commit

Permalink
Fix issue with supplementary read in paired-end mappings
Browse files Browse the repository at this point in the history
  • Loading branch information
konrad committed Apr 17, 2018
1 parent 6b7ae6c commit f08430a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions covernantlib/coveragecalculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,15 @@ def _calc_coverage_paired_end(self, ref_seq, bam):
if not alignment.is_proper_pair:
self._add_coverage_of_single_end_reads(alignment)
else:
# some paired-end mapping have a third supplementary
# read that should be discarded
if alignment.is_supplementary:
continue
# Collect all read pairs - this might be memory intensive!
index = 0
if alignment.is_read2:
index = 1

read_pairs_by_qname.setdefault(
alignment.qname, [None, None])
read_pairs_by_qname[alignment.qname][index] = alignment
Expand Down

0 comments on commit f08430a

Please sign in to comment.