quorum 0.5.2 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. data/.gitignore +3 -5
  2. data/.travis.yml +0 -2
  3. data/Gemfile.lock +2 -2
  4. data/HISTORY.md +12 -0
  5. data/Rakefile +13 -48
  6. data/app/models/quorum/blastn_job.rb +15 -22
  7. data/app/models/quorum/blastp_job.rb +15 -22
  8. data/app/models/quorum/blastx_job.rb +15 -22
  9. data/app/models/quorum/tblastn_job.rb +15 -22
  10. data/app/views/quorum/jobs/form/_blastn_form.html.erb +4 -4
  11. data/app/views/quorum/jobs/form/_blastp_form.html.erb +4 -4
  12. data/app/views/quorum/jobs/form/_blastx_form.html.erb +4 -4
  13. data/app/views/quorum/jobs/form/_tblastn_form.html.erb +4 -4
  14. data/app/views/quorum/jobs/templates/_blast_detailed_report_template.html.erb +6 -17
  15. data/db/migrate/20120918205556_rename_max_score_column.rb +15 -0
  16. data/lib/generators/templates/blast.rb +37 -31
  17. data/lib/quorum/version.rb +1 -1
  18. data/spec/config/quorum_settings.yml +55 -0
  19. data/spec/javascripts/fixtures/quorum_search_form.html +8 -8
  20. data/spec/javascripts/jobs_spec.js +8 -8
  21. data/spec/lib/tasks/travis.rake +120 -0
  22. data/spec/models/blastn_job_spec.rb +41 -22
  23. data/spec/models/blastp_job_spec.rb +41 -22
  24. data/spec/models/blastx_job_spec.rb +41 -22
  25. data/spec/models/job_spec.rb +1 -1
  26. data/spec/models/tblastn_job_spec.rb +41 -22
  27. data/spec/requests/jobs_spec.rb +8 -8
  28. data/spec/templates/blast_db_spec.rb +1 -1
  29. data/spec/templates/blast_spec.rb +1 -1
  30. metadata +7 -32
  31. data/spec/dummy/config/initializers/quorum_initializer.rb +0 -36
  32. data/spec/dummy/config/locales/quorum.en.yml +0 -8
  33. data/spec/dummy/config/quorum_settings.yml +0 -141
  34. data/spec/dummy/db/schema.rb +0 -213
  35. data/spec/dummy/quorum/bin/fetch +0 -115
  36. data/spec/dummy/quorum/bin/search +0 -141
  37. data/spec/dummy/quorum/blastdb/test/contigs.fa +0 -15
  38. data/spec/dummy/quorum/blastdb/test/peptides.fa +0 -4
  39. data/spec/dummy/quorum/blastdb/test.nhd +0 -2
  40. data/spec/dummy/quorum/blastdb/test.nhi +0 -0
  41. data/spec/dummy/quorum/blastdb/test.nhr +0 -0
  42. data/spec/dummy/quorum/blastdb/test.nin +0 -0
  43. data/spec/dummy/quorum/blastdb/test.nog +0 -0
  44. data/spec/dummy/quorum/blastdb/test.nsd +0 -2
  45. data/spec/dummy/quorum/blastdb/test.nsi +0 -0
  46. data/spec/dummy/quorum/blastdb/test.nsq +0 -0
  47. data/spec/dummy/quorum/blastdb/test.phd +0 -2
  48. data/spec/dummy/quorum/blastdb/test.phi +0 -0
  49. data/spec/dummy/quorum/blastdb/test.phr +0 -0
  50. data/spec/dummy/quorum/blastdb/test.pin +0 -0
  51. data/spec/dummy/quorum/blastdb/test.pog +0 -0
  52. data/spec/dummy/quorum/blastdb/test.psd +0 -2
  53. data/spec/dummy/quorum/blastdb/test.psi +0 -0
  54. data/spec/dummy/quorum/blastdb/test.psq +0 -0
  55. data/spec/dummy/quorum/lib/fetch_tools/blast_db.rb +0 -106
  56. data/spec/dummy/quorum/lib/logger.rb +0 -43
  57. data/spec/dummy/quorum/lib/search_tools/blast.rb +0 -452
  58. data/spec/dummy/quorum/lib/trollop.rb +0 -781
