-
Notifications
You must be signed in to change notification settings - Fork 8
/
soap3-dp-module.h
79 lines (63 loc) · 2.73 KB
/
soap3-dp-module.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
#ifndef __SOAP3_DP_MODULE_H__
#define __SOAP3_DP_MODULE_H__
#define MAX_READ_NAME_LENGTH 256
#include "global_arrays.h"
#include "CPUfunctions.h"
#include "alignment.h"
#include "QueryParser.h"
#include "IndexHandler.h"
// scoring system for DP
typedef struct DPScoring
{
int cutoffThreshold; // cutoff threshold when performing DP
int matchScore; // score for match
int mismatchScore; // score for mismatch
int openGapScore; // score for gap opening
int extendGapScore; // score for gap extension
} DPScoring;
// paramaters for paired alignment
typedef struct PairAlignParam
{
int maxReadLength1;
int maxReadLength2;
int numMismatch; // the maximum number of mismatch allowed for the alignment of input reads (default: 2)
int outputOption; // 1: all valid; 2: all best; 3: unique best; 4: random best
int insert_low; // minimum value of insert size
int insert_high; // maximum value of insert size
int cpuNumThreads; // number of CPU threads
int enableDP; // 1: DP is enable; 2: DP is disable
// DP scoring
DPScoring scoring[2]; // for DP is enabled
} PairAlignParam;
// parameters for single alignment
typedef struct SingleAlignParam
{
int maxReadLength;
int numMismatch; // the maximum number of mismatch allowed for the alignment of input reads
int outputOption; // 1: all valid; 2: all best; 3: unique best; 4: random best
int cpuNumThreads; // number of CPU threads
int maxHitNum; // if there are too many hits, then only outputs the first "maxHitNum" hits
int enableDP; // 1: DP is enable; 2: DP is disable
// DP scoring
DPScoring scoring; // for DP is enabled
} SingleAlignParam;
//-------------------------------------------//
// The functions for CX to use //
//-------------------------------------------//
// To perform the paired alignment
// The resulting alignments are stored inside "algnResultArrays"
void alignPairR ( unsigned int * queries, unsigned int * readLengths, unsigned int * readIDs,
unsigned int wordPerQuery,
unsigned int numQueries, Soap3Index * index,
PairAlignParam * param,
unsigned long long & numOfAnswer,
unsigned int & numOfAlignedRead );
// To perform the single alignment
// The resulting alignments are stored inside "algnResultArrays"
void alignSingleR ( unsigned int * queries, unsigned int * readLengths, unsigned int * readIDs,
unsigned int wordPerQuery,
unsigned int numQueries, Soap3Index * index,
SingleAlignParam * param,
unsigned long long & numOfAnswer,
unsigned int & numOfAlignedRead, AlgnResultArrays * algnResultArrays );
#endif