diff --git a/app/controllers/mpa/pept2filtered_controller.rb b/app/controllers/mpa/pept2filtered_controller.rb index faa62dd..e98e5bf 100644 --- a/app/controllers/mpa/pept2filtered_controller.rb +++ b/app/controllers/mpa/pept2filtered_controller.rb @@ -16,11 +16,11 @@ def pept2filtered taxa_filter_ids = (params[:taxa] || []).map(&:to_i) # Request the suffix array search service - @response = search(peptides, equate_il, cutoff).uniq.select { |result| !result["cutoff_used"] } + @response = search(peptides, equate_il, cutoff).select { |result| !result["cutoff_used"] }.uniq # TODO: we should remove this or use a different approach - # @response.each do |result| - # result["taxa"] = result["taxa"].select { |taxon_id| taxa_filter_ids.include?(taxon_id) }.uniq - # end + @response.each do |result| + result["taxa"] = result["taxa"].select { |taxon_id| taxa_filter_ids.include?(taxon_id) }.uniq + end end end