miga-base 1.3.20.2 → 1.3.20.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/miga/cli/action/doctor/distances.rb +18 -1
- data/lib/miga/version.rb +2 -2
- data/scripts/cds.bash +8 -2
- 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: c11dfa7c37bbfd12ff0b9d71c3760489a685f048e1692c9c608b38726d91af36
|
4
|
+
data.tar.gz: 7d6db500aa13fd518a0b702b205d592c9af218ecb9c26d6c78cb25ef41d88e9a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 808778c7f3e3264ccbd5b45251cebd81a12e7dd91328e0bfed8e1d3aa27376e6d610f3f0ae6f3e80b11549d85ec2499fdb9d69a1e4776435ad3b1fafb3985d0d
|
7
|
+
data.tar.gz: e68bb859e5dd6f6568b712e23cdd125486dd911ed0ce63b2046cdad921f1f1fe39e23f3b4980f3b9c1352404ca68d6989b8fa8a7613bdf01f21b8224a9d969a0
|
@@ -77,8 +77,15 @@ module MiGA::Cli::Action::Doctor::Distances
|
|
77
77
|
def partial_bidir_tmp(project, ref_ds)
|
78
78
|
n = ref_ds.size
|
79
79
|
|
80
|
-
#
|
80
|
+
# Check first if a previous run is complete (and recover it)
|
81
81
|
tmp = File.join(project.path, 'doctor-bidirectional.tmp')
|
82
|
+
tmp_done = File.join(tmp, 'done.txt')
|
83
|
+
if File.size?(tmp_done) &&
|
84
|
+
File.readlines(tmp_done)[0].chomp.to_i == cli[:threads]
|
85
|
+
return tmp
|
86
|
+
end
|
87
|
+
|
88
|
+
# Read data first (threaded)
|
82
89
|
FileUtils.mkdir_p(tmp)
|
83
90
|
MiGA::Parallel.process(cli[:threads]) do |thr|
|
84
91
|
file = File.join(tmp, "#{thr}.json")
|
@@ -102,6 +109,8 @@ module MiGA::Cli::Action::Doctor::Distances
|
|
102
109
|
end
|
103
110
|
end
|
104
111
|
|
112
|
+
# Save information to indicate that the run is complete and return
|
113
|
+
File.open(tmp_done, 'w') { |fh| fh.puts cli[:threads] }
|
105
114
|
return tmp
|
106
115
|
end
|
107
116
|
|
@@ -113,7 +122,14 @@ module MiGA::Cli::Action::Doctor::Distances
|
|
113
122
|
dist = { aai: {}, ani: {} }
|
114
123
|
cli[:threads].times do |i|
|
115
124
|
cli.advance('Merging:', i + 1, cli[:threads], false)
|
125
|
+
|
126
|
+
next if File.size?(File.join(tmp, "#{i+1}.json.marshal"))
|
116
127
|
file = File.join(tmp, "#{i}.json")
|
128
|
+
if File.size?("#{file}.marshal")
|
129
|
+
dist = Marshal.load(File.read("#{file}.marshal"))
|
130
|
+
next
|
131
|
+
end
|
132
|
+
|
117
133
|
File.open(file, 'r') do |fh|
|
118
134
|
metric = nil
|
119
135
|
fh.each do |ln|
|
@@ -135,6 +151,7 @@ module MiGA::Cli::Action::Doctor::Distances
|
|
135
151
|
end
|
136
152
|
raise "Incomplete thread dump: #{file}" unless metric == :end
|
137
153
|
end
|
154
|
+
File.open("#{file}.marshal", 'w') { |fh| Marshal.dump(dist, fh) }
|
138
155
|
end
|
139
156
|
cli.say
|
140
157
|
|
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, 20,
|
15
|
+
VERSION = [1.3, 20, 4].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,
|
23
|
+
VERSION_DATE = Date.new(2024, 9, 1)
|
24
24
|
|
25
25
|
##
|
26
26
|
# References of MiGA
|
data/scripts/cds.bash
CHANGED
@@ -16,6 +16,14 @@ if [[ -e "../05.assembly/$DATASET.LargeContigs.fna.gz" \
|
|
16
16
|
miga add_result -P "$PROJECT" -D "$DATASET" -r assembly -f
|
17
17
|
fi
|
18
18
|
|
19
|
+
# Check if the input assembly is empty
|
20
|
+
ASM_LEN=$(grep -v '^>' "../05.assembly/${DATASET}.LargeContigs.fna" \
|
21
|
+
| wc -lc | awk '{ print $2-$1 }')
|
22
|
+
if [[ "$ASM_LEN" -lt 1 ]] ; then
|
23
|
+
miga edit -P "$PROJECT" -D "$DATASET" --inactivate "Empty assembly"
|
24
|
+
exit 0
|
25
|
+
fi
|
26
|
+
|
19
27
|
# Run Prodigal
|
20
28
|
TYPE=$(miga ls -P "$PROJECT" -D "$DATASET" -m type | cut -f 2)
|
21
29
|
case "$TYPE" in
|
@@ -27,8 +35,6 @@ case "$TYPE" in
|
|
27
35
|
P_LEN=0
|
28
36
|
BEST_CT=0
|
29
37
|
PROCEDURE=single
|
30
|
-
ASM_LEN=$(grep -v '^>' "../05.assembly/${DATASET}.LargeContigs.fna" \
|
31
|
-
| wc -lc | awk '{ print $2-$1 }')
|
32
38
|
[[ "$ASM_LEN" -lt 2000 ]] && PROCEDURE=meta
|
33
39
|
echo "# Codon table selection:" > "${DATASET}.ct.t"
|
34
40
|
for ct in 11 4 ; do
|
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.20.
|
4
|
+
version: 1.3.20.4
|
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-
|
11
|
+
date: 2024-09-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: daemons
|