-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathAlleleInfo.h
64 lines (50 loc) · 1.36 KB
/
AlleleInfo.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
/*
* AlleleInfo
* Date: Aug-29-2012
* Author : Gabriel Renaud [email protected]
*
*/
#ifndef AlleleInfo_h
#define AlleleInfo_h
#include <iostream>
#include <string>
using namespace std;
//! A virtual class for a classes that hold allele data
/*!
This class contains basic subroutines for the retrieval of
allele data.
*/
class AlleleInfo{
private:
bool isCpg_;
protected: //derived classes can have access
int typeOfData; //1 = vcf, 2 = bamtable
public:
AlleleInfo(){
isCpg_=false;
}
virtual ~AlleleInfo() { //cout<<"DESTRUCTOR AlleleInfo"<<endl;
};
virtual unsigned int getPosition() const =0;
virtual string getChr() const =0;
virtual char getRandomAllele() const =0;
/* virtual ostream& operator<<(ostream& os) =0; */
virtual void print(ostream& os) const = 0 ;
virtual bool hasAtLeastOneA() const = 0 ;
virtual bool hasAtLeastOneC() const = 0 ;
virtual bool hasAtLeastOneG() const = 0 ;
virtual bool hasAtLeastOneT() const = 0 ;
virtual bool hasAllele(int indexAlle) const = 0 ;
/* ostream& operator<< (ostream& out, const AlleleInfo& al) ; */
void setCpg(bool flag){
isCpg_=flag;
}
bool isCpg() const{
return isCpg_;
}
friend ostream& operator<<(ostream& str, AlleleInfo const& al){
al.print(str);
return str;
}
};
#endif