transrate 1.0.0.alpha.4 → 1.0.0.alpha.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/transrate/contig.rb +7 -9
- data/lib/transrate/samtools.rb +3 -2
- data/lib/transrate/snap.rb +1 -1
- data/lib/transrate/version.rb +1 -1
- data/test/test_read_metrics.rb +1 -1
- data/test/test_transrater.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3fc633cd9166010a55ea892edc4737c2f3221ccf
|
4
|
+
data.tar.gz: 2e9729a73f4128503d992b39c9711e15c89bae7b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef6f9cc4be67ec2b5d09fc9ab7487e3b21b0409e0af63752f33cf977e1d3f50f1644622af76cfba54d6b28c63b36a3607842d38ce0fdec51ff6c4d67063b571f
|
7
|
+
data.tar.gz: d4cc715ba05d3a332882a492fd99ea4ad79f48198dce550b7c1cefed3025663ff88ed7257554e9f4897fbb20f23c337135d72e6a8f3ac142182162875ff6dafa
|
data/lib/transrate/contig.rb
CHANGED
@@ -231,18 +231,16 @@ module Transrate
|
|
231
231
|
(length - low_uniqueness_bases) / length.to_f
|
232
232
|
end
|
233
233
|
|
234
|
-
# Contig score (
|
234
|
+
# Contig score (product of all score components)
|
235
235
|
def score
|
236
236
|
return @score if @score != -1
|
237
237
|
prod =
|
238
|
-
[p_bases_covered, 0.01].max * # proportion of bases covered
|
239
|
-
[p_not_segmented, 0.01].max * # prob contig has 0 changepoints
|
240
|
-
[p_good, 0.01].max * # proportion of reads that mapped good
|
241
|
-
[p_seq_true, 0.01].max * # scaled 1 - mean per-base edit distance
|
242
|
-
[p_unique, 0.01].max # prop mapQ >= 5
|
243
|
-
|
244
|
-
s = 0.01 if !s
|
245
|
-
@score = [s, 0.01].max
|
238
|
+
[p_bases_covered, 0.01].max.to_f * # proportion of bases covered
|
239
|
+
[p_not_segmented, 0.01].max.to_f * # prob contig has 0 changepoints
|
240
|
+
[p_good, 0.01].max.to_f * # proportion of reads that mapped good
|
241
|
+
[p_seq_true, 0.01].max.to_f * # scaled 1 - mean per-base edit distance
|
242
|
+
[p_unique, 0.01].max.to_f # prop mapQ >= 5
|
243
|
+
@score = [prod, 0.01].max
|
246
244
|
end
|
247
245
|
end
|
248
246
|
|
data/lib/transrate/samtools.rb
CHANGED
@@ -23,8 +23,9 @@ module Transrate
|
|
23
23
|
runcmd = Cmd.new "#{Samtools.path} #{cmd}"
|
24
24
|
runcmd.run
|
25
25
|
if !runcmd.status.success?
|
26
|
-
|
27
|
-
|
26
|
+
raise SamtoolsError.new("Samtools command failed: #{runcmd}" +
|
27
|
+
"\n#{runcmd.stderr}" +
|
28
|
+
"\n#{runcmd.stdout}")
|
28
29
|
end
|
29
30
|
runcmd.stdout
|
30
31
|
end
|
data/lib/transrate/snap.rb
CHANGED
@@ -58,7 +58,7 @@ module Transrate
|
|
58
58
|
runner.run
|
59
59
|
save_readcount runner.stdout
|
60
60
|
unless runner.status.success?
|
61
|
-
raise SnapError.new("Snap failed\n#{runner.stderr}")
|
61
|
+
raise SnapError.new("Snap failed\n#{runner.stderr}\n#{runner.stdout}")
|
62
62
|
end
|
63
63
|
else
|
64
64
|
load_readcount left
|
data/lib/transrate/version.rb
CHANGED
data/test/test_read_metrics.rb
CHANGED
@@ -43,7 +43,7 @@ class TestReadMetrics < Test::Unit::TestCase
|
|
43
43
|
assert_equal 2, stats[:contigs_uncovbase], 'uncovered base contig'
|
44
44
|
assert_equal 0, stats[:contigs_uncovered], 'uncovered contig'
|
45
45
|
assert_equal 0, stats[:contigs_lowcovered], 'lowcovered contig'
|
46
|
-
assert_equal
|
46
|
+
assert_equal 0, stats[:contigs_good], 'good contigs'
|
47
47
|
end
|
48
48
|
end
|
49
49
|
end
|
data/test/test_transrater.rb
CHANGED
@@ -59,7 +59,7 @@ class TestTransrater < Test::Unit::TestCase
|
|
59
59
|
Dir.chdir tmpdir do
|
60
60
|
all = @rater.all_metrics(@left, @right)
|
61
61
|
score = @rater.assembly_score
|
62
|
-
assert_equal 0.
|
62
|
+
assert_equal 0.10231, score.round(5) # regression test
|
63
63
|
end
|
64
64
|
end
|
65
65
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: transrate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.alpha.
|
4
|
+
version: 1.0.0.alpha.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Richard Smith-Unna
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-10-
|
12
|
+
date: 2014-10-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: yell
|