Class: MiGA::Cli::Action::GtdbGet

Inherits:
MiGA::Cli::Action show all
Includes:
Download::Gtdb
Defined in:
lib/miga/cli/action/gtdb_get.rb

Constant Summary

Constants included from MiGA

MiGA::CITATION, VERSION, VERSION_DATE, VERSION_NAME

Instance Attribute Summary

Attributes inherited from MiGA::Cli::Action

#cli

Attributes included from MiGA::Common::Net

#remote_connection_uri

Instance Method Summary collapse

Methods included from Download::Gtdb

#cli_name_modifiers, #cli_task_flags, #remote_list, #remote_row_name, #sanitize_cli

Methods included from Download::Base

#cli_base_flags, #cli_filters, #cli_save_actions, #discard_excluded, #download_entries, #exclude_newer, #finalize_tasks, #generic_perform, #impose_limit, #load_ncbi_taxonomy_dump, #load_tasks, #save_entry, #unlink_entries

Methods inherited from MiGA::Cli::Action

#complete, #empty_action, #initialize, #launch, load, #name

Methods inherited from MiGA

CITATION, CITATION_ARRAY, DEBUG, DEBUG_OFF, DEBUG_ON, DEBUG_TRACE_OFF, DEBUG_TRACE_ON, FULL_VERSION, LONG_VERSION, VERSION, VERSION_DATE, #advance, debug?, debug_trace?, initialized?, #like_io?, #num_suffix, rc_path, #result_files_exist?, #say

Methods included from MiGA::Common::Path

#root_path, #script_path

Methods included from MiGA::Common::Format

#clean_fasta_file, #seqs_length, #tabulate

Methods included from MiGA::Common::Net

#download_file_ftp, #http_request, #known_hosts, #main_server, #net_method, #normalize_encoding, #remote_connection

Methods included from MiGA::Common::SystemCall

#run_cmd, #run_cmd_opts

Constructor Details

This class inherits a constructor from MiGA::Cli::Action

Instance Method Details

#parse_cliObject



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/miga/cli/action/gtdb_get.rb', line 9

def parse_cli
  cli.defaults = {
    query: false, unlink: false,
    reference: false, add_version: true, dry: false,
    get_md: false, only_md: false, save_every: 1
  }
  cli.parse do |opt|
    cli.opt_object(opt, [:project])
    opt.on(
      '-T', '--taxon STRING',
      '(Mandatory) Taxon name in GTDB format (e.g., g__Escherichia)'
    ) { |v| cli[:taxon] = v }
    cli_base_flags(opt)
    opt.on(
      '--ncbi-taxonomy',
      'Retrieve NCBI taxonomy instead of GTDB taxonomy'
    ) { |v| cli[:get_ncbi_taxonomy] = v }
    cli_task_flags(opt)
    cli_name_modifiers(opt)
    cli_filters(opt)
    cli_save_actions(opt)
    opt.on(
      '--ncbi-api-key STRING',
      'NCBI API key'
    ) { |v| ENV['NCBI_API_KEY'] = v }
  end
end

#performObject



37
38
39
# File 'lib/miga/cli/action/gtdb_get.rb', line 37

def perform
  generic_perform
end