-
Notifications
You must be signed in to change notification settings - Fork 82
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
[FEATURE] Add free function alignment_from_cigar and cigar_from_alignment. #3057
[FEATURE] Add free function alignment_from_cigar and cigar_from_alignment. #3057
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Codecov ReportBase: 98.21% // Head: 98.23% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #3057 +/- ##
==========================================
+ Coverage 98.21% 98.23% +0.01%
==========================================
Files 275 277 +2
Lines 12231 12329 +98
==========================================
+ Hits 12013 12111 +98
Misses 218 218
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
983dd18
to
6993752
Compare
I did a rebase because clang-format couldn't |
3a95da4
to
e3ddab9
Compare
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.
Should we change all the occurrences of cigar string
etc. to CIGAR string
? It's a bit mixed throughout the documentation.
I still have to check the unit tests
include/seqan3/alignment/cigar_conversion/alignment_from_cigar.hpp
Outdated
Show resolved
Hide resolved
include/seqan3/alignment/cigar_conversion/alignment_from_cigar.hpp
Outdated
Show resolved
Hide resolved
include/seqan3/alignment/cigar_conversion/alignment_from_cigar.hpp
Outdated
Show resolved
Hide resolved
include/seqan3/alignment/cigar_conversion/alignment_from_cigar.hpp
Outdated
Show resolved
Hide resolved
include/seqan3/alignment/cigar_conversion/alignment_from_cigar.hpp
Outdated
Show resolved
Hide resolved
test/snippet/alignment/cigar_conversion/alignment_from_cigar_io.cpp
Outdated
Show resolved
Hide resolved
test/snippet/alignment/cigar_conversion/alignment_from_cigar_io.cpp
Outdated
Show resolved
Hide resolved
test/snippet/alignment/cigar_conversion/cigar_from_alignment.cpp
Outdated
Show resolved
Hide resolved
test/snippet/alignment/cigar_conversion/cigar_from_alignment.cpp
Outdated
Show resolved
Hide resolved
test/snippet/alignment/cigar_conversion/cigar_from_alignment_with_clipping.cpp
Outdated
Show resolved
Hide resolved
include/seqan3/alignment/cigar_conversion/alignment_from_cigar.hpp
Outdated
Show resolved
Hide resolved
6a60b80
to
b86720d
Compare
b86720d
to
96b6d10
Compare
When we remove the alignment field from the SAM file, we need to have a replacement in place to get from a CIGAR string, read from file, to an alignment.
I copied over the functionality from IO into a free function in the
/alignment
module for now.We should discuss where and how we will provide this feature.
Core Meeting 11.10.2022 and 13.10.2022
alignment_from_cigar
fixed to this:
alignment_from_cigar(cigar_vector, read, reference, position_in_reference);
unless smehringer notices when working with it in the PR that something is at odds.
No. A Cigar string is correct iff: Sum of lengths of the M/I/S/=/X operations shall equal the length of SEQ. Since an empty query cannot be aligned and empty CIGAR is not valid but indicates that an alignment is unavailable (same as in IO).
[exception is thrown]
E.g. seq = ACTG, CIGAR = 3M (too many matches)
It's a corrupt CIGAR
[exception is thrown]
It's a corrupt CIGAR
POS
(reference start position) plus the sum of the lengths of M/=/X/D/N CIGAR operations may not exceed the length ofreference
.[exception is thrown]
Note: Circular references should be handled by altering the
reference
input. Condition for correct reference length:cigar_from_alignment
yes
("", "")
be valid?No, same as for empty CIGAR strings
[exception is thrown]
(ACT, ATGG)
It's a corrupt alignment
[exception is thrown]
ideas for utility functions (dump, no decision made)