diff options
author | Nicholas Noll <nbnoll@eml.cc> | 2020-04-26 17:34:43 -0700 |
---|---|---|
committer | Nicholas Noll <nbnoll@eml.cc> | 2020-04-26 17:34:43 -0700 |
commit | 238b944f5986e7deaa2aa2d5925c1fa2c683c1c9 (patch) | |
tree | 7eb4f2d21ab03888ccda436bf36a68c3f13b09e6 /include/libbio.h | |
parent | 98375c9c5e4bf26f8d238666d7233177dba787eb (diff) |
feat: added sort macro to libn. moved macro based templates to more obvious directory
Diffstat (limited to 'include/libbio.h')
-rw-r--r-- | include/libbio.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/libbio.h b/include/libbio.h index b405810..3db742d 100644 --- a/include/libbio.h +++ b/include/libbio.h @@ -31,6 +31,7 @@ error bio·writenewick(bio·Tree tree, io·Putter out, void*); // ----------------------------------------------------------------------- // Sequences +/* i/o */ typedef struct bio·FastaReader bio·FastaReader; typedef struct bio·FastqReader bio·FastqReader; @@ -49,3 +50,14 @@ error bio·closefasta(bio·FastaReader *rdr); bio·FastqReader *bio·openfastq(io·Reader stream, void *s, mem·Allocator heap, void *h); error bio·readfastq(bio·FastqReader *rdr, bio·Seq *seq); error bio·closefastq(bio·FastqReader *rdr); + +/* alignment */ +enum +{ + aln·K = 20, // kmer size (k <= 32) + aln·L = 3, // number of kmers / hash + aln·N = 1000, // number of hashes +}; + +error aln·sketch(byte *seq, int l, uint64 *phi[aln·N], int *locs[aln·N]); +error aln·sort(int len, int l, uint64 *vals); |