-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDstatResult.h
112 lines (91 loc) · 2.96 KB
/
DstatResult.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
/*
* DstatResult
* Date: Mar-15-2013
* Author : Gabriel Renaud gabriel.reno [at sign here] gmail.com
*
*/
#ifndef DstatResult_h
#define DstatResult_h
using namespace std;
#include <list>
#include <vector>
#include "DstatCounter.h"
class DstatResult{
private:
public:
//This is everything
DstatCounter all;
//This is without the ones marked as CpG
DstatCounter noCpg;
//This is only with the ones marked as CpG
DstatCounter onlyCpg;
//This excludes the following cases:
// S = C, R or A = T
// S = T, R or A = C
// S = A, R or A = G
// S = G, R or A = A
DstatCounter transversions;
DstatCounter transitions;
//This excludes the following cases:
// S = T, A = C
// S = A, A = G
DstatCounter noDamage;
DstatResult();
DstatResult(const DstatResult & other);
~DstatResult();
/* DstatResult & operator= (const DstatResult & other); */
DstatResult & operator= (const DstatResult & other){
this->all = other.all;
this->noCpg = other.noCpg;
this->onlyCpg = other.onlyCpg;
this->transversions = other.transversions;
this->transitions = other.transitions;
this->noDamage = other.noDamage;
return *this;
}
void addIfNotInfinity( vector<double> * target , double val );
string printWithBootstrap(list<vector< vector< vector<DstatResult> > > > & boostraps,unsigned int i,unsigned int j,unsigned int k,unsigned int numberOfBootstraps);
string printWithJacknife(const vector< const DstatResult * > * jacknife);
DstatResult & operator+=(const DstatResult & other);
DstatResult & operator-=(const DstatResult & other);
friend ostream& operator<<(ostream& os, const DstatResult & dr){
/* cout<<"DstatResult print() begin"<<endl; */
/* exit(1); */
os<<dr.all <<"\t"
<<dr.onlyCpg <<"\t"
<<dr.noCpg <<"\t"
<<dr.transitions <<"\t"
<<dr.transversions<<"\t"
<<dr.noDamage;
/* os<<":\t" <<dr.all.headerForCount() <<"\n"; */
/* os<<"all_sites:\t" <<dr.all <<"\n"; */
/* os<<"nocpg_sites:\t" <<dr.noCpg <<"\n"; */
/* os<<"onlycpg_sites:\t" <<dr.onlyCpg <<"\n"; */
/* os<<"transitions:\t" <<dr.transitions <<"\n"; */
/* os<<"transversions:\t" <<dr.transversions <<"\n"; */
/* os<<"nodamage:\t" <<dr.noDamage <<"\n"; */
/* os<<"all\t"<<dr.all<<"\n" */
/* <<"all\t"<<dr.onlyCpg<<"\n" */
/* <<dr.noCpg<<"\n" */
/* <<dr.transitions<<"\n" */
/* <<dr.transversions<<"\n" */
/* <<dr.noDamage; */
return os;
}
friend istream &operator>>(istream &is , DstatResult &dr){
//cerr<<" op TEST"<<endl;
is
>>dr.all
>>dr.onlyCpg
>>dr.noCpg
>>dr.transitions
>>dr.transversions
>>dr.noDamage;
return is;
//return dsr.read(s);
}
/* istream read(istream &s){ */
/* cout<< */
};//class DstatResult;
///}//class DstatResult;
#endif