Add query to ref coord mapping#120
Conversation
| return knots | ||
|
|
||
|
|
||
| def get_ref_coords(ops, lens): |
There was a problem hiding this comment.
The dumb version of this function is:
def get_ref_coords(ops, lens):
ref_coords = []
s = 1
for op, l in zip(ops, lens):
if op in [3]:
s += l
elif op in [1,4,5]:
continue
elif op in [0,2,7,8]:
# mapped
pos_list = list(range(s, s + l))
ref_coords.extend(pos_list)
s += l
return ref_coords
| for op, start, l in zip(ops, starts, lens) | ||
| if REFCOORD_OPS[op] | ||
| ] | ||
| ref_coords = np.concatenate(ranges) + 1 |
There was a problem hiding this comment.
I still feel like there is extra logic here. I think the fix here might be as simple as completely dropping the skip cigar ops. Do you get the same results if you switch the REF_OPS skip code value to False without any other code changes?
There was a problem hiding this comment.
I was thinking about the same thing I think you're right - just changing the intron operation to False in REF_OPS can work as well... got the same results for genomic reads and didn't raise errors for transcriptomic reads
|
I put the same reference coordinate function to |
|
I'm not sure I understand the issue. The
Are you saying that I should close this PR? Or would you like for this PR to be considered still? |
targeting spliced read issue #118 (comment)