bio-rocker 1.0.0 → 1.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/ROCker +276 -96
- data/lib/rocker.rb +25 -14
- data/lib/rocker/blasthit.rb +8 -5
- data/lib/rocker/genome-set.rb +70 -0
- data/lib/rocker/protein-set.rb +90 -0
- data/lib/rocker/rocdata.rb +26 -9
- data/lib/rocker/rocwindow.rb +20 -18
- data/lib/rocker/step/build.rb +233 -200
- data/lib/rocker/step/compile.rb +11 -6
- data/lib/rocker/step/filter.rb +11 -7
- data/lib/rocker/step/plot.rb +80 -26
- data/lib/rocker/step/search.rb +27 -4
- metadata +16 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea753ac3675ae8b018f57e1d76fe1a1217a5d329
|
4
|
+
data.tar.gz: 00e681953dae2f6dc715e5594f2c2f45cb441e23
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8fafa5d4adcdf71de47a5f778a94e181a2a1d0d43810a1e4e51b1e37c98e1bf3f2a3932bbf20c27e4ae32c00e6538fdd4ddfa70d695c43d9c731aed35f0aa778
|
7
|
+
data.tar.gz: 04e7ecc8213d0050eb4d80ada2badf39b79fe86cb961c1c0999c4c94542aff6e9e877e3a39e69957ad979c5cabe27a4a828f208ebbec9e39f82a9d04ca64c099
|
data/bin/ROCker
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
# @author Luis M. Rodriguez-R <lmrodriguezr at gmail dot com>
|
4
4
|
# @author Luis (Coto) Orellana
|
5
5
|
# @license artistic license 2.0
|
6
|
-
# @update
|
6
|
+
# @update Sep-07-2015
|
7
7
|
#
|
8
8
|
|
9
9
|
lib = File.expand_path(File.dirname(__FILE__) + '/../lib')
|
@@ -14,14 +14,20 @@ require 'optparse'
|
|
14
14
|
|
15
15
|
#================================[ Options parsing ]
|
16
16
|
$t = {
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
17
|
+
"build" => "Creates in silico metagenomes and training sets from " +
|
18
|
+
"reference genomes.",
|
19
|
+
"compile" => "Identifies the most discriminant bit-score per alignment " +
|
20
|
+
"position in a set of sequence.",
|
21
|
+
"search" => "Uses a ROCker compilation to identify reads putatively " +
|
22
|
+
"derived from a set of sequences.",
|
23
|
+
"filter" => "Uses a pre-compiled set of bit-score thresholds to filter " +
|
24
|
+
"a search result.",
|
25
|
+
"plot" => "Generates a graphical representation of the alignment, the " +
|
26
|
+
"thresholds, and the hits.",
|
27
|
+
"info" => "Display additional information about ROCker."
|
22
28
|
}
|
23
|
-
task = (ARGV.
|
24
|
-
ARGV <<
|
29
|
+
task = (ARGV.empty? ? "" : ARGV.shift).downcase
|
30
|
+
ARGV << "-h" if ARGV.empty? and task != "info"
|
25
31
|
|
26
32
|
o = {}
|
27
33
|
opts = OptionParser.new do |opt|
|
@@ -32,132 +38,293 @@ opts = OptionParser.new do |opt|
|
|
32
38
|
opt.separator ""
|
33
39
|
end
|
34
40
|
case task
|
35
|
-
when
|
41
|
+
when "build"
|
36
42
|
unless ROCker.has_build_gems?
|
37
43
|
opt.separator "+ UNSATISFIED REQUIREMENTS"
|
38
|
-
opt.separator " The building task requires uninstalled gems, please
|
44
|
+
opt.separator " The building task requires uninstalled gems, please"
|
45
|
+
opt.separator " install them executing:"
|
39
46
|
opt.separator " gem install rest_client"
|
40
47
|
opt.separator ""
|
41
48
|
end
|
42
49
|
opt.separator "+ BUILDING ARGUMENTS"
|
43
|
-
opt.on("-p", "--positive ID1,ID2,ID3", Array,
|
44
|
-
|
45
|
-
|
46
|
-
|
50
|
+
opt.on("-p", "--positive ID1,ID2,ID3", Array,
|
51
|
+
"Comma-separated list of UniProtKB IDs corresponding to the positive ",
|
52
|
+
"training set. Required unless -P or -a are used."
|
53
|
+
){ |v| o[:positive]=v }
|
54
|
+
opt.on("-n", "--negative ID1,ID2,ID3", Array,
|
55
|
+
"Comma-separated list of UniProtKB IDs corresponding to the negative ",
|
56
|
+
"training set. See also -N."){ |v| o[:negative]=v }
|
57
|
+
opt.on("-o", "--baseout PATH",
|
58
|
+
"Prefix for the output files to be generated. Required."
|
59
|
+
){ |v| o[:baseout]=v }
|
60
|
+
|
47
61
|
opt.separator ""
|
48
62
|
opt.separator "+ ADVANCED BUILDING ARGUMENTS"
|
49
|
-
opt.on("-P", "--positive-file PATH",
|
50
|
-
|
51
|
-
|
52
|
-
opt.on("-
|
53
|
-
|
54
|
-
|
55
|
-
opt.on(
|
56
|
-
|
57
|
-
|
58
|
-
opt.on(
|
59
|
-
|
60
|
-
|
61
|
-
|
63
|
+
opt.on("-P", "--positive-file PATH",
|
64
|
+
"File containing the positive set, one UniProtKB ID per line.",
|
65
|
+
"If used, -p is not required."){ |v| o[:posfile]=v }
|
66
|
+
opt.on("-N", "--negative-file PATH",
|
67
|
+
"File containing the negative set, one UniProtKB ID per line."
|
68
|
+
){ |v| o[:negfile]=v }
|
69
|
+
opt.on("-a", "--alignment PATH",
|
70
|
+
"Protein alignment of the reference sequences. The defline must have",
|
71
|
+
"UniProtKB IDs. If used, -p is not required."){ |v| o[:aln]=v }
|
72
|
+
opt.on("-s", "--seqdepth NUMBER",
|
73
|
+
"Sequencing depth (reads/bp) to be used in building the in silico" +
|
74
|
+
"metagenome.", "By default: '" + ROCker.default(:seqdepth).to_s +
|
75
|
+
"'."){ |v| o[:seqdepth]=v.to_f }
|
76
|
+
opt.on("-l", "--readlen INTEGER",
|
77
|
+
"Average read length of in silico metagenome (in bp).",
|
78
|
+
"By default: '" + ROCker.default(:readlen).to_s + "'."
|
79
|
+
){ |v| o[:readlen]=v.to_i }
|
80
|
+
opt.on("-v", "--overlap INTEGER",
|
81
|
+
"Minimum overlap (in bp) with reference gene to tag a positive read.",
|
82
|
+
"By default: '" + ROCker.default(:minovl).to_s +
|
83
|
+
"'."){ |v| o[:minovl]=v.to_i }
|
84
|
+
opt.on("--per-taxon RANK",
|
85
|
+
"Use only one genome per taxon to build the metagenome.",
|
86
|
+
"Valid ranks include: species, genus, family, order, class, phylum."
|
87
|
+
){ |v| o[:pertaxon]=v.downcase }
|
88
|
+
opt.on("--nosimulate",
|
89
|
+
"Do not simulate metagenome. It implies --nosearch.",
|
90
|
+
"By default, metagenome is simulated."){ |v| o[:nosimulate]=v }
|
91
|
+
opt.on("--nosearch",
|
92
|
+
"Do not execute similarity search. By default it's executed."
|
93
|
+
){ |v| o[:nosearch]=v }
|
94
|
+
opt.on("--noalignment",
|
95
|
+
"Do not align reference set. By default references are aligned."
|
96
|
+
){ |v| o[:noaln]=v }
|
97
|
+
opt.on("--nocleanup",
|
98
|
+
"Keep all intermediate files. By default temporal files are removed."
|
99
|
+
){ |v| o[:noclean]=v }
|
100
|
+
opt.on("--reuse-files",
|
101
|
+
"Re-use existing result files. By default existing files are ignored."
|
102
|
+
){ |v| o[:reuse]=true }
|
103
|
+
|
62
104
|
opt.separator ""
|
63
105
|
opt.separator "+ EXTERNAL SOFTWARE OPTIONS"
|
64
|
-
opt.on(
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
opt.on(
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
opt.on(
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
opt.on("--
|
77
|
-
|
78
|
-
|
106
|
+
opt.on("--search STR",
|
107
|
+
"Similarity search algorithm to use. Supported: blast and diamond",
|
108
|
+
"By default: '" + ROCker.default(:search).to_s + "'."
|
109
|
+
){ |v| o[:search]=v.to_sym }
|
110
|
+
opt.on("--simulator STR",
|
111
|
+
"In silico metagenome simulator to use. Supported: grinder.",
|
112
|
+
"By default: '" + ROCker.default(:simulator).to_s + "'."
|
113
|
+
){ |v| o[:simulator]=v.to_sym }
|
114
|
+
opt.on("--aligner STR",
|
115
|
+
"Multiple alignment algorithm to use. Supported: clustalo and muscle.",
|
116
|
+
"By default: '" + ROCker.default(:aligner).to_s + "'."
|
117
|
+
){ |v| o[:aligner]=v.to_sym }
|
118
|
+
opt.on("--search-bins PATH",
|
119
|
+
"Path to the similarity search executables. By default in $PATH: '" +
|
120
|
+
ROCker.default(:searchbins) + "'."
|
121
|
+
){ |v| o[:searchbins]=v }
|
122
|
+
opt.on("--simulator-bin PATH",
|
123
|
+
"Path to the simulator executable. By default in $PATH: '" +
|
124
|
+
ROCker.default(:simulatorbin).values.join("' or '") + "'."
|
125
|
+
){ |v| o[:simulatorbin]=v }
|
126
|
+
opt.on("--aligner-bin PATH",
|
127
|
+
"Path to the aligner executable. By default in $PATH: '" +
|
128
|
+
ROCker.default(:alignerbin).values.join("' or '") + "'."
|
129
|
+
){ |v| o[:alignerbin]=v }
|
130
|
+
opt.on("--search-cmd STR",
|
131
|
+
"Command for similarity search, where %1$s: binaries, %2$s: program,",
|
132
|
+
"%3$s: input, %4$s: database, %5$s: output, %6$d: threads.",
|
133
|
+
*ROCker.default(:searchcmd).keys.map do |k|
|
134
|
+
["By default if --search #{k}:", "'" +
|
135
|
+
ROCker.default(:searchcmd)[k] + "'"]
|
136
|
+
end.reduce([],:+) ){ |v| o[:searchcmd]=v }
|
137
|
+
opt.on("--makedb-cmd STR",
|
138
|
+
"Command calling database formater for similarity search, where",
|
139
|
+
"%1$s: binaries, %2$s: dbtype, %3$s: input, %4$s: database.",
|
140
|
+
*ROCker.default(:makedbcmd).keys.map do |k|
|
141
|
+
["By default if --search #{k}:", "'" +
|
142
|
+
ROCker.default(:makedbcmd)[k] + "'"]
|
143
|
+
end.reduce([],:+) ){ |v| o[:makedbcmd]=v }
|
144
|
+
opt.on("--simulator-cmd STR",
|
145
|
+
"Command calling simulator, where %1$s: binary, %2$s: input,",
|
146
|
+
"%3$s: seq. depth (X), %4$d: read len., %5$s: output.",
|
147
|
+
*ROCker.default(:simulatorcmd).keys.map do |k|
|
148
|
+
["By default if --simulator #{k}:", "'" +
|
149
|
+
ROCker.default(:simulatorcmd)[k] + "'"]
|
150
|
+
end.reduce([],:+) ){ |v| o[:simulatorcmd]=v }
|
151
|
+
opt.on("--aligner-cmd STR",
|
152
|
+
"Command calling aligner, where %1$s: binary, %2$s: input,",
|
153
|
+
"%3$s: output, %4$d: threads.",
|
154
|
+
*ROCker.default(:alignercmd).keys.map do |k|
|
155
|
+
["By default if --aligner #{k}:", "'" +
|
156
|
+
ROCker.default(:alignercmd)[k] + "'."]
|
157
|
+
end.reduce([],:+) ){ |v| o[:alignercmd]=v }
|
158
|
+
when "compile"
|
79
159
|
opt.separator "+ COMPILATION ARGUMENTS"
|
80
|
-
opt.on("-a", "--alignment PATH",
|
160
|
+
opt.on("-a", "--alignment PATH",
|
161
|
+
"Protein alignment of the reference sequences. Required."
|
162
|
+
){ |v| o[:aln]=v }
|
81
163
|
opt.on("-b", "--ref-blast PATH",
|
82
|
-
|
83
|
-
|
164
|
+
"Tabular BLAST (blastx) of the test reads vs. the reference dataset.",
|
165
|
+
"Required unless -T exists."){ |v| o[:blast]=v }
|
166
|
+
opt.on("-k", "--rocker PATH",
|
167
|
+
"ROCker file to be created. Required."){ |v| o[:rocker]=v }
|
168
|
+
|
84
169
|
opt.separator ""
|
85
170
|
opt.separator "+ ADVANCED COMPILATION ARGUMENTS"
|
86
|
-
opt.on("-
|
87
|
-
|
88
|
-
|
89
|
-
opt.on("-
|
90
|
-
|
171
|
+
opt.on("-T", "--table PATH",
|
172
|
+
"Formated tabular file to be created (or reused).",
|
173
|
+
"Required unless -b is provided."){ |v| o[:table]=v }
|
174
|
+
opt.on("--min-score NUMBER",
|
175
|
+
"Minimum Bit-Score to consider a hit. By default: " +
|
176
|
+
ROCker.default(:minscore).to_s){ |v| o[:minscore]=v.to_f }
|
177
|
+
opt.on("--norefine",
|
178
|
+
"Do not refine windows."){ o[:refine]=false }
|
179
|
+
opt.on("-w", "--window INT",
|
180
|
+
"Initial size of alignment windows (in number of AA columns). ",
|
181
|
+
"By default: " + ROCker.default(:win).to_s + "."
|
182
|
+
){ |v| o[:win]=v.to_i }
|
183
|
+
opt.on("--reuse-files",
|
184
|
+
"Re-use existing result files. By default, existing files are " +
|
185
|
+
"ignored."){ |v| o[:reuse]=true }
|
91
186
|
opt.separator ""
|
92
187
|
opt.separator "+ INPUT/OUTPUT"
|
93
|
-
opt.separator " o The input alignment (-a) MUST be in FastA format,
|
188
|
+
opt.separator " o The input alignment (-a) MUST be in FastA format, " +
|
189
|
+
"and the IDs must"
|
94
190
|
opt.separator " coincide with those from the BLAST (-b)."
|
95
|
-
opt.separator " o The input BLAST (-b) MUST be in tabular format.
|
191
|
+
opt.separator " o The input BLAST (-b) MUST be in tabular format. " +
|
192
|
+
"True positives must"
|
96
193
|
opt.separator " contain the string '@%' somewhere in the query ID."
|
97
|
-
opt.separator " o The table file (-
|
194
|
+
opt.separator " o The table file (-T) should be tab-delimited and " +
|
195
|
+
"contain six columns:"
|
98
196
|
opt.separator " 1. Subject ID."
|
99
|
-
opt.separator " 2. Start of alignment in subject (translated to
|
100
|
-
|
197
|
+
opt.separator " 2. Start of alignment in subject (translated to " +
|
198
|
+
"alignment column)."
|
199
|
+
opt.separator " 3. End of alignment in subject (translated to " +
|
200
|
+
"alignment column)."
|
101
201
|
opt.separator " 4. Bit score."
|
102
|
-
opt.separator " 5. A number indicating if it was a true (1) or a
|
103
|
-
|
104
|
-
opt.separator "
|
202
|
+
opt.separator " 5. A number indicating if it was a true (1) or a " +
|
203
|
+
"false (0) positive."
|
204
|
+
opt.separator " 6. Mid-point of the alignment in the reference " +
|
205
|
+
"sequence."
|
206
|
+
opt.separator " o The ROCker file (-k) is a tab-delimited file " +
|
207
|
+
"containing five columns:"
|
105
208
|
opt.separator " 1. First column of the window in the alignment."
|
106
209
|
opt.separator " 2. Last column of the window in the alignment."
|
107
210
|
opt.separator " 3. Number of positives in the window (hits)."
|
108
211
|
opt.separator " 4. Number of true positives in the window."
|
109
212
|
opt.separator " 5. Bit score threshold set for the window."
|
110
|
-
opt.separator " The file also contains the alignment (commented
|
213
|
+
opt.separator " The file also contains the alignment (commented " +
|
214
|
+
"with #:)."
|
111
215
|
opt.separator ""
|
112
|
-
when
|
113
|
-
opt.
|
114
|
-
opt.on("-
|
115
|
-
|
216
|
+
when "search"
|
217
|
+
opt.separator "+ SEARCHING ARGUMENTS"
|
218
|
+
opt.on("-k", "--rocker PATH",
|
219
|
+
"ROCker file generated by the compile task (-k). " +
|
220
|
+
"Required."){ |v| o[:rocker]=v }
|
221
|
+
opt.on("-i", "--query PATH",
|
222
|
+
"File containing the query sequences in FastA format. " +
|
223
|
+
"Required."){ |v| o[:query]=v }
|
224
|
+
opt.on("-o", "--out-blast PATH",
|
225
|
+
"Filtered tabular BLAST to be created. Required."){ |v| o[:oblast]=v }
|
226
|
+
opt.on("-x", "--query-blast PATH",
|
227
|
+
"Unfiltered tabular BLAST. By default, this file is not " +
|
228
|
+
"kept."){ |v| o[:qblast]=v }
|
229
|
+
|
116
230
|
opt.separator ""
|
117
231
|
opt.separator "+ EXTERNAL SOFTWARE OPTIONS"
|
118
|
-
opt.on(
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
opt.on(
|
123
|
-
|
124
|
-
|
232
|
+
opt.on("--search STR",
|
233
|
+
"Similarity search algorithm to use. Supported: 'blast' and " +
|
234
|
+
"'diamond'. By default: '" + ROCker.default(:search).to_s +
|
235
|
+
"'.") { |v| o[:search]=v.to_sym }
|
236
|
+
opt.on("--search-bins PATH",
|
237
|
+
"Path to the similarity search executables. By default in the " +
|
238
|
+
"$PATH: '" + ROCker.default(:searchbins) +
|
239
|
+
"'.") { |v| o[:searchbins]=v }
|
240
|
+
opt.on("--search-cmd STR",
|
241
|
+
"Command calling similarity search, where %1$s: binaries, %2$s: " +
|
242
|
+
"program, %3$s: input, %4$s: database, %5$s: output, %6$d: threads.",
|
243
|
+
*ROCker.default(:searchcmd).keys.map do |k|
|
244
|
+
"By default if --search #{k}: '" + ROCker.default(:searchcmd)[k] +
|
245
|
+
"'."
|
246
|
+
end ){ |v| o[:searchcmd]=v }
|
247
|
+
opt.on("--makedb-cmd STR",
|
248
|
+
"Command calling database format for similarity search, where %1$s: " +
|
249
|
+
"binaries, %2$s: dbtype, %3$s: input, %4$s: database.",
|
250
|
+
*ROCker.default(:makedbcmd).keys.map do |k|
|
251
|
+
"By default if --search #{k}: '" + ROCker.default(:makedbcmd)[k] +
|
252
|
+
"'."
|
253
|
+
end ){ |v| o[:makedbcmd]=v }
|
254
|
+
when "filter"
|
125
255
|
opt.separator "+ FILTERING ARGUMENTS"
|
126
|
-
opt.on("-k", "--rocker PATH",
|
127
|
-
|
128
|
-
|
129
|
-
|
256
|
+
opt.on("-k", "--rocker PATH",
|
257
|
+
"ROCker file generated by the compile task (-k). " +
|
258
|
+
"Required."){ |v| o[:rocker]=v }
|
259
|
+
opt.on("-x", "--query-blast PATH",
|
260
|
+
"Tabular BLAST (blastx) of the query reads vs. the reference " +
|
261
|
+
"dataset. Required."){ |v| o[:qblast]=v }
|
262
|
+
opt.on("-o", "--out-blast PATH",
|
263
|
+
"Filtered tabular BLAST to be created. Required."){ |v| o[:oblast]=v }
|
264
|
+
when "plot"
|
130
265
|
opt.separator "+ PLOTTING ARGUMENTS"
|
131
|
-
opt.on("-k", "--rocker PATH",
|
266
|
+
opt.on("-k", "--rocker PATH",
|
267
|
+
"ROCker file generated by the compile task (-k). " +
|
268
|
+
"Required."){ |v| o[:rocker]=v }
|
132
269
|
opt.on("-b", "--ref-blast PATH",
|
133
|
-
|
134
|
-
|
270
|
+
"Tabular BLAST (blastx) of the test reads vs. the reference " +
|
271
|
+
"dataset. Required unless -T exists."){ |v| o[:blast]=v }
|
272
|
+
opt.on("-o", "--plot-file PATH",
|
273
|
+
"File to be created with the plot. By default: value of -k + " +
|
274
|
+
"'.' + value of -f."){ |v| o[:gout]=v }
|
275
|
+
|
135
276
|
opt.separator ""
|
136
277
|
opt.separator "+ ADVANCED PLOTTING ARGUMENTS"
|
137
|
-
opt.on("-
|
138
|
-
|
139
|
-
|
140
|
-
opt.on(
|
141
|
-
opt.on(
|
142
|
-
|
278
|
+
opt.on("-T", "--table PATH",
|
279
|
+
"Formated tabular file to be created (or reused). Required " +
|
280
|
+
"unless -b is provided."){ |v| o[:table]=v }
|
281
|
+
opt.on("--color", "Color alignment by amino acid."){ o[:color]=true }
|
282
|
+
opt.on("--tag-negatives",
|
283
|
+
"Mark hits from negative references."){ o[:tag_negatives] = true }
|
284
|
+
opt.on("--no-transparency",
|
285
|
+
"Do not use (semi-)transparencies."){ |v| o[:transparency] = v }
|
286
|
+
opt.on("--min-score NUMBER",
|
287
|
+
"Minimum Bit-Score to consider a hit. By default: " +
|
288
|
+
ROCker.default(:minscore).to_s + "."){ |v| o[:minscore]=v.to_f }
|
289
|
+
opt.on("--stats-impact",
|
290
|
+
"Plot impact on statistics, instead of absolute values per " +
|
291
|
+
"window."){ o[:impact]=true }
|
292
|
+
opt.on("--stats-ylim STRING",
|
293
|
+
"Limits of the Y-axis in the bottom panel. By default: '-2,.1' " +
|
294
|
+
"if --stats-impact is set, '50,100' otherwise."){ |v| o[:ylim]=v }
|
143
295
|
opt.on("-s", "--subject SBJ1,SBJ2,...", Array,
|
144
|
-
"Plot only information regarding this(ese) subject(s). If multiple,
|
296
|
+
"Plot only information regarding this(ese) subject(s). If multiple, " +
|
297
|
+
"separate by comma. By default, all hits are plotted."){ |v| o[:sbj]=v }
|
145
298
|
opt.on("-f", "--plot-format STRING",
|
146
|
-
"Format of the plot file. Supported values: pdf (default), png,
|
147
|
-
|
148
|
-
opt.on("-
|
299
|
+
"Format of the plot file. Supported values: pdf (default), png, " +
|
300
|
+
"jpeg, and tiff."){ |v| o[:gformat]=v }
|
301
|
+
opt.on("-W", "--width NUMBER",
|
302
|
+
"Width of the plot in inches. By default: " +
|
303
|
+
ROCker.default(:width).to_s +
|
304
|
+
"."){ |v| o[:width]=v.to_f }
|
305
|
+
opt.on("-H", "--height NUMBER",
|
306
|
+
"Height of the plot in inches. By default: " +
|
307
|
+
ROCker.default(:height).to_s +
|
308
|
+
"."){ |v| o[:width]=v.to_f }
|
149
309
|
else
|
150
310
|
opt.banner = "Usage: ROCker.rb [task] [options]"
|
151
311
|
opt.separator ""
|
152
312
|
opt.separator "Please specify one of the following tasks:"
|
153
313
|
$t.keys.each{ |t| opt.separator " #{t}:\t#{$t[t]}" }
|
154
|
-
end
|
314
|
+
end # case task
|
315
|
+
|
155
316
|
opt.separator ""
|
156
317
|
opt.separator "+ GENERAL ARGUMENTS"
|
157
|
-
opt.on("-
|
318
|
+
opt.on("-t", "--threads INT",
|
319
|
+
"Number of threads to use. By default: " + ROCker.default(:thr).to_s +
|
320
|
+
"."){ |v| o[:thr]=v.to_i }
|
321
|
+
opt.on("-R", "--path-to-r PATH",
|
322
|
+
"Path to the R executable to be used. By default: '" +
|
323
|
+
ROCker.default(:r) + "'."){ |v| o[:r]=v }
|
158
324
|
opt.on("-q", "--quiet", "Run quietly."){ |v| o[:q]=true }
|
159
|
-
opt.on("-d", "--debug",
|
160
|
-
|
325
|
+
opt.on("-d", "--debug",
|
326
|
+
"Display debugging information."){ |v| o[:debug]=true }
|
327
|
+
opt.on("-h", "--help", "Display this screen") do
|
161
328
|
puts opt
|
162
329
|
exit
|
163
330
|
end
|
@@ -174,16 +341,29 @@ opts.parse!
|
|
174
341
|
rocker = ROCker.new(o)
|
175
342
|
begin
|
176
343
|
case task
|
177
|
-
when
|
344
|
+
when "build"
|
178
345
|
rocker.build!
|
179
|
-
when
|
346
|
+
when "compile"
|
180
347
|
rocker.compile!
|
181
|
-
when
|
348
|
+
when "filter"
|
182
349
|
rocker.filter!
|
183
|
-
when
|
350
|
+
when "search"
|
184
351
|
rocker.search!
|
185
|
-
when
|
352
|
+
when "plot"
|
186
353
|
rocker.plot!
|
354
|
+
when "info"
|
355
|
+
puts "ROCker v" + ROCker.VERSION
|
356
|
+
puts ""
|
357
|
+
puts "If you use ROCker in your research, please cite:"
|
358
|
+
puts ROCker.CITATION
|
359
|
+
puts ""
|
360
|
+
puts "ROCker can be freely used and distributed under the "
|
361
|
+
puts "terms of the Artistic License 2.0. See LICENSE.txt."
|
362
|
+
puts ""
|
363
|
+
puts "For additional information and documentation, visit:"
|
364
|
+
puts "http://enve-omics.ce.gatech.edu/rocker/"
|
365
|
+
puts "For our list of curated models, visits:"
|
366
|
+
puts "http://enve-omics.ce.gatech.edu/rocker/models"
|
187
367
|
end
|
188
368
|
rescue => err
|
189
369
|
$stderr.puts "Exception: #{err}\n\n"
|