miga-base 1.2.13.1 → 1.2.13.3

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: 036b7181da39c88a4bf825230359f4efd9852b8aea488943028df6fde68184bf
4
- data.tar.gz: 4584f52f0ea297120e23bec511850d2b2eeff7c3b76e1d013978f9a50ea5ea25
3
+ metadata.gz: d01c6cdd3ff689e80079b0bd59a63cc968b1b7e768518ce013d3c4d055032427
4
+ data.tar.gz: 1701cbb3a0c75dfe96ce6c1543f3aac6b35ba0dd87fb0f3f7ccc5e2780eaf7a3
5
5
  SHA512:
6
- metadata.gz: a4b447b41e5647fba734c6b57a355f4889249f3265b085fb8e2277313731b830b0c1f7ea109e0895ba800405e054e5c945890dee924f645a52d6393d4455ab26
7
- data.tar.gz: 9bc1e223e57db9ce9675994fa4e1a7bb4b1aa5509a296295ad8743a4b02e9ece7efdfaec27287bf397f2cd941ac57a3e87e9ac5597516f292ebda8d5dcd726e8
6
+ metadata.gz: deec1e53d9dae1c995e59406a53b653f503e901821884b1b400da17c5330bbef5d344613fc7896961739cc66253604ad73947d20f178bf92f00f01881f16d0a6
7
+ data.tar.gz: d991c538708a72b3c9e65eb56a6e121fea4ab25f26838dbd706f27e16cb8d757346eabc9799a3f5b620df3f8e0c5456b65884e3d887f80d1f65f34b762bbfd59
@@ -164,18 +164,24 @@ module MiGA::Result::Stats
164
164
  lsu: 0, complete_lsu: 0, lsu_fragment: [0.0, '%']
165
165
  }
166
166
 
167
+ subunits = {
168
+ '16S_rRNA' => :ssu, '23S_rRNA' => :lsu,
169
+ '18S_rRNA' => :ssu, '28S_rRNA' => :lsu
170
+ }
167
171
  Zlib::GzipReader.open(file_path(:gff)) do |fh|
168
172
  fh.each_line do |ln|
169
173
  next if ln =~ /^#/
170
174
 
171
175
  rl = ln.chomp.split("\t")
172
176
  feat = Hash[rl[8].split(';').map { |i| i.split('=', 2) }]
173
- subunit = feat['Name'] == '16S_rRNA' ? :ssu : :lsu
177
+ subunit = subunits[feat['Name']] or next # Ignore 5S
178
+
174
179
  if subunit == :ssu
175
180
  len = (rl[4].to_i - rl[3].to_i).abs + 1
176
181
  stats[:max_length] = [stats[:max_length] || 0, len].max
177
182
  end
178
- stats[:ssu] += 1
183
+
184
+ stats[subunit] += 1
179
185
  if feat['product'] =~ /\(partial\)/
180
186
  if feat['note'] =~ /aligned only (\d+) percent/
181
187
  fragment = $1.to_f
@@ -185,7 +191,7 @@ module MiGA::Result::Stats
185
191
  end
186
192
  else
187
193
  stats[:"complete_#{subunit}"] += 1
188
- stats[:"#{subunit}_fragment"] = [100.0, '%']
194
+ stats[:"#{subunit}_fragment"][0] = 100.0
189
195
  end
190
196
  end
191
197
  end
@@ -199,7 +205,7 @@ module MiGA::Result::Stats
199
205
  stats[:trna_count] += 1
200
206
  row = ln.chomp.split("\t")
201
207
  next if row[9] == 'pseudo' || row[4] == 'Undet'
202
- aa[row[4].gsub(/^f?([A-Za-z]+)[0-9]?/, '\1')] = true
208
+ aa[row[4].gsub(/^[a-z]?([A-Za-z]+)[0-9]?/, '\1')] = true
203
209
  end
204
210
  stats[:trna_aa] = aa.size
205
211
  end if file_path(:trna_list)
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, 13, 1].freeze
15
+ VERSION = [1.2, 13, 3].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(2022, 12, 31)
23
+ VERSION_DATE = Date.new(2023, 1, 3)
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.13.1
4
+ version: 1.2.13.3
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: 2022-12-31 00:00:00.000000000 Z
11
+ date: 2023-01-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: daemons