Skip to content

Commit

Permalink
In --paired mode, use the mapping position, length and splicing of bo…
Browse files Browse the repository at this point in the history
…th reads as a grouping key
  • Loading branch information
fgp committed Sep 12, 2017
1 parent 0a3e4ff commit 5f6d510
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions umi_tools/umi_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -1484,8 +1484,19 @@ def __call__(self, inreads):
else:
r_length = 0

key = (read.is_reverse, self.options.spliced & is_spliced,
self.options.paired*read.tlen, r_length)
key = (read.is_reverse, self.options.spliced & is_spliced, r_length)

# In paired mode, we add the 2nd read's properties as well
if self.options.paired and (read2 is not None):
start2, pos2, is_spliced2 = get_read_position(
read, self.options.soft_clip_threshold)

if self.options.read_length:
r_length2 = read.query_length
else:
r_length2 = 0

key = (key, read2.is_reverse, self.options.spliced & is_spliced, r_length2)

# get the umi +/- cell barcode and update dictionaries
if self.options.ignore_umi:
Expand Down

0 comments on commit 5f6d510

Please sign in to comment.