From fa7452464b967bab26e43cd7879a819f4a3a41ac Mon Sep 17 00:00:00 2001 From: Pieter Verschaffelt Date: Mon, 11 Mar 2024 16:58:32 +0100 Subject: [PATCH] Add lineage to response --- app/controllers/mpa_controller.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/controllers/mpa_controller.rb b/app/controllers/mpa_controller.rb index 5e60d18..2dc3993 100644 --- a/app/controllers/mpa_controller.rb +++ b/app/controllers/mpa_controller.rb @@ -68,6 +68,10 @@ def pept2data @lineages[taxon.id] = taxon.lineage.to_a_idx end + @response.each do |entry| + entry["lineage"] = @lineages[entry.lca] + end + @response end