sequenceserver 2.0.0.beta3 → 2.0.0.beta4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. checksums.yaml +5 -5
  2. data/.eslintrc.json +36 -0
  3. data/.rubocop.yml +1 -1
  4. data/.travis.yml +53 -20
  5. data/AppImage/recipe.yml +15 -0
  6. data/AppImage/sequenceserver.desktop +8 -0
  7. data/AppImage/sequenceserver.png +0 -0
  8. data/AppImage/sequenceserver.sh +11 -0
  9. data/README.md +79 -46
  10. data/bin/sequenceserver +4 -4
  11. data/lib/sequenceserver/version.rb +1 -1
  12. data/package.json +2 -0
  13. data/public/css/grapher.css +3 -0
  14. data/public/css/sequenceserver.css +17 -6
  15. data/public/css/sequenceserver.min.css +3 -3
  16. data/public/js/circos.js +515 -491
  17. data/public/js/grapher.js +12 -6
  18. data/public/js/hits_overview.js +321 -308
  19. data/public/js/hsp.js +12 -7
  20. data/public/js/length_distribution.js +241 -234
  21. data/public/js/report.js +196 -174
  22. data/public/js/search.js +3 -3
  23. data/public/js/sequenceserver.js +9 -9
  24. data/public/js/utils.js +17 -10
  25. data/public/js/visualisation_helpers.js +77 -77
  26. data/public/sequenceserver-report.min.js +17 -17
  27. data/public/sequenceserver-search.min.js +1 -1
  28. data/public/vendor/github/nicgirault/circosJs@1.7.0/dist/circosJS.js +1 -5
  29. data/sequenceserver.gemspec +1 -2
  30. data/spec/blast_versions/blast_2.2.30/blast_2.2.30_spec.rb +13 -13
  31. data/spec/blast_versions/blast_2.2.30/import_spec_capybara_local_2.2.30.rb +555 -25
  32. data/spec/blast_versions/blast_2.2.31/blast_2.2.31_spec.rb +13 -13
  33. data/spec/blast_versions/blast_2.2.31/import_spec_capybara_local_2.2.31.rb +558 -24
  34. data/spec/blast_versions/blast_2.3.0/blast_2.3.0_spec.rb +13 -13
  35. data/spec/blast_versions/blast_2.3.0/import_spec_capybara_local_2.3.0.rb +561 -26
  36. data/spec/blast_versions/blast_2.4.0/blast_2.4.0_spec.rb +13 -13
  37. data/spec/blast_versions/blast_2.4.0/import_spec_capybara_local_2.4.0.rb +561 -25
  38. data/spec/blast_versions/blast_2.5.0/blast_2.5.0_spec.rb +13 -13
  39. data/spec/blast_versions/blast_2.5.0/import_spec_capybara_local_2.5.0.rb +558 -24
  40. data/spec/blast_versions/blast_2.6.0/blast_2.6.0_spec.rb +13 -13
  41. data/spec/blast_versions/blast_2.6.0/import_spec_capybara_local_2.6.0.rb +559 -24
  42. data/spec/blast_versions/blast_2.7.1/blast_2.7.1_spec.rb +13 -13
  43. data/spec/blast_versions/blast_2.7.1/import_spec_capybara_local_2.7.1.rb +559 -28
  44. data/spec/blast_versions/blast_2.8.1/blast_2.8.1_spec.rb +13 -13
  45. data/spec/blast_versions/blast_2.8.1/import_spec_capybara_local_2.8.1.rb +559 -27
  46. data/spec/blast_versions/blast_2.9.0/blast_2.9.0_spec.rb +13 -13
  47. data/spec/blast_versions/blast_2.9.0/import_spec_capybara_local_2.9.0.rb +557 -25
  48. data/spec/blast_versions/diamond_0.9.24/diamond_0.9.24_spec.rb +13 -13
  49. data/spec/blast_versions/diamond_0.9.24/import_spec_capybara_local_0.9.24.rb +219 -21
  50. data/spec/capybara_spec.rb +25 -28
  51. data/spec/download_helper.rb +6 -3
  52. data/spec/sequences/MH011443_1_gi_1486783306_gb_MH011443_1.txt +6 -0
  53. data/spec/sequences/MH011443_1_gi_1486783307_gb_AYF55702_1.txt +6 -0
  54. data/spec/sequences/MH011443_1_gi_1528997474_gb_MH447967_1.txt +30 -0
  55. data/spec/sequences/MH011443_1_sp_P04637_P53_HUMAN.txt +6 -0
  56. data/spec/sequences/alignment-35_hits_diamond_blastp.txt +210 -0
  57. data/spec/sequences/alignment-35_hits_diamond_blastx.txt +210 -0
  58. data/spec/sequences/alignment-3_hits.txt +18 -0
  59. data/spec/sequences/alignment-40_hits_blastn.txt +246 -0
  60. data/spec/sequences/alignment-40_hits_blastp.txt +240 -0
  61. data/spec/sequences/alignment-40_hits_blastp_2.2.30.txt +240 -0
  62. data/spec/sequences/alignment-40_hits_blastx.txt +240 -0
  63. data/spec/sequences/alignment-40_hits_tblastn.txt +240 -0
  64. data/spec/sequences/alignment-40_hits_tblastn_2.2.30.txt +240 -0
  65. data/spec/sequences/alignment-40_hits_tblastx.txt +2664 -0
  66. data/spec/sequences/alignment-4_hits.txt +24 -0
  67. data/spec/sequences/alignment-4_hits_blastn.txt +24 -0
  68. data/spec/sequences/alignment-4_hits_blastp.txt +24 -0
  69. data/spec/sequences/alignment-4_hits_blastp_2.2.30.txt +24 -0
  70. data/spec/sequences/alignment-4_hits_blastx.txt +24 -0
  71. data/spec/sequences/alignment-4_hits_diamond_blastp.txt +24 -0
  72. data/spec/sequences/alignment-4_hits_diamond_blastx.txt +24 -0
  73. data/spec/sequences/alignment-4_hits_tblastn.txt +24 -0
  74. data/spec/sequences/alignment-4_hits_tblastn_2.2.30.txt +24 -0
  75. data/spec/sequences/alignment-4_hits_tblastx.txt +318 -0
  76. data/spec/sequences/sp_P04637_P53_HUMAN_gi_1099170394_ref_XP_018868681_1.txt +6 -0
  77. data/spec/sequences/sp_P04637_P53_HUMAN_gi_120407068_ref_NP_000537_3.txt +6 -0
  78. data/spec/sequences/sp_P04637_P53_HUMAN_gi_1484127324_gb_MG595988_1.txt +6 -0
  79. data/spec/sequences/sp_P04637_P53_HUMAN_gi_395440626_gb_JQ694049_1.txt +6 -0
  80. data/spec/sequences/sp_P04637_P53_HUMAN_sp_P04637_P53_HUMAN.txt +6 -0
  81. data/spec/spec_helper.rb +3 -3
  82. metadata +67 -57
  83. data/.eslintrc +0 -213
  84. data/Rakefile +0 -8
  85. data/spec/dotdir/blast_2.4.0/blastn/TBLASTN_XML_2.4.0.xml +0 -1181
  86. data/spec/dotdir/blast_2.5.0/blastn/BLASTN_LONG_XML_2.5.0.xml +0 -18813
  87. data/spec/import_spec_capybara_local.rb +0 -61
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: c896a2ea19a91dbb08a321031f4ef62489ea85191821d9f67bfed2e88dd918ad
4
- data.tar.gz: 9d4e09e3097a6fa5ec1bf691e7d1ca216cbcb062b63df4dfbdd4d0daee9e1906
2
+ SHA1:
3
+ metadata.gz: a8617ffb07710b984f84dfc0dfb7d43c66cac4c3
4
+ data.tar.gz: 14ddad09e8dcb15793d8e06227138ee4c862b280
5
5
  SHA512:
