miga-base 1.3.7.1 → 1.3.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/miga/result/stats.rb +1 -1
- data/lib/miga/version.rb +2 -2
- data/scripts/aai_distances.bash +10 -2
- data/scripts/ani_distances.bash +25 -9
- 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: b57ca3778ff3605473ebae2ebf69aabdb231302a59605094721c6af9cbc7a798
|
4
|
+
data.tar.gz: fbe455bc223b23e5b906874fede98aa85ad443e83d3c0e87839f3bb9bf46ba29
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 682cc9964783ebc692be1d8358708d800caa08713b818a9aae7a6ed4d25d0874ddc553ba7e17ce2712092c9e2874353c00b90c3d8f49a3d339a33f42a7cfed6e
|
7
|
+
data.tar.gz: 63e23a79b5af66e4f5816d6ece02b1f349f0477bcf46a2646328028654ffb9792a33c2ddb0e9237571112232c6e735e3a4df8433608495b43be7b6da038651c6
|
data/lib/miga/result/stats.rb
CHANGED
@@ -208,7 +208,7 @@ module MiGA::Result::Stats
|
|
208
208
|
next if (no += 1) < 4
|
209
209
|
stats[:trna_count] += 1
|
210
210
|
row = ln.chomp.split("\t")
|
211
|
-
next if row[9] == 'pseudo' || row[4]
|
211
|
+
next if row[9] == 'pseudo' || %w[Undet Sup].include?(row[4])
|
212
212
|
aa[row[4].gsub(/^[a-z]?([A-Za-z]+)[0-9]?/, '\1')] = true
|
213
213
|
end
|
214
214
|
stats[:trna_aa] = aa.size
|
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, 7,
|
15
|
+
VERSION = [1.3, 7, 2].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(2023, 6,
|
23
|
+
VERSION_DATE = Date.new(2023, 6, 15)
|
24
24
|
|
25
25
|
##
|
26
26
|
# References of MiGA
|
data/scripts/aai_distances.bash
CHANGED
@@ -34,12 +34,20 @@ function aai_tsv {
|
|
34
34
|
}
|
35
35
|
|
36
36
|
rm -f "miga-project.txt"
|
37
|
-
aai_tsv |
|
37
|
+
aai_tsv | tee >(wc -l | awk '{print $1-1}' > "miga-project.txt.lno") \
|
38
|
+
| gzip -9c > "miga-project.txt.gz"
|
39
|
+
LNO=$(cat "miga-project.txt.lno")
|
40
|
+
rm "miga-project.txt.lno"
|
38
41
|
|
39
42
|
# R-ify
|
40
43
|
cat <<R | R --vanilla
|
41
44
|
file <- gzfile("miga-project.txt.gz")
|
42
|
-
aai <- read.table(
|
45
|
+
aai <- read.table(
|
46
|
+
file, sep = "\t", header = TRUE, as.is = TRUE, quote = "",
|
47
|
+
stringsAsFactors = FALSE, comment.char = "", nrows = $LNO,
|
48
|
+
colClasses = c("character", "character",
|
49
|
+
"numeric", "numeric", "integer", "integer")
|
50
|
+
)
|
43
51
|
saveRDS(aai, file = "miga-project.rds")
|
44
52
|
if(sum(aai[, "a"] != aai[, "b"]) > 0) {
|
45
53
|
h <- hist(aai[aai[, "a"] != aai[, "b"], "value"], breaks = 100, plot = FALSE)
|
data/scripts/ani_distances.bash
CHANGED
@@ -10,20 +10,36 @@ DIR="$PROJECT/data/09.distances/03.ani"
|
|
10
10
|
miga_start_project_step "$DIR"
|
11
11
|
|
12
12
|
# Extract values
|
13
|
-
|
14
|
-
SQL="SELECT seq1, seq2, ani, sd, n, omega from ani;"
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
echo "$SQL" | sqlite3 "$DIR/$i.db" | tr "\\|" "\\t"
|
13
|
+
function foreach_database_ani {
|
14
|
+
local SQL="SELECT seq1, seq2, ani, sd, n, omega from ani;"
|
15
|
+
local k=0
|
16
|
+
while [[ -n ${DS[$k]} ]] ; do
|
17
|
+
echo "$SQL" | sqlite3 "$DIR/${DS[$k]}.db" | tr "\\|" "\\t"
|
18
|
+
let k=$k+1
|
20
19
|
done
|
21
|
-
|
20
|
+
}
|
21
|
+
|
22
|
+
function ani_tsv {
|
23
|
+
DS=($(miga ls -P "$PROJECT" --ref --no-multi --active))
|
24
|
+
echo "a b value sd n omega" | tr " " "\\t"
|
25
|
+
foreach_database_ani
|
26
|
+
}
|
27
|
+
|
28
|
+
rm -f "miga-project.txt"
|
29
|
+
ani_tsv | tee >(wc -l | awk '{print $1-1}' > "miga-project.txt.lno") \
|
30
|
+
| gzip -9c > "miga-project.txt.gz"
|
31
|
+
LNO=$(cat "miga-project.txt.lno")
|
32
|
+
rm "miga-project.txt.lno"
|
22
33
|
|
23
34
|
# R-ify
|
24
35
|
cat <<R | R --vanilla
|
25
36
|
file <- gzfile("miga-project.txt.gz")
|
26
|
-
ani <- read.table(
|
37
|
+
ani <- read.table(
|
38
|
+
file, sep = "\t", header = TRUE, as.is = TRUE, quote = "",
|
39
|
+
stringsAsFactors = FALSE, comment.char = "", nrows = $LNO,
|
40
|
+
colClasses = c("character", "character",
|
41
|
+
"numeric", "numeric", "integer", "integer")
|
42
|
+
)
|
27
43
|
saveRDS(ani, file = "miga-project.rds")
|
28
44
|
if(sum(ani[, "a"] != ani[, "b"]) > 0) {
|
29
45
|
h <- hist(ani[ani[, "a"] != ani[, "b"], "value"], breaks = 100, plot = FALSE)
|
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.7.
|
4
|
+
version: 1.3.7.2
|
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: 2023-06-
|
11
|
+
date: 2023-06-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: daemons
|