sequenceserver 3.0.1 → 3.1.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of sequenceserver might be problematic. Click here for more details.

Files changed (62) hide show
  1. checksums.yaml +4 -4
  2. data/bin/sequenceserver +2 -2
  3. data/lib/sequenceserver/api_errors.rb +32 -2
  4. data/lib/sequenceserver/blast/job.rb +20 -3
  5. data/lib/sequenceserver/blast/report.rb +74 -86
  6. data/lib/sequenceserver/blast/tasks.rb +38 -0
  7. data/lib/sequenceserver/config.rb +54 -20
  8. data/lib/sequenceserver/makeblastdb.rb +16 -2
  9. data/lib/sequenceserver/report.rb +0 -6
  10. data/lib/sequenceserver/routes.rb +66 -25
  11. data/lib/sequenceserver/sequence.rb +35 -7
  12. data/lib/sequenceserver/server.rb +1 -1
  13. data/lib/sequenceserver/version.rb +1 -1
  14. data/lib/sequenceserver.rb +1 -1
  15. data/public/404.html +1 -1
  16. data/public/css/app.css +121 -0
  17. data/public/css/app.min.css +1 -0
  18. data/public/css/sequenceserver.css +0 -148
  19. data/public/css/sequenceserver.min.css +3 -3
  20. data/public/js/circos.js +2 -2
  21. data/public/js/collapse_preferences.js +37 -0
  22. data/public/js/databases.js +65 -37
  23. data/public/js/databases_tree.js +2 -1
  24. data/public/js/dnd.js +37 -50
  25. data/public/js/download_fasta.js +1 -0
  26. data/public/js/form.js +79 -50
  27. data/public/js/grapher.js +23 -37
  28. data/public/js/hits_overview.js +2 -2
  29. data/public/js/kablammo.js +2 -2
  30. data/public/js/length_distribution.js +3 -3
  31. data/public/js/null_plugins/grapher/histogram.js +25 -0
  32. data/public/js/null_plugins/options.js +3 -0
  33. data/public/js/null_plugins/query_stats.js +11 -0
  34. data/public/js/null_plugins/report_plugins.js +6 -1
  35. data/public/js/null_plugins/search_header_plugin.js +4 -0
  36. data/public/js/options.js +161 -56
  37. data/public/js/query.js +85 -59
  38. data/public/js/report.js +1 -1
  39. data/public/js/search.js +2 -0
  40. data/public/js/search_button.js +67 -56
  41. data/public/js/sidebar.js +10 -1
  42. data/public/js/tests/database.spec.js +5 -5
  43. data/public/js/tests/form.spec.js +98 -0
  44. data/public/js/tests/mock_data/databases.json +5 -5
  45. data/public/js/tests/mocks/circos.js +6 -0
  46. data/public/js/tests/report.spec.js +4 -3
  47. data/public/js/tests/search_query.spec.js +16 -6
  48. data/public/sequenceserver-report.min.js +46 -24
  49. data/public/sequenceserver-search.min.js +57 -13
  50. data/public/sequenceserver_logo.webp +0 -0
  51. data/views/blastn_options.erb +66 -66
  52. data/views/blastp_options.erb +59 -59
  53. data/views/blastx_options.erb +68 -68
  54. data/views/layout.erb +61 -3
  55. data/views/search.erb +33 -38
  56. data/views/search_layout.erb +153 -0
  57. data/views/tblastn_options.erb +57 -57
  58. data/views/tblastx_options.erb +64 -64
  59. metadata +51 -22
  60. data/lib/sequenceserver/makeblastdb-modified-with-cache.rb +0 -345
  61. data/public/SequenceServer_logo.png +0 -0
  62. data/public/js/tests/advanced_parameters.spec.js +0 -36
@@ -4,15 +4,15 @@
4
4
  characters per line to preserve formatting.
5
5
  %>
6
6
 
7
- <h5>Input Query Options</h5>
8
- <ul class="list-unstyled">
7
+ <h5 class="text-lg py-4 font-medium">Input Query Options</h5>
8
+ <ul class="list-unstyled space-y-2">
9
9
  <li>
10
- <pre><%= ERB::Util.h %q|-strand <String, `both', `minus', `plus'>
10
+ <pre class="bg-gray-100 border rounded overflow-x-auto p-2 font-mono hover:bg-yellow-100"><%= ERB::Util.h %q|-strand <String, `both', `minus', `plus'>
11
11
  Query strand(s) to search against database/subject
12
12
  Default = 'both'|%></pre>
13
13
  </li>
14
14
  <li>
15
- <pre><%= ERB::Util.h %q|-query_gencode <Integer, values between: 1-6, 9-16, 21-31, 33>
15
+ <pre class="bg-gray-100 border rounded overflow-x-auto p-2 font-mono hover:bg-yellow-100"><%= ERB::Util.h %q|-query_gencode <Integer, values between: 1-6, 9-16, 21-31, 33>
16
16
  Genetic code to use to translate query (see https://www.ncbi.nlm.nih.gov/Taxonomy/
17
17
  taxonomyhome.html/index.cgi?chapter=cgencodes for details)
18
18
  Default = '1'|%></pre>
@@ -20,46 +20,46 @@
20
20
  </ul>
21
21
  <br />
22
22
 
23
- <h5>General Search Options</h5>
24
- <ul class="list-unstyled">
23
+ <h5 class="text-lg py-4 font-medium">General Search Options</h5>
24
+ <ul class="list-unstyled space-y-2">
25
25
  <li>
26
- <pre><%= ERB::Util.h %q|-task <String, Permissible values: 'blastx' 'blastx-fast'>
26
+ <pre class="bg-gray-100 border rounded overflow-x-auto p-2 font-mono hover:bg-yellow-100"><%= ERB::Util.h %q|-task <String, Permissible values: 'blastx' 'blastx-fast'>
27
27
  Task to execute
28
28
  Default = 'blastx'|%></pre>
29
29
  </li>
30
30
  <li>
31
- <pre><%= ERB::Util.h %q|-evalue <Real>
31
+ <pre class="bg-gray-100 border rounded overflow-x-auto p-2 font-mono hover:bg-yellow-100"><%= ERB::Util.h %q|-evalue <Real>
32
32
  Expectation value (E) threshold for saving hits
33
33
  Default = '10'| %></pre>
34
34
  </li>
35
35
  <li>
36
- <pre><%= ERB::Util.h %q|-word_size <Integer, >=2>
36
+ <pre class="bg-gray-100 border rounded overflow-x-auto p-2 font-mono hover:bg-yellow-100"><%= ERB::Util.h %q|-word_size <Integer, >=2>
37
37
  Word size for wordfinder algorithm| %></pre>
38
38
  </li>
39
39
  <li>
40
- <pre><%= ERB::Util.h %q|-gapopen <Integer>
40
+ <pre class="bg-gray-100 border rounded overflow-x-auto p-2 font-mono hover:bg-yellow-100"><%= ERB::Util.h %q|-gapopen <Integer>
41
41
  Cost to open a gap| %></pre>
42
42
  </li>
43
43
  <li>
44
- <pre><%= ERB::Util.h %q|-gapextend <Integer>
44
+ <pre class="bg-gray-100 border rounded overflow-x-auto p-2 font-mono hover:bg-yellow-100"><%= ERB::Util.h %q|-gapextend <Integer>
45
45
  Cost to extend a gap| %></pre>
46
46
  </li>
47
47
  <li>
48
- <pre><%= ERB::Util.h %q|-max_intron_length <Integer, >=0>
49
- Length of the largest intron allowed in a translated nucleotide sequence when
50
- linking multiple distinct alignments
48
+ <pre class="bg-gray-100 border rounded overflow-x-auto p-2 font-mono hover:bg-yellow-100"><%= ERB::Util.h %q|-max_intron_length <Integer, >=0>
49
+ Length of the largest intron allowed in a translated nucleotide sequence when
50
+ linking multiple distinct alignments
51
51
  Default = '0'| %></pre>
52
52
  </li>
53
53
  <li>
54
- <pre><%= ERB::Util.h %q|-matrix <String>
54
+ <pre class="bg-gray-100 border rounded overflow-x-auto p-2 font-mono hover:bg-yellow-100"><%= ERB::Util.h %q|-matrix <String>
55
55
  Scoring matrix name (normally BLOSUM62)| %></pre>
56
56
  </li>
57
57
  <li>
58
- <pre><%= ERB::Util.h %q|-threshold <Real, >=0>
58
+ <pre class="bg-gray-100 border rounded overflow-x-auto p-2 font-mono hover:bg-yellow-100"><%= ERB::Util.h %q|-threshold <Real, >=0>
59
59
  Minimum word score such that the word is added to the BLAST lookup table| %></pre>
60
60
  </li>
61
61
  <li>
62
- <pre><%= ERB::Util.h %q|-comp_based_stats <String>
62
+ <pre class="bg-gray-100 border rounded overflow-x-auto p-2 font-mono hover:bg-yellow-100"><%= ERB::Util.h %q|-comp_based_stats <String>
63
63
  Use composition-based statistics:
64
64
  D or d: default (equivalent to 2)
65
65
  0 or F or f: no composition-based statistics
@@ -74,27 +74,27 @@
74
74
  </ul>
75
75
  <br />
76
76
 
77
- <h5>Formatting Options</h5>
78
- <ul class="list-unstyled">
77
+ <h5 class="text-lg py-4 font-medium">Formatting Options</h5>
78
+ <ul class="list-unstyled space-y-2">
79
79
  <li>
80
- <pre><%= ERB::Util.h %q|-show_gis
80
+ <pre class="bg-gray-100 border rounded overflow-x-auto p-2 font-mono hover:bg-yellow-100"><%= ERB::Util.h %q|-show_gis
81
81
  Show NCBI GIs in deflines?| %></pre>
82
82
  </li>
83
83
  <li>
84
- <pre><%= ERB::Util.h %q|-num_descriptions <Integer, >=0>
84
+ <pre class="bg-gray-100 border rounded overflow-x-auto p-2 font-mono hover:bg-yellow-100"><%= ERB::Util.h %q|-num_descriptions <Integer, >=0>
85
85
  Number of database sequences to show one-line descriptions for
86
86
  Not applicable for outfmt > 4
87
87
  Default = '500'
88
88
  * Incompatible with: max_target_seqs| %></pre>
89
89
  </li>
90
90
  <li>
91
- <pre><%= ERB::Util.h %q| -num_alignments <Integer, >=0>
91
+ <pre class="bg-gray-100 border rounded overflow-x-auto p-2 font-mono hover:bg-yellow-100"><%= ERB::Util.h %q| -num_alignments <Integer, >=0>
92
92
  Number of database sequences to show alignments for
93
93
  Default = '250'
94
94
  * Incompatible with: max_target_seqs| %></pre>
95
95
  </li>
96
96
  <li>
97
- <pre><%= ERB::Util.h %q| -sorthits <Integer, (>=0 and =<4)>
97
+ <pre class="bg-gray-100 border rounded overflow-x-auto p-2 font-mono hover:bg-yellow-100"><%= ERB::Util.h %q| -sorthits <Integer, (>=0 and =<4)>
98
98
  Sorting option for hits:
99
99
  alignment view options:
100
100
  0 = Sort by evalue,
@@ -105,7 +105,7 @@
105
105
  Not applicable for outfmt > 4| %></pre>
106
106
  </li>
107
107
  <li>
108
- <pre><%= ERB::Util.h %q| -sorthsps <Integer, (>=0 and =<4)>
108
+ <pre class="bg-gray-100 border rounded overflow-x-auto p-2 font-mono hover:bg-yellow-100"><%= ERB::Util.h %q| -sorthsps <Integer, (>=0 and =<4)>
109
109
  Sorting option for hps:
110
110
  0 = Sort by hsp evalue,
111
111
  1 = Sort by hsp score,
@@ -118,52 +118,52 @@
118
118
 
119
119
  <br/>
120
120
 
121
- <h5>Query filtering options</h5>
122
- <ul class="list-unstyled">
121
+ <h5 class="text-lg py-4 font-medium">Query filtering options</h5>
122
+ <ul class="list-unstyled space-y-2">
123
123
  <li>
124
- <pre><%= ERB::Util.h %q|-seg <String>
124
+ <pre class="bg-gray-100 border rounded overflow-x-auto p-2 font-mono hover:bg-yellow-100"><%= ERB::Util.h %q|-seg <String>
125
125
  Filter query sequence with SEG (Format: 'yes', 'window locut hicut',
126
126
  or 'no' to disable)
127
127
  Default = '12 2.2 2.5'| %></pre>
128
128
  </li>
129
129
  <li>
130
- <pre><%= ERB::Util.h %q|-soft_masking <Boolean>
130
+ <pre class="bg-gray-100 border rounded overflow-x-auto p-2 font-mono hover:bg-yellow-100"><%= ERB::Util.h %q|-soft_masking <Boolean>
131
131
  Apply filtering locations as soft masks
132
132
  Default = 'false'| %></pre>
133
133
  </li>
134
134
  <li>
135
- <pre><%= ERB::Util.h %q|-lcase_masking
135
+ <pre class="bg-gray-100 border rounded overflow-x-auto p-2 font-mono hover:bg-yellow-100"><%= ERB::Util.h %q|-lcase_masking
136
136
  Use lower case filtering in query and subject sequence(s)?| %></pre>
137
137
  </li>
138
138
  </ul>
139
139
 
140
140
  <br/>
141
141
 
142
- <h5>Restrict search or results</h5>
143
- <ul class="list-unstyled">
142
+ <h5 class="text-lg py-4 font-medium">Restrict search or results</h5>
143
+ <ul class="list-unstyled space-y-2">
144
144
  <li>
145
- <pre><%= ERB::Util.h %q|-gilist <String>
145
+ <pre class="bg-gray-100 border rounded overflow-x-auto p-2 font-mono hover:bg-yellow-100"><%= ERB::Util.h %q|-gilist <String>
146
146
  Restrict search of database to list of GIs
147
147
  * Incompatible with: seqidlist, taxids, taxidlist, negative_gilist,
148
148
  negative_seqidlist, negative_taxids, negative_taxidlist, remote, subject,
149
149
  subject_loc| %></pre>
150
150
  </li>
151
151
  <li>
152
- <pre><%= ERB::Util.h %q|-seqidlist <String>
152
+ <pre class="bg-gray-100 border rounded overflow-x-auto p-2 font-mono hover:bg-yellow-100"><%= ERB::Util.h %q|-seqidlist <String>
153
153
  Restrict search of database to list of SeqIDs
154
154
  * Incompatible with: gilist, taxids, taxidlist, negative_gilist,
155
155
  negative_seqidlist, negative_taxids, negative_taxidlist, remote, subject,
156
156
  subject_loc| %></pre>
157
157
  </li>
158
158
  <li>
159
- <pre><%= ERB::Util.h %q|-negative_gilist <String>
159
+ <pre class="bg-gray-100 border rounded overflow-x-auto p-2 font-mono hover:bg-yellow-100"><%= ERB::Util.h %q|-negative_gilist <String>
160
160
  Restrict search of database to everything except the specified GIs
161
161
  * Incompatible with: gilist, seqidlist, taxids, taxidlist,
162
162
  negative_seqidlist, negative_taxids, negative_taxidlist, remote, subject,
163
163
  subject_loc| %></pre>
164
164
  </li>
165
165
  <li>
166
- <pre><%= ERB::Util.h %q|-negative_seqidlist <String>
166
+ <pre class="bg-gray-100 border rounded overflow-x-auto p-2 font-mono hover:bg-yellow-100"><%= ERB::Util.h %q|-negative_seqidlist <String>
167
167
  Restrict search of database to everything except the specified SeqIDs
168
168
  * Incompatible with: gilist, seqidlist, taxids, taxidlist,
169
169
  negative_gilist, negative_taxids, negative_taxidlist, remote, subject,
@@ -171,88 +171,88 @@
171
171
  </li>
172
172
  <li>
173
173
  <li>
174
- <pre><%= ERB::Util.h %q|-taxids <String>
174
+ <pre class="bg-gray-100 border rounded overflow-x-auto p-2 font-mono hover:bg-yellow-100"><%= ERB::Util.h %q|-taxids <String>
175
175
  Restrict search of database to include only the specified taxonomy IDs (multiple IDs delimited by ',')
176
176
  * Incompatible with: gilist, seqidlist, taxidlist, negative_gilist,
177
177
  negative_seqidlist, negative_taxids, negative_taxidlist, remote, subject,
178
178
  subject_loc| %></pre>
179
179
  </li>
180
180
  <li>
181
- <pre><%= ERB::Util.h %q|-negative_taxids <String>
181
+ <pre class="bg-gray-100 border rounded overflow-x-auto p-2 font-mono hover:bg-yellow-100"><%= ERB::Util.h %q|-negative_taxids <String>
182
182
  Restrict search of database to everything except the specified taxonomy IDs (multiple IDs delimited by ',')
183
183
  * Incompatible with: gilist, seqidlist, taxids, taxidlist,
184
184
  negative_gilist, negative_seqidlist, negative_taxidlist, remote, subject,
185
185
  subject_loc| %></pre>
186
186
  </li>
187
187
  <li>
188
- <pre><%= ERB::Util.h %q|-taxidlist <String>
188
+ <pre class="bg-gray-100 border rounded overflow-x-auto p-2 font-mono hover:bg-yellow-100"><%= ERB::Util.h %q|-taxidlist <String>
189
189
  Restrict search of database to include only the specified taxonomy IDs
190
190
  * Incompatible with: gilist, seqidlist, taxids, negative_gilist,
191
191
  negative_seqidlist, negative_taxids, negative_taxidlist, remote, subject,
192
192
  subject_loc| %></pre>
193
193
  </li>
194
194
  <li>
195
- <pre><%= ERB::Util.h %q|-negative_taxidlist <String>
195
+ <pre class="bg-gray-100 border rounded overflow-x-auto p-2 font-mono hover:bg-yellow-100"><%= ERB::Util.h %q|-negative_taxidlist <String>
196
196
  Restrict search of database to everything except the specified taxonomy IDs
197
197
  * Incompatible with: gilist, seqidlist, taxids, taxidlist,
198
198
  negative_gilist, negative_seqidlist, negative_taxids, remote, subject,
199
199
  subject_loc| %></pre>
200
200
  </li>
201
201
  <li>
202
- <pre><%= ERB::Util.h %q| -ipglist <String>
202
+ <pre class="bg-gray-100 border rounded overflow-x-auto p-2 font-mono hover:bg-yellow-100"><%= ERB::Util.h %q| -ipglist <String>
203
203
  Restrict search of database to list of IPGs
204
204
  * Incompatible with: subject, subject_loc| %></pre>
205
205
  </li>
206
206
  <li>
207
- <pre><%= ERB::Util.h %q| -negative_ipglist <String>
207
+ <pre class="bg-gray-100 border rounded overflow-x-auto p-2 font-mono hover:bg-yellow-100"><%= ERB::Util.h %q| -negative_ipglist <String>
208
208
  Restrict search of database to everything except the specified IPGs
209
209
  * Incompatible with: subject, subject_loc| %></pre>
210
210
  </li>
211
211
  <li>
212
- <pre><%= ERB::Util.h %q|-entrez_query <String>
212
+ <pre class="bg-gray-100 border rounded overflow-x-auto p-2 font-mono hover:bg-yellow-100"><%= ERB::Util.h %q|-entrez_query <String>
213
213
  Restrict search with the given Entrez query
214
214
  * Requires: remote| %></pre>
215
215
  </li>
216
216
  <li>
217
- <pre><%= ERB::Util.h %q|-db_soft_mask <String>
217
+ <pre class="bg-gray-100 border rounded overflow-x-auto p-2 font-mono hover:bg-yellow-100"><%= ERB::Util.h %q|-db_soft_mask <String>
218
218
  Filtering algorithm ID to apply to the BLAST database as soft masking
219
219
  * Incompatible with: db_hard_mask, subject, subject_loc| %></pre>
220
220
  </li>
221
221
  <li>
222
- <pre><%= ERB::Util.h %q|-db_hard_mask <String>
222
+ <pre class="bg-gray-100 border rounded overflow-x-auto p-2 font-mono hover:bg-yellow-100"><%= ERB::Util.h %q|-db_hard_mask <String>
223
223
  Filtering algorithm ID to apply to the BLAST database as hard masking
224
224
  * Incompatible with: db_soft_mask, subject, subject_loc| %></pre>
225
225
  </li>
226
226
  <li>
227
- <pre><%= ERB::Util.h %q|-qcov_hsp_perc <Real, 0..100>
227
+ <pre class="bg-gray-100 border rounded overflow-x-auto p-2 font-mono hover:bg-yellow-100"><%= ERB::Util.h %q|-qcov_hsp_perc <Real, 0..100>
228
228
  Percent query coverage per hsp| %></pre>
229
229
  </li>
230
230
  <li>
231
- <pre><%= ERB::Util.h %q|-max_hsps <Integer, >=1>
231
+ <pre class="bg-gray-100 border rounded overflow-x-auto p-2 font-mono hover:bg-yellow-100"><%= ERB::Util.h %q|-max_hsps <Integer, >=1>
232
232
  Set maximum number of HSPs per subject sequence to save for each query| %></pre>
233
233
  </li>
234
234
  <li>
235
- <pre><%= ERB::Util.h %q|-culling_limit <Integer, >=0>
235
+ <pre class="bg-gray-100 border rounded overflow-x-auto p-2 font-mono hover:bg-yellow-100"><%= ERB::Util.h %q|-culling_limit <Integer, >=0>
236
236
  If the query range of a hit is enveloped by that of at least this
237
237
  many higher-scoring hits, delete the hit
238
238
  * Incompatible with: best_hit_overhang, best_hit_score_edge| %></pre>
239
239
  </li>
240
240
  <li>
241
- <pre><%= ERB::Util.h %q|-best_hit_overhang <Real, (>0 and <0.5)>
241
+ <pre class="bg-gray-100 border rounded overflow-x-auto p-2 font-mono hover:bg-yellow-100"><%= ERB::Util.h %q|-best_hit_overhang <Real, (>0 and <0.5)>
242
242
  Best Hit algorithm overhang value (recommended value: 0.1)