6
- metadata.gz: 8eb71af6ecddeef7bab23be7b6208f2309406a8ebd68079e0c231fcceed7991e82113f671f815fd2c817e7126521bd9d7ab2be944268f0a867b869c77c283364
7
- data.tar.gz: b5e2acc07ccdcd254f769e772c1d46579ae3009b81ff8e327b221ccac7b39c28885ffa0f108c5fdd8ba66d57db310ed7673977a2b1f80798a23979784a963b9f
6
+ metadata.gz: c130d6e3828eae5dae108786e08433d5641112305962884dc2dada918a6a92c17632f7c46400c58ea0adabf106cb02e348bf6adc35dc8cbf296300081221fc99
7
+ data.tar.gz: 17a41dcb923c2e64337b960de1e3717b458077a9658a9e7785ab5815c43860aff09033aacd7812146e0f1fe368878f649794b1aa5bd8bbaf13c8a4a34fe7b0ac
data/.eslintrc.json ADDED
@@ -0,0 +1,36 @@
1
+ {
2
+ "env": {
3
+ "browser": true,
4
+ "commonjs": true,
5
+ "es6": true
6
+ },
7
+ "extends": "eslint:recommended",
8
+ "parserOptions": {
9
+ "ecmaFeatures": {
10
+ "experimentalObjectRestSpread": true,
11
+ "jsx": true
12
+ },
13
+ "sourceType": "module"
14
+ },
15
+ "plugins": [
16
+ "react"
17
+ ],
18
+ "rules": {
19
+ "indent": [
20
+ "error",
21
+ 4
22
+ ],
23
+ "linebreak-style": [
24
+ "error",
25
+ "unix"
26
+ ],
27
+ "quotes": [
28
+ "error",
29
+ "single"
30
+ ],
31
+ "semi": [
32
+ "error",
33
+ "always"
34
+ ]
35
+ }
36
+ }
data/.rubocop.yml CHANGED
@@ -35,7 +35,7 @@ Style/UnlessElse:
35
35
  # TODO:
