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 +4 -4
- data/lib/miga/version.rb +2 -2
- data/scripts/aai_distances.bash +12 -5
- data/scripts/ani_distances.bash +11 -4
- 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: 30206d73638543095eec37de708d5994d9dcae5e94cdaf8797d116a74e4c5241
|
4
|
+
data.tar.gz: d88074873e1f52f713bbe39cf8e47f11e946f0d79bd36de0bb12344f4911a617
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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,
|
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,
|
23
|
+
VERSION_DATE = Date.new(2024, 4, 15)
|
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
@@ -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
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
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.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-
|
11
|
+
date: 2024-04-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: daemons
|