miga-base 1.3.14.4 → 1.3.14.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/miga/version.rb +2 -2
- data/scripts/aai_distances.bash +12 -5
- data/scripts/ani_distances.bash +12 -5
- data/test/remote_dataset_test.rb +1 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b637dd7bbd8ebd512621bf3781286c3f8f94f0ce916ade1d9913a08e93d31019
|
4
|
+
data.tar.gz: bca1c28c21031b4ceafba9192b2345124bed56278855829f255d2b0f9df0e933
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '028b1b2c993a2b21528fb1d29a3b29d7a9f6333f6a8408e47773d84813341217d733cbdb4686a95264189df186ad884182b44ee2c2da86d3ccf696c02241971d'
|
7
|
+
data.tar.gz: 3e78e598542be5bfba5845e0ff8e4744d6413c5d0714be6bfef5e1202e02c9910fe569f1692b325dbaaef5697355cc9ee1eff90d0503730993ddf5bcf468a8e7
|
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,
|
15
|
+
VERSION = [1.3, 14, 7].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,
|
23
|
+
VERSION_DATE = Date.new(2024, 4, 24)
|
24
24
|
|
25
25
|
##
|
26
26
|
# References of MiGA
|
data/scripts/aai_distances.bash
CHANGED
@@ -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
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
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
|
data/scripts/ani_distances.bash
CHANGED
@@ -34,11 +34,18 @@ rm "miga-project.txt.lno"
|
|
34
34
|
# R-ify
|
35
35
|
cat <<R | R --vanilla
|
36
36
|
file <- gzfile("miga-project.txt.gz")
|
37
|
-
text <- readLines(file, n = $LNO + 1, ok = FALSE)
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
37
|
+
text <- readLines(file, n = $LNO + 1, ok = FALSE)[-1]
|
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
|
data/test/remote_dataset_test.rb
CHANGED
@@ -22,10 +22,7 @@ class RemoteDatasetTest < Test::Unit::TestCase
|
|
22
22
|
|
23
23
|
def test_get
|
24
24
|
hiv2 = 'M30502.1'
|
25
|
-
|
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
|
+
version: 1.3.14.7
|
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-
|
11
|
+
date: 2024-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: daemons
|