36
36
  # Fix in bin/sequenceserver and re-enable.
37
37
  Enabled: false
38
- Style/ClassAndModuleCamelCase:
38
+ Naming/ClassAndModuleCamelCase:
39
39
  Exclude:
40
40
  # TODO:
41
41
  # Revisit later.
data/.travis.yml CHANGED
@@ -9,30 +9,63 @@ branches:
9
9
  - 1.0.x # stable
10
10
  - master
11
11
 
12
- install:
13
- - wget -c "https://github.com/mozilla/geckodriver/releases/download/v0.24.0/geckodriver-v0.24.0-linux64.tar.gz"
14
- - mkdir geckodriver && tar xvf geckodriver-*.tar.gz -C geckodriver
15
- - export PATH="geckodriver:$PATH"
16
- - wget -c "ftp://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/2.9.0/ncbi-blast-2.9.0+-x64-linux.tar.gz"
17
- - tar xvf ncbi-blast-*.tar.gz
18
- - gem install bundler && bundle
19
- - bundle exec bin/sequenceserver -s -b ncbi-blast-2.9.0+/bin -d spec/database/sample
20
-
21
- before_script:
22
- - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter && chmod +x ./cc-test-reporter
23
- - ./cc-test-reporter before-build
24
- script:
25
- - bundle exec rspec
26
- after_script:
27
- - ./cc-test-reporter after-build # --exit-code $TRAVIS_TEST_RESULT
28
-
29
12
  cache:
30
13
  directories:
31
- - vendor/bundle
32
- - ncbi-blast-2.9.0+
14
+ - opt
15
+ bundler: true
33
16
 
34
- sudo: false
17
+ before_install:
18
+ # We will download geckodriver, codeclimate test reporter, and NCBI BLAST+ to
19
+ # opt/. opt/ is cached to speed up subsequent runs. codeclimate test reporter
20
+ # and geckodriver contain a single executable and are thus placed in opt/bin,
21
+ # instead of in their own directory like NCBI BLAST+
22
+ - mkdir -p opt/bin && cd opt
23
+ # Download geckodriver and extract to bin
24
+ - wget -c "https://github.com/mozilla/geckodriver/releases/download/v0.24.0/geckodriver-v0.24.0-linux64.tar.gz" && tar xvf geckodriver-*.tar.gz -C bin
25
+ # Download codeclimate test reporter to bin and make it executable
26
+ - wget -c "https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64" -O bin/cc-test-reporter && chmod +x bin/cc-test-reporter
27
+ # Download and extract NCBI BLAST+ 2.9.0
28
+ - wget -c "ftp://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/2.9.0/ncbi-blast-2.9.0+-x64-linux.tar.gz" && tar xvf ncbi-blast-*.tar.gz
29
+ # Conclude installation by adding opt/bin/ containing codeclimate test reporter
30
+ # and geckodriver, and opt/ncbi-blast-2.9.0+/bin containing BLAST+ binaries to
31
+ # PATH.
32
+ - export PATH="$PWD/bin:$PWD/ncbi-blast-2.9.0+/bin:$PATH"
33
+ # Reset working directory or subsequent steps may fail.
34
+ - cd ..
35
35
 
