-
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
Question regarding the usage of seqan3::fm_index_cursor
using seqan3::bitpacked_sequence
.
#3264
Comments
Hi @Dhruv-mak, thanks for reporting this. We will look into it. |
The error message this code produces is:
@Dhruv-mak: |
I can confirm the following error:
produced by the minimal example: using namespace seqan3::literals;
seqan3::bitpacked_sequence<seqan3::dna4> source{"ACGGTCAGGTTC"_dna4};
auto it = source.begin();
seqan3::dna4 val = static_cast<seqan3::dna4>(*it); The explicit cast of the proxy type returned by bitpacked sequence to a normal alphabet will call internally the default constructor of this proxy type causing the compile error, since the proxy type is not default constructible. So this needs some further digging into the alphabet mechanics which may take a while. For the time being, I suggest not using the bitpacked_sequence. Note internally the FM index uses the SDSL and this stores the given sequence in its own memory representation. So there is literally no benefit for using the bitpacked sequence if only the FM index is needed. |
Interestingly, this compiles: using namespace seqan3::literals;
seqan3::bitpacked_sequence<seqan3::dna4> source{"ACGGTCAGGTTC"_dna4};
auto it = source.begin();
seqan3::dna4 val = *it; So implicit conversion seems to work but via a different code path. Maybe some general issue with the alphabet_proxy. I'll investigate. |
… `seqan3::bitpacked_sequence`. seqan#3264 Further constraints the conversion constructors of the nucleotide and aminoacid base alphabet types to only consider conversion if all requirements are fulfilled. This is now represented by the specific concept `convertable_to_through_char_representation`. Through this proxy types will not be converted through their char representation but will be implicitly converted to their underling base alphabet type, e.g. dna4, and then copied/moved using the copy/move constructor of the underlying base alphabet type.
* Fixes #3267 by adding proper constraints to the char conversion table. * Fixes Question regarding the usage of `seqan3::fm_index_cursor` using `seqan3::bitpacked_sequence`. #3264 Further constraints the conversion constructors of the nucleotide and aminoacid base alphabet types to only consider conversion if all requirements are fulfilled. This is now represented by the specific concept `convertable_to_through_char_representation`. Through this proxy types will not be converted through their char representation but will be implicitly converted to their underling base alphabet type, e.g. dna4, and then copied/moved using the copy/move constructor of the underlying base alphabet type. * [MISC] automatic linting * Adds missing copyright text in test file * Removes superfluous vector include in test file. --------- Co-authored-by: seqan-actions[bot] <[email protected]>
Platform
Question
I am relatively new to C++ and I'm currently learning to use the SeqAn3 library. I've been following the documentation for the fm_index, but I encountered an issue that I cannot resolve.
Here's a code Snippet:
Steps to Reproduce
Expected Behavior
Observed Behavior
The text was updated successfully, but these errors were encountered: