diff --git a/app/controllers/mpa/pept2filtered_controller.rb b/app/controllers/mpa/pept2filtered_controller.rb index 3f1f0fa..edf34cf 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, cutoff).uniq.select { |result| !result["cuttof_used"] } + @response = search(peptides, equate_il, cutoff).uniq.select { |result| !result["cutoff_used"] } # TODO: we should remove this or use a different approach @response.each do |result| diff --git a/app/views/mpa/pept2filtered/pept2filtered.json.jbuilder b/app/views/mpa/pept2filtered/pept2filtered.json.jbuilder index 596cac5..c576bc9 100644 --- a/app/views/mpa/pept2filtered/pept2filtered.json.jbuilder +++ b/app/views/mpa/pept2filtered/pept2filtered.json.jbuilder @@ -1 +1,8 @@ -json.peptides(@response) +json.peptides @response do |peptide| + json.sequence peptide["sequence"] + json.taxa peptide["taxa"] + json.fa do + json.counts peptide["fa"]["counts"] + json.data peptide["fa"]["data"] + end +end