forked from sequencing/NxTrim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fastqlib.h
executable file
·66 lines (57 loc) · 1.13 KB
/
fastqlib.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
59
60
61
62
63
64
65
#pragma once
#include "utilityfunc.h"
class fqread {
public:
fqread();
fqread(int L);
fqread(string header,string dna,string line3,string qual);
int l;
bool filtered;//if filtered is true, it failed QC
string h,s,l3,q;
int notN();
int notN(int a,int b);//tells us how many non-missing bases are in this window.
fqread mask(int a,int b);//N masks the region a,b
fqread mask();
fqread window(int a,int b);
fqread window(int a);
fqread rc();
int print();
int clear();
};
class readPair {
public:
readPair();
readPair(fqread read1,fqread read2);
int rc();
int set(fqread read1, fqread read2);
fqread r1,r2;
int l;
bool filtered;
};
class fastqReader {
public:
fastqReader(string fname);
fqread next();
bool fin();
private:
ifile infile;
};
class fastqWriter {
public:
fastqWriter();
fastqWriter(string fname);
int open(string fname);
int write(fqread & read);
int write(readPair & read);
private:
ofile outfile;
};
class pairReader {
public:
pairReader(string fname1,string fname2);
readPair next();
int print();
bool getPair(readPair & p);
private:
fastqReader *f1,*f2;
};