Skip to content

Commit

Permalink
Type-safe use of taxdumps
Browse files Browse the repository at this point in the history
  • Loading branch information
lmrodriguezr committed Mar 8, 2024
1 parent 615b602 commit b0242c3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/miga/remote_dataset.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ def ncbi_taxonomy_dump?
# Get the MiGA::Taxonomy object for the lineage of the taxon with TaxID
# +id+ using the local NCBI Taxonomy dump.
def taxonomy_from_ncbi_dump(id)
id = id.to_i unless id.is_a? Integer
MiGA::Taxonomy.new(ns: 'ncbi').tap do |tax|
while @ncbi_taxonomy_names[id]
tax << { @ncbi_taxonomy_names[id][1] => @ncbi_taxonomy_names[id][0] }
Expand Down

0 comments on commit b0242c3

Please sign in to comment.