forked from grenaud/libgab
-
Notifications
You must be signed in to change notification settings - Fork 0
/
FastQObj.h
44 lines (35 loc) · 845 Bytes
/
FastQObj.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
/*
* FastQObj
* Date: Dec-16-2012
* Author : Gabriel Renaud gabriel.reno [at sign here] gmail.com
*
*/
#ifndef FastQObj_h
#define FastQObj_h
#include <string>
#include <iostream>
#include <cstdlib>
using namespace std;
class FastQObj{
private:
string * id;
string * seq;
string * qual;
bool isFasta;
public:
FastQObj(string * _id,string * _seq,string * _qual,bool _isFasta=false);
~FastQObj();
string * getSeq() const;
string * getID() const;
void setID(const string newID);
string * getQual() const;
void printFastaSeqWithBreaks(ostream & stro) const;
friend ostream& operator<<(ostream& str, FastQObj const& fqo){
if(fqo.isFasta)
str<<*(fqo.id)<<endl<<*(fqo.seq);
else
str<<*(fqo.id)<<endl<<*(fqo.seq)<<endl<<"+"<<endl<<*(fqo.qual);
return str;
}
};
#endif