data/.gitignore CHANGED
@@ -1,10 +1,8 @@
1
1
  .bundle/
2
2
  log/*.log
3
3
  pkg/
4
- spec/dummy/db/*.sqlite3
5
- spec/dummy/db/migrate/
4
+ spec/dummy/db/*
6
5
  spec/dummy/log/*.log
7
- spec/dummy/tmp/
6
+ spec/dummy/tmp/*
8
7
  spec/dummy/config/database.yml
9
- spec/dummy/quorum/log/*
10
- spec/dummy/quorum/tmp/*
8
+ spec/dummy/quorum/
data/.travis.yml CHANGED
@@ -13,8 +13,6 @@ before_script:
13
13
  - "sh -e /etc/init.d/xvfb start"
14
14
  - bundle install
15
15
  - mysql -e "create database quorum_test;"
16
- - "rake travis:create_db_config"
17
- - "rake app:db:schema:load"
18
16
  script: "rake travis:spec"
19
17
  notifications:
20
18
  email:
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- quorum (0.5.2)
4
+ quorum (0.6.0)
5
5
  bio-blastxmlparser (~> 1.1.0)
6
6
  jquery-rails
7
7
  net-ssh (~> 2.3.0)
@@ -136,7 +136,7 @@ GEM
136
136
  rspec-core (2.11.1)
137
137
  rspec-expectations (2.11.3)
138
138
  diff-lcs (~> 1.1.3)
139
- rspec-mocks (2.11.2)
139
+ rspec-mocks (2.11.3)
140
140
  rspec-rails (2.11.0)
141
141
  actionpack (>= 3.0)
142
142
  activesupport (>= 3.0)
data/HISTORY.md CHANGED
@@ -1,3 +1,15 @@
1
+ ## 0.6.0 (2012-09-21)
2
+
3
+ * Renamed blast report max_score to max_target_seqs to match NCBI Blast
4
+ reports. Updated search interface. NOTE: requires migration install.
5
+ * Updated the default search interface:
6
+ * Enabled gapped alignments by default.
7
+ * Improved existing filter options (NCBI Blast DUST and SEG) to use NCBI Blast
8
+ default values.
9
+ * Fixed Rails 3.2 multiple select validation error.
10
+ * Refactored travis-ci rake tasks.
11
+ * Added default spec runner task.
12
+
1
13
  ## 0.5.2 (2012-09-14)
2
14
 
3
15
  * Removed jQuery ajax timeout for long lasting blast jobs.
data/Rakefile CHANGED
@@ -25,58 +25,23 @@ load 'rails/tasks/engine.rake'
25
25
 
26
26
  require 'rspec/core/rake_task'
27
27
  RSpec::Core::RakeTask.new(:spec)
28
- task :default => :spec
29
28
 
30
29
  Bundler::GemHelper.install_tasks
31
30
 
32
- # Travis Tasks
33
- namespace :travis do
34
- # Specs
35
- task :spec do
36
- Rake::Task["travis:create_dirs"].execute
37
- ["rake spec", "rake app:jasmine:ci JASMINE_PORT=53331"].each do |cmd|
38
- puts "Starting to run #{cmd}..."
39
- system("export DISPLAY=:99.0 && bundle exec #{cmd}")
40
- raise "#{cmd} failed!" unless $?.exitstatus == 0
41
- end
42
- Rake::Task["travis:remove_db_config"].execute
43
- end
31
+ # Travis tasks
32
+ load 'spec/lib/tasks/travis.rake'
44
33
 
45
- # Create spec/dummy/config/database.yml for Travis.
46
- task :create_db_config do
47
- config = File.expand_path("../spec/dummy/config", __FILE__)
48
- File.open(File.join(config, "database.yml"), "w+") do |file|
49
- file.puts "test:\n adapter: mysql2\n database: quorum_test\n" <<
50
- " username: root\n password:\n host: localhost\n encoding: utf8"
51
- end
34
+ # Spec runner
35
+ task :spec_runner do
36
+ unless File.exists?(File.expand_path("../spec/dummy/quorum", __FILE__))
37
+ Rake::Task["travis:quorum_install"].execute
38
+ Rake::Task["travis:copy_quorum_settings"].execute
52
39
  end
53
-
54
- # Remove spec/dummy/config/database.yml after Travis.
55
- task :remove_db_config do
56
- config = File.expand_path("../spec/dummy/config", __FILE__)
57
- File.delete(File.join(config, "database.yml"))
58
- end
59
-
60
- # Create necessary directories for test. Mimic a real app install
61
- # via rails g quorum:install.
62
- #
63
- # The directories below are not in the git repo.
64
- task :create_dirs do
65
- app = File.expand_path("../spec/dummy", __FILE__)
66
- quorum = File.expand_path("../spec/dummy/quorum", __FILE__)
67
-
68
- app_tmp = File.join(app, "tmp")
69
- app_pids = File.join(app_tmp, "pids")
70
- app_cache = File.join(app_tmp, "cache")
71
-
72
- Dir.mkdir(app_tmp) unless File.directory?(app_tmp)
73
- Dir.mkdir(app_pids) unless File.directory?(app_pids)
74
- Dir.mkdir(app_cache) unless File.directory?(app_cache)
75
-
76
- quorum_log = File.join(quorum, "log")
77
- quorum_tmp = File.join(quorum, "tmp")
78
-
79
- Dir.mkdir(quorum_log) unless File.directory?(quorum_log)
80
- Dir.mkdir(quorum_tmp) unless File.directory?(quorum_tmp)
40
+ unless File.exists?(File.expand_path("../spec/dummy/tmp", __FILE__))
41
+ Rake::Task["travis:create_dummy_tmp"].execute
81
42
  end
43
+ Rake::Task["spec"].execute
44
+ Rake::Task["app:jasmine:ci"].execute
82
45
  end
46
+
47
+ task :default => :spec_runner
@@ -1,6 +1,8 @@
1
1
  module Quorum
2
2
  class BlastnJob < ActiveRecord::Base
3
3
 
4
+ before_validation :check_blast_dbs, :if => :queue
5
+
4
6
  before_save :set_optional_params, :set_blast_dbs
5
7
 
6
8
  belongs_to :job
@@ -9,7 +11,7 @@ module Quorum
9
11
  :foreign_key => :blastn_job_id,
10
12
  :primary_key => :job_id
11
13
 
12
- attr_accessible :expectation, :max_score, :min_bit_score,
14
+ attr_accessible :expectation, :max_target_seqs, :min_bit_score,
13
15
  :filter, :gapped_alignments, :gap_opening_penalty,
14
16
  :gap_extension_penalty, :gap_opening_extension, :queue,
15
17
  :blast_dbs
@@ -18,7 +20,7 @@ module Quorum
18
20
  :with => /^[+-]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?$/,
19
21
  :message => " - Valid formats (12, 32.05, 43e-123)",
20
22
  :allow_blank => true
21
- validates_numericality_of :max_score,
23
+ validates_numericality_of :max_target_seqs,
22
24
  :only_integer => true,
23
25
  :allow_blank => true
24
26
  validates_numericality_of :min_bit_score,
@@ -31,7 +33,6 @@ module Quorum
31
33
  :only_integer => true,
32
34
  :allow_blank => true
33
35
  validates_presence_of :blast_dbs, :if => :queue
34
- validate :gap_opening_extension_exists
35
36
 
36
37
  #
37
38
  # Gapped alignment helper.
@@ -79,32 +80,24 @@ module Quorum
79
80
 
80
81
  private
81
82
 
82
- def set_blast_dbs
83
+ def check_blast_dbs
83
84
  if self.blast_dbs.present?
84
- self.blast_dbs = self.blast_dbs.delete_if { |b| b.empty? }.join(';')
85
+ self.blast_dbs = self.blast_dbs.delete_if { |b| b.empty? }
85
86
  end
86
87
  end
87
88
 
88
- def set_optional_params
89
- self.expectation = "5e-20" if self.expectation.blank?
90
- self.max_score ||= 25
91
- self.min_bit_score ||= 0
92
- unless self.gapped_alignments
93
- self.gap_opening_penalty = 0
94
- self.gap_extension_penalty = 0
89
+ def set_blast_dbs
90
+ if self.blast_dbs.present?
91
+ self.blast_dbs = self.blast_dbs.join(';')
95
92
  end
96
93
  end
97
94
 
98
- #
99
- # Add error if gapped_alignment? without gap_opening_extension.
100
- #
101
- def gap_opening_extension_exists
102
- if gap_opening_extension.split(',').blank? && gapped_alignment?
103
- errors.add(
104
- :gap_opening_extension,
105
- " - Please select a value."
106
- )
107
- end
95
+ def set_optional_params
96
+ self.expectation = "5e-20" if self.expectation.blank?
97
+ self.max_target_seqs ||= 25
98
+ self.min_bit_score ||= 0
99
+ self.gap_opening_penalty ||= nil
100
+ self.gap_extension_penalty ||= nil
108
101
  end
109
102
 
110
103
  end
@@ -1,6 +1,8 @@
1
1
  module Quorum
2
2
  class BlastpJob < ActiveRecord::Base
3
3
 
4
+ before_validation :check_blast_dbs, :if => :queue
5
+
4
6
  before_save :set_optional_params, :set_blast_dbs
5
7
 
6
8
  belongs_to :job
@@ -9,7 +11,7 @@ module Quorum
9
11
  :foreign_key => :blastp_job_id,
10
12
  :primary_key => :job_id
11
13
 
12
- attr_accessible :expectation, :max_score, :min_bit_score,
14
+ attr_accessible :expectation, :max_target_seqs, :min_bit_score,
13
15
  :filter, :gapped_alignments, :gap_opening_penalty,
14
16
  :gap_extension_penalty, :gap_opening_extension, :queue,
15
17
  :blast_dbs
@@ -18,7 +20,7 @@ module Quorum
18
20
  :with => /^[+-]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?$/,
19
21
  :message => " - Valid formats (12, 32.05, 43e-123)",
20
22
  :allow_blank => true
21
- validates_numericality_of :max_score,
23
+ validates_numericality_of :max_target_seqs,
22
24
  :only_integer => true,
23
25
  :allow_blank => true
24
26
  validates_numericality_of :min_bit_score,
@@ -31,7 +33,6 @@ module Quorum
31
33
  :only_integer => true,
32
34
  :allow_blank => true
33
35
  validates_presence_of :blast_dbs, :if => :queue
34
- validate :gap_opening_extension_exists
35
36
 
36
37
  #
37
38
  # Gapped alignment helper.
@@ -79,32 +80,24 @@ module Quorum
79
80
 
80
81
  private
81
82
 
82
- def set_blast_dbs
83
+ def check_blast_dbs
83
84
  if self.blast_dbs.present?
84
- self.blast_dbs = self.blast_dbs.delete_if { |b| b.empty? }.join(';')
85
+ self.blast_dbs = self.blast_dbs.delete_if { |b| b.empty? }
85
86
  end
86
87
  end
87
88
 
88
- def set_optional_params
89
- self.expectation = "5e-20" if self.expectation.blank?
90
- self.max_score ||= 25
91
- self.min_bit_score ||= 0
92
- unless self.gapped_alignments
93
- self.gap_opening_penalty = 0
94
- self.gap_extension_penalty = 0
89
+ def set_blast_dbs
90
+ if self.blast_dbs.present?
91
+ self.blast_dbs = self.blast_dbs.join(';')
95
92
  end
96
93
  end
97
94
 
98
- #
99
- # Add error if gapped_alignment? without gap_opening_extension.
100
- #
101
- def gap_opening_extension_exists
102
- if gap_opening_extension.split(',').blank? && gapped_alignment?
103
- errors.add(
104
- :gap_opening_extension,
105
- " - Please select a value."
106
- )
107
- end
95
+ def set_optional_params
96
+ self.expectation = "5e-20" if self.expectation.blank?
97
+ self.max_target_seqs ||= 25
98
+ self.min_bit_score ||= 0
99
+ self.gap_opening_penalty ||= nil
100
+ self.gap_extension_penalty ||= nil
108
101
  end
109
102
 
110
103
  end
@@ -1,6 +1,8 @@
1
1
  module Quorum
2
2
  class BlastxJob < ActiveRecord::Base
3
3
 
4
+ before_validation :check_blast_dbs, :if => :queue
5
+
4
6
  before_save :set_optional_params, :set_blast_dbs
5
7
 
6
8
  belongs_to :job
@@ -9,7 +11,7 @@ module Quorum
9
11
  :foreign_key => :blastx_job_id,
10
12
  :primary_key => :job_id
11
13
 
12
- attr_accessible :expectation, :max_score, :min_bit_score,
14
+ attr_accessible :expectation, :max_target_seqs, :min_bit_score,
13
15
  :filter, :gapped_alignments, :gap_opening_penalty,
14
16
  :gap_extension_penalty, :gap_opening_extension, :queue,
15
17
  :blast_dbs
@@ -18,7 +20,7 @@ module Quorum
18
20
  :with => /^[+-]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?$/,
19
21
  :message => " - Valid formats (12, 32.05, 43e-123)",
20
22
  :allow_blank => true
21
- validates_numericality_of :max_score,
23
+ validates_numericality_of :max_target_seqs,
22
24
  :only_integer => true,
23
25
  :allow_blank => true
24
26
  validates_numericality_of :min_bit_score,
@@ -31,7 +33,6 @@ module Quorum
31
33
  :only_integer => true,
32
34
  :allow_blank => true
33
35
  validates_presence_of :blast_dbs, :if => :queue
34
- validate :gap_opening_extension_exists
35
36
 
36
37
  #
37
38
  # Gapped alignment helper.
@@ -79,32 +80,24 @@ module Quorum
79
80
 
80
81
  private
81
82
 
82
- def set_blast_dbs
83
+ def check_blast_dbs
83
84
  if self.blast_dbs.present?
84
- self.blast_dbs = self.blast_dbs.delete_if { |b| b.empty? }.join(';')
85
+ self.blast_dbs = self.blast_dbs.delete_if { |b| b.empty? }
85
86
  end
86
87
  end
87
88
 
88
- def set_optional_params
89
- self.expectation = "5e-20" if self.expectation.blank?
90
- self.max_score ||= 25
91
- self.min_bit_score ||= 0
92
- unless self.gapped_alignments
93
- self.gap_opening_penalty = 0
94
- self.gap_extension_penalty = 0
89
+ def set_blast_dbs
90
+ if self.blast_dbs.present?
91
+ self.blast_dbs = self.blast_dbs.join(';')
95
92
  end
96
93
  end
97
94
 
98
- #
99
- # Add error if gapped_alignment? without gap_opening_extension.
100
- #
101
- def gap_opening_extension_exists
102
- if gap_opening_extension.split(',').blank? && gapped_alignment?
103
- errors.add(
104
- :gap_opening_extension,
105
- " - Please select a value."
106
- )
107
- end
95
+ def set_optional_params
96
+ self.expectation = "5e-20" if self.expectation.blank?
97
+ self.max_target_seqs ||= 25
98
+ self.min_bit_score ||= 0
99
+ self.gap_opening_penalty ||= nil
100
+ self.gap_extension_penalty ||= nil
108
101
  end
109
102
 
110
103
  end
@@ -1,6 +1,8 @@
1
1
  module Quorum
2
2
  class TblastnJob < ActiveRecord::Base
3
3
 
4
+ before_validation :check_blast_dbs, :if => :queue
5
+
4
6
  before_save :set_optional_params, :set_blast_dbs
5
7
 
6
8
  belongs_to :job
@@ -9,7 +11,7 @@ module Quorum
9
11
  :foreign_key => :tblastn_job_id,
10
12
  :primary_key => :job_id
11
13
 
12
- attr_accessible :expectation, :max_score, :min_bit_score,
14
+ attr_accessible :expectation, :max_target_seqs, :min_bit_score,
13
15
  :filter, :gapped_alignments, :gap_opening_penalty,
14
16
  :gap_extension_penalty, :gap_opening_extension, :queue,
15
17
  :blast_dbs
@@ -18,7 +20,7 @@ module Quorum
18
20
  :with => /^[+-]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?$/,
19
21
  :message => " - Valid formats (12, 32.05, 43e-123)",
20
22
  :allow_blank => true
21
- validates_numericality_of :max_score,
23
+ validates_numericality_of :max_target_seqs,
22
24
  :only_integer => true,
23
25
  :allow_blank => true
24
26
  validates_numericality_of :min_bit_score,
@@ -31,7 +33,6 @@ module Quorum
31
33
  :only_integer => true,
32
34
  :allow_blank => true
33
35
  validates_presence_of :blast_dbs, :if => :queue
34
- validate :gap_opening_extension_exists
35
36
 
36
37
  #
37
38
  # Gapped alignment helper.
@@ -79,32 +80,24 @@ module Quorum
79
80
 
80
81
  private
81
82
 
82
- def set_blast_dbs
83
+ def check_blast_dbs
83
84
  if self.blast_dbs.present?
84
- self.blast_dbs = self.blast_dbs.delete_if { |b| b.empty? }.join(';')
85
+ self.blast_dbs = self.blast_dbs.delete_if { |b| b.empty? }
85
86
  end
86
87
  end
87
88
 
88
- def set_optional_params
89
- self.expectation = "5e-20" if self.expectation.blank?
90
- self.max_score ||= 25
91
- self.min_bit_score ||= 0
92
- unless self.gapped_alignments
93
- self.gap_opening_penalty = 0
94
- self.gap_extension_penalty = 0
89
+ def set_blast_dbs
90
+ if self.blast_dbs.present?
91
+ self.blast_dbs = self.blast_dbs.join(';')
95
92
  end
96
93
  end
97
94
 
98
- #
99
- # Add error if gapped_alignment? without gap_opening_extension.
100
- #
101
- def gap_opening_extension_exists
102
- if gap_opening_extension.split(',').blank? && gapped_alignment?
103
- errors.add(
104
- :gap_opening_extension,
105
- " - Please select a value."
106
- )
107
- end
95
+ def set_optional_params
96
+ self.expectation = "5e-20" if self.expectation.blank?
97
+ self.max_target_seqs ||= 25
98
+ self.min_bit_score ||= 0
99
+ self.gap_opening_penalty ||= nil
100
+ self.gap_extension_penalty ||= nil
108
101
  end
109
102
 
110
103
  end
@@ -16,7 +16,7 @@
16
16
  <%= n.label :filter, "DUST" %>
17
17
  </td>
18
18
  <td>
19
- <%= n.check_box :filter %>
19
+ <%= n.select :filter, [['Yes', true],['No', false]] %>
20
20
  </td>
21
21
  </tr>
22
22
  <tr>
@@ -37,17 +37,17 @@
37
37
  </tr>
38
38
  <tr>
39
39
  <td>
40
- <%= n.label :max_score %>
40
+ <%= n.label :max_target_seqs, "Max target sequences" %>
41
41
  </td>
42
42
  <td>
43
- <%= n.text_field :max_score, :size => 15, :title => "25",
43
+ <%= n.text_field :max_target_seqs, :size => 15, :title => "25",
44
44
  :class => "auto-hint" %>
45
45
  </td>
46
46
  <td>
47
47
  <%= n.label :gapped_alignments %>
48
48
  </td>
49
49
  <td>
50
- <%= n.select :gapped_alignments, [['No', false], ['Yes', true]] %>
50
+ <%= n.select :gapped_alignments, [['Yes', true],['No', false]] %>
51
51
  </td>
52
52
  </tr>
53
53
  <tr>
@@ -16,7 +16,7 @@
16
16
  <%= n.label :filter, "SEG" %>
17
17
  </td>
18
18
  <td>
19
- <%= n.check_box :filter %>
19
+ <%= n.select :filter, [['No', false], ['Yes', true]] %>
20
20
  </td>
21
21
  </tr>
22
22
  <tr>
@@ -37,17 +37,17 @@
37
37
  </tr>
38
38
  <tr>
39
39
  <td>
40
- <%= n.label :max_score %>
40
+ <%= n.label :max_target_seqs, "Max target sequences" %>
41
41
  </td>
42
42
  <td>
43
- <%= n.text_field :max_score, :size => 15, :title => "25",
43
+ <%= n.text_field :max_target_seqs, :size => 15, :title => "25",
44
44
  :class => "auto-hint" %>
45
45
  </td>
46
46
  <td>
47
47
  <%= n.label :gapped_alignments %>
48
48
  </td>
49
49
  <td>
50
- <%= n.select :gapped_alignments, [['No', false], ['Yes', true]] %>
50
+ <%= n.select :gapped_alignments, [['Yes', true],['No', false]] %>
51
51
  </td>
52
52
  </tr>
53
53
  <tr>
@@ -16,7 +16,7 @@
16
16
  <%= n.label :filter, "SEG" %>
17
17
  </td>
18
18
  <td>
19
- <%= n.check_box :filter %>
19
+ <%= n.select :filter, [['Yes', true],['No', false]] %>
20
20
  </td>
21
21
  </tr>
22
22
  <tr>
@@ -37,17 +37,17 @@
37
37
  </tr>
38
38
  <tr>
39
39
  <td>
40
- <%= n.label :max_score %>
40
+ <%= n.label :max_target_seqs, "Max target sequences" %>
41
41
  </td>
42
42
  <td>
43
- <%= n.text_field :max_score, :size => 15, :title => "25",
43
+ <%= n.text_field :max_target_seqs, :size => 15, :title => "25",
44
44
  :class => "auto-hint" %>
45
45
  </td>
46
46
  <td>
47
47
  <%= n.label :gapped_alignments %>
48
48
  </td>
49
49
  <td>
50
- <%= n.select :gapped_alignments, [['No', false], ['Yes', true]] %>
50
+ <%= n.select :gapped_alignments, [['Yes', true],['No', false]] %>
51
51
  </td>
52
52
  </tr>
53
53
  <tr>
@@ -16,7 +16,7 @@
16
16
  <%= n.label :filter, "SEG" %>
17
17
  </td>
18
18
  <td>
19
- <%= n.check_box :filter %>
19
+ <%= n.select :filter, [['Yes', true],['No', false]] %>
20
20
  </td>
21
21
  </tr>
22
22
  <tr>
@@ -37,17 +37,17 @@
37
37
  </tr>
38
38
  <tr>
39
39
  <td>
40
- <%= n.label :max_score %>
40
+ <%= n.label :max_target_seqs, "Max target sequences" %>
41
41
  </td>
42
42
  <td>
43
- <%= n.text_field :max_score, :size => 15, :title => "25",
43
+ <%= n.text_field :max_target_seqs, :size => 15, :title => "25",
44
44
  :class => "auto-hint" %>
45
45
  </td>
46
46
  <td>
47
47
  <%= n.label :gapped_alignments %>
48
48
  </td>
49
49
  <td>
50
- <%= n.select :gapped_alignments, [['No', false], ['Yes', true]] %>
50
+ <%= n.select :gapped_alignments, [['Yes', true],['No', false]] %>
51
51
  </td>
52
52
  </tr>
53
53
  <tr>
@@ -2,19 +2,8 @@
2
2
  <script type="text/template" id="detailed_report_template">
3
3
  <h3>Query Accession {{= query }}</h3>
4
4
  {{ _.each(data, function(v) { }}
5
- {{ var id = v.id }}
6
- {{ var qseq = v.qseq }}
7
- {{ var midline = v.midline }}
8
- {{ var hseq = v.hseq }}
9
- {{ var q_from = v.query_from }}
10
- {{ var q_to = v.query_to }}
11
- {{ var h_from = v.hit_from }}
12
- {{ var h_to = v.hit_to }}
13
- {{ var qstrand = v.query_frame }}
14
- {{ var hstrand = v.hit_frame }}
15
- {{ var hsp_group = v.hsp_group }}
16
- <div id="{{= id }}">
17
- <p class="small">{{= QUORUM.displayHspLinks(id, hsp_group, data) }}</p>
5
+ <div id="{{= v.id }}">
6
+ <p class="small">{{= QUORUM.displayHspLinks(v.id, v.hsp_group, data) }}</p>
18
7
  <p class="small">Hit Accession: {{= v.hit_display_id }}</p>
19
8
  <p class="small">Hit Description: {{= v.hit_def }}</p>
20
9
  <table class="report_details">
@@ -25,7 +14,7 @@
25
14
  </tr>
26
15
  <tr>
27
16
  <td>Alignment Length: {{= v.align_len }}</td>
28
- <td>Qstrand / Hstrand: {{= QUORUM.formatStrand(qstrand, hstrand) }}</td>
17
+ <td>Qstrand / Hstrand: {{= QUORUM.formatStrand(v.query_frame, v.hit_frame) }}</td>
29
18
  <td></td>
30
19
  </tr>
31
20
  <tr>
@@ -40,12 +29,12 @@
40
29
  </tr>
41
30
  </table>
42
31
  <p class="small">
43
- <a id="download_sequence_{{= id }}"
44
- onclick="QUORUM.downloadSequence({{= id }}, '{{= algo }}', this)">
32
+ <a id="download_sequence_{{= v.id }}"
33
+ onclick="QUORUM.downloadSequence({{= v.id }}, '{{= algo }}', this)">
45
34
  Download Sequence
46
35
  </a>
47
36
  </p>
48
- {{= QUORUM.formatSequenceReport(qseq, midline, hseq, q_from, q_to, h_from, h_to, algo) }}
37
+ {{= QUORUM.formatSequenceReport(v.qseq, v.midline, v.hseq, v.query_from, v.query_to, v.hit_from, v.hit_to, algo) }}
49
38
  </div>
50
39
  <hr />
51
40
  {{ }); }}
@@ -0,0 +1,15 @@
1
+ class RenameMaxScoreColumn < ActiveRecord::Migration
2
+ def up
3
+ rename_column :quorum_blastn_jobs, :max_score, :max_target_seqs
4
+ rename_column :quorum_blastp_jobs, :max_score, :max_target_seqs
5
+ rename_column :quorum_blastx_jobs, :max_score, :max_target_seqs
6
+ rename_column :quorum_tblastn_jobs, :max_score, :max_target_seqs
7
+ end
8
+
9
+ def down
10
+ rename_column :quorum_blastn_jobs, :max_target_seqs, :max_score
11
+ rename_column :quorum_blastp_jobs, :max_target_seqs, :max_score
12
+ rename_column :quorum_blastx_jobs, :max_target_seqs, :max_score
13
+ rename_column :quorum_tblastn_jobs, :max_target_seqs, :max_score
14
+ end
15
+ end