miga-base 1.3.11.0 → 1.3.12.0
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 +13 -0
- data/lib/miga/cli/action/download/ncbi.rb +0 -9
- data/lib/miga/dataset.rb +1 -1
- data/lib/miga/remote_dataset/base.rb +1 -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: 45ab052e74f73fe87a2383443285dae3fb218c659618c1d2d7278ff8bb0de6f4
|
4
|
+
data.tar.gz: 553c70d1a5c15093686260a0dec176a0f8ecd196f0884218484ff9964e416661
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 27a87882655d6875f482042d388273ce46135329919f9738913022af6fd97f411e9db6238b4bd7fbcc50d7d605da51f447d85b68ff77758cf324ce9e59c7e592
|
7
|
+
data.tar.gz: 116737b9a5ca99d97a8ad8f704a5df9146177c2d9603c8c4b19e631baa52e60183888369dcec96f671238f6ad934ce8c6324bc368aaff8bc8645f3b1d3dee247
|
@@ -68,6 +68,10 @@ module MiGA::Cli::Action::Download::Base
|
|
68
68
|
'-R', '--remote-list PATH',
|
69
69
|
'Path to an output file with the list of all datasets listed remotely'
|
70
70
|
) { |v| cli[:remote_list] = v }
|
71
|
+
opt.on(
|
72
|
+
'--ncbi-taxonomy-dump STRING',
|
73
|
+
'Path to an NCBI Taxonomy dump directory to query instead of API calls'
|
74
|
+
) { |v| cli[:ncbi_taxonomy_dump] = v }
|
71
75
|
end
|
72
76
|
|
73
77
|
def generic_perform
|
@@ -82,6 +86,7 @@ module MiGA::Cli::Action::Download::Base
|
|
82
86
|
def load_tasks
|
83
87
|
sanitize_cli
|
84
88
|
p = cli.load_project
|
89
|
+
load_ncbi_taxonomy_dump
|
85
90
|
ds = remote_list
|
86
91
|
ds = discard_excluded(ds)
|
87
92
|
ds = exclude_newer(ds)
|
@@ -89,6 +94,14 @@ module MiGA::Cli::Action::Download::Base
|
|
89
94
|
[p, ds]
|
90
95
|
end
|
91
96
|
|
97
|
+
def load_ncbi_taxonomy_dump
|
98
|
+
return unless cli[:ncbi_taxonomy_dump]
|
99
|
+
|
100
|
+
cli.say "Reading NCBI Taxonomy dump: #{cli[:ncbi_taxonomy_dump]}"
|
101
|
+
MiGA::RemoteDataset.use_ncbi_taxonomy_dump(cli[:ncbi_taxonomy_dump], cli)
|
102
|
+
end
|
103
|
+
|
104
|
+
|
92
105
|
def finalize_tasks(d, downloaded)
|
93
106
|
cli.say "Datasets listed: #{d.size}"
|
94
107
|
act = cli[:dry] ? 'to download' : 'downloaded'
|
@@ -26,10 +26,6 @@ module MiGA::Cli::Action::Download::Ncbi
|
|
26
26
|
opt.on('--ncbi-list-json STRING', '::HIDE::') do |v|
|
27
27
|
cli[:ncbi_list_json] = v
|
28
28
|
end
|
29
|
-
opt.on(
|
30
|
-
'--ncbi-taxonomy-dump STRING',
|
31
|
-
'Path to an NCBI Taxonomy dump directory to query instead of API calls'
|
32
|
-
) { |v| cli[:ncbi_taxonomy_dump] = v }
|
33
29
|
end
|
34
30
|
|
35
31
|
def cli_name_modifiers(opt)
|
@@ -55,11 +51,6 @@ module MiGA::Cli::Action::Download::Ncbi
|
|
55
51
|
end
|
56
52
|
|
57
53
|
def remote_list
|
58
|
-
if cli[:ncbi_taxonomy_dump]
|
59
|
-
cli.say "Reading NCBI Taxonomy dump: #{cli[:ncbi_taxonomy_dump]}"
|
60
|
-
MiGA::RemoteDataset.use_ncbi_taxonomy_dump(cli[:ncbi_taxonomy_dump], cli)
|
61
|
-
end
|
62
|
-
|
63
54
|
if cli[:ncbi_list_json] && File.size?(cli[:ncbi_list_json])
|
64
55
|
return read_ncbi_list_json(cli[:ncbi_list_json])
|
65
56
|
end
|
data/lib/miga/dataset.rb
CHANGED
@@ -21,7 +21,7 @@ module MiGA::RemoteDataset::Base
|
|
21
21
|
@@_NCBI_DATASETS = 'https://api.ncbi.nlm.nih.gov/datasets/v2alpha/'
|
22
22
|
@@_EUTILS = 'https://eutils.ncbi.nlm.nih.gov/entrez/eutils/'
|
23
23
|
@@_EBI_API = 'https://www.ebi.ac.uk/Tools/'
|
24
|
-
@@_GTDB_API = 'https://api.
|
24
|
+
@@_GTDB_API = 'https://gtdb-api.ecogenomic.org/'
|
25
25
|
@@_SEQCODE_API = 'https://disc-genomics.uibk.ac.at/seqcode/'
|
26
26
|
@@_EUTILS_BUILD = lambda { |service, q|
|
27
27
|
q[:api_key] = ENV['NCBI_API_KEY'] if ENV['NCBI_API_KEY']
|
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.3,
|
15
|
+
VERSION = [1.3, 12, 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(2024,
|
23
|
+
VERSION_DATE = Date.new(2024, 3, 8)
|
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.3.
|
4
|
+
version: 1.3.12.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: 2024-
|
11
|
+
date: 2024-03-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: daemons
|