Skip to content

Commit

Permalink
Add option miga get --ncbi-taxonomy-dump
Browse files Browse the repository at this point in the history
  • Loading branch information
lmrodriguezr committed Mar 10, 2024
1 parent b9fc848 commit 3692c90
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions lib/miga/cli/action/get.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
require 'miga/remote_dataset'

class MiGA::Cli::Action::Get < MiGA::Cli::Action
require 'miga/cli/action/download/base'
include MiGA::Cli::Action::Download::Base

def parse_cli
cli.defaults = {
query: false, universe: :ncbi, db: :nuccore, get_md: false, only_md: false
Expand Down Expand Up @@ -69,12 +72,18 @@ def parse_cli
'--api-key STRING',
'API key for the given universe'
) { |v| cli[:api_key] = v }
opt.on(
'--ncbi-taxonomy-dump [path]',
'Path to an NCBI Taxonomy dump directory to query instead of API calls',
'If the path is not passed, the dump is automatically downloaded'
) { |v| cli[:ncbi_taxonomy_dump] = v || true }
end
end

def perform
glob = get_sub_cli
p = cli.load_project
load_ncbi_taxonomy_dump
glob.each do |sub_cli|
rd = create_remote_dataset(sub_cli, p)
next if rd.nil?
Expand Down
2 changes: 1 addition & 1 deletion lib/miga/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module MiGA
# - String indicating release status:
# - rc* release candidate, not released as gem
# - [0-9]+ stable release, released as gem
VERSION = [1.3, 12, 3].freeze
VERSION = [1.3, 13, 0].freeze

##
# Nickname for the current major.minor version.
Expand Down

0 comments on commit 3692c90

Please sign in to comment.