miga-base 1.2.8.2 → 1.2.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/miga/cli/action/classify_wf.rb +7 -4
- data/lib/miga/cli/action/derep_wf.rb +2 -0
- data/lib/miga/cli/action/index_wf.rb +1 -0
- data/lib/miga/cli/action/init.rb +13 -2
- data/lib/miga/cli/action/preproc_wf.rb +1 -0
- data/lib/miga/cli/action/quality_wf.rb +2 -1
- data/lib/miga/cli/action/wf.rb +11 -1
- data/lib/miga/version.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 22d59bdb8dee84becd895fa7cd7be47912f3b895025494e55fb46b7125ac5560
|
4
|
+
data.tar.gz: d7213e012fa9b110d5391f5957cd3b2336e41a7ad84775471beca7da3c9510e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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([
|
67
|
-
cli
|
68
|
-
|
69
|
-
|
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'
|
data/lib/miga/cli/action/init.rb
CHANGED
@@ -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
|
-
|
134
|
-
|
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"'
|
@@ -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|
|
data/lib/miga/cli/action/wf.rb
CHANGED
@@ -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,
|
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,
|
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.
|
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-
|
11
|
+
date: 2022-11-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: daemons
|