NVBIO
Main Page
Modules
Classes
Examples
File List
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
nvBowtie
bowtie2
cuda
params.h
Go to the documentation of this file.
1
/*
2
* nvbio
3
* Copyright (c) 2011-2014, NVIDIA CORPORATION. All rights reserved.
4
*
5
* Redistribution and use in source and binary forms, with or without
6
* modification, are permitted provided that the following conditions are met:
7
* * Redistributions of source code must retain the above copyright
8
* notice, this list of conditions and the following disclaimer.
9
* * Redistributions in binary form must reproduce the above copyright
10
* notice, this list of conditions and the following disclaimer in the
11
* documentation and/or other materials provided with the distribution.
12
* * Neither the name of the NVIDIA CORPORATION nor the
13
* names of its contributors may be used to endorse or promote products
14
* derived from this software without specific prior written permission.
15
*
16
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
17
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19
* DISCLAIMED. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE FOR ANY
20
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
*/
27
28
#pragma once
29
30
#include <
nvBowtie/bowtie2/cuda/scoring.h
>
31
#include <
string.h
>
32
#include <string>
33
#include <map>
34
35
namespace
nvbio {
36
namespace
bowtie2 {
37
namespace
cuda {
38
41
42
enum
MappingMode
{
43
BestMappingApprox
= 0,
44
BestMappingExact
= 1,
45
AllMapping
= 2
46
};
47
48
enum
ScoringMode
{
49
EditDistanceMode
= 0,
50
SmithWatermanMode
= 1,
51
};
52
53
static
const
char
* s_mapping_mode[] = {
54
"best"
,
55
"best-exact"
,
56
"all"
57
};
58
inline
const
char
*
mapping_mode
(
const
uint32
mode)
59
{
60
return
s_mapping_mode[ mode ];
61
}
62
63
inline
uint32
mapping_mode
(
const
char
* str)
64
{
65
if
(strcmp( str,
"best"
) == 0)
66
return
BestMappingApprox
;
67
else
if
(strcmp( str,
"best-exact"
) == 0)
68
return
BestMappingExact
;
69
else
70
return
AllMapping
;
71
}
72
73
static
const
char
* s_scoring_mode[] = {
74
"ed"
,
75
"sw"
76
};
77
inline
const
char
*
scoring_mode
(
const
uint32
mode)
78
{
79
return
s_scoring_mode[ mode ];
80
}
81
82
inline
uint32
scoring_mode
(
const
char
* str)
83
{
84
if
(strcmp( str,
"ed"
) == 0)
85
return
EditDistanceMode
;
86
else
if
(strcmp( str,
"sw"
) == 0)
87
return
SmithWatermanMode
;
88
else
89
return
EditDistanceMode
;
90
}
91
95
struct
ParamsPOD
96
{
97
bool
keep_stats
;
98
bool
randomized
;
99
bool
fw
;
100
bool
rc
;
101
uint32
mode
;
102
uint32
scoring_mode
;
103
uint32
alignment_type
;
104
uint32
top_seed
;
105
uint32
seed_len
;
106
SimpleFunc
seed_freq
;
107
uint32
max_hits
;
108
uint32
max_dist
;
109
uint32
max_effort_init
;
110
uint32
max_effort
;
111
uint32
min_ext
;
112
uint32
max_ext
;
113
uint32
max_reseed
;
114
uint32
rep_seeds
;
115
uint32
allow_sub
;
116
uint32
subseed_len
;
117
uint32
mapq_filter
;
118
uint32
min_read_len
;
119
uint32
max_batch_size
;
120
uint32
avg_read_length
;
121
bool
ungapped_mates
;
122
123
// paired-end options
124
uint32
pe_policy
;
125
bool
pe_overlap
;
126
bool
pe_dovetail
;
127
bool
pe_unpaired
;
128
bool
pe_discordant
;
129
uint32
min_frag_len
;
130
uint32
max_frag_len
;
131
132
// Scoring scheme
133
UberScoringScheme
scoring_scheme
;
134
135
// Internal fields
136
uint32
scoring_window
;
137
DebugState
debug
;
138
};
139
143
struct
Params
:
public
ParamsPOD
144
{
145
std::string
report
;
146
std::string
scoring_file
;
147
148
int32
persist_batch
;
149
int32
persist_seeding
;
150
int32
persist_extension
;
151
std::string
persist_file
;
152
153
int32
no_multi_hits
;
154
};
155
159
std::map<std::string,std::string>
load_options
(
const
char
* name);
160
164
void
parse_options
(
Params
& params,
const
std::map<std::string,std::string>& options,
bool
init);
165
167
168
}
// namespace cuda
169
}
// namespace bowtie2
170
}
// namespace nvbio
Generated on Wed Feb 25 2015 08:33:05 for NVBIO by
1.8.4