-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathread.h
66 lines (55 loc) · 1.29 KB
/
read.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
66
#ifndef READ_H
#define READ_H
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <iostream>
#include <fstream>
#include "sequence.h"
#include <vector>
using namespace std;
class Read{
public:
Read(string name, string seq, string strand, string quality, bool phred64=false);
Read(string name, Sequence seq, string strand, string quality, bool phred64=false);
Read(string name, string seq, string strand);
Read(string name, Sequence seq, string strand);
Read(Read &r);
void print();
void printFile(ofstream& file);
Read* reverseComplement();
string firstIndex();
string lastIndex();
// default is Q20
int lowQualCount(int qual=20);
int length();
string toString();
string toStringWithTag(string tag);
void resize(int len);
void convertPhred64To33();
void trimFront(int len);
bool fixMGI();
vector<Read*> split(int segment);
public:
static bool test();
private:
public:
string mName;
Sequence mSeq;
string mStrand;
string mQuality;
bool mHasQuality;
};
class ReadPair{
public:
ReadPair(Read* left, Read* right);
~ReadPair();
// merge a pair, without consideration of seq error caused false INDEL
Read* fastMerge();
public:
Read* mLeft;
Read* mRight;
public:
static bool test();
};
#endif