miga-base 1.2.9.0 → 1.2.10.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '091cbb355cb05e9f9b78a84222ce575755e4f5fc134b7b86c3543a40297776ce'
4
- data.tar.gz: 04b636a84a89030128b4a267a8a0c49013161fc753c7e7f5fe29b767f4095ee4
3
+ metadata.gz: 43040e5cfb781472a3b329f927def556241354dbe5b2bce0cf1193343a54f9e3
4
+ data.tar.gz: 4c189d36e1fe8bc0e1c9ba43d727e8db8c6cda4607b6c43b348ea6f662d50a28
5
5
  SHA512:
6
- metadata.gz: b85165b51ec14d4fb3d78eb7945938b253e53d1aafee6593252dc54bd8202bc5709812cbbc22cc1d01a1b351f4843769e77aab1f92447a68a0ebe604e0adf150
7
- data.tar.gz: e7edbc1aeec3119d69503fef00be330783eef5afb9e03dc24077ed87e596d1c7f8bac325e7d45caacda7924bcec442d5e0dbc6a90e5cb506ae7b77f73f06840f
6
+ metadata.gz: c0dd101a62434880a0458eeb00fb4a1acdfe21eeda37b2f3c240cb0b5713b0631a79a994a4bcc7c030403f0bb82d4c1107fbca0c92e6f7d33247d55896b9eabf
7
+ data.tar.gz: b5d09fbab61dfff05393e2408e56b61d3208d8c8f3293125cc25f880a03baaa23fbd44a7612a8453d959c42fe8d41a826e35d10c597de3ac6baebbc9198ff498
@@ -60,13 +60,16 @@ class MiGA::Cli::Action::ClassifyWf < MiGA::Cli::Action
60
60
  )
61
61
  p.set_option(:ref_project, ref_db.path)
62
62
  p.set_option(:tax_pvalue, cli[:pvalue])
63
+
63
64
  # Run
64
65
  run_daemon
65
66
  summarize(%w[cds assembly essential_genes]) if cli[:summaries]
66
- summarize(['taxonomy'])
67
- cli.say "Summary: classification"
68
- ofile = File.expand_path('classification.tsv', cli[:outdir])
69
- call_cli(['ls', '-P', cli[:outdir], '-m', 'tax', '--tab', '-o', ofile])
67
+ summarize(%w[taxonomy])
68
+ unless cli[:prepare_and_exit]
69
+ cli.say "Summary: classification"
70
+ ofile = File.expand_path('classification.tsv', cli[:outdir])
71
+ call_cli(['ls', '-P', cli[:outdir], '-m', 'tax', '--tab', '-o', ofile])
72
+ end
70
73
  cleanup
71
74
  end
72
75
 
@@ -68,6 +68,8 @@ class MiGA::Cli::Action::DerepWf < MiGA::Cli::Action
68
68
  private
69
69
 
70
70
  def dereplicate(p)
71
+ return if cli[:prepare_and_exit]
72
+
71
73
  cli.say 'Extracting genomospecies clades'
72
74
  r = p.result(:clade_finding) or raise 'Result unavailable: run failed'
73
75
  c_f = r.file_path(:clades_gsp) or raise 'Result incomplete: run failed'
@@ -26,6 +26,7 @@ class MiGA::Cli::Action::IndexWf < MiGA::Cli::Action
26
26
  def perform
27
27
  # Input data
28
28
  p = create_project(:assembly, {}, run_mytaxa_scan: cli[:mytaxa])
29
+
29
30
  # Run
30
31
  run_daemon
31
32
  summarize
@@ -41,6 +41,7 @@ class MiGA::Cli::Action::PreprocWf < MiGA::Cli::Action
41
41
  d_metadata[:run_mytaxa] = false
42
42
  end
43
43
  p = create_project(cli[:input_type], p_metadata, d_metadata)
44
+
44
45
  # Run
45
46
  run_daemon
46
47
  summarize
