miga-base 1.3.6.1 → 1.3.7.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 51d2b93599ee94cbf863b737016a37c32d63bc80c8ef80a8b5dbb52257e6f8b5
4
- data.tar.gz: 7dced09173180bd58d8ba0feef1a90ecf00d3fc55154ebae4c34d861b0e1e566
3
+ metadata.gz: b5e0216cf49c600ae5776ea4e45bfcc2441ffed928908b20bbfc32541b08351a
4
+ data.tar.gz: a826116aa5208524e029bd2c6324a89d1805653dd20659a9738e627439192ad1
5
5
  SHA512:
6
- metadata.gz: 0bbaf2de062ecbb74a9d9636e2fb1478e56edfc5c23f6c3733a183114af86f5efc6cc678d71b1437e5825edeeb57efe932a00172610edac07172555ff5ef568d
7
- data.tar.gz: 610f728fd400987765779a6df88869af8611ea928cbc2853fac673a897cb3fbd09ec3eac2e1dc0d827257ce046cd67ab674a41892536520dd38bb93d9ebb66b7
6
+ metadata.gz: 8da516f7f72b162e643202d1e84e57646f36afe895f7e57695bb281a937e6a80ee8cdbd333fe83e24f2708d2306e10d9d216adc86c510e07bf2dcdf3a02372d6
7
+ data.tar.gz: 3cbc31c7152861e678858420e213c35f4283c668586d0770a1d933e6d788589f006de645b9de292bbc991511c72a375bc97881981aa40c412271063b9434c83b
@@ -172,11 +172,10 @@ class MiGA::Cli::Action::Db < MiGA::Cli::Action
172
172
  end
173
173
 
174
174
  def version_requested(db)
175
- if cli[:version] == :latest
176
- cli[:version] = db[:latest].to_sym
177
- end
175
+ cli[:version] = db[:latest].to_sym if cli[:version] == :latest
178
176
  ver = db[:versions][cli[:version]]
179
177
  raise 'Cannot find database version' if ver.nil?
178
+ ver[:version] = cli[:version]
180
179
 
181
180
  cli.puts "# Database size: #{version_size(ver)}"
182
181
  ver
@@ -252,12 +251,13 @@ class MiGA::Cli::Action::Db < MiGA::Cli::Action
252
251
 
253
252
  def register_database(manif, db, ver)
254
253
  cli.say "Registering database locally"
255
- reg = local_manifest.merge(last_update: Time.now.to_s)
254
+ reg = (local_manifest || {}).merge(last_update: Time.now.to_s)
256
255
  reg[:databases] ||= {}
257
256
  reg[:databases][cli[:database]] ||= {}
258
257
  reg[:databases][cli[:database]][:manif_last_update] = manif[:last_update]
259
258
  reg[:databases][cli[:database]][:manif_host] = manif[:host]
260
259
  reg[:databases][cli[:database]].merge! db
260
+ reg[:databases][cli[:database]].delete(:versions)
261
261
  reg[:databases][cli[:database]][:local_version] = ver
262
262
  MiGA::Json.generate(reg, local_manifest_file)
263
263
  end
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, 6, 1].freeze
15
+ VERSION = [1.3, 7, 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, 5, 1)
23
+ VERSION_DATE = Date.new(2023, 6, 4)
24
24
 
25
25
  ##
26
26
  # References of MiGA
@@ -224,7 +224,10 @@ module MiGA::DistanceRunner::Commands
224
224
  else
225
225
  out[6] = out[6].to_f
226
226
  end
227
- aai_data[out[1]] = [out[6], 0, 0, 0]
227
+
228
+ # AAI-hat can result in 0.0 values (e.g., "<30%") when low-quality
229
+ # genome comparisons produce unrealistically small estimates.
230
+ aai_data[out[1]] = [out[6], 0, 0, 0] unless out[6].zero?
228
231
  end
229
232
  end
230
233
  $stderr.puts "Results: #{haai_data.size} | Inferences: #{aai_data.size}"
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.6.1
4
+ version: 1.3.7.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-05-01 00:00:00.000000000 Z
11
+ date: 2023-06-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: daemons