-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add query to ref coord mapping #120
base: master
Are you sure you want to change the base?
Conversation
src/remora/data_chunks.py
Outdated
|
||
return knots | ||
|
||
|
||
def get_ref_coords(ops, lens): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
src/remora/data_chunks.py
Outdated
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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)