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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 674190908d65b39a2a860c3f78c8f3449171ef5ce95005e6b36b008181db5530
4
- data.tar.gz: 3f6c844d8a17d4c74bbe7d3a4df8cbae41d10d0263f42c34a0cd555de9164a70
3
+ metadata.gz: a71abecf373fd0b61a6148010a4c4f2ae08bb1088fbc5c185c95a2e35e761d74
4
+ data.tar.gz: 021b16610dbf57f81e31e04745bbf04189fe82a836245883c4f68fe80ef99cf6
5
5
  SHA512:
6
- metadata.gz: 445197498099f28214ba6a0876dd1dc51df8c568789b4e70678ef0b894f200001cde3e30ed3a6d5c2ea7856c7212e3ba5aa03e18b965294b70a71eec2bff958d
7
- data.tar.gz: d665948deb9123884f9cc3774e51d36ac888eeb5c1fa877bd999ac1be643677c40371a70c075d91f38b043e08a49ec3d13eb3151d026ea1798d021c1e3bd5fa4
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
- # This is a dummy entry plugged directly to +ncbi_asm_get+
68
- assembly: { stage: :assembly, format: :fasta, getter: :ncbi_asm },
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
- # These are dummy entries plugged directly to +ncbi_*_get+
88
- assembly: { stage: :assembly, format: :fasta, getter: :ncbi_asm },
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, 0].freeze
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, 7, 22)
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.0
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-22 00:00:00.000000000 Z
11
+ date: 2026-08-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: daemons