genevalidatorapp 1.5.4 → 2.0.0
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 +5 -5
- data/README.md +1 -124
- data/Rakefile +12 -9
- data/genevalidatorapp.gemspec +28 -31
- data/lib/genevalidatorapp.rb +2 -2
- data/lib/genevalidatorapp/config.rb +1 -1
- data/lib/genevalidatorapp/database.rb +3 -3
- data/lib/genevalidatorapp/genevalidator.rb +27 -32
- data/lib/genevalidatorapp/routes.rb +2 -2
- data/lib/genevalidatorapp/server.rb +1 -1
- data/lib/genevalidatorapp/version.rb +1 -1
- data/public/src/js/plots.js +1 -1
- data/public/web_files/js/GV_compiled_js.min.js +33 -14
- data/{spec → test}/database/funky_ids/funky_ids.fa +0 -0
- data/{spec → test}/database/funky_ids/funky_ids.fa.nhr +0 -0
- data/{spec → test}/database/funky_ids/funky_ids.fa.nin +0 -0
- data/{spec → test}/database/funky_ids/funky_ids.fa.nog +0 -0
- data/{spec → test}/database/funky_ids/funky_ids.fa.nsd +0 -0
- data/{spec → test}/database/funky_ids/funky_ids.fa.nsi +0 -0
- data/{spec → test}/database/funky_ids/funky_ids.fa.nsq +0 -0
- data/{spec → test}/database/sample/proteins/Solenopsis_invicta/Sinvicta2-2-3.prot.subset.fasta +0 -0
- data/{spec → test}/database/sample/proteins/Solenopsis_invicta/Sinvicta2-2-3.prot.subset.fasta.phr +0 -0
- data/{spec → test}/database/sample/proteins/Solenopsis_invicta/Sinvicta2-2-3.prot.subset.fasta.pin +0 -0
- data/{spec → test}/database/sample/proteins/Solenopsis_invicta/Sinvicta2-2-3.prot.subset.fasta.pog +0 -0
- data/{spec → test}/database/sample/proteins/Solenopsis_invicta/Sinvicta2-2-3.prot.subset.fasta.psd +0 -0
- data/{spec → test}/database/sample/proteins/Solenopsis_invicta/Sinvicta2-2-3.prot.subset.fasta.psi +0 -0
- data/{spec → test}/database/sample/proteins/Solenopsis_invicta/Sinvicta2-2-3.prot.subset.fasta.psq +0 -0
- data/{spec → test}/database/sample/transcripts/Solenopsis_invicta/Sinvicta2-2-3.cdna.subset.fasta +0 -0
- data/{spec → test}/database/sample/transcripts/Solenopsis_invicta/Sinvicta2-2-3.cdna.subset.fasta.nhr +0 -0
- data/{spec → test}/database/sample/transcripts/Solenopsis_invicta/Sinvicta2-2-3.cdna.subset.fasta.nin +0 -0
- data/{spec → test}/database/sample/transcripts/Solenopsis_invicta/Sinvicta2-2-3.cdna.subset.fasta.nog +0 -0
- data/{spec → test}/database/sample/transcripts/Solenopsis_invicta/Sinvicta2-2-3.cdna.subset.fasta.nsd +0 -0
- data/{spec → test}/database/sample/transcripts/Solenopsis_invicta/Sinvicta2-2-3.cdna.subset.fasta.nsi +0 -0
- data/{spec → test}/database/sample/transcripts/Solenopsis_invicta/Sinvicta2-2-3.cdna.subset.fasta.nsq +0 -0
- data/{spec → test}/database/unformatted/Cardiocondyla_obscurior/Cobs1.4.proteins.fa +0 -0
- data/{spec → test}/database/without_parse_seqids/without_parse_seqids.fa +0 -0
- data/{spec → test}/database/without_parse_seqids/without_parse_seqids.fa.phr +0 -0
- data/{spec → test}/database/without_parse_seqids/without_parse_seqids.fa.pin +0 -0
- data/{spec → test}/database/without_parse_seqids/without_parse_seqids.fa.psq +0 -0
- data/{spec → test}/empty_config.yml +0 -0
- data/{spec/route_spec.rb → test/test_route_spec.rb} +22 -23
- data/views/results.slim +2 -2
- metadata +68 -134
- data/bin/genevalidatorapp +0 -284
- data/docker/Dockerfile +0 -21
data/bin/genevalidatorapp
DELETED
|
@@ -1,284 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env ruby
|
|
2
|
-
require 'readline'
|
|
3
|
-
require 'English'
|
|
4
|
-
require 'slop'
|
|
5
|
-
|
|
6
|
-
ENV['RACK_ENV'] ||= 'production'
|
|
7
|
-
|
|
8
|
-
# display name for tools like `ps`
|
|
9
|
-
$PROGRAM_NAME = 'genevalidatorapp'
|
|
10
|
-
|
|
11
|
-
begin
|
|
12
|
-
Slop.parse!(strict: true, help: true) do
|
|
13
|
-
banner <<BANNER
|
|
14
|
-
SUMMARY:
|
|
15
|
-
GeneValidator - Identify problems with predicted genes
|
|
16
|
-
|
|
17
|
-
USAGE:
|
|
18
|
-
$ genevalidatorapp [options]
|
|
19
|
-
|
|
20
|
-
Examples:
|
|
21
|
-
# Launch GeneValidatorApp with the given config file
|
|
22
|
-
$ genevalidatorapp --config ~/.genevalidatorapp.conf
|
|
23
|
-
|
|
24
|
-
# Launch GeneValidatorApp with 8 threads at port 8888
|
|
25
|
-
$ genevalidatorapp --num_threads 8 --port 8888
|
|
26
|
-
|
|
27
|
-
# Create a config file with the other arguments
|
|
28
|
-
$ genevalidatorapp -s -d ~/database_dir
|
|
29
|
-
|
|
30
|
-
BANNER
|
|
31
|
-
# - Add Web_dir ? or simply default to ~/.genevalidatorapp/runs/
|
|
32
|
-
|
|
33
|
-
on 'c', 'config_file=',
|
|
34
|
-
'Use the given configuration file',
|
|
35
|
-
argument: true
|
|
36
|
-
|
|
37
|
-
on 'g', 'gv_public_dir=',
|
|
38
|
-
'The public directory that is served to the web application.',
|
|
39
|
-
argument: true
|
|
40
|
-
|
|
41
|
-
on 'b', 'bin=',
|
|
42
|
-
'Load BLAST+ and/or MAFFT binaries from this directory',
|
|
43
|
-
argument: true,
|
|
44
|
-
as: Array
|
|
45
|
-
|
|
46
|
-
on 'd', 'database_dir=',
|
|
47
|
-
'Read BLAST database from this directory',
|
|
48
|
-
argument: true
|
|
49
|
-
|
|
50
|
-
on 'f', 'default_database_path=',
|
|
51
|
-
'The path to the default BLAST database',
|
|
52
|
-
argument: true
|
|
53
|
-
|
|
54
|
-
on 'n', 'num_threads=',
|
|
55
|
-
'Number of threads to use to run a BLAST search',
|
|
56
|
-
argument: true
|
|
57
|
-
|
|
58
|
-
on 'r', 'require=',
|
|
59
|
-
'Load extension from this file',
|
|
60
|
-
argument: true
|
|
61
|
-
|
|
62
|
-
on 'H', 'host=',
|
|
63
|
-
'Host to run GeneValidatorApp on',
|
|
64
|
-
argument: true
|
|
65
|
-
|
|
66
|
-
on 'p', 'port=',
|
|
67
|
-
'Port to run GeneValidatorApp on',
|
|
68
|
-
argument: true
|
|
69
|
-
|
|
70
|
-
on 's', 'set',
|
|
71
|
-
'Set configuration value in default or given config file'
|
|
72
|
-
|
|
73
|
-
on 'l', 'list_databases',
|
|
74
|
-
'List BLAST databases'
|
|
75
|
-
|
|
76
|
-
on 'D', 'devel',
|
|
77
|
-
'Start GeneValidatorApp in development mode'
|
|
78
|
-
|
|
79
|
-
on '-v', '--version',
|
|
80
|
-
'Print version number of GeneValidatorApp that will be loaded'
|
|
81
|
-
|
|
82
|
-
on '-h', '--help',
|
|
83
|
-
'Display this help message'
|
|
84
|
-
|
|
85
|
-
clean_opts = lambda do |hash|
|
|
86
|
-
hash.delete_if { |k, v| k == :set || v.nil? }
|
|
87
|
-
hash
|
|
88
|
-
end
|
|
89
|
-
|
|
90
|
-
run do
|
|
91
|
-
if version?
|
|
92
|
-
require 'genevalidatorapp/version'
|
|
93
|
-
puts GeneValidatorApp::VERSION
|
|
94
|
-
exit
|
|
95
|
-
end
|
|
96
|
-
|
|
97
|
-
ENV['RACK_ENV'] = 'development' if devel?
|
|
98
|
-
|
|
99
|
-
# Exit gracefully on SIGINT.
|
|
100
|
-
stty = `stty -g`.chomp
|
|
101
|
-
trap('INT') do
|
|
102
|
-
puts ''
|
|
103
|
-
puts 'Aborted.'
|
|
104
|
-
system('stty', stty)
|
|
105
|
-
exit
|
|
106
|
-
end
|
|
107
|
-
|
|
108
|
-
require 'genevalidatorapp'
|
|
109
|
-
|
|
110
|
-
begin
|
|
111
|
-
GeneValidatorApp.init clean_opts[to_h]
|
|
112
|
-
|
|
113
|
-
# The aim of following error recovery scenarios is to guide user to a
|
|
114
|
-
# working GeneValidatorApp installation. We expect to land following
|
|
115
|
-
# error scenarios either when creating a new GeneValidatorApp (first
|
|
116
|
-
# time or later), or updating config values using -s CLI option.
|
|
117
|
-
|
|
118
|
-
rescue GeneValidatorApp::CONFIG_FILE_ERROR => e
|
|
119
|
-
|
|
120
|
-
puts e
|
|
121
|
-
exit!
|
|
122
|
-
|
|
123
|
-
rescue GeneValidatorApp::NUM_THREADS_INCORRECT => e
|
|
124
|
-
|
|
125
|
-
puts e
|
|
126
|
-
|
|
127
|
-
unless num_threads?
|
|
128
|
-
puts 'You can set the correct value by running:'
|
|
129
|
-
puts
|
|
130
|
-
puts ' genevalidatorapp -s -n <value>'
|
|
131
|
-
puts
|
|
132
|
-
end
|
|
133
|
-
|
|
134
|
-
exit!
|
|
135
|
-
|
|
136
|
-
rescue GeneValidatorApp::BIN_DIR_NOT_FOUND => e
|
|
137
|
-
|
|
138
|
-
puts e
|
|
139
|
-
|
|
140
|
-
unless bin?
|
|
141
|
-
puts 'You can set the correct value by running:'
|
|
142
|
-
puts
|
|
143
|
-
puts ' genevalidatorapp -s -b <value>'
|
|
144
|
-
puts
|
|
145
|
-
end
|
|
146
|
-
|
|
147
|
-
exit!
|
|
148
|
-
|
|
149
|
-
rescue GeneValidatorApp::EXTENSION_FILE_NOT_FOUND => e
|
|
150
|
-
|
|
151
|
-
puts e
|
|
152
|
-
|
|
153
|
-
unless require?
|
|
154
|
-
puts 'You can set the correct value by running:'
|
|
155
|
-
puts
|
|
156
|
-
puts ' genevalidatorapp -s -r <value>'
|
|
157
|
-
puts
|
|
158
|
-
end
|
|
159
|
-
|
|
160
|
-
exit!
|
|
161
|
-
|
|
162
|
-
rescue GeneValidatorApp::DATABASE_DIR_NOT_FOUND => e
|
|
163
|
-
|
|
164
|
-
puts e
|
|
165
|
-
|
|
166
|
-
unless database_dir?
|
|
167
|
-
puts 'You can set the correct value by running:'
|
|
168
|
-
puts
|
|
169
|
-
puts ' genevalidatorapp -s -d <value>'
|
|
170
|
-
puts
|
|
171
|
-
end
|
|
172
|
-
|
|
173
|
-
exit!
|
|
174
|
-
|
|
175
|
-
rescue GeneValidatorApp::BLAST_NOT_INSTALLED,
|
|
176
|
-
GeneValidatorApp::BLAST_NOT_EXECUTABLE,
|
|
177
|
-
GeneValidatorApp::BLAST_NOT_COMPATIBLE => e
|
|
178
|
-
|
|
179
|
-
# Show original error message first.
|
|
180
|
-
puts
|
|
181
|
-
puts e
|
|
182
|
-
|
|
183
|
-
# Set a flag so that if we recovered from error resulting config can be
|
|
184
|
-
# saved. Config will be saved unless invoked with -b option.
|
|
185
|
-
fetch_option(:set).value = !bin?
|
|
186
|
-
|
|
187
|
-
# Ask user if she already has BLAST+ downloaded.
|
|
188
|
-
puts
|
|
189
|
-
puts <<MSG
|
|
190
|
-
GeneValidatorApp can use NCBI BLAST+ that you may have on your system already.
|
|
191
|
-
Please enter the path to NCBI BLAST+.
|
|
192
|
-
|
|
193
|
-
Press Ctrl+C to quit.
|
|
194
|
-
MSG
|
|
195
|
-
puts
|
|
196
|
-
response = Readline.readline('>> ').to_s.strip
|
|
197
|
-
unless response.empty?
|
|
198
|
-
unless File.basename(response) == 'bin'
|
|
199
|
-
response = File.join(response, 'bin')
|
|
200
|
-
end
|
|
201
|
-
fetch_option(:bin).value = File.join(response)
|
|
202
|
-
puts
|
|
203
|
-
redo
|
|
204
|
-
end
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
rescue GeneValidatorApp::DATABASE_DIR_NOT_SET => e
|
|
208
|
-
|
|
209
|
-
# Show original error message.
|
|
210
|
-
puts
|
|
211
|
-
puts e
|
|
212
|
-
|
|
213
|
-
# Set a flag so that if we recovered from error resulting config can be
|
|
214
|
-
# saved. Config will be saved unless invoked with -d option.
|
|
215
|
-
fetch_option(:set).value = !database_dir?
|
|
216
|
-
|
|
217
|
-
# Ask user for the directory containing sequences or BLAST+
|
|
218
|
-
# databases.
|
|
219
|
-
puts
|
|
220
|
-
puts <<MSG
|
|
221
|
-
GeneValidatorApp needs to know where your BLAST+ databases are.
|
|
222
|
-
Please enter the path to the relevant directory.
|
|
223
|
-
|
|
224
|
-
Press Ctrl+C to quit.
|
|
225
|
-
MSG
|
|
226
|
-
|
|
227
|
-
puts
|
|
228
|
-
response = Readline.readline('>> ').to_s.strip
|
|
229
|
-
fetch_option(:database_dir).value = response
|
|
230
|
-
redo
|
|
231
|
-
|
|
232
|
-
rescue GeneValidatorApp::NO_BLAST_DATABASE_FOUND,
|
|
233
|
-
GeneValidatorApp::NO_PROTEIN_BLAST_DATABASE_FOUND => e
|
|
234
|
-
unless list_databases?
|
|
235
|
-
# Print error raised.
|
|
236
|
-
puts
|
|
237
|
-
puts e
|
|
238
|
-
exit!
|
|
239
|
-
end
|
|
240
|
-
|
|
241
|
-
rescue GeneValidatorApp::BLAST_DATABASE_ERROR => e
|
|
242
|
-
|
|
243
|
-
puts e
|
|
244
|
-
exit!
|
|
245
|
-
|
|
246
|
-
rescue => e
|
|
247
|
-
# This will catch any unhandled error and some very special errors.
|
|
248
|
-
# Ideally we will never hit this block. If we do, there's a bug in
|
|
249
|
-
# GeneValidatorApp or something really weird going on. If we hit this
|
|
250
|
-
# error block we show the stacktrace to the user requesting them to
|
|
251
|
-
# post the same to our Google Group.
|
|
252
|
-
puts <<MSG
|
|
253
|
-
Something went wonky
|
|
254
|
-
|
|
255
|
-
Looks like you have encountered a bug in GeneValidatorApp. Please could you
|
|
256
|
-
report this incident here -
|
|
257
|
-
https://github.com/wurmlab/genevalidatorapp/issues
|
|
258
|
-
|
|
259
|
-
Error:
|
|
260
|
-
#{e.backtrace.unshift(e.message).join("\n")}
|
|
261
|
-
MSG
|
|
262
|
-
exit!
|
|
263
|
-
end
|
|
264
|
-
|
|
265
|
-
if list_databases?
|
|
266
|
-
puts GeneValidatorApp::Database.all
|
|
267
|
-
exit
|
|
268
|
-
end
|
|
269
|
-
|
|
270
|
-
if set?
|
|
271
|
-
GeneValidatorApp.config.write_config_file
|
|
272
|
-
exit
|
|
273
|
-
end
|
|
274
|
-
|
|
275
|
-
GeneValidatorApp.config.write_config_file if fetch_option(:set).value
|
|
276
|
-
|
|
277
|
-
GeneValidatorApp.run
|
|
278
|
-
end
|
|
279
|
-
end
|
|
280
|
-
rescue Slop::Error => e
|
|
281
|
-
puts e
|
|
282
|
-
puts "Run '#{$PROGRAM_NAME} -h' for help with command line options."
|
|
283
|
-
exit
|
|
284
|
-
end
|
data/docker/Dockerfile
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# GeneValidator
|
|
2
|
-
#
|
|
3
|
-
# A web wrapper for GeneValidator (identify problems with predicted genes)
|
|
4
|
-
#
|
|
5
|
-
# If you use GeneValidator in your work, please cite us as follows:
|
|
6
|
-
#
|
|
7
|
-
# Dragan M‡, Moghul MI‡, Priyam A, Bustos C & Wurm Y. 2016.
|
|
8
|
-
# GeneValidator: identify problems with protein-coding gene predictions.
|
|
9
|
-
# Bioinformatics, doi: 10.1093/bioinformatics/btw015.
|
|
10
|
-
#
|
|
11
|
-
# VERSION 1.0.0
|
|
12
|
-
|
|
13
|
-
FROM ubuntu:16.04
|
|
14
|
-
MAINTAINER Bruno Vieira <mail@bmpvieira.com>
|
|
15
|
-
|
|
16
|
-
LABEL Description="Identify problems with protein-coding gene predictions http://genevalidator.sbcs.qmul.ac.uk" Version="1.0.0"
|
|
17
|
-
|
|
18
|
-
RUN apt-get update
|
|
19
|
-
RUN apt-get install -y build-essential ruby ruby-dev ncbi-blast+ mafft zlib1g-dev libgsl0-dev
|
|
20
|
-
RUN gem install genevalidatorapp
|
|
21
|
-
CMD genevalidatorapp -d /db
|