sequenceserver 2.0.0.rc1 → 2.0.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/bin/sequenceserver +27 -1
- data/lib/sequenceserver/blast/report.rb +2 -1
- data/lib/sequenceserver/config.rb +1 -1
- data/lib/sequenceserver/database.rb +5 -8
- data/lib/sequenceserver/version.rb +1 -1
- data/public/css/sequenceserver.css +4 -0
- data/public/css/sequenceserver.min.css +3 -3
- data/public/js/report.js +14 -7
- data/public/js/search.js +21 -24
- data/public/sequenceserver-report.min.js +1 -1
- data/public/sequenceserver-search.min.js +1 -1
- data/spec/capybara_spec.rb +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 164573dfee9002d6a1e164899e5d6f8a22696d7a13e3f6d48dd96a134673d8b3
|
4
|
+
data.tar.gz: 06fd8269f49b72a04d41d05903e7d7273e647d4e451047722d285840fecd207f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3d66c251f7f5e3a96a45878001245a49c811e02bebeac271a350ec9b8e944e8066cabf55c8851bf4e4ce1d6e9cd86e3b76cce53bde7f6230afd3db4592a9175
|
7
|
+
data.tar.gz: 14cdb61bbfbf1fb316df829aaf2c602c0753db51174b5166bb8c4de646ac43a2f5a0023593e063cd12c05e3dcf4163df1f48551e190df12607206afa0593ae5a
|
data/bin/sequenceserver
CHANGED
@@ -20,6 +20,30 @@ def download_from_url(url)
|
|
20
20
|
system(cmd)
|
21
21
|
end
|
22
22
|
|
23
|
+
def ask_to_join
|
24
|
+
asked_to_join = File.join(SequenceServer::DOTDIR, 'asked_to_join')
|
25
|
+
unless File.exist?(asked_to_join)
|
26
|
+
puts
|
27
|
+
puts <<~MSG
|
28
|
+
Do you want to be notified of SequenceServer releases and any
|
29
|
+
other important announcements (3-12 messages a year)? If yes,
|
30
|
+
please provide your email address below or press enter to
|
31
|
+
continue (you won't be prompted again).
|
32
|
+
MSG
|
33
|
+
print '>> '
|
34
|
+
response = STDIN.gets.to_s.strip
|
35
|
+
puts
|
36
|
+
|
37
|
+
if response =~ /@/
|
38
|
+
post_email_cmd = "curl -m 5 https://docs.google.com/forms/u/0/d/e/" \
|
39
|
+
"1FAIpQLSe7sOCiKzYbI7LwErid-g3wfIU5Zpi6VTm0ILJyR036RqC8zg/formResponse " \
|
40
|
+
"-d ifq -d emailAddress=#{response} -d submit=Submit > /dev/null 2> /dev/null"
|
41
|
+
system post_email_cmd
|
42
|
+
end
|
43
|
+
system "touch #{asked_to_join}"
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
23
47
|
begin
|
24
48
|
Slop.parse!(strict: true, help: true) do
|
25
49
|
banner <<~BANNER
|
@@ -379,6 +403,8 @@ begin
|
|
379
403
|
|
380
404
|
SequenceServer.config.write_config_file if fetch_option(:set).value
|
381
405
|
|
406
|
+
ask_to_join
|
407
|
+
|
382
408
|
SequenceServer.run
|
383
409
|
end
|
384
410
|
end
|
@@ -386,4 +412,4 @@ rescue Slop::Error => e
|
|
386
412
|
puts e
|
387
413
|
puts "Run '#{$PROGRAM_NAME} -h' for help with command line options."
|
388
414
|
exit
|
389
|
-
end
|
415
|
+
end
|
@@ -41,7 +41,8 @@ module SequenceServer
|
|
41
41
|
h
|
42
42
|
}.update(search_id: job.id,
|
43
43
|
submitted_at: job.submitted_at.utc,
|
44
|
-
imported_xml: !!job.imported_xml_file
|
44
|
+
imported_xml: !!job.imported_xml_file,
|
45
|
+
seqserv_version: SequenceServer::VERSION).to_json
|
45
46
|
end
|
46
47
|
|
47
48
|
private
|
@@ -81,7 +81,7 @@ module SequenceServer
|
|
81
81
|
# otherwise.
|
82
82
|
def parse_config_file
|
83
83
|
unless file? config_file
|
84
|
-
logger.
|
84
|
+
logger.debug "Configuration file not found: #{config_file}"
|
85
85
|
return {}
|
86
86
|
end
|
87
87
|
logger.info "Reading configuration file: #{config_file}."
|
@@ -328,11 +328,8 @@ module SequenceServer
|
|
328
328
|
db_name
|
329
329
|
end
|
330
330
|
|
331
|
-
# Guess whether FASTA file contains protein or nucleotide sequences
|
332
|
-
#
|
333
|
-
#
|
334
|
-
# NOTE: 2^15 == 32786. Approximately 546 lines, assuming 60 characters on
|
335
|
-
# each line.
|
331
|
+
# Guess whether FASTA file contains protein or nucleotide sequences by
|
332
|
+
# sampling a few few characters of the file.
|
336
333
|
def guess_sequence_type_in_fasta(file)
|
337
334
|
sequences = sample_sequences(file)
|
338
335
|
sequence_types = sequences.map { |seq| Sequence.guess_type(seq) }
|
@@ -340,14 +337,14 @@ module SequenceServer
|
|
340
337
|
(sequence_types.length == 1) && sequence_types.first
|
341
338
|
end
|
342
339
|
|
343
|
-
# Read first
|
344
|
-
# pattern and return.
|
340
|
+
# Read first 1,048,576 characters of the file, split the read text on
|
341
|
+
# fasta def line pattern and return.
|
345
342
|
#
|
346
343
|
# If the given file is FASTA, returns Array of as many different
|
347
344
|
# sequences in the portion of the file read. Returns the portion
|
348
345
|
# of the file read wrapped in an Array otherwise.
|
349
346
|
def sample_sequences(file)
|
350
|
-
File.read(file,
|
347
|
+
File.read(file, 1_048_576).split(/^>.+$/).delete_if(&:empty?)
|
351
348
|
end
|
352
349
|
end
|
353
350
|
end
|