sequenceserver-beta 0.8.7.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +3 -0
  3. data/LICENSE.Apache.txt +176 -0
  4. data/LICENSE.txt +69 -0
  5. data/README.txt +5 -0
  6. data/bin/sequenceserver +82 -0
  7. data/config.ru +6 -0
  8. data/example.config.yml +39 -0
  9. data/lib/profile_code.rb +217 -0
  10. data/lib/sequenceserver.rb +527 -0
  11. data/lib/sequenceserver/blast.rb +92 -0
  12. data/lib/sequenceserver/customisation.rb +60 -0
  13. data/lib/sequenceserver/database.rb +29 -0
  14. data/lib/sequenceserver/database_formatter.rb +190 -0
  15. data/lib/sequenceserver/helpers.rb +136 -0
  16. data/lib/sequenceserver/sequencehelpers.rb +93 -0
  17. data/lib/sequenceserver/sinatralikeloggerformatter.rb +12 -0
  18. data/lib/sequenceserver/version.rb +9 -0
  19. data/public/css/beige.css.css +254 -0
  20. data/public/css/bootstrap.dropdown.css +29 -0
  21. data/public/css/bootstrap.icons.css +155 -0
  22. data/public/css/bootstrap.min.css +415 -0
  23. data/public/css/bootstrap.modal.css +28 -0
  24. data/public/css/custom.css +232 -0
  25. data/public/img/glyphicons-halflings-white.png +0 -0
  26. data/public/img/glyphicons-halflings.png +0 -0
  27. data/public/js/bootstrap.dropdown.js +92 -0
  28. data/public/js/bootstrap.modal.js +7 -0
  29. data/public/js/bootstrap.transition.js +7 -0
  30. data/public/js/jquery-scrollspy.js +98 -0
  31. data/public/js/jquery-ui.js +14987 -0
  32. data/public/js/jquery.activity.js +10 -0
  33. data/public/js/jquery.enablePlaceholder.min.js +10 -0
  34. data/public/js/jquery.js +5 -0
  35. data/public/js/sequenceserver.blast.js +208 -0
  36. data/public/js/sequenceserver.js +304 -0
  37. data/public/js/store.min.js +2 -0
  38. data/sequenceserver.gemspec +49 -0
  39. data/tests/database/nucleotide/Sinvicta2-2-3.cdna.subset.fasta +5486 -0
  40. data/tests/database/nucleotide/Sinvicta2-2-3.cdna.subset.fasta.nhr +0 -0
  41. data/tests/database/nucleotide/Sinvicta2-2-3.cdna.subset.fasta.nin +0 -0
  42. data/tests/database/nucleotide/Sinvicta2-2-3.cdna.subset.fasta.nsq +0 -0
  43. data/tests/database/protein/Sinvicta2-2-3.prot.subset.fasta +6449 -0
  44. data/tests/database/protein/Sinvicta2-2-3.prot.subset.fasta.phr +0 -0
  45. data/tests/database/protein/Sinvicta2-2-3.prot.subset.fasta.pin +0 -0
  46. data/tests/database/protein/Sinvicta2-2-3.prot.subset.fasta.psq +0 -0
  47. data/tests/run +26 -0
  48. data/tests/test_sequencehelpers.rb +77 -0
  49. data/tests/test_sequenceserver_blast.rb +60 -0
  50. data/tests/test_ui.rb +104 -0
  51. data/tests/test_ui.rb~ +104 -0
  52. data/tests/ui.specs.todo +10 -0
  53. data/views/500.erb +22 -0
  54. data/views/_options.erb +144 -0
  55. data/views/search.erb +220 -0
  56. metadata +226 -0