243
243
  * Incompatible with: culling_limit| %></pre>
244
244
  </li>
245
245
  <li>
246
- <pre><%= ERB::Util.h %q|-best_hit_score_edge <Real, (>0 and <0.5)>
246
+ <pre class="bg-gray-100 border rounded overflow-x-auto p-2 font-mono hover:bg-yellow-100"><%= ERB::Util.h %q|-best_hit_score_edge <Real, (>0 and <0.5)>
247
247
  Best Hit algorithm score edge value (recommended value: 0.1)
248
248
  * Incompatible with: culling_limit| %></pre>
249
249
  </li>
250
250
  <li>
251
- <pre><%= ERB::Util.h %q|-subject_besthit
251
+ <pre class="bg-gray-100 border rounded overflow-x-auto p-2 font-mono hover:bg-yellow-100"><%= ERB::Util.h %q|-subject_besthit
252
252
  Turn on best hit per subject sequence| %></pre>
253
253
  </li>
254
254
  <li>
255
- <pre><%= ERB::Util.h %q|-max_target_seqs <Integer, >=1>
255
+ <pre class="bg-gray-100 border rounded overflow-x-auto p-2 font-mono hover:bg-yellow-100"><%= ERB::Util.h %q|-max_target_seqs <Integer, >=1>
256
256
  Maximum number of aligned sequences to keep (value of 5 or more is recommended)
257
257
  Default = '500'
258
258
  * Incompatible with: num_descriptions, num_alignments| %></pre>
@@ -261,58 +261,58 @@
261
261
 
262
262
  <br/>
263
263
 
264
- <h5>Statistical options</h5>
265
- <ul class="list-unstyled">
264
+ <h5 class="text-lg py-4 font-medium">Statistical options</h5>
265
+ <ul class="list-unstyled space-y-2">
266
266
  <li>
267
- <pre><%= ERB::Util.h %q|-dbsize <Int8>
267
+ <pre class="bg-gray-100 border rounded overflow-x-auto p-2 font-mono hover:bg-yellow-100"><%= ERB::Util.h %q|-dbsize <Int8>
268
268
  Effective length of the database| %></pre>
269
269
  </li>
270
270
  <li>
271
- <pre><%= ERB::Util.h %q|-searchsp <Int8, >=0>
271
+ <pre class="bg-gray-100 border rounded overflow-x-auto p-2 font-mono hover:bg-yellow-100"><%= ERB::Util.h %q|-searchsp <Int8, >=0>
272
272
  Effective length of the search space| %></pre>
273
273
  </li>
274
274
  <li>
275
- <pre><%= ERB::Util.h %q|-sum_stats <Boolean>
275
+ <pre class="bg-gray-100 border rounded overflow-x-auto p-2 font-mono hover:bg-yellow-100"><%= ERB::Util.h %q|-sum_stats <Boolean>
276
276
  Use sum statistics| %></pre>
277
277
  </li>
278
278
  </ul>
279
279
 
280
280
  <br/>
281
281
 
282
- <h5>Extension options</h5>
283
- <ul class="list-unstyled">
282
+ <h5 class="text-lg py-4 font-medium">Extension options</h5>
283
+ <ul class="list-unstyled space-y-2">
284
284
  <li>
285
- <pre><%= ERB::Util.h %q|-xdrop_ungap <Real>
285
+ <pre class="bg-gray-100 border rounded overflow-x-auto p-2 font-mono hover:bg-yellow-100"><%= ERB::Util.h %q|-xdrop_ungap <Real>
286
286
  X-dropoff value (in bits) for ungapped extensions| %></pre>
287
287
  </li>
288
288
  <li>
289
- <pre><%= ERB::Util.h %q|-xdrop_gap <Real>
289
+ <pre class="bg-gray-100 border rounded overflow-x-auto p-2 font-mono hover:bg-yellow-100"><%= ERB::Util.h %q|-xdrop_gap <Real>
290
290
  X-dropoff value (in bits) for preliminary gapped extensions| %></pre>
291
291
  </li>
292
292
  <li>
293
- <pre><%= ERB::Util.h %q|-xdrop_gap_final <Real>
293
+ <pre class="bg-gray-100 border rounded overflow-x-auto p-2 font-mono hover:bg-yellow-100"><%= ERB::Util.h %q|-xdrop_gap_final <Real>
294
294
  X-dropoff value (in bits) for final gapped alignment| %></pre>
295
295
  </li>