36
36
  env:
37
37
  global:
38
38
  - CC_TEST_REPORTER_ID=ec48bb03c72db6b43ce71fd488110b4707abfde4386c144d886d711378d8db64
39
+ before_script:
40
+ # Create configuration file for SequenceServer. FIXME: this should not
41
+ # really be required for running test suite, but it is at the moment
42
+ - bundle exec bin/sequenceserver -s -d spec/database/sample
43
+ # Run codeclimate test reporter's before-build hook.
44
+ - if [ "${TRAVIS_BUILD_STAGE_NAME}" = "Test" ]; then
45
+ cc-test-reporter before-build;
46
+ fi
47
+ script:
48
+ # Run main specs and import spec for BLAST 2.9.0+
49
+ - bundle exec rspec spec/*_spec.rb spec/blast_versions/blast_2.9.0/*
50
+ after_script:
51
+ - if [ "${TRAVIS_BUILD_STAGE_NAME}" = "Test" ]; then
52
+ cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT;
53
+ fi
54
+
55
+ jobs:
56
+ include:
57
+ # Each script listed below is automatically run by Travis in parallel, and only
58
+ # against Ruby 2.3 (because it is listed first in the rvm key), and after the
59
+ # main test stage. We use a glob pattern here instead of specifying just the
60
+ # directory name because capybara spec files in subfolders don't end with
61
+ # _spec.rb.
62
+ - stage: compatibility
63
+ script: bundle exec rspec spec/blast_versions/diamond_0.9.24/*
64
+ - script: bundle exec rspec spec/blast_versions/blast_2.2.30/*
65
+ - script: bundle exec rspec spec/blast_versions/blast_2.2.31/*
66
+ - script: bundle exec rspec spec/blast_versions/blast_2.3.0/*
67
+ - script: bundle exec rspec spec/blast_versions/blast_2.4.0/*
68
+ - script: bundle exec rspec spec/blast_versions/blast_2.5.0/*
69
+ - script: bundle exec rspec spec/blast_versions/blast_2.6.0/*
70
+ - script: bundle exec rspec spec/blast_versions/blast_2.7.1/*
71
+ - script: bundle exec rspec spec/blast_versions/blast_2.8.1/*
@@ -0,0 +1,15 @@
1
+ app: sequenceserver
2
+
3
+ ingredients:
4
+ dist: xenial
5
+ sources:
6
+ - deb http://us.archive.ubuntu.com/ubuntu/ xenial xenial-updates xenial-security main universe
7
+ packages:
8
+ - ruby
9
+ - ruby-dev
10
+ - build-essential
11
+ script:
12
+ - usr/bin/gem install --pre --install-dir var/lib/gems/2.3.0 sequenceserver
13
+ - cp ${PWD}/../../../AppImage/sequenceserver.sh usr/bin/sequenceserver
14
+ - cp ${PWD}/../../../AppImage/sequenceserver.desktop .
15
+ - cp ${PWD}/../../../AppImage/sequenceserver.png .
@@ -0,0 +1,8 @@
1
+ [Desktop Entry]
2
+ Version=1.0
3
+ Type=Application
4
+ Name=SequenceServer
5
+ Icon=sequenceserver
6
+ Exec=sequenceserver
7
+ Terminal=true
8
+ Categories=ConsoleOnly;Science;
Binary file
@@ -0,0 +1,11 @@
1
+ # Set GEM_PATH to where we installed gems in the AppImage.
2
+ export GEM_PATH=$APPDIR/var/lib/gems/2.3.0
3
+
4
+ # Get path of sequenceserver executable inside AppImage. Path of bare commands
5
+ # (here ruby) are resolved within AppImage's context. Use of Gem.bin_path lets
6
+ # us avoid hardcoding version number. The file returned is bin/sequenceserver
7
+ # and not the shim that rubygem creates.
8
+ executable=$(ruby -e 'puts Gem.bin_path("sequenceserver", "sequenceserver")')
9
+
10
+ # Run sequenceserver.
11
+ ruby ${executable} "$@"
data/README.md CHANGED
@@ -17,46 +17,50 @@
17
17
 
18
18
  SequenceServer lets you rapidly set up a BLAST+ server with an intuitive user interface for personal or group use.
19
19
 
20
- ## Version 1.0.11
20
+ If you use SequenceServer, please cite:
21
21
 
22
- - Stable release
23
- - Release date: June 2017
24
- - Works with BLAST 2.2.30
22
+ > [Sequenceserver: A modern graphical user interface for custom BLAST
23
+ databases. Molecular Biology and Evolution
24
+ (2019).](https://doi.org/10.1093/molbev/msz185)
25
25
 
26
- For installation instructions and how to use SequenceServer please see
27
- http://sequenceserver.com.
28
26
 
29
- If you want to install and use SequenceServer from source, we recommend the
30
- use of 'bundler' Ruby gem to install dependencies and to run SequenceServer:
27
+ ## Stable (version 1.0.11)
31
28
 
32
- # Install bundler gem
33
- gem install bundler
29
+ - Release date: June 2017
30
+ - Works with BLAST 2.2.30
34
31
 
35
- # Use bundler to install dependencies
36
- cd sequenceserver
37
- bundle install --without=development
32
+ ### Installation
38
33
 
39
- # Use bundler command to run SequenceServer
40
- bundle exec bin/sequenceserver
34
+ For installation instructions and how to use SequenceServer please see
35
+ https://sequenceserver.com/#installation.
41
36
 
42
- If you use SequenceServer, please cite:
37
+ If you want to run SequenceServer directly from source code, please see
38
+ 'Develop and contribute' section below.
43
39
 
44
- > [Sequenceserver: A modern graphical user interface for custom BLAST
45
- databases. Molecular Biology and Evolution
46
- (2019).](https://doi.org/10.1093/molbev/msz185)
40
+ ## Beta (version 2.0)
47
41
 
48
- ## Version 2.0 (beta)
42
+ We have changed the underlying architecture so that BLAST jobs submisions are asynchronous and so that raw BLAST results are available in the browser in JSON format. Asynchronous job submission facilitates handling of BLAST searches that take a while to compute. For SequenceServer instances running on PCs or fat servers, this means not having to worry about network timeouts when running searches that take more than 5-10 minutes. However, asynchronous job architecture also facilitates hooking SequenceServer to grid engines (e.g., qsub) to run BLAST searches that will take hours or even days. Availability of raw BLAST results (details about each query, hit, and hsps) in the browser in JSON format means that the rich ecosystem of JavaScript visualisation libraries can be used.
49
43
 
50
- Beta release of SequenceServer version 2.0.
44
+ **Key features**
45
+ * Supports BLAST 2.9.0 and the new v5 BLAST database format
46
+ * Ability to import and visualise XML output from DIAMOND
47
+ and older versions of BLAST+ (till 2.2.30)
48
+ * Ability to bookmark and share the results page
49
+ * Visualisations for each level of results:
50
+ - Summary overview of top hits in a circos plot
51
+ - Length distribution of hits per query
52
+ - Relative length and position of matching regions for
53
+ each query-hit pair (Kablammo)
54
+ * Ability to pre-set advanced parameters for different BLAST algorithms
51
55
 
52
- Here, we have changed the underlying architecture to persist jobs so that
53
- the results can be bookmarked or shared, and to support integration with
54
- grid engines such as qsub. Furthermore, the HTML report is now generated
55
- in the browser by fetching BLAST results in JSON format from the server.
56
- This facilitates the use of existing JavaScript libraries to visualise
57
- BLAST results.
56
+ **Beta to stable**
57
+ 1. Fix visual bugs in reports page
58
+ 2. Performance optimisation
59
+ 3. User reported bug fixes
58
60
 
59
- The new beta releases are announced on [Google Group](https://groups.google.com/forum/#!forum/sequenceserver) and on the [GitHub release page](https://github.com/wurmlab/sequenceserver/releases).
61
+ The new beta releases are announced on [GitHub release page](https://github.com/wurmlab/sequenceserver/releases) and on [Google Group](https://groups.google.com/forum/#!forum/sequenceserver)/
62
+
63
+ Development priorities are being coordinated through the following Google Doc: [SequenceServer 2.0 roadmap](https://docs.google.com/document/d/1Vt2MmaD5h5oN8XrmokLVnjUfRLWqKVWeEja3w9SIeBw) (comments welcome)
60
64
 
61
65
  ### Install and configure
62
66
 
@@ -67,42 +71,71 @@ To get the latest 2.0 (beta) release, run:
67
71
  If you are new to the above command, please consult the 'Install or update'
68
72
  section on our website http://sequenceserver.com.
69
73
 
70
- If you want to install and use the beta versions from source, the process
71
- is the same as for the old stable release (instructions above).
74
+ If you want to run SequenceServer beta directly from source code, please see
75
+ 'Develop and contribute' section below.
76
+
72
77
 
73
78
  ### Develop and contribute
74
79
 
75
- In addition to [Ruby](https://www.ruby-lang.org/en/) and [RubyGems](https://rubygems.org/), you will need [Node and npm](https://nodejs.org/) if you want to build JavaScript assets, and [CodeClimate](https://codeclimate.com/) to run static code analysis.
80
+ To develop and contribute, you will need to run SequenceServer from source.
76
81
 
77
- If you want to submit a pull-request, you don't need to build JavaScript assets
78
- (we will do it) or to have run CodeClimate.
82
+ #### Run SequenceServer from source code
79
83
 
80
- To develop and contribute, you will need to run SequenceServer from source (see
81
- previous section).
84
+ You will need [Ruby](https://www.ruby-lang.org/en/) and [RubyGems](https://rubygems.org/):
82
85
 
83
- #### Workflow commands
86
+ # Install bundler gem to install Ruby dependencies
87
+ gem install bundler
84
88
 
85
- Launch SequenceServer in development mode. In development mode SequenceServer
86
- logs verbosely and uses raw front-end files.
89
+ # Move to where you downloaded or cloned seqserv
90
+ cd sequenceserver
87
91
 
88
- bundle exec bin/sequenceserver -D
92
+ # Use bundler to install Ruby dependencies
93
+ bundle install
89
94
 
90
- Run tests:
95
+ # Use bundler to run SequenceServer
96
+ bundle exec bin/sequenceserver
91
97
 
92
- bundle exec rspec
93
98
 
94
- Run code style checkers (rubocop, csslint, eslint) -
99
+ If you do not plan to develop, you can skip installing development dependencies
100
+ by running `bundle install --without=development`.
95
101
 
96
- codeclimate analyze
102
+ #### Making changes to the code
97
103
 
98
- To install JS dependencies to be build JS and CSS bundles:
104
+ During development, you should use `-D` option to run SequenceServer in development mode. In this mode, SequenceServer logs verbosely and uses raw front-end files.
99
105
 
100
- npm install
106
+ # Run SequenceServer in development mode
107
+ bundle exec bin/sequenceserver -D
108
+
109
+ You will need [Node and npm](https://nodejs.org/) if you want to modify and build frontend code:
101
110
 
102
- Build minified JS and CSS bundles:
111
+ # Install frontend dependencies
112
+ npm install
103
113
 
114
+ # Build minified JS and CSS bundles
104
115
  npm run-script build
105
116
 
117
+ #### Testing
118
+
119
+ We use RSpec and Capybara for testing. Our test suite covers 95% of the codebase. Running all tests can take considerable time (~2 hrs). We recommend using Travis to automatically run all tests when you push your code to your fork. Tests are also run automatically when you open a pull-request (see Getting code merged section below). Although, it may be desirable sometimes to run a single test, whole file, or all tests locally.
120
+
121
+ To run a single test (a.k.a, scenario):
122
+
123
+ bundle exec rspec spec/foo_spec.rb -e 'bar'
124
+
125
+ To run all tests in a single file:
126
+
127
+ bundle exec rspec spec/foo_spec.rb
128
+
129
+ To run all tests:
130
+
131
+ bundle exec rspec spec/**/*spec*
132
+
133
+ #### Getting code merged
134
+
135
+ Please open a pull-request on GitHub to get code merged. Our test suite and the CodeClimate static code analysis system will be automatically run on your pull-request. These should pass for your code to be merged. If you want to add a new feature to SequenceServer, please also add tests. In addition, code should be `rubocop` and `eslint` compliant, and hard-wrapped to 80 chars per line.
136
+
137
+ If you change frontend code (JavaScript and CSS), please build (i.e., minify and compress) and commit the resulting JS and CSS bundles before opening a pull-request. This is because SequenceServer is run in production mode by the test suite.
138
+
106
139
  ## Docker builds
