Skip to content
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 std::string overload for alignment_from_cigar. #3077

Merged
merged 2 commits into from
Oct 31, 2022

Conversation

smehringer
Copy link
Member

@smehringer smehringer commented Oct 21, 2022

You might have read a CIGAR string from elsewhere, used our IO with a std::string as type for field::cigar or want to get the alignment for a secondary alignment which is stores as a string in the tag dictionary.

In all those cases, you want to create an alignment from a CIGAR string not a vector, so I added an overload.

Note that the overload currently is not the most efficient one, because it allocates a std::vector<seqan3::cigar> for convenient use of the other overload. This can be improved by directly parsing the CIGAR string.

Alternatively, we could make the function detail::parse_cigar (not a good name right now), which creates a CIGAR vector out of a CIGAR string, public.

@vercel
Copy link

vercel bot commented Oct 21, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
seqan3 ✅ Ready (Inspect) Visit Preview Oct 31, 2022 at 1:36PM (UTC)

@eseiler eseiler self-requested a review October 21, 2022 10:03
@seqan-actions seqan-actions added the lint [INTERNAL] signal for linting label Oct 21, 2022
@eseiler eseiler removed the lint [INTERNAL] signal for linting label Oct 21, 2022
@codecov
Copy link

codecov bot commented Oct 21, 2022

Codecov Report

Base: 98.25% // Head: 98.25% // No change to project coverage 👍

Coverage data is based on head (78e180e) compared to base (dd9c819).
Patch has no changes to coverable lines.

❗ Current head 78e180e differs from pull request most recent head bcfcbc2. Consider uploading reports for the commit bcfcbc2 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3077   +/-   ##
=======================================
  Coverage   98.25%   98.25%           
=======================================
  Files         276      276           
  Lines       12344    12344           
=======================================
  Hits        12128    12128           
  Misses        216      216           
Impacted Files Coverage Δ
...lignment/cigar_conversion/alignment_from_cigar.hpp 100.00% <ø> (ø)
...nclude/seqan3/test/literal/gapped_dna5_literal.hpp 100.00% <0.00%> (ø)

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.
📢 Do you have feedback about the report comment? Let us know in this issue.

@eseiler
Copy link
Member

eseiler commented Oct 21, 2022

clang-format should be resolved by a rebase on master, but it's not blocking IMO

@smehringer smehringer force-pushed the io_alignment_from_cigar_overload branch from ffc7151 to 78e180e Compare October 24, 2022 07:04
@seqan-actions seqan-actions added lint [INTERNAL] signal for linting and removed lint [INTERNAL] signal for linting labels Oct 24, 2022
@smehringer smehringer requested review from remyschwab and removed request for feldroop October 31, 2022 09:04
@eseiler eseiler force-pushed the io_alignment_from_cigar_overload branch from 78e180e to bcfcbc2 Compare October 31, 2022 13:32
@seqan-actions seqan-actions added lint [INTERNAL] signal for linting and removed lint [INTERNAL] signal for linting labels Oct 31, 2022
@eseiler eseiler merged commit 0fa39dd into seqan:master Oct 31, 2022
@smehringer smehringer deleted the io_alignment_from_cigar_overload branch November 1, 2022 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants