diff --git a/umi_tools/sam_methods.py b/umi_tools/sam_methods.py index a3bc486..79a577a 100644 --- a/umi_tools/sam_methods.py +++ b/umi_tools/sam_methods.py @@ -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.mate_file.fetch(reference=self.chrom, multiple_iterators=False): + for read in self.infile.fetch(reference=self.chrom, multiple_iterators=True): if any((read.is_unmapped, read.mate_is_unmapped, read.is_read1)): continue @@ -625,7 +625,7 @@ def close(self): len(self.read1s)) found = 0 - for read in self.mate_file.fetch(until_eof=True, multiple_iterators=False): + for read in self.infile.fetch(until_eof=True, multiple_iterators=True): if any((read.is_unmapped, read.mate_is_unmapped, read.is_read1)): continue