miga-base 1.2.15.4 → 1.2.16.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/ncbi.rb +15 -3
- data/lib/miga/cli/action/ncbi_get.rb +6 -0
- 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: '0215026559d070f36a5eacddecaa2a2c4c4717f6506add25b76f1988dfb86483'
|
4
|
+
data.tar.gz: 944b5ba3f76e75a988932963db73ab23795f0a266233f555e5617f875aad1d53
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 70b1fb8640127febebf776f80faf75d59b25ab145152ad5d49d78b9a408e5e653cf874bb9e5c5c0749ae4bb790b46ffe9eff504ac646df5c558b72f4ba155be0
|
7
|
+
data.tar.gz: ca8d6a4f389b721b4240f70b0da6d02ea8f70c52d0e09b5622d168745a1f082a6fc0b5c5a4d92e2b85844d42bb17e682a52cbd788a0664496c2814c958ce6b7a
|
@@ -52,10 +52,22 @@ module MiGA::Cli::Action::Download::Ncbi
|
|
52
52
|
end
|
53
53
|
|
54
54
|
def remote_list
|
55
|
-
|
55
|
+
doc =
|
56
|
+
if cli[:ncbi_table_file]
|
57
|
+
cli.say 'Reading genome list from file'
|
58
|
+
File.open(cli[:ncbi_table_file], 'r')
|
59
|
+
else
|
60
|
+
cli.say 'Downloading genome list'
|
61
|
+
url = remote_list_url
|
62
|
+
MiGA::RemoteDataset.download_url(url)
|
63
|
+
end
|
64
|
+
ds = parse_csv_as_datasets(doc)
|
65
|
+
doc.close if cli[:ncbi_table_file]
|
66
|
+
ds
|
67
|
+
end
|
68
|
+
|
69
|
+
def parse_csv_as_datasets(doc)
|
56
70
|
ds = {}
|
57
|
-
url = remote_list_url
|
58
|
-
doc = MiGA::RemoteDataset.download_url(url)
|
59
71
|
CSV.parse(doc, headers: true).each do |r|
|
60
72
|
asm = r['assembly']
|
61
73
|
next if asm.nil? || asm.empty? || asm == '-'
|
@@ -29,6 +29,12 @@ class MiGA::Cli::Action::NcbiGet < MiGA::Cli::Action
|
|
29
29
|
'--api-key STRING',
|
30
30
|
'::HIDE::' # For backwards compatibility
|
31
31
|
) { |v| ENV['NCBI_API_KEY'] = v }
|
32
|
+
opt.on(
|
33
|
+
'--ncbi-table-file STRING',
|
34
|
+
'::HIDE::' # Only meant for debugging
|
35
|
+
# It can take the table returned by NCBI and parse it from a file
|
36
|
+
# instead of downloading it directly
|
37
|
+
) { |v| cli[:ncbi_table_file] = v }
|
32
38
|
opt.on(
|
33
39
|
'--ncbi-api-key STRING',
|
34
40
|
'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.2,
|
15
|
+
VERSION = [1.2, 16, 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(2023, 2,
|
23
|
+
VERSION_DATE = Date.new(2023, 2, 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.2.
|
4
|
+
version: 1.2.16.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: 2023-02-
|
11
|
+
date: 2023-02-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: daemons
|