aboutsummaryrefslogtreecommitdiff
path: root/include/libbio.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/libbio.h')
-rw-r--r--include/libbio.h31
1 files changed, 9 insertions, 22 deletions
diff --git a/include/libbio.h b/include/libbio.h
index f802e22..7b28a55 100644
--- a/include/libbio.h
+++ b/include/libbio.h
@@ -52,32 +52,19 @@ 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;
+typedef struct bio·SeqReader bio·SeqReader;
+typedef struct bio·SeqWriter bio·SeqWriter;
typedef struct bio·Seq
{
int len;
- byte *name;
- byte *s;
- byte *q;
+ char *name;
+ char *s;
+ char *q;
} bio·Seq;
-bio·FastaReader *bio·openfasta(io·Reader stream, void *s, mem·Allocator heap, void *h);
-error bio·readfasta(bio·FastaReader *rdr, bio·Seq *seq);
-error bio·closefasta(bio·FastaReader *rdr);
+bio·SeqReader *bio·open(io·Reader io, void *rdr, mem·Allocator mem, void *heap);
+error bio·close(bio·SeqReader *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 = 10, // number of hashes
-};
-
-error aln·sketch(byte *seq, int l, uint64 *phi[aln·N], int *locs[aln·N]);
-error aln·sort(uintptr len, int l, uint64 *vals);
+error bio·readfasta(bio·SeqReader *rdr, bio·Seq *seq);
+error bio·readfastq(bio·SeqReader *rdr, bio·Seq *seq);