Skip to content

Commit

Permalink
Use multiple_iterators in close for TwoPassWriter, but not write_mates
Browse files Browse the repository at this point in the history
  • Loading branch information
IanSudbery committed Oct 16, 2024
1 parent 8eb8e93 commit 0a7c536
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions umi_tools/sam_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,7 @@ def write_mates(self):
U.debug("Dumping %i mates for contig %s" % (
len(self.read1s), self.chrom))

for read in self.infile.fetch(reference=self.chrom, multiple_iterators=True):
for read in self.mate_file.fetch(reference=self.chrom, multiple_iterators=False):
if any((read.is_unmapped, read.mate_is_unmapped, read.is_read1)):
continue

Expand All @@ -625,7 +625,7 @@ def close(self):
len(self.read1s))

found = 0
for read in self.infile.fetch(until_eof=True, multiple_iterators=True):
for read in self.mate_file.fetch(until_eof=True, multiple_iterators=True):

if any((read.is_unmapped, read.mate_is_unmapped, read.is_read1)):
continue
Expand Down

0 comments on commit 0a7c536

Please sign in to comment.