miga-base 1.2.8.2 → 1.2.10.0

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: 6605edc35cd0b2aec6d095653ff1d9604df81d6a57e341a290cbd213bb18fee3
4
- data.tar.gz: 2f811051db25da424bdf9f9c89390a4e0cac33fb3c6330e255b369d171e8a4b9
3
+ metadata.gz: 22d59bdb8dee84becd895fa7cd7be47912f3b895025494e55fb46b7125ac5560
4
+ data.tar.gz: d7213e012fa9b110d5391f5957cd3b2336e41a7ad84775471beca7da3c9510e3
5
5
  SHA512:
6
- metadata.gz: 252fe9abe5ce14ebe86c5250716b9ce541f1faf510bd36ae2d33f4f15f964f3ec735a66db9fa11503b74fb82f16d6a2a5c43d6df3a71b67dacec65462425d759
7
- data.tar.gz: ef734003e57818b155347ce591e9683420ecfa00cd5b4398c0ed1485fc23108a74d9bd91980d6a2bb4c2481c3d1027805b9083fb9add802b5a30f140926c996d
6
+ metadata.gz: ecfd6595931a7fb0fd9b924a8a7cc64535a78ab97a1a978a65f0861e719d8570ef4ac34da8587a23664e84c215b67efdaac059d1aa159da318750dd75ebab04d
7
+ data.tar.gz: cda07a76118f2cba313deb974d8f6397612e11dd619332a707e12898afbb1d199bb8eeef07485c95826ddaa7b15adb617475168b668b201f59b7acc424afff84
@@ -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
@@ -52,6 +52,12 @@ class MiGA::Cli::Action::Init < MiGA::Cli::Action
52
52
  'Type of daemon launcher, one of: bash, ssh, qsub, msub, slurm',
53
53
  "By default: interactive (#{cli[:dtype]} if --auto)"
54
54
  ) { |v| cli[:dtype] = v.to_sym }
55
+ %w[R ruby python].each do |bin|
56
+ opt.on(
57
+ "--path-to-#{bin} STRING",
58
+ "Use this path to #{bin} instead of testing for executables"
59
+ ) { |v| cli[:"path_to_#{bin}"] = v }
60
+ end
55
61
  opt.on(
56
62
  '--ask-all',
57
63
  'Ask for the location of all software',
@@ -130,8 +136,13 @@ class MiGA::Cli::Action::Init < MiGA::Cli::Action
130
136
  fh.each_line do |ln|
131
137
  r = define_software(ln) or next
132
138
  cli.print "Testing #{r[0]}#{" (#{r[3]})" if r[3]}... "
133
- path = find_software(r[1])
134
- paths[r[1]] = File.expand_path(r[1], path).shellescape
139
+ if cli[:"path_to_#{r[1]}"]
140
+ paths[r[1]] = cli[:"path_to_#{r[1]}"]
141
+ cli.puts "user-provided: #{paths[r[1]]}"
142
+ else
143
+ path = find_software(r[1])
144
+ paths[r[1]] = File.expand_path(r[1], path).shellescape
145
+ end
135
146
  end
136
147
  end
137
148
  rc_fh.puts 'export PATH="$MIGA_PATH$PATH"'
@@ -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, 8, 2].freeze
15
+ VERSION = [1.2, 10, 0].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, 8, 14)
23
+ VERSION_DATE = Date.new(2022, 11, 28)
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.8.2
4
+ version: 1.2.10.0
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-08-14 00:00:00.000000000 Z
11
+ date: 2022-11-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: daemons