Open
Conversation
parham-k
reviewed
Aug 3, 2023
| * @param seq_len Length of `seq`. | ||
| * @param hash_num Number of hashes to compute. | ||
| * @param k Length of k-mer. | ||
| * @param phred_min Minimum Phred score for a base to be included in the hash. |
Member
There was a problem hiding this comment.
I think the explanation for phred_min needs clarification. I thought that if the Phred score for a base is less than this threshold, the k-mer will be ignored, not that specific base (unlike spaced seeds where bases are ignored).
| /** | ||
| * NtHash with Phred score filtering. | ||
| */ | ||
| class PhredNtHash : private NtHash |
Member
There was a problem hiding this comment.
An alternative would be to use : public NtHash and hide unused methods with using, e.g.
private:
using NtHash::peek;
This way, there'll be no need to reimplement NtHash's public methods like get_pos etc.
Source: https://www.learncpp.com/cpp-tutorial/hiding-inherited-functionality/
| uint64_t get_reverse_hash() const { return NtHash::get_reverse_hash(); } | ||
|
|
||
| private: | ||
| const char* qual_seq; |
Member
There was a problem hiding this comment.
Let's prefer to use a shared_ptr or an std::string_view for qual_seq here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Added a new PhredNtHash that skip k-mers with any base with a lower quality than a user-specified Phred quality score.
Once the code change is approved, I will generate the docs, wrappers and python tests.