Class: MiGA::Cli::Action::QualityWf
- Inherits:
-
MiGA::Cli::Action
- Object
- MiGA
- MiGA::Cli::Action
- MiGA::Cli::Action::QualityWf
- Includes:
- Wf
- Defined in:
- lib/miga/cli/action/quality_wf.rb
Instance Attribute Summary
Attributes inherited from MiGA::Cli::Action
Instance Method Summary collapse
Methods included from Wf
#call_cli, #cleanup, #create_project, #default_opts_for_wf, #download_datasets, #import_datasets, #initialize_empty_project, #opts_for_wf, #opts_for_wf_distances, #run_daemon, #summarize, #transfer_metadata
Methods inherited from MiGA::Cli::Action
#complete, #empty_action, #initialize, #launch, load, #name
Constructor Details
This class inherits a constructor from MiGA::Cli::Action
Instance Method Details
#parse_cli ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/miga/cli/action/quality_wf.rb', line 10 def parse_cli default_opts_for_wf cli.defaults = { mytaxa: false, min_qual: 'no' } cli.parse do |opt| opt.on( '-m', '--mytaxa-scan', 'Perform MyTaxa scan analysis' ) { |v| cli[:mytaxa] = v } opts_for_wf(opt, 'Input genome assemblies (nucleotides, FastA)') end end |
#perform ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/miga/cli/action/quality_wf.rb', line 22 def perform # Input data norun = %w[ project_stats haai_distances aai_distances ani_distances clade_finding ] = Hash[norun.map { |i| ["run_#{i}", false] }] = { run_distances: false } [:run_mytaxa_scan] = false unless cli[:mytaxa] p = create_project(:assembly, , ) # Run run_daemon summarize if cli[:mytaxa] && !cli[:prepare_and_exit] dir = File.('mytaxa_scan', cli[:outdir]) Dir.mkdir(dir) p.each_dataset do |d| r = d.result(:mytaxa_scan) or next f = r.file_path(:report) or next FileUtils.cp(f, dir) end end cleanup end |