Skip to content

Commit

Permalink
Merge branch 'develop' into feature/test-action
Browse files Browse the repository at this point in the history
  • Loading branch information
pverscha committed Mar 14, 2023
2 parents 944cd94 + 4f861ca commit 3c0e018
Show file tree
Hide file tree
Showing 14 changed files with 2 additions and 569 deletions.
2 changes: 1 addition & 1 deletion app/controllers/api/api_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def pept2prot
end

ids = ids.uniq.compact.sort
UniprotEntry.includes(:taxon, :ec_cross_references, :go_cross_references, :refseq_cross_references, :embl_cross_references)
UniprotEntry.includes(:taxon, :ec_cross_references, :go_cross_references)
.where(id: ids).find_in_batches do |group|
group.each do |uni|
lookup[uni.id].each { |s| @result[s] << uni }
Expand Down
23 changes: 0 additions & 23 deletions app/models/embl_cross_reference.rb

This file was deleted.

97 changes: 0 additions & 97 deletions app/models/proteome.rb

This file was deleted.

53 changes: 0 additions & 53 deletions app/models/proteome_cache.rb

This file was deleted.

25 changes: 0 additions & 25 deletions app/models/proteome_cross_reference.rb

This file was deleted.

15 changes: 0 additions & 15 deletions app/models/refseq_cross_reference.rb

This file was deleted.

3 changes: 0 additions & 3 deletions app/models/uniprot_entry.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,9 @@
class UniprotEntry < ApplicationRecord
include ReadOnlyModel

has_many :refseq_cross_references
has_many :embl_cross_references
has_many :ec_cross_references
has_many :go_cross_references
has_many :interpro_cross_references
has_many :proteome_cross_references

has_many :peptides
has_many :ec_numbers, through: :ec_cross_references
Expand Down
6 changes: 1 addition & 5 deletions app/views/api/api/pept2prot.json.erb
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@
"taxon_id" => u.taxon_id,
"taxon_name" => u.taxon.try(:name),
"ec_references" => u.ec_cross_references.map(&:ec_number_code).join(" "),
"go_references" => u.go_cross_references.map(&:go_term_code).join(" "),
"refseq_ids" => u.refseq_cross_references.map(&:sequence_id).join(" "),
"refseq_protein_ids" => u.refseq_cross_references.map(&:protein_id).join(" "),
"insdc_ids" => u.embl_cross_references.map(&:sequence_id).join(" "),
"insdc_protein_ids" => u.embl_cross_references.map(&:protein_id).join(" "),
"go_references" => u.go_cross_references.map(&:go_term_code).join(" ")
}
end
end.flatten).html_safe
Expand Down
8 changes: 0 additions & 8 deletions test/controllers/api/api_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,6 @@ class Api::ApiControllerTest < ActionController::TestCase
assert_not @response.body.include? '"taxon_name":null'
assert @response.body.include? 'ec_references'
assert @response.body.include? 'go_references'
assert @response.body.include? 'refseq_ids'
assert @response.body.include? 'refseq_protein_ids'
assert @response.body.include? 'insdc_ids'
assert @response.body.include? 'insdc_protein_ids'
assert_not @response.body.include? '"uniprot_id":"nr2"'
end

Expand All @@ -112,10 +108,6 @@ class Api::ApiControllerTest < ActionController::TestCase
assert_not @response.body.include? '"taxon_name":null'
assert @response.body.include? 'ec_references'
assert @response.body.include? 'go_references'
assert @response.body.include? 'refseq_ids'
assert @response.body.include? 'refseq_protein_ids'
assert @response.body.include? 'insdc_ids'
assert @response.body.include? 'insdc_protein_ids'
assert @response.body.include? '"uniprot_id":"nr2"'
end

Expand Down
59 changes: 0 additions & 59 deletions test/models/embl_cross_reference_test.rb

This file was deleted.

Loading

0 comments on commit 3c0e018

Please sign in to comment.