transrate 1.0.0.alpha.4 → 1.0.0.alpha.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2f7b1950319885f1e22e62ea5def9d44c2bf50c8
4
- data.tar.gz: 2a0fc6c4ad1a23be8ea560f63d2f4c8af144b35f
3
+ metadata.gz: 3fc633cd9166010a55ea892edc4737c2f3221ccf
4
+ data.tar.gz: 2e9729a73f4128503d992b39c9711e15c89bae7b
5
5
  SHA512:
6
- metadata.gz: 837907dea75820b5e6630a2db91bff70cd8c1cdd00ce14dd450e298ed301dc0a593c726b11e5abd6a48e72aadfd8e8aeec98c62571dd6a11a1d3494657b309b1
7
- data.tar.gz: f8eec588917af4737fe49482c2c8e6bfbf281a1531fde7be5f4956f68bf16a0d07f2ef5bf67aefe7b4b0b3697bd47ab36734cee4e9708666d15f2247c9b4e8e0
6
+ metadata.gz: ef6f9cc4be67ec2b5d09fc9ab7487e3b21b0409e0af63752f33cf977e1d3f50f1644622af76cfba54d6b28c63b36a3607842d38ce0fdec51ff6c4d67063b571f
7
+ data.tar.gz: d4cc715ba05d3a332882a492fd99ea4ad79f48198dce550b7c1cefed3025663ff88ed7257554e9f4897fbb20f23c337135d72e6a8f3ac142182162875ff6dafa
@@ -231,18 +231,16 @@ module Transrate
231
231
  (length - low_uniqueness_bases) / length.to_f
232
232
  end
233
233
 
234
- # Contig score (geometric mean of all score components)
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
- s = prod ** (1.0 / 5)
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
 
@@ -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
- logger.warn "Samtools command failed: #{runcmd}" +
27
- "\n#{runcmd.stderr}"
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
@@ -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
@@ -11,7 +11,7 @@ module Transrate
11
11
  MAJOR = 1
12
12
  MINOR = 0
13
13
  PATCH = 0
14
- BUILD = 'alpha.4'
14
+ BUILD = 'alpha.5'
15
15
 
16
16
  STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join('.')
17
17
  end
@@ -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 2, stats[:contigs_good], 'good contigs'
46
+ assert_equal 0, stats[:contigs_good], 'good contigs'
47
47
  end
48
48
  end
49
49
  end
@@ -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.40908, score.round(5) # regression test
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
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-21 00:00:00.000000000 Z
12
+ date: 2014-10-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: yell