We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
let kh_val(h)=y when put the key into hash?
The text was updated successfully, but these errors were encountered:
Not sure if this is efficient enough, you can unpack the kmer out of uint64_t given k to a seq string:
#include <inttypes.h> void u64s(uint64_t x, char* s, size_t k) { size_t i = 0; for (i = 0; i < k; ++i) { s[k - i - 1] = "ACGT"[(uint8_t) x & 0x3]; x >>= 2; } s[i] = '\0'; } static void print_hist(const kc_c1_t *h) { int i, j = 31; khint_t k; uint64_t cnt[256] = {0}; char s[j + 1]; //for (i = 0; i < 256; ++i) cnt[i] = 0; for (k = 0; k < kh_end(h); ++k) { if (kh_exist(h, k)) { u64s(kh_key(h, k), s, j); printf("%"PRIu64"\t%d\t%s\n", kh_key(h, k), kh_val(h, k), s); //++cnt[kh_val(h, k) < 256? kh_val(h, k) : 255]; } } /* for (i = 1; i < 256; ++i) printf("%d\t%ld\n", i, (long)cnt[i]); */ }
reference
Sorry, something went wrong.
No branches or pull requests
let kh_val(h)=y when put the key into hash?
The text was updated successfully, but these errors were encountered: