sequenceserver 0.7.4 → 0.7.5

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.

@@ -0,0 +1,176 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
@@ -4,7 +4,12 @@ Copyright (c) 2010-2011 Yannick Wurm, Benjamin J. Woodcroft, Anurag Priyam.
4
4
 
5
5
  1. Definitions
6
6
 
7
- The software: the SequenceServer software and associated documentation.
7
+ The software: the SequenceServer software and associated documentation. The
8
+ term does not extend to unmodified open source software components used within
9
+ SequenceServer which are governed by their own license agreements. However,
10
+ modfications to such components shall be deemed a part of the SequenceServer
11
+ software.
12
+
8
13
  The authors: Yannick Wurm, Anurag Priyam, Benjamin J. Woodcroft.
9
14
 
10
15
 
@@ -270,8 +270,11 @@ module SequenceServer
270
270
  advanced_opts = params['advanced']
271
271
  validate_advanced_parameters(advanced_opts) #check the advanced options are sensible
272
272
 
273
- # blastn implies blastn, not megablast
274
- advanced_opts << '-task blastn ' if method == 'blastn'
273
+ # blastn implies blastn, not megablast; but let's not interfere if a user
274
+ # specifies `task` herself
275
+ if method == 'blastn' and not advanced_opts =~ /task/
276
+ advanced_opts << ' -task blastn '
277
+ end
275
278
 
276
279
  method = settings.binaries[ method ]
277
280
  settings.log.debug('settings.databases: ' + settings.databases.inspect)
@@ -95,6 +95,13 @@ module SequenceServer
95
95
  type = type.downcase
96
96
  name = name.freeze
97
97
  title = title.join(' ').freeze
98
+
99
+ # skip past all but alias file of a NCBI multi-part BLAST database
100
+ if name.match(/\/\w*[.]\d{2,}[.\w]*/)
101
+ log.info(%|Found a multi-part database volume at #{name} - ignoring it.|)
102
+ next
103
+ end
104
+
98
105
  #LOG.info("Found #{type} database: #{title} at #{name}")
99
106
  (db[type] ||= []) << Database.new(name, title)
100
107
  end
@@ -0,0 +1,246 @@
1
+ /**
2
+ * jQuery Live Clipboard
3
+ *
4
+ * Copyright (c) 2009 Shinichi Tomita (shinichi.tomita@gmail.com)
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
+ * SOFTWARE.
20
+ */
21
+ (function($) {
22
+
23
+ var namespace = 'liveclip';
24
+ var relayEvents =
25
+ 'click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,keypress,keyup'.split(',');
26
+
27
+ /**
28
+ * Adjust clipboard textarea size to cover parent clippable element.
29
+ */
30
+ function track() {
31
+ var target = $(this);
32
+ var clipboard = target.clipboard();
33
+ var w = target.outerWidth(), h = target.outerHeight(), offset = target.offset();
34
+ if (/^(auto|scroll)$/.test(target.css('overflow'))) w -= 20;
35
+ if (clipboard) clipboard.css({ width : w, height : h, top : offset.top, left : offset.left });
36
+ }
37
+
38
+ /**
39
+ * Finding and capture event target element, excluding clipboard textarea.
40
+ * This is "pseudo" capturing, assuming no layered elements covering over the target.
41
+ */
42
+ function capture(el, e) {
43
+ var captured = _capture(el);
44
+ var clipboard = captured.clipboard();
45
+ // if captured element has clipboard, return it.
46
+ return captured !== el && clipboard ? clipboard : captured;
47
+
48
+ function _capture(el) {
49
+ var target = el;
50
+ el.children().each(function() {
51
+ var child = $(this);
52
+ var w = child.width(), h = child.innerHeight(), offset = child.offset();
53
+ if (e.pageX > offset.left && e.pageX < offset.left + w &&
54
+ e.pageY > offset.top && e.pageY < offset.top + h) {
55
+ target = _capture(child);
56
+ }
57
+ })
58
+ return target;
59
+ }
60
+ }
61
+
62
+ /**
63
+ * Context menu event handler
64
+ */
65
+ function contextmenuHandler(e) {
66
+ var clipboard = $(this);
67
+ var target = clipboard.data(namespace + '-target');
68
+ var options = target.data(namespace + '-clipboard-options');
69
+
70
+ if (options.active && options.active.call(target) === false) {
71
+ clipboard.attr('readonly', 'readonly');
72
+ return;
73
+ }
74
+
75
+ if (options.paste || options.del) {
76
+ clipboard.removeAttr('readonly');
77
+ } else {
78
+ clipboard.attr('readonly', 'readonly');
79
+ }
80
+
81
+ var val = options.copy ? options.copy.call(target) : '';
82
+ clipboard.val(val);
83
+ clipboard.get(0).select();
84
+ if (options.paste || options.del) {
85
+ val = clipboard.val();
86
+ var watchPID = clipboard.data(namespace+'-watcher');
87
+ if (watchPID) {
88
+ clearInterval(watchPID);
89
+ clipboard.removeData(namespace+'-watcher');
90
+ }
91
+ watchPID = setInterval(function() {
92
+ var v = clipboard.val();
93
+ if (v !== val) {
94
+ try {
95
+ if (v === '') {
96
+ if (options.del) options.del.call(target)
97
+ } else {
98
+ if (options.paste) options.paste.call(target, v);
99
+ clipboard.val('');
100
+ }
101
+ } catch(e) {}
102
+ clearInterval(watchPID);
103
+ clipboard.removeData(namespace+'-watcher');
104
+ }
105
+ }, 100);
106
+ clipboard.data(namespace+'-watcher', watchPID);
107
+ }
108
+ }
109
+
110
+
111
+ /**
112
+ * Keyboard down event handler
113
+ */
114
+ function keydownHandler(e) {
115
+ var clipboard = $(this);
116
+ var target = clipboard.data(namespace + '-target');
117
+ var options = target.data(namespace + '-clipboard-options');
118
+
119
+ if (e.metaKey) {
120
+ switch (e.keyCode) {
121
+ case 67 : // Command + C
122
+ var val = options.copy ? options.copy.call(target) : '';
123
+ clipboard.val(val)
124
+ clipboard.get(0).select();
125
+ break;
126
+ case 86 : // Command + V
127
+ if (options.paste) {
128
+ clipboard.get(0).select();
129
+ setTimeout(function() {
130
+ var data = clipboard.val();
131
+ options.paste.call(target, data);
132
+ clipboard.val('')
133
+ }, 10);
134
+ }
135
+ break;
136
+ case 88 : // Command + X
137
+ var val = options.copy ? options.copy.call(target) : '';
138
+ clipboard.val(val)
139
+ clipboard.get(0).select();
140
+ if (options.del) {
141
+ setTimeout(function() {
142
+ options.del.call(target)
143
+ }, 10);
144
+ }
145
+ break;
146
+ default :
147
+ break;
148
+ }
149
+ } else if (e.keyCode==46) { // delete
150
+ if (options.del) options.del.call(target);
151
+ }
152
+
153
+ }
154
+
155
+
156
+ $.fn.extend({
157
+
158
+ /**
159
+ * Attach clipboard feature to block element
160
+ * Get current clipboard proxy textarea
161
+ */
162
+ clipboard : function(options) {
163
+ var elements = this;
164
+
165
+ if (options) { // setter
166
+
167
+ $(elements).each(function() {
168
+ var target = $(this);
169
+ var clipboard = target.data(namespace + '-clipboard');
170
+ if (!clipboard) {
171
+ clipboard = $('<textarea></textarea>')
172
+ .addClass(namespace+'-clipboard')
173
+ .addClass(options.cls ? options.cls : '')
174
+ .css({
175
+ cursor : 'default',
176
+ position : 'absolute',
177
+ fontSize : $.liveclip.debug ? '12px' : '1px',
178
+ opacity : $.liveclip.debug ? .5 : .01
179
+ })
180
+ .appendTo(document.body)
181
+ .bind('contextmenu', contextmenuHandler)
182
+ .bind('keydown', keydownHandler);
183
+ $.each(relayEvents, function(i, eventName) {
184
+ clipboard.bind(eventName+'.'+namespace, function(e) {
185
+ capture(target, e).trigger(e);
186
+ });
187
+ });
188
+ if ($.liveclip.autoTrack) { target.bind('mouseover.'+namespace, track) }
189
+ target.data(namespace+'-clipboard', clipboard);
190
+ clipboard.data(namespace+'-target', target);
191
+ }
192
+ target.data(namespace+'-clipboard-options', options);
193
+ track.call(target);
194
+ });
195
+ return this;
196
+
197
+ } else { // getter
198
+ return $(this).data(namespace + '-clipboard');
199
+ }
200
+
201
+ }
202
+ ,
203
+
204
+ /**
205
+ * remove attached clipboard feature
206
+ */
207
+ removeClipboard : function() {
208
+ $(this).each(function() {
209
+ $(this).clipboard().remove();
210
+ $(this).unbind('mouseover.'+namespace, track)
211
+ .removeData(namespace + '-clipboard')
212
+ .removeData(namespace + '-clipboard-options');
213
+ });
214
+ return this;
215
+ }
216
+
217
+ });
218
+
219
+ $.liveclip = {
220
+ debug : false,
221
+ autoTrack : false
222
+ }
223
+
224
+ /**
225
+ * Track all clipboard, aligning to target element position and size
226
+ * If no target element available in document, removing clipboard.
227
+ */
228
+ $.trackClipboards = function() {
229
+ $('body > textarea.'+namespace+'-clipboard').each(function() {
230
+ var clipboard = $(this);
231
+ var target = clipboard.data(namespace + '-target');
232
+ if (target && target.parent()) {
233
+ track.call(target);
234
+ } else {
235
+ clipboard.remove();
236
+ }
237
+ });
238
+ }
239
+
240
+ $(function() {
241
+ if ($.liveclip.autoTrack) {
242
+ $(document).mousemove($.trackClipboards);
243
+ }
244
+ })
245
+
246
+ })(jQuery)
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
  # meta
3
3
  s.name = 'sequenceserver'
4
- s.version = '0.7.4'
4
+ s.version = '0.7.5'
5
5
  s.authors = ['Anurag Priyam', 'Ben J Woodcroft', 'Yannick Wurm']
6
6
  s.email = 'anurag08priyam@gmail.com'
7
7
  s.homepage = 'http://sequenceserver.com'
@@ -20,7 +20,7 @@ DESC
20
20
  # gem
21
21
  s.files = Dir['lib/**/*'] + Dir['views/**/*'] + Dir['public/**/*'] + Dir['tests/**/*']
22
22
  s.files = s.files + ['config.ru', 'example.config.yml']
23
- s.files = s.files + ['LICENSE.txt', 'README.txt']
23
+ s.files = s.files + ['LICENSE.txt', 'LICENSE.Apache.txt', 'README.txt']
24
24
  s.files = s.files + ['Gemfile', 'sequenceserver.gemspec']
25
25
  s.executables = ['sequenceserver']
26
26
  s.require_paths = ['lib']
@@ -0,0 +1,10 @@
1
+ it "should automatically focus sequence input box" do
2
+ # when the page loads, check that sequence input box is focussed
3
+ #
4
+ # NOTE: unless #75 is resolved, make sure to test this functionality only if
5
+ # HTML5 autofocus attribute is supported
6
+ end
7
+
8
+ it "should ensure spell checking is disabled for sequence input box" do
9
+ # NOTE: only if the browser supports it
10
+ end
@@ -31,7 +31,7 @@
31
31
  <div class="span12">
32
32
  <div class="offset-left sequence">
33
33
  <div class="clearfix">
34
- <textarea name="sequence" id="sequence" rows="11" placeholder="Paste your sequence(s) here..." ></textarea>
34
+ <textarea name="sequence" id="sequence" rows="11" spellcheck="false" <%= 'autofocus="true"' unless @blast %> placeholder="Paste your sequence(s) here..." ></textarea>
35
35
  </div>
36
36
  </div>
37
37
  </div>
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sequenceserver
3
3
  version: !ruby/object:Gem::Version
4
- hash: 11
4
+ hash: 9
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 7
9
- - 4
10
- version: 0.7.4
9
+ - 5
10
+ version: 0.7.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Anurag Priyam
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2011-12-23 00:00:00 Z
20
+ date: 2012-02-09 00:00:00 Z
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
23
23
  name: bundler
@@ -89,6 +89,7 @@ files:
89
89
  - public/css/custom.css
90
90
  - public/js/jquery.js
91
91
  - public/js/jquery.enablePlaceholder.min.js
92
+ - public/js/liveclip.jquery.js
92
93
  - public/js/sequenceserver.js
93
94
  - public/js/jquery.activity.js
94
95
  - public/js/sequenceserver.blast.js
@@ -103,9 +104,11 @@ files:
103
104
  - tests/database/nucleotide/Sinvicta2-2-3.cdna.subset.fasta.nsq
104
105
  - tests/database/nucleotide/Sinvicta2-2-3.cdna.subset.fasta.nin
105
106
  - tests/database/nucleotide/Sinvicta2-2-3.cdna.subset.fasta.nhr
107
+ - tests/ui.specs.todo
106
108
  - config.ru
107
109
  - example.config.yml
108
110
  - LICENSE.txt
111
+ - LICENSE.Apache.txt
109
112
  - README.txt
110
113
  - Gemfile
111
114
  - sequenceserver.gemspec