miga-base 1.4.3.0 → 1.4.3.1
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/remote_dataset/base.rb +6 -4
- data/lib/miga/remote_dataset/download.rb +22 -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: a71abecf373fd0b61a6148010a4c4f2ae08bb1088fbc5c185c95a2e35e761d74
|
|
4
|
+
data.tar.gz: 021b16610dbf57f81e31e04745bbf04189fe82a836245883c4f68fe80ef99cf6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ebdc34e46e478e58d83842ac93c913e413cfc9ee526429a6b4be026fa73217d5fc44863c896b67d6eb11c70cf527273a659f2d429caf9b873146d40f6a31dce7
|
|
7
|
+
data.tar.gz: 17d801e447570c9390295828f3317649080c4d9d2d1c6f9e1a39f8c3903b5bd8aa2a6f2dbc9e702210d75dc4e72a99b14bce6bd1b56c856bf1b46d0ebe53e220
|
|
@@ -64,8 +64,9 @@ module MiGA::RemoteDataset::Base
|
|
|
64
64
|
},
|
|
65
65
|
gtdb: {
|
|
66
66
|
dbs: {
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
assembly: {
|
|
68
|
+
stage: :assembly, format: :fasta, getter: :ncbi_or_embl_asm
|
|
69
|
+
},
|
|
69
70
|
# The 'taxon' namespace actually returns a list of genomes (+format+)
|
|
70
71
|
taxon: {
|
|
71
72
|
stage: :metadata, format: :genomes, map_to: [:assembly],
|
|
@@ -84,8 +85,9 @@ module MiGA::RemoteDataset::Base
|
|
|
84
85
|
},
|
|
85
86
|
seqcode: {
|
|
86
87
|
dbs: {
|
|
87
|
-
|
|
88
|
-
|
|
88
|
+
assembly: {
|
|
89
|
+
stage: :assembly, format: :fasta, getter: :ncbi_or_embl_asm
|
|
90
|
+
},
|
|
89
91
|
nuccore: { stage: :assembly, format: :fasta, getter: :ncbi_gb },
|
|
90
92
|
# This is the list of type genomes
|
|
91
93
|
:'type-genomes' => { stage: :metadata, format: :json }
|
|
@@ -49,6 +49,28 @@ class MiGA::RemoteDataset
|
|
|
49
49
|
doc
|
|
50
50
|
end
|
|
51
51
|
|
|
52
|
+
##
|
|
53
|
+
# Attempts to download from NCBI Assembly and, if that fails, moves to EMBL
|
|
54
|
+
# instead. This is the default for SeqCode because some assemblies don't
|
|
55
|
+
# synchronize fast enough, and in the case of MAGs some never do. This is
|
|
56
|
+
# also the default for GTDB since it could be affected in the future too,
|
|
57
|
+
# although at present GTDB only sources data from NCBI. Supported +opts+ are
|
|
58
|
+
# the same as for +ncbi_asm_get+
|
|
59
|
+
def ncbi_or_embl_asm_get(opts)
|
|
60
|
+
begin
|
|
61
|
+
ncbi_asm_get(opts)
|
|
62
|
+
rescue
|
|
63
|
+
# The actual error thrown by `ncbi_asm_get` is rather uniformative and
|
|
64
|
+
# could change in the future. Right now, the URL resolves correctly, but
|
|
65
|
+
# the file is corrupted, so the actual error is `Zip::Error`. Hopefully
|
|
66
|
+
# NCBI will implement an actual 404 Error that can be caught here more
|
|
67
|
+
# narrowly, but for now it's safer to catch broadly here.
|
|
68
|
+
|
|
69
|
+
opts_embl = opts.dup.merge(universe: :ebi, db: :embl)
|
|
70
|
+
download_get(opts_embl)
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
|
|
52
74
|
##
|
|
53
75
|
# Download data from NCBI Assembly database using the REST method.
|
|
54
76
|
# Supported +opts+ (Hash) include:
|
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.4, 3,
|
|
15
|
+
VERSION = [1.4, 3, 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(2026,
|
|
23
|
+
VERSION_DATE = Date.new(2026, 8, 7)
|
|
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.4.3.
|
|
4
|
+
version: 1.4.3.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: 2026-07
|
|
11
|
+
date: 2026-08-07 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: daemons
|