From f46b3ffa15f6c0c48670690d7c59eb733711b89b Mon Sep 17 00:00:00 2001 From: tibvdm Date: Tue, 18 Jun 2024 18:01:27 +0200 Subject: [PATCH] fix pept2funct and peptinfo endpoints --- app/controllers/api/pept2funct_controller.rb | 12 ++++++------ app/controllers/api/peptinfo_controller.rb | 14 +++++++------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/app/controllers/api/pept2funct_controller.rb b/app/controllers/api/pept2funct_controller.rb index 52cbe1d..baf938d 100644 --- a/app/controllers/api/pept2funct_controller.rb +++ b/app/controllers/api/pept2funct_controller.rb @@ -18,13 +18,13 @@ def pept2funct interpro_result = pept2interpro_helper @input_order.each do |seq| - next unless go_result.key? seq_index + next unless go_result.key? seq - @result[seq_index] = { - total: go_result[seq_index][:total], - go: go_result[seq_index][:go], - ec: ec_result[seq_index][:ec], - ipr: interpro_result[seq_index][:ipr] + @result[seq] = { + total: go_result[seq][:total], + go: go_result[seq][:go], + ec: ec_result[seq][:ec], + ipr: interpro_result[seq][:ipr] } end end diff --git a/app/controllers/api/peptinfo_controller.rb b/app/controllers/api/peptinfo_controller.rb index 303f44e..c16fd39 100644 --- a/app/controllers/api/peptinfo_controller.rb +++ b/app/controllers/api/peptinfo_controller.rb @@ -21,14 +21,14 @@ def peptinfo interpro_result = pept2interpro_helper @input_order.each do |seq| - next unless go_result.key? seq_index + next unless go_result.key? seq - @result[seq_index] = { - total: go_result[seq_index][:total], - go: go_result[seq_index][:go], - ec: ec_result[seq_index][:ec], - ipr: interpro_result[seq_index][:ipr], - lca: lca_result[seq_index] + @result[seq] = { + total: go_result[seq][:total], + go: go_result[seq][:go], + ec: ec_result[seq][:ec], + ipr: interpro_result[seq][:ipr], + lca: lca_result[seq] } end end