-
Notifications
You must be signed in to change notification settings - Fork 8
/
SNP_Caller.h
75 lines (60 loc) · 2.34 KB
/
SNP_Caller.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
#ifndef _SNP_CALLER_H_
#define _SNP_CALLER_H_
#include <stdio.h>
#include "SNP_Meta.h"
enum SNPMetaBufferStatus
{
NOT_READY, READY, FINISHED
};
typedef struct SNPMetaBuffer
{
MetaReference *reference;
MetaSnpCounter *snpCounter;
GenotypeLikelihood *genotypeLikelihood;
StrandBias *strandBias;
BaseQualityBias *baseQualityBias;
DeltaStrandCount *deltaStrandCount;
GCCount *gcCount;
AverageStrandCount *avgStrandCount;
AverageDepth *avgDepth;
SnpCallingInfo *scInfo;
MetaWindowInfo *mwInfo;
IndelInfo *indelInfo;
unsigned int batchSize;
unsigned int startIdx;
SNPMetaBufferStatus status;
} SNPMetaBuffer;
typedef struct SnpCallerWrapperObj
{
SNPMetaBuffer *buffer0;
SNPMetaBuffer *buffer1;
FILE *snpOutput;
unsigned int *attriSize;
} SnpCallerWrapperObj;
void filterSNP(MetaReference *reference, MetaSnpCounter *snpCounter,
GenotypeLikelihood *genotypeLikelihood, SnpCallingInfo *scInfo,
MetaWindowInfo *mwInfo, IndelInfo *indelInfo,
unsigned int batchSize, unsigned int startIdx,
FILE *snpOutput, unsigned int *attriSize);
SNPMetaBuffer *createSNPMetaBuffer(MetaReference *reference,
MetaSnpCounter *snpCounter,
GenotypeLikelihood *genotypeLikelihood,
SnpCallingInfo *scInfo,
MetaWindowInfo *mwInfo,
IndelInfo *indelInfo);
void freeSNPMetaBuffer(SNPMetaBuffer *buffer);
void setReadySNPMetaBufferStatus(SNPMetaBuffer *buffer,
unsigned int batchSize,
unsigned int startIdx);
void setFinishSNPMetaBufferStatus(SNPMetaBuffer *buffer);
void waitFinishSNPMetaBuffer(SNPMetaBuffer *buffer);
SNPMetaBuffer *getIdleSNPMetaBuffer(SNPMetaBuffer *buffer0, SNPMetaBuffer *buffer1);
void startFilterSNPThread(SNPMetaBuffer *buffer0, SNPMetaBuffer *buffer1,
FILE *snpOutput,
unsigned int *attriSize,
pthread_t &filterSnpThread);
void calRandomForestpPedictProb(const char *snp_noRF_filename,
const char *snp_filename,
unsigned int attriSize, char verbose);
void closeFilterSNPThread(pthread_t &thread);
#endif