296
296
  <li>
297
- <pre><%= ERB::Util.h %q|-window_size <Integer, >=0>
297
+ <pre class="bg-gray-100 border rounded overflow-x-auto p-2 font-mono hover:bg-yellow-100"><%= ERB::Util.h %q|-window_size <Integer, >=0>
298
298
  Multiple hits window size, use 0 to specify 1-hit algorithm| %></pre>
299
299
  </li>
300
300
  <li>
301
- <pre><%= ERB::Util.h %q|-ungapped
301
+ <pre class="bg-gray-100 border rounded overflow-x-auto p-2 font-mono hover:bg-yellow-100"><%= ERB::Util.h %q|-ungapped
302
302
  Perform ungapped alignment only?| %></pre>
303
303
  </li>
304
304
  </ul>
305
305
  <br/>
306
306
 
307
- <h5>Miscellaneous options</h5>
308
- <ul class="list-unstyled">
307
+ <h5 class="text-lg py-4 font-medium">Miscellaneous options</h5>
308
+ <ul class="list-unstyled space-y-2">
309
309
  <li>
310
- <pre><%= ERB::Util.h %q|-parse_deflines <Real>
310
+ <pre class="bg-gray-100 border rounded overflow-x-auto p-2 font-mono hover:bg-yellow-100"><%= ERB::Util.h %q|-parse_deflines <Real>
311
311
  Should the query and subject defline(s) be parsed?| %></pre>
312
312
  </li>
313
313
  <li>
314
- <pre><%= ERB::Util.h %q|-use_sw_tback <Real>
314
+ <pre class="bg-gray-100 border rounded overflow-x-auto p-2 font-mono hover:bg-yellow-100"><%= ERB::Util.h %q|-use_sw_tback <Real>
315
315
  Compute locally optimal Smith-Waterman alignments?| %></pre>
316
316
  </li>
317
-
317
+
318
318
  </ul>
data/views/layout.erb CHANGED
@@ -9,6 +9,7 @@
9
9
  <meta name="author" content="Pragmatic Genomics Ltd">
10
10
  <meta name="description" content="Custom BLAST server provided by SequenceServer (https://sequenceserver.com)"/>
11
11
 
12
+ <%= Rack::Csrf.metatag(env) %>
12
13
  <!-- CSS -->
13
14
  <% if settings.production? || settings.test? %>
14
15
  <link rel="stylesheet" media="screen,print" type="text/css" href="css/sequenceserver.min.css?ver=<%= SequenceServer::VERSION %>"/>
@@ -20,17 +21,24 @@
20
21
  <body>
21
22
  <div
22
23
  class="navbar">
23
- <div
24
- class="container">
24
+ <div class="container">
25
25
  <a
26
26
  class="navbar-brand"
27
27
  href="https://sequenceserver.com" target="_blank">
28
- <img class="logo" src="SequenceServer_logo.png" alt="sequenceserver_logo">
28
+ <img class="logo" src="sequenceserver_logo.webp" alt="sequenceserver_logo">
29
29
  <small>
30
30
  <%= SequenceServer::VERSION %>
31
31
  </small>
32
32
  </a>
33
33
  <ul class="nav navbar-nav navbar-right hover-reset focus-reset">
34
+ <li>
35
+ <a
36
+ href="https://sequenceserver.com/progress-on-BLAST-interface/"
37
+ class="update-check"
38
+ data-version="<%= SequenceServer::VERSION %>"
39
+ target="_blank">
40
+ </a>
41
+ </li>
34
42
  <li>
35
43
  <a
36
44
  target="_blank"
@@ -100,6 +108,56 @@
100
108
  </div> <!-- /container -->
101
109
  </div>
102
110
 
