-
Notifications
You must be signed in to change notification settings - Fork 8
/
BGS-HostAlgnmtAlgoSingle.h
120 lines (95 loc) · 5.87 KB
/
BGS-HostAlgnmtAlgoSingle.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
/*
*
* BGS-HostAlgnmtAlgoSingle.h
* Soap3(gpu)
*
* Copyright (C) 2011, HKU
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#ifndef __BGS_HOSTALIGNMENT_ALGO_H_SINGLE__
#define __BGS_HOSTALIGNMENT_ALGO_H_SINGLE__
#include <stdio.h>
#include <stdlib.h>
#include "2bwt-lib/BWT.h"
#include "2bwt-lib/HSP.h"
#include "2bwt-flex/LT.h"
#include "2bwt-flex/SRA2BWTCheckAndExtend.h"
#include "2bwt-flex/SRAArguments.h"
#include "BGS-IO.h"
#include "AlgnResult.h"
//====================MODELIZED BELOW======================
// BWTxxxModelxxx functions are fully generalised BWT search algorithm that searchs for reads contain any number of edit/mismatch
// However, calling these functions requires user to define themselves a 'searching model'.
// The searching model requires each BWT step to be defined. The search algorithm will then follow the defined model.
// BWTMismatchModelAnyDirection_CE matches steps with check and extend mechanism.
// It allows starting off CE in the middle of a step and recursive CE until SRACase completes.
// The following functions are modified such that the resulting SA ranges will be collected
unsigned long long BWTMismatchModelAnyDirection_CE3 ( SRAQueryInput * qInput, int i, int mismatchInserted,
SRACase * alignmentCase, int stepInCase,
unsigned long long * saRanges,
int occMismatch, uint8_t nbMismatch, char occQuality, SingleAlgnResult * algnResult );
// BWTExactModelForward_Lookup lookup your pattern in lookup table, bi-directional and assuming forward
unsigned long long BWTExactModelForward_Lookup3 ( SRAQueryInput * qInput,
SRACase * alignmentCase, int stepInCase,
unsigned long long * saRanges, SingleAlgnResult * algnResult );
// BWTExactModelBackward_Lookup lookup your pattern in lookup table, single direction and assuming backward
unsigned long long BWTExactModelBackward_Lookup3 ( SRAQueryInput * qInput,
SRACase * alignmentCase, int stepInCase,
unsigned long long * saRanges, SingleAlgnResult * algnResult );
// BWTExactModelBackwardAnyDirection_Lookup lookup your pattern in lookup table, single direction and assuming backward
unsigned long long BWTExactModelBackwardAnyDirection_Lookup3 ( SRAQueryInput * qInput,
SRACase * alignmentCase, int stepInCase,
unsigned long long * saRanges, SingleAlgnResult * algnResult );
// BWTExactModelBackward matches pattern on text without using any other aux, e.g. lookup table.
unsigned long long BWTExactModelBackward3 ( SRAQueryInput * qInput, int i, int errorInserted,
SRACase * alignmentCase, int stepInCase,
unsigned long long * saRanges,
int occError, uint8_t nbMismatch, char occQuality, SingleAlgnResult * algnResult );
// BWTMismatchModelAnyDirection matches pattern on text without using any other aux, e.g. lookup table, with mismatches.
unsigned long long BWTExactModelAnyDirection3 ( SRAQueryInput * qInput, int i, int errorInserted,
SRACase * alignmentCase, int stepInCase,
unsigned long long * saRanges,
int occError, uint8_t nbMismatch, char occQuality, SingleAlgnResult * algnResult );
// BWTMismatchModelAnyDirection matches pattern on text without using any other aux, e.g. lookup table, with mismatches.
unsigned long long BWTMismatchModelAnyDirection3 ( SRAQueryInput * qInput, int i, int mismatchInserted,
SRACase * alignmentCase, int stepInCase,
unsigned long long * saRanges,
int occMismatch, uint8_t nbMismatch, char occQuality, SingleAlgnResult * algnResult );
// BWTMismatchModelBackward matches pattern on text without using any other aux, e.g. lookup table, with mismatches.
unsigned long long BWTMismatchModelBackward3 ( SRAQueryInput * qInput, int i, int mismatchInserted,
SRACase * alignmentCase, int stepInCase,
unsigned long long * saRanges,
int occMismatch, uint8_t nbMismatch, char occQuality, SingleAlgnResult * algnResult );
// BWTEditModelAnyDirection matches pattern on text without using any other aux, e.g. lookup table, with mismatches.
unsigned long long BWTEditModelAnyDirection3 ( SRAQueryInput * qInput, int i, int editInserted,
SRACase * alignmentCase, int stepInCase,
unsigned long long * saRanges,
int occEdit, uint8_t nbMismatch, char occQuality, SingleAlgnResult * algnResult );
// BWTEditModelBackward matches pattern on text without using any other aux, e.g. lookup table, with mismatches.
unsigned long long BWTEditModelBackward3 ( SRAQueryInput * qInput, int i, int editInserted,
SRACase * alignmentCase, int stepInCase,
unsigned long long * saRanges,
int occEdit, uint8_t nbMismatch, char occQuality, SingleAlgnResult * algnResult );
unsigned long long BWTModelSwitchAnyDirection3 ( SRAQueryInput * qInput, int i, int errorInserted,
SRACase * alignmentCase, int stepInCase,
unsigned long long * saRanges,
int occError, uint8_t nbMismatch, char occQuality, SingleAlgnResult * algnResult );
unsigned long long BWTModelSwitchBackward3 ( SRAQueryInput * qInput, int i, int errorInserted,
SRACase * alignmentCase, int stepInCase,
unsigned long long * saRanges,
int occError, uint8_t nbMismatch, char occQuality, SingleAlgnResult * algnResult );
#endif