quorum 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (165) hide show
  1. data/.gitignore +10 -0
  2. data/.rspec +1 -0
  3. data/Gemfile +15 -0
  4. data/Gemfile.lock +170 -0
  5. data/MIT-LICENSE +20 -0
  6. data/README.rdoc +318 -0
  7. data/Rakefile +31 -0
  8. data/app/assets/images/quorum/.gitkeep +0 -0
  9. data/app/assets/images/quorum/bg.png +0 -0
  10. data/app/assets/images/quorum/knight_rider.gif +0 -0
  11. data/app/assets/images/quorum/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  12. data/app/assets/images/quorum/ui-bg_flat_75_ffffff_40x100.png +0 -0
  13. data/app/assets/images/quorum/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  14. data/app/assets/images/quorum/ui-bg_glass_65_ffffff_1x400.png +0 -0
  15. data/app/assets/images/quorum/ui-bg_glass_75_dadada_1x400.png +0 -0
  16. data/app/assets/images/quorum/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  17. data/app/assets/images/quorum/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  18. data/app/assets/images/quorum/ui-bg_inset-soft_95_fef1ec_1x100.png +0 -0
  19. data/app/assets/images/quorum/ui-icons_222222_256x240.png +0 -0
  20. data/app/assets/images/quorum/ui-icons_2e83ff_256x240.png +0 -0
  21. data/app/assets/images/quorum/ui-icons_454545_256x240.png +0 -0
  22. data/app/assets/images/quorum/ui-icons_888888_256x240.png +0 -0
  23. data/app/assets/images/quorum/ui-icons_cd0a0a_256x240.png +0 -0
  24. data/app/assets/javascripts/quorum/application.js +13 -0
  25. data/app/assets/javascripts/quorum/jobs.js +386 -0
  26. data/app/assets/stylesheets/quorum/application.css +224 -0
  27. data/app/assets/stylesheets/quorum/jobs.css +72 -0
  28. data/app/assets/stylesheets/quorum/jquery-ui-1.8.16.custom.css +568 -0
  29. data/app/assets/stylesheets/quorum/tipsy.css +25 -0
  30. data/app/controllers/quorum/application_controller.rb +5 -0
  31. data/app/controllers/quorum/jobs_controller.rb +102 -0
  32. data/app/helpers/quorum/application_helper.rb +4 -0
  33. data/app/models/quorum/blastn_job.rb +111 -0
  34. data/app/models/quorum/blastn_job_report.rb +7 -0
  35. data/app/models/quorum/blastp_job.rb +111 -0
  36. data/app/models/quorum/blastp_job_report.rb +7 -0
  37. data/app/models/quorum/blastx_job.rb +111 -0
  38. data/app/models/quorum/blastx_job_report.rb +7 -0
  39. data/app/models/quorum/job.rb +164 -0
  40. data/app/models/quorum/tblastn_job.rb +111 -0
  41. data/app/models/quorum/tblastn_job_report.rb +7 -0
  42. data/app/views/layouts/quorum/application.html.erb +15 -0
  43. data/app/views/quorum/jobs/_blastn_form.html.erb +71 -0
  44. data/app/views/quorum/jobs/_blastp_form.html.erb +71 -0
  45. data/app/views/quorum/jobs/_blastx_form.html.erb +71 -0
  46. data/app/views/quorum/jobs/_tblastn_form.html.erb +71 -0
  47. data/app/views/quorum/jobs/new.html.erb +45 -0
  48. data/app/views/quorum/jobs/show.html.erb +183 -0
  49. data/app/views/shared/_error_messages.html.erb +10 -0
  50. data/config/locales/en.yml +8 -0
  51. data/config/routes.rb +9 -0
  52. data/db/migrate/20111031204518_create_jobs.rb +12 -0
  53. data/db/migrate/20111031204701_create_blastn_jobs.rb +19 -0
  54. data/db/migrate/20111031204719_create_blastx_jobs.rb +19 -0
  55. data/db/migrate/20111031204733_create_blastp_jobs.rb +19 -0
  56. data/db/migrate/20111031204754_create_tblastn_jobs.rb +19 -0
  57. data/db/migrate/20111031204846_create_blastn_job_reports.rb +34 -0
  58. data/db/migrate/20111031204903_create_blastx_job_reports.rb +34 -0
  59. data/db/migrate/20111031204922_create_blastp_job_reports.rb +34 -0
  60. data/db/migrate/20111031204941_create_tblastn_job_reports.rb +34 -0
  61. data/lib/generators/quorum/install_generator.rb +68 -0
  62. data/lib/generators/quorum/styles_generator.rb +18 -0
  63. data/lib/generators/quorum/views_generator.rb +18 -0
  64. data/lib/generators/templates/README +25 -0
  65. data/lib/generators/templates/blast.rb +412 -0
  66. data/lib/generators/templates/logger.rb +43 -0
  67. data/lib/generators/templates/quorum_initializer.rb +36 -0
  68. data/lib/generators/templates/quorum_settings.yml +157 -0
  69. data/lib/generators/templates/search +141 -0
  70. data/lib/generators/templates/trollop.rb +781 -0
  71. data/lib/quorum/engine.rb +5 -0
  72. data/lib/quorum/helpers.rb +17 -0
  73. data/lib/quorum/sequence.rb +89 -0
  74. data/lib/quorum/version.rb +3 -0
  75. data/lib/quorum.rb +89 -0
  76. data/lib/tasks/blastdb/README +17 -0
  77. data/lib/tasks/blastdb/build_blast_db.rb +222 -0
  78. data/lib/tasks/quorum_resque.rake +3 -0
  79. data/lib/tasks/quorum_tasks.rake +50 -0
  80. data/lib/workers/quorum.rb +45 -0
  81. data/quorum.gemspec +29 -0
  82. data/script/rails +6 -0
  83. data/spec/data/nucl_prot_seqs.txt +36 -0
  84. data/spec/data/nucl_seqs.txt +32 -0
  85. data/spec/data/prot_seqs.txt +4 -0
  86. data/spec/data/seqs.docx +0 -0
  87. data/spec/data/seqs_not_fa.txt +16 -0
  88. data/spec/data/tmp/test.tgz +0 -0
  89. data/spec/dummy/Rakefile +7 -0
  90. data/spec/dummy/app/assets/javascripts/application.js +9 -0
  91. data/spec/dummy/app/assets/stylesheets/application.css +7 -0
  92. data/spec/dummy/app/controllers/application_controller.rb +3 -0
  93. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  94. data/spec/dummy/app/mailers/.gitkeep +0 -0
  95. data/spec/dummy/app/models/.gitkeep +0 -0
  96. data/spec/dummy/app/models/blast.rb +2 -0
  97. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  98. data/spec/dummy/config/application.rb +46 -0
  99. data/spec/dummy/config/boot.rb +10 -0
  100. data/spec/dummy/config/environment.rb +20 -0
  101. data/spec/dummy/config/environments/development.rb +30 -0
  102. data/spec/dummy/config/environments/production.rb +60 -0
  103. data/spec/dummy/config/environments/test.rb +42 -0
  104. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  105. data/spec/dummy/config/initializers/inflections.rb +10 -0
  106. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  107. data/spec/dummy/config/initializers/quorum_initializer.rb +36 -0
  108. data/spec/dummy/config/initializers/resque.rb +1 -0
  109. data/spec/dummy/config/initializers/secret_token.rb +7 -0
  110. data/spec/dummy/config/initializers/session_store.rb +8 -0
  111. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  112. data/spec/dummy/config/locales/en.yml +5 -0
  113. data/spec/dummy/config/locales/quorum.en.yml +8 -0
  114. data/spec/dummy/config/quorum_settings.yml +145 -0
  115. data/spec/dummy/config/routes.rb +9 -0
  116. data/spec/dummy/config.ru +4 -0
  117. data/spec/dummy/db/schema.rb +214 -0
  118. data/spec/dummy/lib/assets/.gitkeep +0 -0
  119. data/spec/dummy/log/.gitkeep +0 -0
  120. data/spec/dummy/public/404.html +26 -0
  121. data/spec/dummy/public/422.html +26 -0
  122. data/spec/dummy/public/500.html +26 -0
  123. data/spec/dummy/public/favicon.ico +0 -0
  124. data/spec/dummy/quorum/bin/search +141 -0
  125. data/spec/dummy/quorum/blastdb/test/contigs.fa +2 -0
  126. data/spec/dummy/quorum/blastdb/test/peptides.fa +2 -0
  127. data/spec/dummy/quorum/blastdb/test.nhd +1 -0
  128. data/spec/dummy/quorum/blastdb/test.nhi +0 -0
  129. data/spec/dummy/quorum/blastdb/test.nhr +0 -0
  130. data/spec/dummy/quorum/blastdb/test.nin +0 -0
  131. data/spec/dummy/quorum/blastdb/test.nog +0 -0
  132. data/spec/dummy/quorum/blastdb/test.nsd +1 -0
  133. data/spec/dummy/quorum/blastdb/test.nsi +0 -0
  134. data/spec/dummy/quorum/blastdb/test.nsq +0 -0
  135. data/spec/dummy/quorum/blastdb/test.phd +1 -0
  136. data/spec/dummy/quorum/blastdb/test.phi +0 -0
  137. data/spec/dummy/quorum/blastdb/test.phr +0 -0
  138. data/spec/dummy/quorum/blastdb/test.pin +0 -0
  139. data/spec/dummy/quorum/blastdb/test.pog +0 -0
  140. data/spec/dummy/quorum/blastdb/test.psd +1 -0
  141. data/spec/dummy/quorum/blastdb/test.psi +0 -0
  142. data/spec/dummy/quorum/blastdb/test.psq +0 -0
  143. data/spec/dummy/quorum/lib/logger.rb +43 -0
  144. data/spec/dummy/quorum/lib/search_tools/blast.rb +412 -0
  145. data/spec/dummy/quorum/lib/trollop.rb +781 -0
  146. data/spec/dummy/script/rails +6 -0
  147. data/spec/models/blastn_job_report_spec.rb +13 -0
  148. data/spec/models/blastn_job_spec.rb +103 -0
  149. data/spec/models/blastp_job_report_spec.rb +13 -0
  150. data/spec/models/blastp_job_spec.rb +103 -0
  151. data/spec/models/blastx_job_report_spec.rb +13 -0
  152. data/spec/models/blastx_job_spec.rb +103 -0
  153. data/spec/models/job_spec.rb +40 -0
  154. data/spec/models/tblastn_job_report_spec.rb +13 -0
  155. data/spec/models/tblastn_job_spec.rb +103 -0
  156. data/spec/quorum/quorum_sequence_spec.rb +64 -0
  157. data/spec/quorum_installed_spec.rb +64 -0
  158. data/spec/requests/jobs_spec.rb +138 -0
  159. data/spec/spec_helper.rb +45 -0
  160. data/spec/tasks/blastdb_rake_spec.rb +119 -0
  161. data/spec/templates/blast_spec.rb +8 -0
  162. data/spec/templates/logger_spec.rb +35 -0
  163. data/vendor/assets/javascripts/jquery.tipsy.js +241 -0
  164. data/vendor/assets/javascripts/underscore-min.js +30 -0
  165. metadata +325 -0
