diff --git a/app/controllers/mpa/pept2filtered_controller.rb b/app/controllers/mpa/pept2filtered_controller.rb index 8aab9ad..5cd3238 100644 --- a/app/controllers/mpa/pept2filtered_controller.rb +++ b/app/controllers/mpa/pept2filtered_controller.rb @@ -16,7 +16,7 @@ def pept2filtered taxa_filter_ids = (params[:taxa] || []).map(&:to_i) # Request the suffix array search service - @response = search(peptides, equate_il).uniq + @response = search(peptides, equate_il, cutoff).uniq # TODO: we should remove this or use a different approach @response.each do |result| diff --git a/app/helpers/suffix_array_helper.rb b/app/helpers/suffix_array_helper.rb index ea956a8..460b6f7 100644 --- a/app/helpers/suffix_array_helper.rb +++ b/app/helpers/suffix_array_helper.rb @@ -1,7 +1,7 @@ module SuffixArrayHelper - def search(peptides, equate_il) + def search(peptides, equate_il, cutoff = 10_000) # Convert the peptides array into a json string - json_data = { peptides: peptides, equalize_I_and_L: equate_il }.to_json + json_data = { peptides: peptides, equalize_I_and_L: equate_il, cutoff: cutoff }.to_json # The URL to the suffix array search service url = URI.parse("http://localhost:3000/search")