@@ -28,10 +28,11 @@ class MiGA::Cli::Action::QualityWf < MiGA::Cli::Action
28
28
  d_metadata = { run_distances: false }
29
29
  d_metadata[:run_mytaxa_scan] = false unless cli[:mytaxa]
30
30
  p = create_project(:assembly, p_metadata, d_metadata)
31
+
31
32
  # Run
32
33
  run_daemon
33
34
  summarize
34
- if cli[:mytaxa]
35
+ if cli[:mytaxa] && !cli[:prepare_and_exit]
35
36
  dir = File.expand_path('mytaxa_scan', cli[:outdir])
36
37
  Dir.mkdir(dir)
37
38
  p.each_dataset do |d|
@@ -8,7 +8,8 @@ module MiGA::Cli::Action::Wf
8
8
  cli.expect_files = true
9
9
  cli.defaults = {
10
10
  clean: false, project_type: :genomes, dataset_type: :popgenome,
11
- ncbi_draft: true, min_qual: MiGA::Project.OPTIONS[:min_qual][:default]
11
+ ncbi_draft: true, min_qual: MiGA::Project.OPTIONS[:min_qual][:default],
12
+ prepare_and_exit: false
12
13
  }
13
14
  end
14
15
 
@@ -83,6 +84,10 @@ module MiGA::Cli::Action::Wf
83
84
  'Number of CPUs to use per project-wide job',
84
85
  'By default controlled by the daemon configuration (ppn_project or ppn)'
85
86
  ) { |v| cli[:threads_project] = v }
87
+ opt.on(
88
+ '--prepare-and-exit',
89
+ 'Create project and import datasets, but do not run any analyses'
90
+ ) { |v| cli[:prepare_and_exit] = v }
86
91
  end
87
92
 
88
93
  def opts_for_wf_distances(opt)
@@ -159,6 +164,8 @@ module MiGA::Cli::Action::Wf
159
164
  end
160
165
 
161
166
  def summarize(which = %w[cds assembly essential_genes ssu])
167
+ return if cli[:prepare_and_exit]
168
+
162
169
  which.each do |r|
163
170
  cli.say "Summary: #{r}"
164
171
  call_cli(
@@ -173,6 +180,7 @@ module MiGA::Cli::Action::Wf
173
180
  end
174
181
 
175
182
  def cleanup
183
+ return if cli[:prepare_and_exit]
176
184
  return unless cli[:clean]
177
185
 
178
186
  cli.say 'Cleaning up intermediate files'
@@ -188,6 +196,8 @@ module MiGA::Cli::Action::Wf
188
196
  end
189
197
 
190
198
  def run_daemon
199
+ return if cli[:prepare_and_exit]
200
+
191
201
  cmd = ['daemon', 'run', '-P', cli[:outdir], '--shutdown-when-done']
192
202
  cmd += ['--json', cli[:daemon_json]] if cli[:daemon_json]
193
203
  cmd += ['--max-jobs', cli[:jobs]] if cli[:jobs]
data/lib/miga/version.rb CHANGED
@@ -12,7 +12,7 @@ module MiGA
12
12
  # - String indicating release status:
13
13
  # - rc* release candidate, not released as gem
14
14
  # - [0-9]+ stable release, released as gem
15
- VERSION = [1.2, 9, 0].freeze
15
+ VERSION = [1.2, 10, 1].freeze
16
16
 
17
17
  ##
18
18
  # Nickname for the current major.minor version.
@@ -20,7 +20,7 @@ module MiGA
20
20
 
21
21
  ##
22
22
  # Date of the current gem relese.
23
- VERSION_DATE = Date.new(2022, 10, 15)
23
+ VERSION_DATE = Date.new(2022, 12, 1)
24
24
 
25
25
  ##
26
26
  # References of MiGA
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: miga-base
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.9.0
4
+ version: 1.2.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luis M. Rodriguez-R
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-10-15 00:00:00.000000000 Z
11
+ date: 2022-12-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: daemons