]> git.donarmstrong.com Git - fastq-tools.git/blob - src/swsse2/fastalib.h
b6b43e3d6963b02bf073031cd7136570e0899932
[fastq-tools.git] / src / swsse2 / fastalib.h
1 /******************************************************************
2   Copyright 2006 by Michael Farrar.  All rights reserved.
3   This program may not be sold or incorporated into a commercial product,
4   in whole or in part, without written consent of Michael Farrar.  For 
5   further information regarding permission for use or reproduction, please 
6   contact: Michael Farrar at farrar.michael@gmail.com.
7 *******************************************************************/
8
9 /*
10   Written by Michael Farrar, 2006.
11   Please send bug reports and/or suggestions to farrar.michael@gmail.com.
12 */
13
14 #ifndef INCLUDE_FASTALIB_H
15 #define INCLUDE_FASTALIB_H
16
17 #include <stdio.h>
18
19 #define MAX_SEQ_LENGTH (64 * 1024)
20
21 typedef struct {
22     char *readBuffer;
23
24     char *seqName;
25     unsigned char *seqBuffer;
26
27     int pos;
28     int size;
29
30     FILE *fp;
31
32     int sequences;
33     int residues;
34
35     int pad;
36 } FASTA_LIB;
37
38 FASTA_LIB *openLib (char *file, int pad);
39 void closeLib (FASTA_LIB *lib);
40
41 unsigned char *nextSeq (FASTA_LIB *lib, int *length);
42
43 #define seqName(LIB) (LIB->seqName)
44
45 #endif /* INCLUDE_FASTALIB_H */