diff --git a/app/controllers/mpa_controller.rb b/app/controllers/mpa_controller.rb index 6574889..ea99a11 100644 --- a/app/controllers/mpa_controller.rb +++ b/app/controllers/mpa_controller.rb @@ -30,7 +30,7 @@ def pept2data @lineages = Hash.new taxa.each do |taxon| - @lineages[taxon.id] = taxon.lineage.to_a + @lineages[taxon.id] = taxon.lineage.to_a_idx end puts @lineages.inspect diff --git a/app/views/mpa/pept2data.json.jbuilder b/app/views/mpa/pept2data.json.jbuilder index e129ad3..508d6f5 100644 --- a/app/views/mpa/pept2data.json.jbuilder +++ b/app/views/mpa/pept2data.json.jbuilder @@ -3,7 +3,7 @@ json.peptides @response do |peptide, lca| json.lca lca json.lineage @lineages[lca] json.fa do - json.counts {} - json.data {} + json.counts({}) + json.data({}) end end