miga-base 0.7.6.0 → 0.7.7.0
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/stats.rb +5 -1
- data/lib/miga/cli/objects_helper.rb +3 -1
- data/lib/miga/remote_dataset/download.rb +1 -0
- data/lib/miga/result/stats.rb +2 -3
- data/lib/miga/version.rb +2 -2
- data/scripts/project_stats.bash +3 -0
- data/scripts/stats.bash +1 -1
- data/test/dataset_test.rb +5 -0
- data/utils/adapters.fa +13 -0
- 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: 3682f50e3efe936ce751cd83cc7945edddb8e1c3ea6e654c4d54f8ea79efbfcb
|
4
|
+
data.tar.gz: a5bc821d8f1b6f55baf495eea28e8783c86c61ffaca2d486e4589b818a60038f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 23e986949f97ae31498b7310eba666f0fc4b5f3e4ab9d38a135b2934db901449dca70ce74830e4353bb60f2196ce2c195b1bfb20400f884494e9766e58ea5214
|
7
|
+
data.tar.gz: 3857008111b8a65b1fbf09442eb3a657789ebf964769c7805485be57298141c363296b7d2491ef3379726344f07892211d10d4c72fc74a8095bc0eaf00d4e873
|
@@ -20,6 +20,10 @@ class MiGA::Cli::Action::Stats < MiGA::Cli::Action
|
|
20
20
|
'--try-load',
|
21
21
|
'Check if stat exists instead of computing on --compute-and-save'
|
22
22
|
) { |v| cli[:try_load] = v }
|
23
|
+
opt.on(
|
24
|
+
'--ignore-empty',
|
25
|
+
'If the result does not exist, exit without throwing exceptions'
|
26
|
+
) { |v| cli[:ignore_result_empty] = v }
|
23
27
|
end
|
24
28
|
end
|
25
29
|
|
@@ -27,7 +31,7 @@ class MiGA::Cli::Action::Stats < MiGA::Cli::Action
|
|
27
31
|
if cli[:try_load] && !r[:stats].nil? && !r[:stats].empty?
|
28
32
|
cli[:compute] = false
|
29
33
|
end
|
30
|
-
r = cli.load_result
|
34
|
+
r = cli.load_result or return
|
31
35
|
if cli[:compute]
|
32
36
|
cli.say 'Computing statistics'
|
33
37
|
r.compute_stats
|
@@ -80,7 +80,9 @@ module MiGA::Cli::ObjectsHelper
|
|
80
80
|
raise "Unsupported result for #{klass}: #{self[:result]}"
|
81
81
|
end
|
82
82
|
r = obj.add_result(self[:result], false)
|
83
|
-
|
83
|
+
if r.nil? && !self[:ignore_result_empty]
|
84
|
+
raise "Cannot load result: #{self[:result]}"
|
85
|
+
end
|
84
86
|
|
85
87
|
@objects[:result] = r
|
86
88
|
end
|
data/lib/miga/result/stats.rb
CHANGED
@@ -168,10 +168,9 @@ module MiGA::Result::Stats
|
|
168
168
|
stats[:aai] = [$2.to_f, '%']
|
169
169
|
3.times { fh.gets }
|
170
170
|
fh.each_line do |ln|
|
171
|
-
|
172
|
-
break if row.empty?
|
171
|
+
next unless ln.chomp =~ /^\s*(\S+)\s+(.+)\s+([0-9\.e-]+)\s+\**\s*$/
|
173
172
|
|
174
|
-
stats[:"#{
|
173
|
+
stats[:"#{$1}_pvalue"] = $3.to_f unless $1 == 'root'
|
175
174
|
end
|
176
175
|
end
|
177
176
|
stats
|
data/lib/miga/version.rb
CHANGED
@@ -8,7 +8,7 @@ module MiGA
|
|
8
8
|
# - Float representing the major.minor version.
|
9
9
|
# - Integer representing gem releases of the current version.
|
10
10
|
# - Integer representing minor changes that require new version number.
|
11
|
-
VERSION = [0.7,
|
11
|
+
VERSION = [0.7, 7, 0]
|
12
12
|
|
13
13
|
##
|
14
14
|
# Nickname for the current major.minor version.
|
@@ -16,7 +16,7 @@ module MiGA
|
|
16
16
|
|
17
17
|
##
|
18
18
|
# Date of the current gem release.
|
19
|
-
VERSION_DATE = Date.new(2020,
|
19
|
+
VERSION_DATE = Date.new(2020, 6, 4)
|
20
20
|
|
21
21
|
##
|
22
22
|
# Reference of MiGA.
|
data/scripts/project_stats.bash
CHANGED
data/scripts/stats.bash
CHANGED
@@ -14,7 +14,7 @@ miga date > "$DATASET.start"
|
|
14
14
|
# Calculate statistics
|
15
15
|
for i in raw_reads trimmed_fasta assembly cds essential_genes ssu distances taxonomy ; do
|
16
16
|
echo "# $i"
|
17
|
-
miga stats --compute-and-save -P "$PROJECT" -D "$DATASET" -r $i
|
17
|
+
miga stats --compute-and-save --ignore-empty -P "$PROJECT" -D "$DATASET" -r $i
|
18
18
|
done
|
19
19
|
|
20
20
|
# Finalize
|
data/test/dataset_test.rb
CHANGED
@@ -192,4 +192,9 @@ class DatasetTest < Test::Unit::TestCase
|
|
192
192
|
assert_equal(:incomplete, d.status)
|
193
193
|
assert_predicate(d, :active?)
|
194
194
|
end
|
195
|
+
|
196
|
+
def test_preprocessing_tasks
|
197
|
+
assert_include(MiGA::Dataset.PREPROCESSING_TASKS, :cds)
|
198
|
+
assert_include(MiGA::Dataset.PREPROCESSING_TASKS, :taxonomy)
|
199
|
+
end
|
195
200
|
end
|
data/utils/adapters.fa
CHANGED
@@ -300,3 +300,16 @@ AGATCGGAAGAGCGGTTCAGCAGGAATGCCGAG
|
|
300
300
|
AGATCGGAAGAGCACACGTCTGAACTCCAGTCAC
|
301
301
|
>TruSeq3_UniversalAdapter
|
302
302
|
AGATCGGAAGAGCGTCGTGTAGGGAAAGAGTGTA
|
303
|
+
|
304
|
+
>Nextera_PE_PrefixNX/1
|
305
|
+
AGATGTGTATAAGAGACAG
|
306
|
+
>Nextera_PE_PrefixNX/2
|
307
|
+
AGATGTGTATAAGAGACAG
|
308
|
+
>Nextera_PE_Trans1
|
309
|
+
TCGTCGGCAGCGTCAGATGTGTATAAGAGACAG
|
310
|
+
>Nextera_PE_Trans1_rc
|
311
|
+
CTGTCTCTTATACACATCTGACGCTGCCGACGA
|
312
|
+
>Nextera_PE_Trans2
|
313
|
+
GTCTCGTGGGCTCGGAGATGTGTATAAGAGACAG
|
314
|
+
>Nextera_PE_Trans2_rc
|
315
|
+
CTGTCTCTTATACACATCTCCGAGCCCACGAGAC
|
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: 0.7.
|
4
|
+
version: 0.7.7.0
|
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: 2020-
|
11
|
+
date: 2020-06-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: daemons
|