aboutsummaryrefslogtreecommitdiff
path: root/include/libbio.h
diff options
context:
space:
mode:
authorNicholas Noll <nbnoll@eml.cc>2020-04-25 11:38:29 -0700
committerNicholas Noll <nbnoll@eml.cc>2020-04-25 11:38:29 -0700
commit788ddbd8e113cd4f9694aee779c5b5dcca26e30b (patch)
tree32e2db53cf5cd3fb907e6b17ab9ef6bdab8d9f4c /include/libbio.h
parent1f166f0a4ed9ed32ade1ed21a571c9b2d0171ebc (diff)
feat: updated fasta code to allow for iteration
Diffstat (limited to 'include/libbio.h')
-rw-r--r--include/libbio.h17
1 files changed, 10 insertions, 7 deletions
diff --git a/include/libbio.h b/include/libbio.h
index 2dc3d45..4c93656 100644
--- a/include/libbio.h
+++ b/include/libbio.h
@@ -31,11 +31,14 @@ error bio·writenewick(bio·Tree tree, io·Putter out, void*);
// -----------------------------------------------------------------------
// Sequences
-#if 0
typedef struct bio·FastaReader bio·FastaReader;
-
-/* fasta/q i/o */
-bio·Seq *bio·newfastareader(Stream *file, mem·Allocator heap);
-bio·Seq *bio·readfasta(bio·FastaParser *p);
-error bio·writefasta(bio·Seq *seq, Stream *out);
-#endif
+typedef struct bio·Seq
+{
+ int len;
+ byte *name;
+ byte *s;
+ byte *q;
+} bio·Seq;
+
+bio·FastaReader *bio·newfastareader(io·Reader stream, void *s, mem·Allocator heap, void *h);
+error bio·readfasta(bio·FastaReader *rdr, bio·Seq *seq);