#pragma once // ----------------------------------------------------------------------- // Phylogenetics typedef struct bio·Node { string name; string comment; double dist; double support; int nchild; int ndescendent; struct bio·Node *parent; struct bio·Node *child[2]; struct bio·Node *sibling; } bio·Node; error phylo·addchild(bio·Node *parent, bio·Node* child); bool phylo·isleaf(bio·Node *node); typedef struct bio·Tree { bio·Node *root; } bio·Tree; /* newick i/o */ bio·Tree bio·readnewick(io·Peeker stream, void*, mem·Allocator heap, void*); error bio·writenewick(bio·Tree tree, io·Putter out, void*); // ----------------------------------------------------------------------- // Sequences typedef struct bio·FastaReader bio·FastaReader; 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);