Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 methods to fix mate info on non-primaries and templates #204
base: main
Are you sure you want to change the base?
Add methods to fix mate info on non-primaries and templates #204
Changes from 29 commits
8a4e218
cb734da
3dd8bc4
e4d076d
4ee5878
8bca675
b880b65
56722b0
c74834b
8c69815
386d058
d8b2c42
a53f735
6f3c514
4e64644
8c4ce6f
dc17e0d
935184b
0f5200f
f7e81c4
e328f45
8a4973b
f858479
06938d7
6dea881
0d6ab25
ce520e1
4c7f8b3
8baaa48
206cec5
f95cc9e
7c4a938
7a2ca2c
dd7dba5
841a44a
7140063
4f2fbea
ec56350
7116964
716de79
8d2617c
0649c67
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Check warning on line 874 in fgpyo/sam/__init__.py
Codecov / codecov/patch
fgpyo/sam/__init__.py#L874
Check warning on line 876 in fgpyo/sam/__init__.py
Codecov / codecov/patch
fgpyo/sam/__init__.py#L876
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.
thank-you!
Check warning on line 933 in fgpyo/sam/__init__.py
Codecov / codecov/patch
fgpyo/sam/__init__.py#L933
Check warning on line 935 in fgpyo/sam/__init__.py
Codecov / codecov/patch
fgpyo/sam/__init__.py#L935
Check warning on line 939 in fgpyo/sam/__init__.py
Codecov / codecov/patch
fgpyo/sam/__init__.py#L938-L939
Check warning on line 955 in fgpyo/sam/__init__.py
Codecov / codecov/patch
fgpyo/sam/__init__.py#L955
Check warning on line 957 in fgpyo/sam/__init__.py
Codecov / codecov/patch
fgpyo/sam/__init__.py#L957
Check warning on line 962 in fgpyo/sam/__init__.py
Codecov / codecov/patch
fgpyo/sam/__init__.py#L961-L962
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 don't think template-length is correct, since the
mate_primary.template_length
is calculated from theprimary
relative tosupp
. Should we recalculate it, or should we set it to zero since it's not the primary-primary alignment?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.
Hmm, I'm having a hard time seeing how this is wrong. Really wish we could whiteboard!
Here, "mate primary" is the primary alignment of the supplemental's mate. What we want to do is have the supplement's template length be equal to the primary of the supplement (which we unfortunately do not have access to). However, the implementation in
fgpyo
(and elsewhere) flips the sign of the template length for mates. So, if we flip the sign of the supplemental's mate primary, then we should have the value that would have been set upon the supplemental's primary.For secondary supplementals (and for secondaries in general) I am not setting template length anywhere because I feel the specification leaves this ambiguous, and a smarter aligner (or custom code) might set specific template lengths on the secondaries and I don't want to override that info. I feel the spec. is ambiguous for secondaries because I don't see reference to
RNAME
/RNEXT
in the definition ofTLEN
.Check warning on line 1231 in fgpyo/sam/__init__.py
Codecov / codecov/patch
fgpyo/sam/__init__.py#L1231
Check warning on line 1302 in fgpyo/sam/__init__.py
Codecov / codecov/patch
fgpyo/sam/__init__.py#L1302
Check warning on line 1305 in fgpyo/sam/__init__.py
Codecov / codecov/patch
fgpyo/sam/__init__.py#L1305
Check warning on line 1307 in fgpyo/sam/__init__.py
Codecov / codecov/patch
fgpyo/sam/__init__.py#L1307
Check warning on line 1310 in fgpyo/sam/__init__.py
Codecov / codecov/patch
fgpyo/sam/__init__.py#L1310
Check warning on line 1313 in fgpyo/sam/__init__.py
Codecov / codecov/patch
fgpyo/sam/__init__.py#L1312-L1313