107
140
 
108
141
  Both the old stable and new beta versions of SequenceServer are available as
data/bin/sequenceserver CHANGED
@@ -11,12 +11,12 @@ $PROGRAM_NAME = 'sequenceserver'
11
11
  # Given a url, downloads the archive into a temporary file
12
12
  # and and extracts it into ~/.sequenceserver.
13
13
  def download_from_url(url)
14
- archive = File.join('/tmp', File.basename(url))
14
+ archive = File.join('~/.sequenceserver', File.basename(url))
15
15
  # -ip4 is required to avoid this curl bug http://sourceforge.net/p/curl/bugs/1424/?limit=25
16
16
  # see also https://github.com/yannickwurm/sequenceserver/issues/139
17
- cmd = "curl --ipv4 -C - #{url} -o #{archive} && " \
18
- 'mkdir -p ~/.sequenceserver && ' \
19
- "tar xvf #{archive} -C ~/.sequenceserver"
17
+ cmd = 'mkdir -p ~/.sequenceserver' \
18
+ " && curl --ipv4 -C - #{url} -o #{archive}" \
19
+ " && tar xvf #{archive} -C ~/.sequenceserver"
20
20
  system(cmd)
21
21
  end
22
22
 
@@ -1,4 +1,4 @@
1
1
  # Define version number.
