sequenceserver 1.1.0.beta → 1.1.0.beta2
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.
- checksums.yaml +4 -4
- data/.travis.yml +7 -7
- data/README.md +9 -11
- data/Rakefile +2 -15
- data/lib/sequenceserver/database.rb +7 -1
- data/lib/sequenceserver/routes.rb +5 -2
- data/lib/sequenceserver/version.rb +1 -1
- data/lib/sequenceserver.rb +3 -1
- data/package.json +2 -3
- data/public/config.js +0 -7
- data/public/css/sequenceserver.css +8 -17
- data/public/css/sequenceserver.min.css +2 -2
- data/public/js/report.js +62 -45
- data/public/js/search.js +24 -17
- data/public/js/sequenceserver.js +23 -60
- data/public/sequenceserver-report.min.js +17 -0
- data/public/sequenceserver-search.min.js +11 -0
- data/sequenceserver.gemspec +5 -5
- data/spec/capybara_spec.rb +3 -3
- data/spec/sequence_spec.rb +2 -2
- data/views/layout.erb +1 -13
- data/views/report.erb +13 -0
- data/views/search.erb +45 -0
- metadata +26 -92
- data/public/css/sequenceserver.min.css.gz +0 -0
- data/public/sequenceserver.min.js +0 -26
- data/public/sequenceserver.min.js.gz +0 -0
- data/public/vendor/npm/object-assign@2.1.1/.jspm-hash +0 -1
- data/public/vendor/npm/object-assign@2.1.1/.jspm.json +0 -72
- data/public/vendor/npm/object-assign@2.1.1/index.js +0 -27
- data/public/vendor/npm/object-assign@2.1.1/package.json +0 -38
- data/public/vendor/npm/object-assign@2.1.1.js +0 -1
- data/public/vendor/npm/qs@2.4.1/.jshintignore +0 -1
- data/public/vendor/npm/qs@2.4.1/.jshintrc +0 -10
- data/public/vendor/npm/qs@2.4.1/.jspm-hash +0 -1
- data/public/vendor/npm/qs@2.4.1/.jspm.json +0 -61
- data/public/vendor/npm/qs@2.4.1/.npmignore +0 -18
- data/public/vendor/npm/qs@2.4.1/.travis.yml +0 -6
- data/public/vendor/npm/qs@2.4.1/CHANGELOG.md +0 -68
- data/public/vendor/npm/qs@2.4.1/CONTRIBUTING.md +0 -1
- data/public/vendor/npm/qs@2.4.1/LICENSE +0 -28
- data/public/vendor/npm/qs@2.4.1/Makefile +0 -8
- data/public/vendor/npm/qs@2.4.1/README.md +0 -233
- data/public/vendor/npm/qs@2.4.1/index.js +0 -2
- data/public/vendor/npm/qs@2.4.1/lib/index.js +0 -8
- data/public/vendor/npm/qs@2.4.1/lib/parse.js +0 -100
- data/public/vendor/npm/qs@2.4.1/lib/stringify.js +0 -67
- data/public/vendor/npm/qs@2.4.1/lib/utils.js +0 -132
- data/public/vendor/npm/qs@2.4.1/lib.js +0 -2
- data/public/vendor/npm/qs@2.4.1/package.json +0 -29
- data/public/vendor/npm/qs@2.4.1/test/parse.js +0 -359
- data/public/vendor/npm/qs@2.4.1.js +0 -1
- data/public/vendor/npm/react-router@0.13.3/.jspm-hash +0 -1
- data/public/vendor/npm/react-router@0.13.3/.jspm.json +0 -70
- data/public/vendor/npm/react-router@0.13.3/README.md +0 -140
- data/public/vendor/npm/react-router@0.13.3/lib/Cancellation.js +0 -9
- data/public/vendor/npm/react-router@0.13.3/lib/History.js +0 -31
- data/public/vendor/npm/react-router@0.13.3/lib/Match.js +0 -80
- data/public/vendor/npm/react-router@0.13.3/lib/Navigation.js +0 -22
- data/public/vendor/npm/react-router@0.13.3/lib/PathUtils.js +0 -154
- data/public/vendor/npm/react-router@0.13.3/lib/PropTypes.js +0 -15
- data/public/vendor/npm/react-router@0.13.3/lib/Redirect.js +0 -12
- data/public/vendor/npm/react-router@0.13.3/lib/Route.js +0 -133
- data/public/vendor/npm/react-router@0.13.3/lib/ScrollHistory.js +0 -53
- data/public/vendor/npm/react-router@0.13.3/lib/State.js +0 -25
- data/public/vendor/npm/react-router@0.13.3/lib/TestUtils.js +0 -102
- data/public/vendor/npm/react-router@0.13.3/lib/Transition.js +0 -58
- data/public/vendor/npm/react-router@0.13.3/lib/actions/LocationActions.js +0 -25
- data/public/vendor/npm/react-router@0.13.3/lib/behaviors/ImitateBrowserBehavior.js +0 -19
- data/public/vendor/npm/react-router@0.13.3/lib/behaviors/ScrollToTopBehavior.js +0 -15
- data/public/vendor/npm/react-router@0.13.3/lib/components/ActiveHandler.js +0 -111
- data/public/vendor/npm/react-router@0.13.3/lib/components/ContextWrapper.js +0 -39
- data/public/vendor/npm/react-router@0.13.3/lib/components/DefaultRoute.js +0 -41
- data/public/vendor/npm/react-router@0.13.3/lib/components/Link.js +0 -119
- data/public/vendor/npm/react-router@0.13.3/lib/components/NotFoundRoute.js +0 -41
- data/public/vendor/npm/react-router@0.13.3/lib/components/Redirect.js +0 -40
- data/public/vendor/npm/react-router@0.13.3/lib/components/Route.js +0 -67
- data/public/vendor/npm/react-router@0.13.3/lib/components/RouteHandler.js +0 -111
- data/public/vendor/npm/react-router@0.13.3/lib/createRouter.js +0 -329
- data/public/vendor/npm/react-router@0.13.3/lib/createRoutesFromReactChildren.js +0 -59
- data/public/vendor/npm/react-router@0.13.3/lib/getWindowScrollPosition.js +0 -19
- data/public/vendor/npm/react-router@0.13.3/lib/index.js +0 -26
- data/public/vendor/npm/react-router@0.13.3/lib/isReactChildren.js +0 -14
- data/public/vendor/npm/react-router@0.13.3/lib/locations/HashLocation.js +0 -79
- data/public/vendor/npm/react-router@0.13.3/lib/locations/HistoryLocation.js +0 -64
- data/public/vendor/npm/react-router@0.13.3/lib/locations/RefreshLocation.js +0 -18
- data/public/vendor/npm/react-router@0.13.3/lib/locations/StaticLocation.js +0 -50
- data/public/vendor/npm/react-router@0.13.3/lib/locations/TestLocation.js +0 -104
- data/public/vendor/npm/react-router@0.13.3/lib/runRouter.js +0 -16
- data/public/vendor/npm/react-router@0.13.3/lib/supportsHistory.js +0 -17
- data/public/vendor/npm/react-router@0.13.3/lib.js +0 -2
- data/public/vendor/npm/react-router@0.13.3/package.json +0 -36
- data/public/vendor/npm/react-router@0.13.3/umd/ReactRouter.js +0 -3388
- data/public/vendor/npm/react-router@0.13.3/umd/ReactRouter.min.js +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cccfc5a0df6982dde1187b7f12d043092d6b72c4
|
4
|
+
data.tar.gz: ce2dbf97a61770f721fd3501e150817e4e33f095
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c75136b0c361e18f5d5d6dedfd4ad3aa8a730d3002f7be1823a47e7c6e6c0de1451116d6369af6c6cb5431e17d30cf64e2049960449cfab31d2566d1c0a7228
|
7
|
+
data.tar.gz: 4871277a05d19b600fc2611958623aa38b6328a1e271917aeedf840a0901550f2f76f86e6f59ee31793e95a946ab2ba092308622c8e30290b7065f2913719ccf
|
data/.travis.yml
CHANGED
@@ -8,25 +8,21 @@ rvm:
|
|
8
8
|
addons:
|
9
9
|
firefox: "58.0"
|
10
10
|
|
11
|
-
code_climate:
|
12
|
-
repo_token:
|
13
|
-
secure: "cT2wvWS2Uk2trYGwZ38Qo9XWCeL+OOXH0lVmLfNb1Xy/tWAXycDdZsc9CN8igjhD+/cKvvh529/qdDm2PJnb1Hux1bxHSTuMuE2xQWlfJqaOR/IX0z96MbP1eITKjhGv9vccmIPdV3Rh/OQLeHkyqyHvXio9NXiARMJUZDTpRuA="
|
14
|
-
|
15
11
|
branches:
|
16
12
|
only:
|
17
13
|
- 1.0.x # stable
|
18
14
|
- master
|
19
15
|
|
20
16
|
install:
|
21
|
-
- wget -c "https://github.com/mozilla/geckodriver/releases/download/v0.20.0/geckodriver-v0.20.0-
|
17
|
+
- wget -c "https://github.com/mozilla/geckodriver/releases/download/v0.20.0/geckodriver-v0.20.0-linux64.tar.gz"
|
22
18
|
- mkdir geckodriver && tar xvf geckodriver-*.tar.gz -C geckodriver
|
23
|
-
- export PATH="geckodriver:$PATH"
|
19
|
+
- export PATH="$PWD/geckodriver:$PATH"
|
24
20
|
- wget -c "ftp://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/2.6.0/ncbi-blast-2.6.0+-x64-linux.tar.gz"
|
25
21
|
- tar xvf ncbi-blast-*.tar.gz
|
26
22
|
- gem install bundler && bundle
|
27
23
|
- bundle exec bin/sequenceserver -s -b ncbi-blast-2.6.0+/bin -d spec/database/sample
|
28
24
|
|
29
|
-
script: xvfb-run bundle exec
|
25
|
+
script: xvfb-run bundle exec rspec
|
30
26
|
|
31
27
|
cache:
|
32
28
|
directories:
|
@@ -34,3 +30,7 @@ cache:
|
|
34
30
|
- ncbi-blast-2.6.0+
|
35
31
|
|
36
32
|
sudo: false
|
33
|
+
|
34
|
+
env:
|
35
|
+
global:
|
36
|
+
- CC_TEST_REPORTER_ID=ec48bb03c72db6b43ce71fd488110b4707abfde4386c144d886d711378d8db64
|
data/README.md
CHANGED
@@ -34,12 +34,6 @@ npm install
|
|
34
34
|
bundle
|
35
35
|
```
|
36
36
|
|
37
|
-
We use capybara-webkit for functional testing, which requires [`qt` to be
|
38
|
-
installed](https://github.com/thoughtbot/capybara-webkit/wiki/Installing-Qt-and-compiling-capybara-webkit).
|
39
|
-
|
40
|
-
We use JSPM (via Node) for front-end package management and building JavaScript
|
41
|
-
and CSS files.
|
42
|
-
|
43
37
|
If you are deploying SequenceServer from git you can skip `npm install` step
|
44
38
|
and skip installing gems used for testing (and `qt`), etc. by running:
|
45
39
|
|
@@ -53,15 +47,19 @@ logs verbosely and uses raw front-end files.
|
|
53
47
|
bundle exec bin/sequenceserver -D
|
54
48
|
```
|
55
49
|
|
56
|
-
Run
|
50
|
+
Run tests:
|
51
|
+
```
|
52
|
+
bundle exec rspec
|
53
|
+
```
|
54
|
+
|
55
|
+
Run code style checkers (rubocop, csslint, eslint) -
|
57
56
|
```
|
58
|
-
|
57
|
+
codeclimate analyze
|
59
58
|
```
|
60
59
|
|
61
|
-
|
60
|
+
Build minifies JS and CSS bundles:
|
62
61
|
```
|
63
|
-
|
64
|
-
rake lint
|
62
|
+
npm run-script build
|
65
63
|
```
|
66
64
|
|
67
65
|
## Using Docker
|
data/Rakefile
CHANGED
@@ -1,21 +1,8 @@
|
|
1
|
-
require 'rspec/core'
|
2
|
-
require 'rspec/core/rake_task'
|
3
|
-
|
4
|
-
desc 'Run specs'
|
5
|
-
RSpec::Core::RakeTask.new(:spec) do |spec|
|
6
|
-
spec.pattern = FileList['spec/**/*_spec.rb']
|
7
|
-
spec.pattern.exclude(ENV['exclude'])
|
8
|
-
end
|
9
|
-
|
10
|
-
desc 'Run CodeClimate (rubocop, csslint, eslint)'
|
11
|
-
task :lint do
|
12
|
-
sh 'codeclimate analyze'
|
13
|
-
end
|
14
|
-
|
15
1
|
desc 'Concatenate, minify and gzip JS and CSS files; build gem'
|
16
2
|
task :build do
|
17
3
|
sh 'npm run-script build'
|
4
|
+
# FIXME: clean up the dir before gem
|
18
5
|
sh 'gem build sequenceserver.gemspec'
|
19
6
|
end
|
20
7
|
|
21
|
-
task :default => [:
|
8
|
+
task :default => [:build]
|
@@ -21,6 +21,11 @@ module SequenceServer
|
|
21
21
|
# and use `parse_seqids` option of `makeblastdb` to format databases.
|
22
22
|
Database = Struct.new(:name, :title, :type, :nsequences, :ncharacters,
|
23
23
|
:updated_on) do
|
24
|
+
|
25
|
+
extend Forwardable
|
26
|
+
|
27
|
+
def_delegators SequenceServer, :config, :sys
|
28
|
+
|
24
29
|
def initialize(*args)
|
25
30
|
args[2].downcase! # database type
|
26
31
|
args.each(&:freeze)
|
@@ -32,7 +37,8 @@ module SequenceServer
|
|
32
37
|
attr_reader :id
|
33
38
|
|
34
39
|
def include?(accession)
|
35
|
-
|
40
|
+
cmd = "blastdbcmd -entry '#{accession}' -db #{name}"
|
41
|
+
out, _ = sys(cmd, path: config[:bin])
|
36
42
|
!out.empty?
|
37
43
|
end
|
38
44
|
|
@@ -49,6 +49,9 @@ module SequenceServer
|
|
49
49
|
frame_options = SequenceServer.config[:frame_options]
|
50
50
|
frame_options && { :frame_options => frame_options }
|
51
51
|
}
|
52
|
+
|
53
|
+
# Serve compressed responses.
|
54
|
+
use Rack::Deflater
|
52
55
|
end
|
53
56
|
|
54
57
|
# For any request that hits the app, log incoming params at debug level.
|
@@ -58,7 +61,7 @@ module SequenceServer
|
|
58
61
|
|
59
62
|
# Returns base HTML. Rest happens client-side: rendering the search form.
|
60
63
|
get '/' do
|
61
|
-
erb :layout
|
64
|
+
erb :search, layout: true
|
62
65
|
end
|
63
66
|
|
64
67
|
# Returns data that is used to render the search form client side. These
|
@@ -93,7 +96,7 @@ module SequenceServer
|
|
93
96
|
# Returns base HTML. Rest happens client-side: polling for and rendering
|
94
97
|
# the results.
|
95
98
|
get '/:jid' do |jid|
|
96
|
-
erb :layout
|
99
|
+
erb :report, layout: true
|
97
100
|
end
|
98
101
|
|
99
102
|
# @params sequence_ids: whitespace separated list of sequence ids to
|
data/lib/sequenceserver.rb
CHANGED
@@ -96,9 +96,11 @@ module SequenceServer
|
|
96
96
|
temp_stdout_file = Tempfile.new 'sequenceserver-sys'
|
97
97
|
temp_stderr_file = Tempfile.new 'sequenceserver-sys'
|
98
98
|
|
99
|
+
# Log the command we are going to run - use -D option to view.
|
99
100
|
logger.debug("Executing: #{command}")
|
100
101
|
|
101
|
-
#
|
102
|
+
# Run command in a child process. This allows us to control PATH
|
103
|
+
# and pwd of the running process.
|
102
104
|
child_pid = fork do
|
103
105
|
# Set the PATH environment variable to the binary directory or
|
104
106
|
# safe directory.
|
data/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "SequenceServer",
|
3
3
|
"description": "BLAST searching made easy!",
|
4
|
-
"version": "1.1.0
|
4
|
+
"version": "1.1.0-beta",
|
5
5
|
"homepage": "http://www.sequenceserver.com",
|
6
6
|
"repository": "https://github.com/yannickwurm/sequenceserver",
|
7
7
|
"author": {
|
@@ -14,7 +14,7 @@
|
|
14
14
|
"jspm": "^0.16.2"
|
15
15
|
},
|
16
16
|
"scripts": {
|
17
|
-
"build": "jspm bundle-sfx --minify --skip-source-maps js/
|
17
|
+
"build": "jspm bundle-sfx --minify --skip-source-maps js/search.js public/sequenceserver-search.min.js && jspm bundle-sfx --minify --skip-source-maps js/report.js public/sequenceserver-report.min.js && cleancss public/css/sequenceserver.css > public/css/sequenceserver.min.css"
|
18
18
|
},
|
19
19
|
"jspm": {
|
20
20
|
"directories": {
|
@@ -29,7 +29,6 @@
|
|
29
29
|
"jquery-ui": "github:components/jqueryui@^1.11.4",
|
30
30
|
"nicgirault/circosJs": "github:nicgirault/circosJs@^1.7.0",
|
31
31
|
"react": "npm:react@^0.13.3",
|
32
|
-
"react-router": "npm:react-router@^0.13.3",
|
33
32
|
"underscore": "npm:underscore@^1.8.3",
|
34
33
|
"webshim": "npm:webshim@^1.15.8"
|
35
34
|
},
|
data/public/config.js
CHANGED
@@ -26,7 +26,6 @@ System.config({
|
|
26
26
|
"jquery-ui": "github:components/jqueryui@1.11.4",
|
27
27
|
"nicgirault/circosJs": "github:nicgirault/circosJs@1.7.0",
|
28
28
|
"react": "npm:react@0.13.3",
|
29
|
-
"react-router": "npm:react-router@0.13.3",
|
30
29
|
"underscore": "npm:underscore@1.8.3",
|
31
30
|
"webshim": "npm:webshim@1.15.8",
|
32
31
|
"github:components/jqueryui@1.11.4": {
|
@@ -101,12 +100,6 @@ System.config({
|
|
101
100
|
"npm:path-browserify@0.0.0": {
|
102
101
|
"process": "github:jspm/nodelibs-process@0.1.1"
|
103
102
|
},
|
104
|
-
"npm:react-router@0.13.3": {
|
105
|
-
"object-assign": "npm:object-assign@2.1.1",
|
106
|
-
"process": "github:jspm/nodelibs-process@0.1.1",
|
107
|
-
"qs": "npm:qs@2.4.1",
|
108
|
-
"react": "npm:react@0.13.3"
|
109
|
-
},
|
110
103
|
"npm:react@0.13.3": {
|
111
104
|
"buffer": "github:jspm/nodelibs-buffer@0.1.0",
|
112
105
|
"envify": "npm:envify@3.4.0",
|
@@ -224,13 +224,6 @@ a.disabled:hover {
|
|
224
224
|
font-weight: normal;
|
225
225
|
}
|
226
226
|
|
227
|
-
/**
|
228
|
-
* Set padding: 10px and 15px on li.
|
229
|
-
*/
|
230
|
-
.list-padded li {
|
231
|
-
padding: 10px 15px;
|
232
|
-
}
|
233
|
-
|
234
227
|
/**
|
235
228
|
* Reset Bootstrap's CSS for pre tags.
|
236
229
|
*/
|
@@ -336,14 +329,16 @@ input[name="advanced"] {
|
|
336
329
|
/**********************
|
337
330
|
Sidebar
|
338
331
|
**********************/
|
339
|
-
.sidebar {
|
340
|
-
/*
|
332
|
+
.sidebar > div {
|
333
|
+
/* To line up with the results on the right */
|
341
334
|
margin-top: 20px;
|
342
335
|
}
|
343
|
-
.sidebar
|
344
|
-
padding: 10px 0 0 0;
|
336
|
+
.sidebar h4 {
|
345
337
|
font-size: 14px;
|
346
338
|
}
|
339
|
+
.sidebar li a {
|
340
|
+
padding: 7px 10px;
|
341
|
+
}
|
347
342
|
|
348
343
|
.sidebar.affix {
|
349
344
|
margin-top: 0;
|
@@ -362,14 +357,10 @@ input[name="advanced"] {
|
|
362
357
|
}
|
363
358
|
}
|
364
359
|
|
365
|
-
.index {
|
366
|
-
max-height: 416px; /* will accomodate 10 elements. IE 7 and above only. */
|
367
|
-
overflow-y: auto;
|
368
|
-
}
|
369
|
-
|
370
360
|
/* Result per query. */
|
371
361
|
.overview {
|
372
|
-
|
362
|
+
/* To line up with the sidebar on the left */
|
363
|
+
margin: 20px 0;
|
373
364
|
}
|
374
365
|
.resultn {
|
375
366
|
margin-bottom: 50px;
|