miga-base 1.3.14.4 → 1.3.14.6

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: 12530028c3e6587950ac7fa614a6ac24b50e51901235b1b881fcb71d67506cb1
4
- data.tar.gz: 6740c893798b3e79fb1bee27da95111141da996c90799594e007101c4873394b
3
+ metadata.gz: 30206d73638543095eec37de708d5994d9dcae5e94cdaf8797d116a74e4c5241
4
+ data.tar.gz: d88074873e1f52f713bbe39cf8e47f11e946f0d79bd36de0bb12344f4911a617
5
5
  SHA512:
6
- metadata.gz: d5736f50f13d26622c0cd247899d4e0bf2f9bf3bd506f89f8c605e728231867158ac8a031464eca4853bc2f6ed9700f0e64f57f2eeb4dd6f66ffcd056294ea21
7
- data.tar.gz: b4c0a2af4ee7149e5beb950174a0c1918af7b85d1f80cfd49237095d170c159335c24adf49fe6601c37b3a15d7d3e2264e997005796ff89c8ca0b214f2c94a94
6
+ metadata.gz: e77eba87e956eebd9168c50ba12bb6cb66b6d888887fcac7cb909ce4e9560db0804cca3307d92834da83bfee30974b9df4c58402b8c829a859d9854efc887f5b
7
+ data.tar.gz: 5cfa6a9e28a745376a44c9abe91478170f51785f813068fbbffd0d29ea48679994d98f56001c0bbc213a5c43f5f8efbb21a6b027c953aed4a94446bc73bc6e73
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, 14, 4].freeze
15
+ VERSION = [1.3, 14, 6].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(2024, 4, 13)
23
+ VERSION_DATE = Date.new(2024, 4, 15)
24
24
 
25
25
  ##
26
26
  # References of MiGA
@@ -40,11 +40,18 @@ rm "miga-project.txt.lno"
40
40
  # R-ify
41
41
  cat <<R | R --vanilla
42
42
  file <- gzfile("miga-project.txt.gz")
43
- text <- readLines(file, n = $LNO + 1, ok = FALSE)
44
- list <- strsplit(text[-1], "\t", fixed = TRUE)
45
- a <- sapply(list, function(x) x[1])
46
- b <- sapply(list, function(x) x[2])
47
- d <- sapply(list, function(x) 1 - (as.numeric(x[3]) / 100))
43
+ text <- readLines(file, n = $LNO + 1, ok = FALSE)[-1]
44
+ a <- vector("character", $LNO)
45
+ b <- vector("character", $LNO)
46
+ d <- vector("numeric", $LNO)
47
+ chunk.n <- 1024 * 1024
48
+ for (chunk in seq_len(ceiling(length(text) / chunk.n))) {
49
+ sel <- (chunk * chunk.n - chunk.n + 1):min(chunk * chunk.n, length(text))
50
+ list <- strsplit(text[sel], "\t", fixed = TRUE)
51
+ a[sel] <- sapply(list, function(x) x[1])
52
+ b[sel] <- sapply(list, function(x) x[2])
53
+ d[sel] <- sapply(list, function(x) 1 - (as.numeric(x[3]) / 100))
54
+ }
48
55
  save(a, b, d, file = "miga-project.rda")
49
56
 
50
57
  non_self <- a != b
@@ -35,10 +35,17 @@ rm "miga-project.txt.lno"
35
35
  cat <<R | R --vanilla
36
36
  file <- gzfile("miga-project.txt.gz")
37
37
  text <- readLines(file, n = $LNO + 1, ok = FALSE)
38
- list <- strsplit(text[-1], "\t", fixed = TRUE)
39
- a <- sapply(list, function(x) x[1])
40
- b <- sapply(list, function(x) x[2])
41
- d <- sapply(list, function(x) 1 - (as.numeric(x[3]) / 100))
38
+ a <- vector("character", $LNO)
39
+ b <- vector("character", $LNO)
40
+ d <- vector("numeric", $LNO)
41
+ chunk.n <- 1024 * 1024
42
+ for (chunk in seq_len(ceiling(length(text) / chunk.n))) {
43
+ sel <- (chunk * chunk.n - chunk.n + 1):min(chunk * chunk.n, length(text))
44
+ list <- strsplit(text[sel], "\t", fixed = TRUE)
45
+ a[sel] <- sapply(list, function(x) x[1])
46
+ b[sel] <- sapply(list, function(x) x[2])
47
+ d[sel] <- sapply(list, function(x) 1 - (as.numeric(x[3]) / 100))
48
+ }
42
49
  save(a, b, d, file = "miga-project.rda")
43
50
 
44
51
  non_self <- a != b
@@ -22,10 +22,7 @@ class RemoteDatasetTest < Test::Unit::TestCase
22
22
 
23
23
  def test_get
24
24
  hiv2 = 'M30502.1'
25
- # TODO
26
- # EMBL Temporarily down, enable back whenever possible!
27
- #{ embl: :ebi, nuccore: :ncbi }.each do |db, universe|
28
- { nuccore: :ncbi }.each do |db, universe|
25
+ { embl: :ebi, nuccore: :ncbi }.each do |db, universe|
29
26
  rd = MiGA::RemoteDataset.new(hiv2, db, universe)
30
27
  assert_equal([hiv2], rd.ids)
31
28
 
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.14.4
4
+ version: 1.3.14.6
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: 2024-04-13 00:00:00.000000000 Z
11
+ date: 2024-04-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: daemons