forked from ANGSD/angsd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
abcIBS.h
56 lines (49 loc) · 1.13 KB
/
abcIBS.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
#include "abc.h"
typedef struct{
int **dat;
int *major;
int *minor;
int *ibsMatrix;
int *nonMis;// N x N matrix of non missing comparisons for ibs matrix
double *covMatrix;
int *covMis; // N x N matrix of non missing comparisons for covariance matrix
}IBSstruct;
class abcIBS:public abc{
private:
//non optional arguments
int doIBS;
int majorminor;
int doCount;
int output01;
int doCov;
int intToMajorMinorAA[5];
//optional arguments
int maxMis;
int minMinor;
double minFreq;
int makeMatrix;
int *ibsMatrixAll;
int *nonMisAll;
double *covMatrixAll;
int *nonMisCov;
//out file
BGZF* outfileZ;
FILE* outfileMat;
FILE* outfileCov;
int nInd;
//functions
void printHaplo(funkyPars *pars);
void getHaplo(funkyPars *pars);
void makeIBSmatrix(funkyPars *pars);
void makeCovMatrix(funkyPars *pars);
//print buffer
kstring_t bufstr;
public:
abcIBS(const char *outfiles,argStruct *arguments,int inputtype);
~abcIBS();
void getOptions(argStruct *arguments);
void run(funkyPars *pars);
void print(funkyPars *pars);
void clean(funkyPars *pars);
void printArg(FILE *argFile);
};