-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathfastq_pair.h
58 lines (45 loc) · 1.13 KB
/
fastq_pair.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//
// Created by redwards on 7/29/17.
//
#ifndef CEEQLIB_INDEX_FASTQ_H
#define CEEQLIB_INDEX_FASTQ_H
#include <stdbool.h>
/*
* idloc is a struct with the current file position (pos) from ftell,
* the id string for the sequence, and whether or not we've printed it out.
* next is a pointer to the next idloc element in the hash.
*/
struct idloc {
bool printed;
long int pos;
char *id;
struct idloc *next;
};
/*
* options are our options that can be passed in. The most important
* is the table size.
*/
struct options {
int tablesize;
bool print_table_counts;
bool verbose;
bool splitspace;
};
// how long should our lines be. This is a 64k buffer
#define MAXLINELEN 65536
/*
* calculate the hash for a fastq sequence
*
* This is a simple hash but widely used!
*
* we use an unsigned here so that the answer is > 0
*
* You still need to mod this on the table size
*/
unsigned hash (char *s);
/*
* Take two fastq files (f and g), we generate paired output.
* t is the tablesize and is the most important parameter
*/
int pair_files(char *f, char *g, struct options *o);
#endif //CEEQLIB_INDEX_FASTQ_H