2
2
  module SequenceServer
3
- VERSION = '2.0.0.beta3'.freeze
3
+ VERSION = '2.0.0.beta4'.freeze
4
4
  end
data/package.json CHANGED
@@ -11,6 +11,8 @@
11
11
  "dependencies": {},
12
12
  "devDependencies": {
13
13
  "clean-css": "^3.4.1",
14
+ "eslint": "^6.5.1",
15
+ "eslint-plugin-react": "^7.16.0",
14
16
  "jspm": "^0.16.2"
15
17
  },
16
18
  "scripts": {
@@ -74,6 +74,9 @@ svg .bar:hover {
74
74
  * These are taken from Kablammo project I think and are necessary for
75
75
  * downloading functionality.
76
76
  */
77
+ svg .RdYlBu .q0-2{fill:rgb(252,141,89)}
78
+ svg .RdYlBu .q1-2{fill:rgb(255,255,191)}
79
+
77
80
  svg .RdYlBu .q0-3{fill:rgb(252,141,89)}
78
81
  svg .RdYlBu .q1-3{fill:rgb(255,255,191)}
79
82
  svg .RdYlBu .q2-3{fill:rgb(145,191,219)}
@@ -177,7 +177,14 @@ a.disabled:hover,
177
177
  * Use monospace font.
178
178
  */
179
179
  .text-monospace {
180
- font-family: monospace;
180
+ font-family:
181
+ "SFMono-Regular",
182
+ Consolas,
183
+ "Liberation Mono",
184
+ Menlo,
185
+ Courier,
186
+ monospace;
187
+ font-size: 12px;
181
188
  }
182
189
 
183
190
  /**
@@ -235,6 +242,8 @@ a.disabled:hover,
235
242
  padding: 0;
236
243
  border-radius: 0;
237
244
  background-color: inherit;
245
+ white-space: pre-wrap;
246
+ word-break: keep-all;
238
247
  }
239
248
 
240
249
  /***************************
@@ -308,6 +317,10 @@ input[name="advanced"] {
308
317
  border-bottom-left-radius: 4px !important;
309
318
  }
310
319
 
320
+ input[type=checkbox] {
321
+ vertical-align: top;
322
+ }
323
+
311
324
  #method {
312
325
  letter-spacing: 1px;
313
326
  }
@@ -410,12 +423,9 @@ input[name="advanced"] {
410
423
  .hsp:last-child {
411
424
  padding-bottom: 0;
412
425
  }
413
- .hsp pre {
414
- font-size: 12px;
415
- }
426
+
416
427
  .hsp-stats {
417
- word-break: normal;
418
- white-space: pre-wrap;
428
+ font-size: 12px;
419
429
  }
420
430
  .hsp .hsp-lines {
421
431
  margin-top: 5px;
@@ -429,6 +439,7 @@ input[name="advanced"] {
429
439
  .hit-links * {
430
440
  padding-left: 3px;
431
441
  letter-spacing: 1px;
442
+ vertical-align: baseline;
432
443
  }
433
444
  .btn-link {
434
445
  border: none;