From 788ddbd8e113cd4f9694aee779c5b5dcca26e30b Mon Sep 17 00:00:00 2001 From: Nicholas Noll Date: Sat, 25 Apr 2020 11:38:29 -0700 Subject: feat: updated fasta code to allow for iteration --- include/libbio.h | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'include/libbio.h') 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); -- cgit v1.2.1