-
Notifications
You must be signed in to change notification settings - Fork 0
/
SNP.h
executable file
·57 lines (50 loc) · 1.2 KB
/
SNP.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
/*
* SNP.h
*
* Created on: May 4, 2012
* Author: nhatuan
*/
#ifndef SNP_H_
#define SNP_H_
#include <fstream>
#include "TDistribution.h"
#include <stdlib.h>
#include <stdio.h>
#include "utils.h"
class SNP {
public:
SNP();
virtual ~SNP();
void setName(string _name);
void setChrom(string _chr);
void setPos(string _p);
void setRef(string _r);
void setAlt(string _a);
void setInfo(string _i);
string getName();
string getChrom();
string getPos();
string getRef();
string getAlt();
string getInfo();
float calculateLikelihood();
void assignData(string lineString, vector<string> header);
string toString();
void writeToVCF(ofstream &myStream);
int getNumberOfSamples();
void setNumOfGoodSamples(int num);
vector<Sample> mixtureModel(vector<Sample> sampleList);
void debug(vector<Sample> sampleList);
private:
vector<string> header;
TDistribution * distributions;
vector<Sample> samples, missing;
string chrom, pos, name, ref, alt, info;
float ** confScores;
int numberOfGoodSample;
void addNewSample(float x, float y, string name);
void addToMissing(float x, float y, string name);
void initDistributions(vector<Sample> initSample);
vector<Sample> getGoodData();
};
#endif /* SNP_H_ */