forked from DaehwanKimLab/centrifuge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
presets.cpp
87 lines (84 loc) · 2.65 KB
/
presets.cpp
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
/*
* Copyright 2011, Ben Langmead <[email protected]>
*
* This file is part of Bowtie 2.
*
* Bowtie 2 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 3 of the License, or
* (at your option) any later version.
*
* Bowtie 2 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 Bowtie 2. If not, see <http://www.gnu.org/licenses/>.
*/
#include <iostream>
#include "presets.h"
#include "opts.h"
using namespace std;
void PresetsV0::apply(
const std::string& preset,
std::string& policy,
EList<std::pair<int, std::string> >& opts)
{
// Presets: Same as:
// For --end-to-end:
// --very-fast -M 5 -R 1 -N 0 -L 22 -i S,1,2.50
// --fast -M 10 -R 2 -N 0 -L 22 -i S,1,2.50
// --sensitive -M 15 -R 2 -N 0 -L 22 -i S,1,1.15
// --very-sensitive -M 25 -R 3 -N 0 -L 19 -i S,1,0.50
if(preset == "very-fast") {
policy += ";SEED=0,22";
policy += ";DPS=5";
policy += ";ROUNDS=1";
policy += ";IVAL=S,0,2.50";
} else if(preset == "fast") {
policy += ";SEED=0,22";
policy += ";DPS=10";
policy += ";ROUNDS=2";
policy += ";IVAL=S,0,2.50";
} else if(preset == "sensitive") {
policy += ";SEED=0,22";
policy += ";DPS=15";
policy += ";ROUNDS=2";
policy += ";IVAL=S,1,1.15";
} else if(preset == "very-sensitive") {
policy += ";SEED=0,20";
policy += ";DPS=20";
policy += ";ROUNDS=3";
policy += ";IVAL=S,1,0.50";
}
// For --local:
// --very-fast-local -M 1 -N 0 -L 25 -i S,1,2.00
// --fast-local -M 2 -N 0 -L 22 -i S,1,1.75
// --sensitive-local -M 2 -N 0 -L 20 -i S,1,0.75 (default)
// --very-sensitive-local -M 3 -N 0 -L 20 -i S,1,0.50
else if(preset == "very-fast-local") {
policy += ";SEED=0,25";
policy += ";DPS=5";
policy += ";ROUNDS=1";
policy += ";IVAL=S,1,2.00";
} else if(preset == "fast-local") {
policy += ";SEED=0,22";
policy += ";DPS=10";
policy += ";ROUNDS=2";
policy += ";IVAL=S,1,1.75";
} else if(preset == "sensitive-local") {
policy += ";SEED=0,20";
policy += ";DPS=15";
policy += ";ROUNDS=2";
policy += ";IVAL=S,1,0.75";
} else if(preset == "very-sensitive-local") {
policy += ";SEED=0,20";
policy += ";DPS=20";
policy += ";ROUNDS=3";
policy += ";IVAL=S,1,0.50";
}
else {
cerr << "Unknown preset: " << preset.c_str() << endl;
}
}