data/.gitignore ADDED
@@ -0,0 +1,10 @@
1
+ .bundle/
2
+ log/*.log
3
+ pkg/
4
+ spec/dummy/db/*.sqlite3
5
+ spec/dummy/db/migrate/
6
+ spec/dummy/log/*.log
7
+ spec/dummy/tmp/
8
+ spec/dummy/config/database.yml
9
+ spec/dummy/quorum/log/*
10
+ spec/dummy/quorum/tmp/*
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --colour
data/Gemfile ADDED
@@ -0,0 +1,15 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Declare your gem's dependencies in quorum.gemspec.
4
+ # Bundler will treat runtime dependencies like base dependencies, and
5
+ # development dependencies will be added by default to the :development group.
6
+ gemspec
7
+
8
+ # Declare any dependencies that are still in development here instead of in
9
+ # your gemspec. These might include edge Rails or gems from your path or
10
+ # Git. Remember to move these dependencies to your gemspec before releasing
11
+ # your gem to rubygems.org.
12
+
13
+ # To use debugger
14
+ # gem 'ruby-debug19', :require => 'ruby-debug'
15
+
data/Gemfile.lock ADDED
@@ -0,0 +1,170 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ quorum (0.1.0)
5
+ bio-blastxmlparser (~> 1.0.1)
6
+ jquery-rails
7
+ net-ssh (~> 2.2.1)
8
+ rails (~> 3.1.0)
9
+ resque (~> 1.19.0)
10
+
11
+ GEM
12
+ remote: http://rubygems.org/
13
+ specs:
14
+ actionmailer (3.1.0)
15
+ actionpack (= 3.1.0)
16
+ mail (~> 2.3.0)
17
+ actionpack (3.1.0)
18
+ activemodel (= 3.1.0)
19
+ activesupport (= 3.1.0)
20
+ builder (~> 3.0.0)
21
+ erubis (~> 2.7.0)
22
+ i18n (~> 0.6)
23
+ rack (~> 1.3.2)
24
+ rack-cache (~> 1.0.3)
25
+ rack-mount (~> 0.8.2)
26
+ rack-test (~> 0.6.1)
27
+ sprockets (~> 2.0.0)
28
+ activemodel (3.1.0)
29
+ activesupport (= 3.1.0)
30
+ bcrypt-ruby (~> 3.0.0)
31
+ builder (~> 3.0.0)
32
+ i18n (~> 0.6)
33
+ activerecord (3.1.0)
34
+ activemodel (= 3.1.0)
35
+ activesupport (= 3.1.0)
36
+ arel (~> 2.2.1)
37
+ tzinfo (~> 0.3.29)
38
+ activeresource (3.1.0)
39
+ activemodel (= 3.1.0)
40
+ activesupport (= 3.1.0)
41
+ activesupport (3.1.0)
42
+ multi_json (~> 1.0)
43
+ arel (2.2.1)
44
+ bcrypt-ruby (3.0.0)
45
+ bio-blastxmlparser (1.0.1)
46
+ bio-logger (>= 1.0.0)
47
+ nokogiri (>= 1.5.0)
48
+ bio-logger (1.0.0)
49
+ log4r (>= 1.1.9)
50
+ builder (3.0.0)
51
+ capybara (1.1.1)
52
+ mime-types (>= 1.16)
53
+ nokogiri (>= 1.3.3)
54
+ rack (>= 1.0.0)
55
+ rack-test (>= 0.5.4)
56
+ selenium-webdriver (~> 2.0)
57
+ xpath (~> 0.1.4)
58
+ childprocess (0.2.2)
59
+ ffi (~> 1.0.6)
60
+ database_cleaner (0.6.7)
61
+ diff-lcs (1.1.3)
62
+ erubis (2.7.0)
63
+ factory_girl (2.1.0)
64
+ factory_girl_rails (1.2.0)
65
+ factory_girl (~> 2.1.0)
66
+ railties (>= 3.0.0)
67
+ ffi (1.0.9)
68
+ hike (1.2.1)
69
+ i18n (0.6.0)
70
+ jquery-rails (1.0.16)
71
+ railties (~> 3.0)
72
+ thor (~> 0.14)
73
+ json_pure (1.5.4)
74
+ spruz (~> 0.2.8)
75
+ log4r (1.1.9)
76
+ mail (2.3.0)
77
+ i18n (>= 0.4.0)
78
+ mime-types (~> 1.16)
79
+ treetop (~> 1.4.8)
80
+ mime-types (1.16)
81
+ multi_json (1.0.3)
82
+ mysql2 (0.3.7)
83
+ net-ssh (2.2.1)
84
+ nokogiri (1.5.0)
85
+ polyglot (0.3.2)
86
+ rack (1.3.2)
87
+ rack-cache (1.0.3)
88
+ rack (>= 0.4)
89
+ rack-mount (0.8.3)
90
+ rack (>= 1.0.0)
91
+ rack-protection (1.1.4)
92
+ rack
93
+ rack-ssl (1.3.2)
94
+ rack
95
+ rack-test (0.6.1)
96
+ rack (>= 1.0)
97
+ rails (3.1.0)
98
+ actionmailer (= 3.1.0)
99
+ actionpack (= 3.1.0)
100
+ activerecord (= 3.1.0)
101
+ activeresource (= 3.1.0)
102
+ activesupport (= 3.1.0)
103
+ bundler (~> 1.0)
104
+ railties (= 3.1.0)
105
+ railties (3.1.0)
106
+ actionpack (= 3.1.0)
107
+ activesupport (= 3.1.0)
108
+ rack-ssl (~> 1.3.2)
109
+ rake (>= 0.8.7)
110
+ rdoc (~> 3.4)
111
+ thor (~> 0.14.6)
112
+ rake (0.9.2)
113
+ rdoc (3.9.4)
114
+ redis (2.2.2)
115
+ redis-namespace (1.0.3)
116
+ redis (< 3.0.0)
117
+ resque (1.19.0)
118
+ multi_json (~> 1.0)
119
+ redis-namespace (~> 1.0.2)
120
+ sinatra (>= 0.9.2)
121
+ vegas (~> 0.1.2)
122
+ rspec (2.6.0)
123
+ rspec-core (~> 2.6.0)
124
+ rspec-expectations (~> 2.6.0)
125
+ rspec-mocks (~> 2.6.0)
126
+ rspec-core (2.6.4)
127
+ rspec-expectations (2.6.0)
128
+ diff-lcs (~> 1.1.2)
129
+ rspec-mocks (2.6.0)
130
+ rspec-rails (2.6.1)
131
+ actionpack (~> 3.0)
132
+ activesupport (~> 3.0)
133
+ railties (~> 3.0)
134
+ rspec (~> 2.6.0)
135
+ rubyzip (0.9.4)
136
+ selenium-webdriver (2.5.0)
137
+ childprocess (>= 0.2.1)
138
+ ffi (>= 1.0.7)
139
+ json_pure
140
+ rubyzip
141
+ sinatra (1.3.0)
142
+ rack (~> 1.3)
143
+ rack-protection (~> 1.1)
144
+ tilt (~> 1.3)
145
+ sprockets (2.0.0)
146
+ hike (~> 1.2)
147
+ rack (~> 1.0)
148
+ tilt (~> 1.1, != 1.3.0)
149
+ spruz (0.2.13)
150
+ thor (0.14.6)
151
+ tilt (1.3.3)
152
+ treetop (1.4.10)
153
+ polyglot
154
+ polyglot (>= 0.3.1)
155
+ tzinfo (0.3.30)
156
+ vegas (0.1.8)
157
+ rack (>= 1.0.0)
158
+ xpath (0.1.4)
159
+ nokogiri (~> 1.3)
160
+
161
+ PLATFORMS
162
+ ruby
163
+
164
+ DEPENDENCIES
165
+ capybara
166
+ database_cleaner
167
+ factory_girl_rails (~> 1.2.0)
168
+ mysql2
169
+ quorum!
170
+ rspec-rails (~> 2.6)
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright NCGR
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.rdoc ADDED
@@ -0,0 +1,318 @@
1
+ = Quorum
2
+
3
+ A flexible bioinformatics search tool.
4
+
5
+ Quorum is a Rails 3.1 mountable engine that supports the following
6
+ bioinformatics search tools.
7
+
8
+ * NCBI Blast+ (http://blast.ncbi.nlm.nih.gov)
9
+
10
+ Dependencies:
11
+
12
+ * Rails >= 3.1.0
13
+ * Redis >= 0.900 for Resque (https://github.com/defunkt/resque)
14
+ * NCBI Blast+ (ftp://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/LATEST/)
15
+ * Emboss (http://emboss.sourceforge.net/)
16
+
17
+ See the gem in action.
18
+
19
+ http://medplants.ncgr.org/quorum/jobs/new
20
+
21
+ == Installation
22
+
23
+ Use the latest stable Rails release with Quorum.
24
+
25
+ gem install quorum
26
+
27
+ After you install Quorum and add it to your Gemfile, run the generator.
28
+
29
+ rails generate quorum:install
30
+
31
+ The generator will create a directory in your application's root path
32
+
33
+ quorum/
34
+
35
+ as well as the necessary config files to run and customize Quorum. You
36
+ MUST customize "config/quorum_settings.yml" before using Quorum. See Remote
37
+ Machine Setup below if you choose to execute Quorum remotely.
38
+
39
+ Migrate the database.
40
+
41
+ rake quorum:install:migrations
42
+ rake db:migrate
43
+
44
+ == Getting Started
45
+
46
+ === NCBI Blast+ Setup
47
+
48
+ Build your NCBI Blast+ database(s) using the rake task below.
49
+
50
+ rake quorum:blastdb:build
51
+
52
+ Arguments:
53
+
54
+ * DIR= - path to {.tgz, .tar.gz, .tbz, .tar.bz2} files containing raw data.
55
+ Separate multiple directories with a colon (:).
56
+
57
+ DIR=/path/to/dir:/path/to/another/dir
58
+
59
+ * TYPE= - type of Blast database to build {both, prot, nucl}. Defaults to
60
+ both.
61
+
62
+ * PROT_FILE_NAME= - name of the file containing protein data. Defaults to
63
+ peptides.fa.
64
+
65
+ * NUCL_FILE_NAME= - name of the file containing nucleotide data. Defaults
66
+ to contigs.fa.
67
+
68
+ * REBUILD_DB= - removes existing blast database(s) before building {true or
69
+ false}. Defaults to false.
70
+
71
+ * EMPTY= - skip makeblastdb and create necessary directories {true or false}.
72
+ Defaults to false. Set this argument to true if you wish to create your own
73
+ Blast database(s).
74
+
75
+ Example:
76
+
77
+ rake quorum:blastdb:build DIR=/path/to/dir:/path/to/another/dir TYPE=nucl \
78
+ NUCL_FILE_NAME=my_contigs.fa REBUILD_DB=true
79
+
80
+ Empty example:
81
+
82
+ rake quorum:blastdb:build EMPTY=true
83
+
84
+ For a full list of supported arguments.
85
+
86
+ rake -D
87
+
88
+ Don't forget to update "config/quorum_settings.yml" with your newly created
89
+ database(s).
90
+
91
+ === Remote Machine Setup -- Recommended for Production Use
92
+
93
+ Follow the steps below to execute Quorum remotely via Net::SSH.
94
+
95
+ * Ensure your ActiveRecord Database adapter in "config/database.yml" is set to
96
+ *any* supported adapter other than sqlite3.
97
+
98
+ * Ensure your database host is set and accessible via the remote machine(s).
99
+
100
+ * Ensure you have supplied the necessary information in
101
+ "config/quorum_settings.yml" to execute Quorum remotely.
102
+
103
+ remote: true
104
+ ssh_host: remote.machine.org
105
+ ssh_user: remote_user
106
+
107
+ Net::SSH.start() optional params (http://net-ssh.github.com/ssh/v2/api/index.html)
108
+
109
+ ssh_options:
110
+ password: "secret"
111
+ port: 8888
112
+
113
+ * Tar and compress quorum.
114
+
115
+ tar -czvf quorum.tar.gz quorum/
116
+
117
+ * Copy the newly created tarball to the remote machine.
118
+
119
+ scp quorum.tar.gz <username>@<host>:/path/to/install
120
+
121
+ * Expand the tarball on the remote machine.
122
+
123
+ ssh <username>@<host>
124
+
125
+ tar -xzvf quorum.tar.gz
126
+
127
+ * Ensure Quorum script dependencies are added to the remote machine's PATH.
128
+ If the remote machine doesn't have a .bashrc file, create one.
129
+
130
+ touch /path/to/.bashrc
131
+
132
+ and add script dependencies to PATH.
133
+
134
+ echo "export PATH=/path/to/dependencies:$PATH" >> /path/to/.bashrc
135
+
136
+ === Customize Quorum's Views and Styles
137
+
138
+ To override Quorum's default views, run the generator.
139
+
140
+ rails generate quorum:views
141
+
142
+ A copy of Quorum's views can be found in your application under
143
+ "app/views/quorum/".
144
+
145
+ To override Quorum's default styles, run the generator.
146
+
147
+ rails generate quorum:styles
148
+
149
+ A copy of Quorum's styles can be found in your application under
150
+ "app/assets/stylesheets/quorum/". If your application has existing styles,
151
+ it's a good idea to remove
152
+
153
+ *= require_tree .
154
+
155
+ in "app/assets/stylesheets/application.css" and require your stylesheets
156
+ individually.
157
+
158
+ Don't plan on supporting all of Quorum's alogrithms? Override Quorum's views
159
+ and comment out any unwanted algorithms in "app/views/quorum/jobs/new.html.erb"
160
+ and "app/views/quorum/jobs/show.html.erb".
161
+
162
+ For example:
163
+
164
+ Remove Blastp in "app/views/quorum/jobs/new.html.erb"
165
+
166
+ <!-- Search Algorithms -->
167
+ <!-- Comment out an alorithm below to remove it from the form. -->
168
+
169
+ <!-- blastn -->
170
+ <%= render :partial => "blastn_form", :locals => {
171
+ :f => f, :blast_dbs => @blast_dbs } %>
172
+
173
+ <!-- blastx -->
174
+ <%= render :partial => "blastx_form", :locals => {
175
+ :f => f, :blast_dbs => @blast_dbs } %>
176
+
177
+ <!-- tblastn -->
178
+ <%= render :partial => "tblastn_form", :locals => {
179
+ :f => f, :blast_dbs => @blast_dbs } %>
180
+
181
+ <!-- blastp -->
182
+ <% render :partial => "blastp_form", :locals => {
183
+ :f => f, :blast_dbs => @blast_dbs } %>
184
+
185
+ <!-- End Search Algorithms -->
186
+
187
+ Remove Blastp in "app/views/quorum/jobs/show.html.erb"
188
+
189
+ <div id="tabs">
190
+ <ul>
191
+ <li><a href="#tabs-1">Blastn</a></li>
192
+ <li><a href="#tabs-2">Blastx</a></li>
193
+ <li><a href="#tabs-3">Tblastn</a></li>
194
+ <!--
195
+ <li><a href="#tabs-4">Blastp</a></li>
196
+ -->
197
+ </ul>
198
+
199
+ <!-- Search results per algorithm -->
200
+ <div id="tabs-1">
201
+ <h2>Blastn</h2>
202
+ <div id="blastn-results">
203
+ Searching... <%= image_tag "quorum/knight_rider.gif" %>
204
+ </div>
205
+ </div>
206
+
207
+ <div id="tabs-2">
208
+ <h2>Blastx</h2>
209
+ <div id="blastx-results">
210
+ Searching... <%= image_tag "quorum/knight_rider.gif" %>
211
+ </div>
212
+ </div>
213
+
214
+ <div id="tabs-3">
215
+ <h2>Tblastn</h2>
216
+ <div id="tblastn-results">
217
+ Searching... <%= image_tag "quorum/knight_rider.gif" %>
218
+ </div>
219
+ </div>
220
+
221
+ <!--
222
+ <div id="tabs-4">
223
+ <h2>Blastp</h2>
224
+ <div id="blastp-results">
225
+ Searching... <%= image_tag "quorum/knight_rider.gif" %>
226
+ </div>
227
+ </div>
228
+ -->
229
+ </div>
230
+
231
+ === Redis
232
+
233
+ For detailed Redis installation instructions, follow the links below.
234
+
235
+ * Redis (http://redis.io/)
236
+ * Resque (https://github.com/defunkt/resque)
237
+
238
+ === Resque
239
+
240
+ Quorum provides a simple Rails environment rake task for spawning Resque
241
+ workers. To customize Resque workers by adding monitoring etc., follow
242
+ the link below.
243
+
244
+ * Resque (https://github.com/defunkt/resque)
245
+
246
+ <b>Resque Web Interface</b>
247
+
248
+ Quorum mounts Resque's web interface by default via
249
+
250
+ mount Resque::Server.new, :at => "/quorum/resque"
251
+
252
+ in "config/routes.rb". The line above is fine for development, however, in
253
+ production it's best to grant authenticated users access to "/quorum/resque".
254
+
255
+ HTTP Basic Example:
256
+ "config/initializers/resque_http_auth.rb"
257
+
258
+ Resque::Server.use(Rack::Auth::Basic) do |user, password|
259
+ user == "resque"
260
+ password == "secret"
261
+ end
262
+
263
+ Devise Example:
264
+ "config/routes.rb"
265
+
266
+ authenticate :user do
267
+ mount Resque::Server.new, :at => "/quorum/resque"
268
+ end
269
+
270
+ Devise plus Declarative Authorization Example:
271
+ "config/routes.rb"
272
+
273
+ # Only superusers can access Resque's web interface.
274
+ resque_constraint = lambda do |request|
275
+ request.env["warden"].authenticate? &&
276
+ request.env["warden"].user.role_symbols.include?(:superuser)
277
+ end
278
+
279
+ constraints resque_constraint do
280
+ mount Resque::Server.new, :at => "/quorum/resque"
281
+ end
282
+
283
+ === I18n
284
+
285
+ To customize Quorum flash messages, edit "config/locales/quorum.en.yml".
286
+
287
+ == Additional Information
288
+
289
+ === Bugs?
290
+
291
+ https://github.com/ncgr/quorum/issues
292
+
293
+ === Contributing
294
+
295
+ * Fork Quorum
296
+ * Create a topic branch <code>git checkout -b my_branch</code>
297
+ * Push to your branch <code>git push origin my_branch</code>
298
+ * Create a pull request from your branch
299
+ * Find your name added to the README under Contributors
300
+
301
+ === TODO
302
+
303
+ * Add GFF3 annotations to detailed Blast reports
304
+ * Add link to download Blast hit sequence in detailed report
305
+ * Support Hmmer3
306
+
307
+ === Maintained By
308
+
309
+ * Ken Seal (https://github.com/hunzinker)
310
+
311
+ === Contributors
312
+
313
+ * John Crow (https://github.com/crowja)
314
+ * Andrew Farmer
315
+
316
+ == License
317
+
318
+ MIT License. Copyright NCGR http://ncgr.org/
data/Rakefile ADDED
@@ -0,0 +1,31 @@
1
+ #!/usr/bin/env rake
2
+ begin
3
+ require 'bundler/setup'
4
+ rescue LoadError
5
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
6
+ end
7
+ begin
8
+ require 'rdoc/task'
9
+ rescue LoadError
10
+ require 'rdoc/rdoc'
11
+ require 'rake/rdoctask'
12
+ RDoc::Task = Rake::RDocTask
13
+ end
14
+
15
+ RDoc::Task.new(:rdoc) do |rdoc|
16
+ rdoc.rdoc_dir = 'rdoc'
17
+ rdoc.title = 'Quorum'
18
+ rdoc.options << '--line-numbers'
19
+ rdoc.rdoc_files.include('README.rdoc')
20
+ rdoc.rdoc_files.include('lib/**/*.rb')
21
+ end
22
+
23
+ APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__)
24
+ load 'rails/tasks/engine.rake'
25
+
26
+ require 'rspec/core/rake_task'
27
+ RSpec::Core::RakeTask.new(:spec)
28
+ task :default => :spec
29
+
30
+ Bundler::GemHelper.install_tasks
31
+
File without changes
Binary file
@@ -0,0 +1,13 @@
1
+ // This is a manifest file that'll be compiled into including all the files listed below.
2
+ // Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
3
+ // be included in the compiled file accessible from http://example.com/assets/application.js
4
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
5
+ // the compiled file.
6
+ //
7
+ //= require jquery
8
+ //= require jquery_ujs
9
+ //= require jquery-ui
10
+ //= require underscore-min
11
+ //= require jquery.tipsy
12
+ //= require_tree .
13
+