-
Notifications
You must be signed in to change notification settings - Fork 5
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
PhredNtHash class #108
base: master
Are you sure you want to change the base?
PhredNtHash class #108
Conversation
* @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. |
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 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 |
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.
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; |
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.
Let's prefer to use a shared_ptr
or an std::string_view
for qual_seq
here.
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.