From 238b944f5986e7deaa2aa2d5925c1fa2c683c1c9 Mon Sep 17 00:00:00 2001 From: Nicholas Noll Date: Sun, 26 Apr 2020 17:34:43 -0700 Subject: feat: added sort macro to libn. moved macro based templates to more obvious directory --- include/libbio.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include/libbio.h') 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); -- cgit v1.2.1