forked from ANGSD/angsd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathabcSaf.h
64 lines (58 loc) · 1.93 KB
/
abcSaf.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
typedef struct{
char *oklist;//<- {0,1,2}, length=numSites, 0 don't keep 1 do keep 2 error
float **pLikes;
}realRes;
class abcSaf : public abc{
std::vector<float> *theta_res;
std::vector<int> theta_pos;
int doSaf;
BGZF *outfileGprobs;
BGZF *outfileSAF;
FILE *outfileSAFIDX;
BGZF *outfileSAFPOS;
BGZF *theta_dat;
FILE *theta_idx;
int underFlowProtect;
int fold;
int isSim;
int noTrans;
char *anc;
char *pest;
int doPost;
int doThetas;
void calcThetas(funkyPars *p,int index,double *prior,std::vector<float> *vecs,std::vector<int> &myposi,int newdim);
double aConst;
double aConst2;
double aConst3;
double *scalings;
int tsktsktsk;
int isHap;
double *filipeIndF;
int ishap;
int newDim;
int64_t offs[2];
int64_t offs_thetas;
int nnnSites;
char *tmpChr;
void algoJointPost(double **post,int nSites,int nInd,int *keepSites,realRes *r,int doFold);
void algoGeno(int refId,double **liks,char *major,char *minor,int nsites,int numInds,kstring_t *sfsfile,int underFlowProtect, int *posi,int *keepSites,double *pest);
void algoJoint(double **liks,char *anc,int nsites,int numInds,int underFlowProtect, int fold,int *keepSites,realRes *r,int noTrans);
void algoJointHap(double **liks,char *anc,int nsites,int numInds,int underFlowProtect, int fold,int *keepSites,realRes *r,int noTrans);
void algoJointMajorMinor(double **liks,int nsites,int numInds, int *keepSites,realRes *r,int fold,char *major, char *minor);
void writeAll();
int mynchr;
public:
static double *prior; //<- outputfile form pest;
static double *lbicoTab; //dim = [2*numInds+1]
static double **myComb2Tab;
//none optional stuff
FILE *outfile;
abcSaf(const char *outfiles,argStruct *arguments,int inputtype);
~abcSaf();
void getOptions(argStruct *arguments);
void run(funkyPars *pars);
void clean(funkyPars *pars);
void print(funkyPars *pars);
void printArg(FILE *argFile);
void changeChr(int refId);
};