miga-base 1.2.13.4 → 1.2.14.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/miga/cli/action/download/base.rb +1 -1
- data/lib/miga/cli/action/download/gtdb.rb +3 -0
- data/lib/miga/cli/action/gtdb_get.rb +4 -0
- data/lib/miga/cli/action/wf.rb +18 -2
- 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: ae083dbb06efae44846887887e0706b0436340aeb7524846478a68867c602b67
|
4
|
+
data.tar.gz: 78bb2440e073e4d55fe6a439dfa1eddb25c2fa4aad7d06000384de20092ab710
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 185667da9d0e7dc3849dc851e2f2c6829901bfaee7975c7b249630b660cc41aa40988fcc9e27c3937a6ad533df3135e4d2f2115e7f16e8bd3f25ed9e0533d9f7
|
7
|
+
data.tar.gz: 77ec658cbfcecda4b32e7a0110b53953220f649f79f4a112c23c510511a4752869af9e3894452335d827311a9b8fedd0c5072860ecff035f1c018aa346c9894f
|
@@ -23,6 +23,9 @@ module MiGA::Cli::Action::Download::Gtdb
|
|
23
23
|
|
24
24
|
def sanitize_cli
|
25
25
|
cli.ensure_par(taxon: '-T')
|
26
|
+
unless cli[:taxon] =~ /^[a-z]__\S+$/
|
27
|
+
raise 'Taxon (-T) must be in GTDB format: s__Macondimonas_diazotrophica'
|
28
|
+
end
|
26
29
|
cli[:save_every] = 1 if cli[:dry]
|
27
30
|
end
|
28
31
|
|
data/lib/miga/cli/action/wf.rb
CHANGED
@@ -35,10 +35,18 @@ module MiGA::Cli::Action::Wf
|
|
35
35
|
'-T', '--ncbi-taxon STRING',
|
36
36
|
'Download all the genomes in NCBI classified as this taxon'
|
37
37
|
) { |v| cli[:ncbi_taxon] = v }
|
38
|
+
opt.on(
|
39
|
+
'-G', '--gtdb-taxon STRING',
|
40
|
+
'Download all the genomes in GTDB classified as this taxon'
|
41
|
+
) { |v| cli[:gtdb_taxon] = v }
|
38
42
|
opt.on(
|
39
43
|
'--no-draft',
|
40
|
-
'Only download complete genomes, not drafts'
|
44
|
+
'Only download complete genomes, not drafts (requires -T)'
|
41
45
|
) { |v| cli[:ncbi_draft] = v }
|
46
|
+
opt.on(
|
47
|
+
'--gtdb-ref',
|
48
|
+
'Only download reference anchor genomes in GTDB (requires -G)'
|
49
|
+
) { |v| cli[:gtdb_ref] = v }
|
42
50
|
opt.on(
|
43
51
|
'--max-download INT', Integer,
|
44
52
|
'Maximum number of genomes to download (by default: unlimited)'
|
@@ -136,7 +144,7 @@ module MiGA::Cli::Action::Wf
|
|
136
144
|
p.set_option(i, cli[i])
|
137
145
|
end
|
138
146
|
|
139
|
-
# Download datasets
|
147
|
+
# Download datasets from NCBI
|
140
148
|
unless cli[:ncbi_taxon].nil?
|
141
149
|
what = cli[:ncbi_draft] ? '--all' : '--complete'
|
142
150
|
cmd = ['ncbi_get', '-P', cli[:outdir], '-T', cli[:ncbi_taxon], what]
|
@@ -144,6 +152,14 @@ module MiGA::Cli::Action::Wf
|
|
144
152
|
call_cli(cmd)
|
145
153
|
end
|
146
154
|
|
155
|
+
# Download datasets from GTDB
|
156
|
+
unless cli[:gtdb_taxon].nil?
|
157
|
+
cmd = ['gtdb_get', '-P', cli[:outdir], '-T', cli[:gtdb_taxon]]
|
158
|
+
cmd << '--reference' if cli[:gtdb_ref]
|
159
|
+
cmd += ['--max', cli[:ncbi_max]] if cli[:ncbi_max]
|
160
|
+
call_cli(cmd)
|
161
|
+
end
|
162
|
+
|
147
163
|
# Add datasets
|
148
164
|
call_cli(
|
149
165
|
[
|
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, 14, 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(2023, 1,
|
23
|
+
VERSION_DATE = Date.new(2023, 1, 16)
|
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.14.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: 2023-01-
|
11
|
+
date: 2023-01-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: daemons
|