miga-base 1.3.4.0 → 1.3.4.2

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: 59178742e814265d104b1921808f01a55d4bd2a5021b644209875fcd54afb1e7
4
- data.tar.gz: 2bbf5a39c825a76578f7f5b9572fcd96ba8616f54204d6006a8dc8a43a1ed574
3
+ metadata.gz: 786b98a997a9145ad36a42404b756a65ca5f8abe628adf10e27960c58b7d5641
4
+ data.tar.gz: 95bc1da96a509cbe3c9334b78daf4ebaec9238693ef37fd5f417063943c9cf36
5
5
  SHA512:
6
- metadata.gz: 064ce8a7c49c0df03360cbbdd080074f87d197264994d36d0a18767ce8061e09c1cb65975bfceffe8f8ae96112ec245561af49a60da04d91867ea93f8408039f
7
- data.tar.gz: 2302337cb23527049bda0d411f85d258b1ba4958ac17f5b26e0da2e46057254085b46a01eded94a053857674af4ad23b807f022a440a29ad5d53259b5aeb1ace
6
+ metadata.gz: 909a0cf12a2048024d4c8f5ed2210661d96b78b4c6a6efdae650ca49d6f34f8439c812fb14b30df664c8758beb4c532bc4b1c7a6a09e108f7c48418a03d09902
7
+ data.tar.gz: 2af006dc05851eb66eb7e3f0fec127b10bec73945b5761a3145d9973935a65c93b7b010bb977b4b492f527201f31b68c5caa4c68d8815c2d474f96420c642d31
@@ -26,7 +26,8 @@ class MiGA::Cli::Action::Doctor < MiGA::Cli::Action
26
26
  '--only TASK',
27
27
  'Perform only the specified task (see --ignore)'
28
28
  ) do |v|
29
- op_k = @@OPERATIONS.find { |_, i| i[0] == v.downcase }.first
29
+ op_k = @@OPERATIONS.find { |_, i| i[0] == v.downcase }&.first
30
+ op_k or raise "Unknown task: #{v}"
30
31
  @@OPERATIONS.each_key { |i| cli[i] = false }
31
32
  cli[op_k] = true
32
33
  end
@@ -178,9 +178,9 @@ class MiGA::RemoteDataset < MiGA::MiGA
178
178
  doc.scan(%r{<Taxon>(.*?)</Taxon>}m).map(&:first).each do |i|
179
179
  name = i.scan(%r{<ScientificName>(.*)</ScientificName>}).first.to_a.first
180
180
  rank = i.scan(%r{<Rank>(.*)</Rank>}).first.to_a.first
181
- rank = nil if rank == 'no rank' or rank.empty?
182
- rank = 'dataset' if lineage.empty? and rank.nil?
183
- lineage[rank] = name unless rank.nil? or rank.nil?
181
+ rank = nil if rank.nil? || rank == 'no rank' || rank.empty?
182
+ rank = 'dataset' if lineage.size == 1 && rank.nil?
183
+ lineage[rank] = name unless rank.nil? || name.nil?
184
184
  end
185
185
  MiGA.DEBUG "Got lineage: #{lineage}"
186
186
  MiGA::Taxonomy.new(lineage)
@@ -231,9 +231,10 @@ module MiGA::Result::Stats
231
231
 
232
232
  # Fix estimates based on essential genes based on taxonomy
233
233
  def fix_essential_genes_by_domain
234
+ return if file_path(:raw_report)
235
+
234
236
  tax = source.metadata[:tax]
235
- return if (!tax.nil? && !%w[Archaea Bacteria].include?(tax[:d])) ||
236
- file_path(:raw_report)
237
+ return unless tax.nil? || %w[Archaea Bacteria].include?(tax[:d])
237
238
 
238
239
  domain = tax.nil? ? 'AB' : tax[:d][0]
239
240
  MiGA::MiGA.DEBUG "Fixing essential genes by domain"
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, 4, 0].freeze
15
+ VERSION = [1.3, 4, 2].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, 3, 30)
23
+ VERSION_DATE = Date.new(2023, 4, 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.3.4.0
4
+ version: 1.3.4.2
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-03-30 00:00:00.000000000 Z
11
+ date: 2023-04-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: daemons