-
Notifications
You must be signed in to change notification settings - Fork 2
/
FstResult.h
81 lines (67 loc) · 1.88 KB
/
FstResult.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
/*
* FstResult
* Date: Jan-24-2013
* Author : Gabriel Renaud gabriel.reno [at sign here] gmail.com
*
*/
#ifndef FstResult_h
#define FstResult_h
using namespace std;
#include <sstream>
#include <vector>
#include <list>
#include "FstAlleleCounter.h"
#include "libgab.h"
class FstResult{
private:
public:
//This is everything
FstAlleleCounter all;
//This is without the ones marked as CpG
FstAlleleCounter noCpg;
//This is only with the ones marked as CpG
FstAlleleCounter 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
FstAlleleCounter transversions;
FstAlleleCounter transitions;
//This excludes the following cases:
// S = T, R or A = C
// S = A, R or A = G
FstAlleleCounter noDamage;
FstResult();
~FstResult();
string getHeader();
void addIfNotInfinity( vector<double> * target , double val );
string printWithBootstrap(list< vector< vector< FstResult > > > & boostraps,unsigned int i,unsigned int j,unsigned int numberOfBootstraps);
string printWithJacknife(const vector< const FstResult * > * jacknife);
FstResult & operator+= (const FstResult & other){
all += other.all;
noCpg += other.noCpg;
onlyCpg += other.onlyCpg;
transitions += other.transitions;
transversions += other.transversions;
return *this;
}
FstResult & operator-= (const FstResult & other){
all -= other.all;
noCpg -= other.noCpg;
onlyCpg -= other.onlyCpg;
transitions -= other.transitions;
transversions -= other.transversions;
return *this;
}
friend ostream& operator<<(ostream& os, const FstResult & ct){
os<<ct.all<<"\t"
<<ct.onlyCpg<<"\t"
<<ct.noCpg<<"\t"
<<ct.transitions<<"\t"
<<ct.transversions<<"\t"
<<ct.noDamage;
return os;
}
};
#endif