diff --git a/app/controllers/mpa/pept2data_controller.rb b/app/controllers/mpa/pept2data_controller.rb index 6f0ad0e..4996d86 100644 --- a/app/controllers/mpa/pept2data_controller.rb +++ b/app/controllers/mpa/pept2data_controller.rb @@ -15,12 +15,12 @@ def pept2data # Request the suffix array search service @response = search(peptides, equate_il).uniq - @response["equated_IL"] = equate_il # Collect all lca's to look up the lineages taxa = [] @response.each do |result| taxa.append(result["lca"]) + result["equate"] = equate_il end # Retrieve all lineages at once diff --git a/app/views/mpa/pept2data/pept2data.json.jbuilder b/app/views/mpa/pept2data/pept2data.json.jbuilder index 3e738de..c989c56 100644 --- a/app/views/mpa/pept2data/pept2data.json.jbuilder +++ b/app/views/mpa/pept2data/pept2data.json.jbuilder @@ -1,4 +1,5 @@ json.peptides @response do |peptide| + json.equate peptide["equate"] json.sequence peptide["sequence"] json.lca peptide["lca"] json.lineage @lineages[peptide["lca"].to_i] @@ -7,4 +8,3 @@ json.peptides @response do |peptide| json.data peptide["fa"]["data"] end end -json.equated_IL @response["equated_IL"]