111
+ <script>
112
+ document.addEventListener('DOMContentLoaded', function() {
113
+
114
+ function suggestNewVersion(element, version) {
115
+ element.textContent = `New version v${version} is available`;
116
+ console.log(`New SequenceServer version available ${version}. Please consider updating.`)
117
+ }
118
+
119
+ const element = document.querySelector('.update-check');
120
+ const currentVersion = element.getAttribute('data-version');
121
+ const cachedVersion = document.cookie.split(';').find((item) => item.trim().startsWith('newVersion='));
122
+ const upToDate = document.cookie.split(';').find((item) => item.trim().startsWith('versionIsLatest='));
123
+ if (upToDate) {
124
+ console.log('SequenceServer is up to date');
125
+ return;
126
+ }
127
+ if (cachedVersion) {
128
+ const newVersion = cachedVersion.split('=')[1];
129
+ if (newVersion !== currentVersion) {
130
+ suggestNewVersion(element, newVersion);
131
+ }
132
+ return;
133
+ }
134
+ console.log('Checking for new SequenceServer version...')
135
+ fetch(`https://updates.sequenceserver.com/?version=${currentVersion}`)
136
+ .then(response => {
137
+ if (response.ok) {
138
+ return response.json();
139
+ } else {
140
+ console.error('Failed to check for new SequenceServer version')
141
+ }
142
+ })
143
+ .then(data => {
144
+ const date = new Date();
145
+ date.setTime(date.getTime() + (24 * 60 * 60 * 1000));
146
+ const expires = "; expires=" + date.toUTCString();
147
+
148
+ if (data.update_available) {
149
+ const newVersion = data.new_version;
150
+ document.cookie = `newVersion=${newVersion}${expires}; path=/`;
151
+ suggestNewVersion(element, newVersion);
152
+ } else {
153
+ console.log('SequenceServer is up to date');
154
+ document.cookie = `versionIsLatest=true${expires}; path=/`;
155
+ }
156
+ })
157
+ .catch(() => {});
158
+ });
159
+
160
+ </script>
103
161
  <!-- twitter -->
104
162
  <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
105
163
  </body>
data/views/search.erb CHANGED
@@ -2,51 +2,46 @@
2
2
  <input type="hidden" id="input_sequence" value="<%= @input_sequence %>">
3
3
 
4
4
  <!-- We will initialise React on this div -->
5
- <div id="view"></div>
5
+ <div id="view" class="my-6 container mx-auto max-w-screen-xl py-6"></div>
6
6
 
7
7
  <!-- JS -->
8
- <script src="sequenceserver-search.min.js?ver=<%= SequenceServer::VERSION %>"></script>
8
+ <script src="sequenceserver-search.min.js?ver=<%= SequenceServer::VERSION %>"></script>
9
9
 
10
10
  <!-- Markup for advanced options modal -->
11
- <div
12
- class="modal fade" id="help"
13
- tabindex="-1">
14
- <div
15
- class="modal-dialog modal-lg">
16
- <div
17
- class="modal-content">
18
- <div
19
- class="modal-header">
20
- <h3>Advanced Options</h3>
11
+ <div class="hidden fixed z-10 inset-0 overflow-y-auto" aria-labelledby="modal-title" role="dialog" aria-modal="true" data-help-modal>
12
+ <div class="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
13
+ <div class="fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity" aria-hidden="true"></div>
14
+
15
+ <span class="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">&#8203;</span>
16
+
17
+ <div class="inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-screen-md sm:w-full">
18
+ <div class="bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4 border-b">
19
+ <h3 class="text-xl leading-6 font-medium text-gray-900">Advanced Options</h3>
21
20
  </div>
22
- <div
23
- class="modal-body">
24
- <div id="tblastn">
25
- <%= erb :tblastn_options %>
26
- </div>
27
- <div id="blastn">
28
- <%= erb :blastn_options %>
29
- </div>
30
- <div id="blastx">
31
- <%= erb :blastx_options %>
32
- </div>
33
- <div id="tblastx">
34
- <%= erb :tblastx_options %>
35
- </div>
36
- <div id="blastp">
37
- <%= erb :blastp_options %>
38
- </div>
21
+
22
+ <div class="overflow-y-scroll max-h-96 bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4">
23
+ <div id="tblastn">
24
+ <%= erb :tblastn_options %>
25
+ </div>
26
+ <div id="blastn">
27
+ <%= erb :blastn_options %>
28
+ </div>
29
+ <div id="blastx">
30
+ <%= erb :blastx_options %>
31
+ </div>
32
+ <div id="tblastx">
33
+ <%= erb :tblastx_options %>
34
+ </div>
35
+ <div id="blastp">
36
+ <%= erb :blastp_options %>
37
+ </div>
39
38
  </div>
40
-
41
- <div
42
- class="modal-footer">
43
- <button
44
- type="button"
45
- class="btn btn-default btn-primary"
46
- data-dismiss="modal">
47
- Got it!
39
+
40
+ <div class="bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse border-t">
41
+ <button type="button" class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-seqblue text-base font-medium text-white hover:bg-seqorange focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-seqorange sm:ml-3 sm:w-auto sm:text-sm" onclick="document.querySelector('[data-help-modal]').classList.add('hidden')">
42
+ Close
48
43
  </button>
49
44
  </div>
50
45
  </div>
51
46
  </div>
52
- </div>
47
+ </div>