@@ -0,0 +1,220 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <title>SequenceServer: Custom BLAST Server</title>
5
+ <meta name="author" content="Anurag Priyam" />
6
+ <meta name="author" content="Ben J. Woodcroft" />
7
+ <meta name="author" content="Yannick Wurm" />
8
+ <meta name="author" content="Cedric Wurm" />
9
+ <meta name="description" content="Custom BLAST server provided by SequenceServer (http://www.sequenceserver.com)"/>
10
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
11
+ <script type="text/javascript" src="<%= uri('/js/store.min.js') %>"></script>
12
+ <script type="text/javascript" src="<%= uri('/js/jquery.js') %>"></script>
13
+ <script type="text/javascript" src="<%= uri('/js/jquery-ui.js') %>"></script>
14
+ <script type="text/javascript" src="<%= uri('/js/jquery.enablePlaceholder.min.js') %>"></script>
15
+ <script type="text/javascript" src="<%= uri('/js/jquery.activity.js') %>"></script>
16
+ <script type="text/javascript" src="<%= uri('/js/jquery-scrollspy.js') %>"></script>
17
+ <script type="text/javascript" src="<%= uri('/js/bootstrap.transition.js') %>"></script>
18
+ <script type="text/javascript" src="<%= uri('/js/bootstrap.dropdown.js') %>"></script>
19
+ <script type="text/javascript" src="<%= uri('/js/bootstrap.modal.js') %>"></script>
20
+ <script type="text/javascript" src="<%= uri('/js/sequenceserver.js') %>"></script>
21
+ <script type="text/javascript" src="<%= uri('/js/sequenceserver.blast.js') %>"></script>
22
+
23
+ <%# without a space after erb's closing tag, a / gets appended to css' path %>
24
+ <link rel="stylesheet" media="screen" type="text/css" href="<%= uri('/css/bootstrap.min.css') %>" />
25
+ <link rel="stylesheet" media="screen" type="text/css" href="<%= uri('/css/bootstrap.dropdown.css') %>" />
26
+ <link rel="stylesheet" media="screen" type="text/css" href="<%= uri('/css/bootstrap.modal.css') %>" />
27
+ <link rel="stylesheet" media="screen" type="text/css" href="<%= uri('/css/bootstrap.icons.css') %>" />
28
+ <link rel="stylesheet" media="screen" type="text/css" href="<%= uri('/css/custom.css') %>" />
29
+ </head>
30
+
31
+ <body>
32
+ <div class="container">
33
+ <noscript>
34
+ <div class="nojs-error">
35
+ <h3>SequenceServer can't work without JavaScript.</h3>
36
+ <ul>
37
+ <li>Please see if you can enable JavaScript in your browser's preferences.</li>
38
+ <li>If your browser doesn't support JavaScript, please consider upgrading to the latest version or using Firefox or Chrome.</li>
39
+ </ul>
40
+ </div>
41
+ </noscript>
42
+
43
+ <div class="page">
44
+ <div id="banner">
45
+ <h1>BLAST Sequence(s)</h1>
46
+ </div>
47
+
48
+ <form method="post" id="blast" action="<%= uri('/#result') %>">
49
+ <div class="row">
50
+ <div class="span16">
51
+ <div class="control-group">
52
+ <textarea name="sequence" id="sequence" spellcheck="false" autofocus="true" placeholder="Paste your sequence(s) here..." ></textarea>
53
+ </div>
54
+ </div>
55
+ </div>
56
+
57
+ <div class="notifications">
58
+ <div class="notification alert-info hide" id="nucleotide-sequence-notification">
59
+ Detected: nucleotide sequence(s).
60
+ </div>
61
+
62
+ <div class="notification alert-info hide" id="protein-sequence-notification">
63
+ Detected: protein sequence(s).
64
+ </div>
65
+
66
+ <div class="notification alert-error hide" id="mixed-sequence-notification">
67
+ Detected: mixed nucleotide and protein sequences. We can't handle that. Please try one sequence at a time.
68
+ </div>
69
+ </div>
70
+
71
+ <br class="large"/>
72
+
73
+ <div class="row">
74
+ <div class="span8">
75
+ <div class="offset-left box databases nucleotide">
76
+ <div class="clearfix">
77
+ <fieldset>
78
+ <legend>Nucleotide databases</legend>
79
+ <div class="controls offset-left">
80
+ <% settings.databases.values.select{|database| database.type == :nucleotide}.sort.each do |database| %>
81
+ <label class="checkbox">
82
+ <input type="checkbox" name="databases[]" value="<%=database.hash%>" data-type="<%=database.type%>" />
83
+ <span> <%= database.title or database.name %></span>
84
+ </label>
85
+ <% end %>
86
+ </div>
87
+ </fieldset>
88
+ </div>
89
+ </div>
90
+ </div>
91
+
92
+ <div class="span8">
93
+ <div class="offset-right box databases protein">
94
+ <div class="clearfix">
95
+ <fieldset>
96
+ <legend>Protein databases</legend>
97
+ <div class="controls offset-left">
98
+ <% settings.databases.values.select{|database| database.type == :protein}.sort.each do |database| %>
99
+ <label class="checkbox">
100
+ <input type="checkbox" name="databases[]" value="<%=database.hash%>" data-type="<%=database.type%>" />
101
+ <span> <%= database.title or database.name %></span>
102
+ </label>
103
+ <% end %>
104
+ </div>
105
+ </fieldset>
106
+ </div>
107
+ </div>
108
+ </div>
109
+ </div>
110
+
111
+ <br class="large"/>
112
+
113
+ <div class="row">
114
+ <div class="span12">
115
+ <div class="offset-left box advanced">
116
+ <div class="clearfix">
117
+ <label for="advanced">Advanced Parameters:</label>
118
+ <input class="span8" type="text" name="advanced" id="advanced" title="View, and enter advanced parameters." placeholder="eg: -evalue 1.0e-5 -num_alignments 100"/>
119
+ <span class="icon-question-sign" data-toggle="modal" href="#help"></span>
120
+ </div>
121
+
122
+ <div class="modal hide fade" id="help">
123
+ <div class="modal-header">
124
+ <h3>Advanced Options</h3>
125
+ </div>
126
+ <div class="modal-body">
127
+ <%= erb :_options %>
128
+ </div>
129
+ <div class="modal-footer">
130
+ <button class="btn btn-primary" data-dismiss="modal">Got it!</button>
131
+ </div>
132
+ </div>
133
+ </div>
134
+ </div>
135
+
136
+ <div class="span4">
137
+ <div id="methods">
138
+ <button type="submit" class="span3 btn btn-large btn-primary" id="method" disabled="disabled">blast</button>
139
+ <button class="btn btn-primary btn-large dropdown-toggle hide" data-toggle="dropdown">
140
+ <span class="caret"></span>
141
+ </button>
142
+ <ul class="dropdown-menu"></ul>
143
+ </div>
144
+ </div>
145
+ </div>
146
+ </form>
147
+
148
+ <div class="modal hide" id="spinner" data-keyboard="false" data-backdrop="static">
149
+ <div class="modal-body">
150
+ </div>
151
+ </div>
152
+
153
+ <div class="results hide">
154
+ <div id="result">Waiting for BLAST to be run <!-- need bit before for UI testing so it knows when BLAST is finished -->
155
+ </div>
156
+ </div>
157
+
158
+ <div class="modal hide fade" id="error">
159
+ <div class="modal-header">
160
+ <h3 id="error-short">Oops! BLAST Failed</h3>
161
+ </div>
162
+ <div class="modal-body">
163
+ <h4 id="error-type"></h4>
164
+ <br/>
165
+ <p id="error-message"></p>
166
+ </div>
167
+ <div class="modal-footer">
168
+ <button class="btn btn-danger" data-dismiss="modal">Close</button>
169
+ </div>
170
+ </div>
171
+
172
+ <div id="underbar">
173
+ <p><strong><a href='http://www.sequenceserver.com'>
174
+ <%= [ "&copy; SequenceServer: BLAST search made easy!",
175
+ "Custom BLAST web interface by SequenceServer.",
176
+ "SequenceServer: Local BLAST with bespoke html interface.",
177
+ "Set up custom BLAST interface with SequenceServer.",
178
+ "Please cite: Priyam A, Woodcroft BJ, Wurm Y (<em>in prep</em>). " +
179
+ "Sequenceserver: BLAST searching made easy."
180
+ ][rand(5)]
181
+ %>
182
+ </a></strong></p>
183
+ </div>
184
+ </div> <!-- /page -->
185
+ </div> <!-- /container -->
186
+
187
+ <div id="social" class="modal hide fade">
188
+ <div class="modal-header">
189
+ <h3 id="error-short">Looks like you are fond of SequenceServer :).</h3>
190
+ </div>
191
+ <div class="modal-body">
192
+ <p>Please consider giving us a plus-one and/or tweeting about us. Thanks!</p>
193
+ <br/>
194
+ <div class="buttons">
195
+ <div class="button-container well">
196
+ <div class="g-plusone" data-annotation="none" data-href="http://www.sequenceserver.com"></div>
197
+ </div>
198
+ <div class="button-container well">
199
+ <a href="https://twitter.com/share" class="twitter-share-button" data-url="http://www.sequenceserver.com" data-text="SequenceServer: BLAST search made easy." data-via="yeban" data-size="large" data-count="none" data-hashtags="bioinformatics">Tweet</a>
200
+ </div>
201
+ </div>
202
+ </div>
203
+ <div class="modal-footer">
204
+ <button class="btn btn-primary" data-dismiss="modal">Done</button>
205
+ </div>
206
+ </div> <!-- /social -->
207
+
208
+ <!-- google plus -->
209
+ <script type="text/javascript">
210
+ (function() {
211
+ var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
212
+ po.src = 'https://apis.google.com/js/plusone.js';
213
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
214
+ })();
215
+ </script>
216
+
217
+ <!-- twitter -->
218
+ <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>
219
+ </body>
220
+ </html>
metadata ADDED
@@ -0,0 +1,226 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: sequenceserver-beta
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.8.7.beta1
5
+ platform: ruby
6
+ authors:
7
+ - Anurag Priyam
8
+ - Ben J Woodcroft
9
+ - Yannick Wurm
10
+ autorequire:
11
+ bindir: bin
12
+ cert_chain: []
13
+ date: 2014-01-21 00:00:00.000000000 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: bundler
17
+ requirement: !ruby/object:Gem::Requirement
18
+ requirements:
19
+ - - "~>"
20
+ - !ruby/object:Gem::Version
21
+ version: '1.2'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ requirements:
26
+ - - "~>"
27
+ - !ruby/object:Gem::Version
28
+ version: '1.2'
29
+ - !ruby/object:Gem::Dependency
30
+ name: sinatra
31
+ requirement: !ruby/object:Gem::Requirement
32
+ requirements:
33
+ - - "~>"
34
+ - !ruby/object:Gem::Version
35
+ version: 1.3.0
36
+ type: :runtime
37
+ prerelease: false
38
+ version_requirements: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - "~>"
41
+ - !ruby/object:Gem::Version
42
+ version: 1.3.0
43
+ - !ruby/object:Gem::Dependency
44
+ name: ptools
45
+ requirement: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - ">="
48
+ - !ruby/object:Gem::Version
49
+ version: '0'
50
+ type: :runtime
51
+ prerelease: false
52
+ version_requirements: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ version: '0'
57
+ - !ruby/object:Gem::Dependency
58
+ name: minitest
59
+ requirement: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - ">="
62
+ - !ruby/object:Gem::Version
63
+ version: '0'
64
+ type: :development
65
+ prerelease: false
66
+ version_requirements: !ruby/object:Gem::Requirement
67
+ requirements:
68
+ - - ">="
69
+ - !ruby/object:Gem::Version
70
+ version: '0'
71
+ - !ruby/object:Gem::Dependency
72
+ name: rack-test
73
+ requirement: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - ">="
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ type: :development
79
+ prerelease: false
80
+ version_requirements: !ruby/object:Gem::Requirement
81
+ requirements:
82
+ - - ">="
83
+ - !ruby/object:Gem::Version
84
+ version: '0'
85
+ - !ruby/object:Gem::Dependency
86
+ name: watir-webdriver
87
+ requirement: !ruby/object:Gem::Requirement
88
+ requirements:
89
+ - - ">="
90
+ - !ruby/object:Gem::Version
91
+ version: '0'
92
+ type: :development
93
+ prerelease: false
94
+ version_requirements: !ruby/object:Gem::Requirement
95
+ requirements:
96
+ - - ">="
97
+ - !ruby/object:Gem::Version
98
+ version: '0'
99
+ - !ruby/object:Gem::Dependency
100
+ name: headless
101
+ requirement: !ruby/object:Gem::Requirement
102
+ requirements:
103
+ - - ">="
104
+ - !ruby/object:Gem::Version
105
+ version: '0'
106
+ type: :development
107
+ prerelease: false
108
+ version_requirements: !ruby/object:Gem::Requirement
109
+ requirements:
110
+ - - ">="
111
+ - !ruby/object:Gem::Version
112
+ version: '0'
113
+ - !ruby/object:Gem::Dependency
114
+ name: rspec
115
+ requirement: !ruby/object:Gem::Requirement
116
+ requirements:
117
+ - - ">="
118
+ - !ruby/object:Gem::Version
119
+ version: '0'
120
+ type: :development
121
+ prerelease: false
122
+ version_requirements: !ruby/object:Gem::Requirement
123
+ requirements:
124
+ - - ">="
125
+ - !ruby/object:Gem::Version
126
+ version: '0'
127
+ description: |
128
+ SequenceServer lets you rapidly set up a BLAST+ server with an intuitive user interface for use locally or over the web.
129
+ email: anurag08priyam@gmail.com
130
+ executables:
131
+ - sequenceserver
132
+ extensions: []
133
+ extra_rdoc_files: []
134
+ files:
135
+ - Gemfile
136
+ - LICENSE.Apache.txt
137
+ - LICENSE.txt
138
+ - README.txt
139
+ - bin/sequenceserver
140
+ - config.ru
141
+ - example.config.yml
142
+ - lib/profile_code.rb
143
+ - lib/sequenceserver.rb
144
+ - lib/sequenceserver/blast.rb
145
+ - lib/sequenceserver/customisation.rb
146
+ - lib/sequenceserver/database.rb
147
+ - lib/sequenceserver/database_formatter.rb
148
+ - lib/sequenceserver/helpers.rb
149
+ - lib/sequenceserver/sequencehelpers.rb
150
+ - lib/sequenceserver/sinatralikeloggerformatter.rb
151
+ - lib/sequenceserver/version.rb
152
+ - public/css/beige.css.css
153
+ - public/css/bootstrap.dropdown.css
154
+ - public/css/bootstrap.icons.css
155
+ - public/css/bootstrap.min.css
156
+ - public/css/bootstrap.modal.css
157
+ - public/css/custom.css
158
+ - public/img/glyphicons-halflings-white.png
159
+ - public/img/glyphicons-halflings.png
160
+ - public/js/bootstrap.dropdown.js
161
+ - public/js/bootstrap.modal.js
162
+ - public/js/bootstrap.transition.js
163
+ - public/js/jquery-scrollspy.js
164
+ - public/js/jquery-ui.js
165
+ - public/js/jquery.activity.js
166
+ - public/js/jquery.enablePlaceholder.min.js
167
+ - public/js/jquery.js
168
+ - public/js/sequenceserver.blast.js
169
+ - public/js/sequenceserver.js
170
+ - public/js/store.min.js
171
+ - sequenceserver.gemspec
172
+ - tests/database/nucleotide/Sinvicta2-2-3.cdna.subset.fasta
173
+ - tests/database/nucleotide/Sinvicta2-2-3.cdna.subset.fasta.nhr
174
+ - tests/database/nucleotide/Sinvicta2-2-3.cdna.subset.fasta.nin
175
+ - tests/database/nucleotide/Sinvicta2-2-3.cdna.subset.fasta.nsq
176
+ - tests/database/protein/Sinvicta2-2-3.prot.subset.fasta
177
+ - tests/database/protein/Sinvicta2-2-3.prot.subset.fasta.phr
178
+ - tests/database/protein/Sinvicta2-2-3.prot.subset.fasta.pin
179
+ - tests/database/protein/Sinvicta2-2-3.prot.subset.fasta.psq
180
+ - tests/run
181
+ - tests/test_sequencehelpers.rb
182
+ - tests/test_sequenceserver_blast.rb
183
+ - tests/test_ui.rb
184
+ - tests/test_ui.rb~
185
+ - tests/ui.specs.todo
186
+ - views/500.erb
187
+ - views/_options.erb
188
+ - views/search.erb
189
+ homepage: http://sequenceserver.com
190
+ licenses:
191
+ - SequenceServer (custom)
192
+ metadata: {}
193
+ post_install_message: |2+
194
+
195
+ ------------------------------------------------------------------------
196
+ Thank you for installing SequenceServer :)!
197
+
198
+ To launch SequenceServer execute 'sequenceserver' from command line.
199
+
200
+ $ sequenceserver
201
+
202
+
203
+ Visit http://sequenceserver.com for more.
204
+ ------------------------------------------------------------------------
205
+
206
+ rdoc_options: []
207
+ require_paths:
208
+ - lib
209
+ required_ruby_version: !ruby/object:Gem::Requirement
210
+ requirements:
211
+ - - ">="
212
+ - !ruby/object:Gem::Version
213
+ version: '0'
214
+ required_rubygems_version: !ruby/object:Gem::Requirement
215
+ requirements:
216
+ - - ">"
217
+ - !ruby/object:Gem::Version
218
+ version: 1.3.1
219
+ requirements: []
220
+ rubyforge_project:
221
+ rubygems_version: 2.2.0.rc.1
222
+ signing_key:
223
+ specification_version: 4
224
+ summary: BLAST search made easy!
225
+ test_files: []
226
+ has_rdoc: