miga-base 1.4.2.4 → 1.4.2.5

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: 5e0cb44349d861128c762b5285e8013f3086283c9a86e9e34197d3b37a6ed3e6
4
- data.tar.gz: 9f890c7b7288067ce20f61e0ec83edf50c79407abbfcf7dd470d852f73f7aa44
3
+ metadata.gz: 725b5f62ffeba49a813504c3cfaf5a222ba5259f82eb2cb0430150483e83cc83
4
+ data.tar.gz: 5c3d9e21668edeb12d022a193a045ec43749c2704484976fa08bcb248cdf8fed
5
5
  SHA512:
6
- metadata.gz: c0b2768551937f51919e74e7df35790d957418facc0498db6752662d8192d6c5c6fdd59b9ab5eec91e4d345675ed47e5154077a03722d84a79ea32d5501f1afb
7
- data.tar.gz: 5e4cb5dc6ad5c82cde159e3ff854111659d8b7c0d5b665a86a54757dc43cd95284dd97f870d921f37bd3711391669ae990282c9bbee8f8df832718afdd5292d6
6
+ metadata.gz: c9746ea4048074e5478c087f81293bd0ee64da5a9e4c51b86d4a62d1c76f0de43a92a8a539349df8b8e0adb5fe8ad58f6594d523ce7858bcc861f265dc62c7d6
7
+ data.tar.gz: 276f2aabeb61253b8d2a6d219517c9334f9ac63317b0daa4482af474ed9106adc667458214619f1245cdc9c1b88627dd6440b5369c1752bfbc5e63cba6e474b8
data/Gemfile CHANGED
@@ -7,3 +7,5 @@ group :test do
7
7
  end
8
8
 
9
9
  gem 'rake', '~> 13.0'
10
+
11
+ gem "csv", "~> 3.3"
@@ -24,10 +24,11 @@ module MiGA::Common::Format
24
24
 
25
25
  ##
26
26
  # Cleans a FastA file in place, removing all sequences shorter than
27
- # +min_len+
27
+ # +min_len+ and renaming duplicate sequence identifiers
28
28
  def clean_fasta_file(file, min_len = 1)
29
29
  tmp_fh = nil
30
30
  tmp_path = nil
31
+ names = Set.new
31
32
  begin
32
33
  if file =~ /\.gz/
33
34
  tmp_path = Tempfile.new('MiGA.gz').tap(&:close).path
@@ -45,11 +46,14 @@ module MiGA::Common::Format
45
46
  ln.chomp!
46
47
  if ln =~ /^>\s*(\S+)(.*)/
47
48
  id, df = $1, $2
49
+ id = id.gsub(/[^A-Za-z0-9_\|\.]/, '_')
50
+ id = id + '_dup' while names.include?(id)
51
+ names << id
48
52
  if next_seq[1].length >= min_len
49
53
  tmp_fh.puts next_seq[0]
50
54
  tmp_fh.print next_seq[1].wrap_width(80)
51
55
  end
52
- next_seq = [">#{id.gsub(/[^A-Za-z0-9_\|\.]/, '_')}#{df}", '']
56
+ next_seq = [">#{id}#{df}", '']
53
57
  else
54
58
  next_seq[1] += ln.gsub(/[^A-Za-z]/, '')
55
59
  end
@@ -118,7 +118,7 @@ module MiGA::Common::Net
118
118
  def http_request(method, url, *opts)
119
119
  doc = nil
120
120
  remote_connection(url).start do |http|
121
- res = http.send(method, remote_connection_uri.to_s, *opts)
121
+ res = http.send(method, remote_connection_uri, *opts)
122
122
  if %w[301 302].include?(res.code)
123
123
  DEBUG "REDIRECTION #{res.code}: #{res['location']}"
124
124
  return http_request(method, res['location'], *opts)
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, 2, 4].freeze
15
+ VERSION = [1.4, 2, 5].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, 4, 28)
23
+ VERSION_DATE = Date.new(2026, 5, 20)
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.2.4
4
+ version: 1.4.2.5
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-04-28 00:00:00.000000000 Z
11
+ date: 2026-05-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: daemons