transrate 1.0.0.beta5 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6010a898aadeb76441e40dc958a2985c3df1d444
4
- data.tar.gz: 3c908a057b696e778cb4d369d50798ee8887d271
3
+ metadata.gz: 1cdc0e54bd5a77cc14727d6c42e739e6c9fa4d10
4
+ data.tar.gz: ee950d7fcd11d5662a7012c1aeefb597dfe7dd4a
5
5
  SHA512:
6
- metadata.gz: c9bc4f6e6d390b66a863fb2cd26041f92742738bc4698e2391e8a88e2c712c43d23014461e189ed6646689b87e38231edc5fb728c282d40d6f60e13df4cde864
7
- data.tar.gz: cff2caebdb5b477f5675f88550bd1757c1ccb28190d499f303fb24186d69aef88499ca5cfcf0756ff82ef74f3b20c6eeaaac783ae71e049af19fc87641bdf5e1
6
+ metadata.gz: aa61ac533468fdcd3dbca9949996a4d6c62dcf540fd8f0f7194251b9b88415e28f9c54e884586853ec12244e4778d4bc840a396be3c85c55acb09f71a0d77e4d
7
+ data.tar.gz: f55918c002f429f1d4912feca88b91e7647bb4064348e254860673d8d9d52bd8bad512b3f7e23e166ad87defbe67de51eeb043620a43dc51eed61e4d40aeece1
data/.gitignore CHANGED
@@ -67,3 +67,6 @@ traveling-ruby*
67
67
  *box
68
68
  libruby.so*
69
69
  libruby*dylib
70
+
71
+ # example data
72
+ example_data*
data/Rakefile CHANGED
@@ -90,7 +90,7 @@ task :default => :test
90
90
  # PACKAGING
91
91
 
92
92
  PACKAGE_NAME = "transrate"
93
- VERSION = "1.0.0.beta4"
93
+ VERSION = "1.0.0"
94
94
  TRAVELING_RUBY_VERSION = "20150210-2.2.0"
95
95
 
96
96
  desc "Package your app"
@@ -156,10 +156,11 @@ def create_package(target)
156
156
  sh "mkdir packaging/bindeps/#{target}/{bin,lib}"
157
157
  sh "cd packaging/bindeps/#{target} && " +
158
158
  "find . -maxdepth 1 -name '*.tar.gz' -exec tar -xzf '{}' \\; && " +
159
- "mv snap bam-read bin/"
159
+ "mv snap-aligner bam-read bin/ && cp -r ./*/{bin,lib} ."
160
160
  sh "cp -r packaging/bindeps/#{target}/{bin,lib} #{package_dir}/"
161
161
  # install c extension
162
- sh "cp test/vagrant/#{target}/{transrate,libruby}.* #{package_dir}/lib/"
162
+ sh "cp test/vagrant/#{target}/libruby.* #{package_dir}/lib/"
163
+ sh "cp test/vagrant/#{target}/transrate.* #{package_dir}/lib/app/ext/transrate/"
163
164
  # create package
164
165
  if !ENV['DIR_ONLY']
165
166
  sh "cd packaging && tar -czf #{package_pref}.tar.gz #{package_pref}"
@@ -173,11 +173,11 @@ else
173
173
  end
174
174
 
175
175
  puts "To install all missing dependencies, run:"
176
- puts " transrate --install-deps"
176
+ puts " transrate --install-deps a;;"
177
177
  puts "If you only want the read-metrics dependencies:"
178
- puts " transrate --install-read-deps"
178
+ puts " transrate --install-deps read"
179
179
  puts "Or if you only want the reference-metrics dependencies: "
180
- puts " transrate --install-ref-deps"
180
+ puts " transrate --install-deps ref"
181
181
 
182
182
  exit 1
183
183
  end
@@ -290,7 +290,7 @@ assemblies.split(',').each do |assembly|
290
290
  pretty_print_hash(contig_results, report_width)
291
291
  end
292
292
 
293
- logger.info "Contig metrics done in #{Time.now - t0} seconds"
293
+ logger.info "Contig metrics done in #{(Time.now - t0).round} seconds"
294
294
 
295
295
  read_results = {}
296
296
 
@@ -305,7 +305,7 @@ assemblies.split(',').each do |assembly|
305
305
  pretty_print_hash(read_results, report_width)
306
306
  end
307
307
 
308
- logger.info "Read metrics done in #{Time.now - t0} seconds"
308
+ logger.info "Read metrics done in #{(Time.now - t0).round} seconds"
309
309
  else
310
310
  logger.info "No reads provided, skipping read diagnostics"
311
311
  end
@@ -324,7 +324,7 @@ assemblies.split(',').each do |assembly|
324
324
  pretty_print_hash(comparative_results, report_width)
325
325
  end
326
326
 
327
- logger.info "Comparative metrics done in #{Time.now - t0} seconds"
327
+ logger.info "Comparative metrics done in #{(Time.now - t0).round} seconds"
328
328
 
329
329
  logger.info "-" * report_width
330
330
  else
@@ -366,7 +366,7 @@ assemblies.split(',').each do |assembly|
366
366
  csv << basic_metrics.keys
367
367
  first = false
368
368
  end
369
- csv << basic_metrics.values
369
+ csv << basic_metrics.values.map{ |x| x.is_a?(Float) ? x.round(6) : x }
370
370
  end
371
371
  end
372
372
 
@@ -388,6 +388,9 @@ CSV.open(outfile, 'wb') do |file|
388
388
  head = [:assembly] + keys
389
389
  file << head
390
390
  all.each do |row|
391
- file << head.map { |x| row[x] }
391
+ file << head.map { |x|
392
+ entry = row[x]
393
+ entry.is_a?(Float) ? entry.round(5) : entry
394
+ }
392
395
  end
393
396
  end
@@ -1,23 +1,23 @@
1
1
  snap:
2
2
  binaries:
3
- - snap
3
+ - snap-aligner
4
4
  version:
5
- number: '1.0dev.67.trfix1'
6
- command: 'snap'
5
+ number: '1.0beta.18'
6
+ command: 'snap-aligner'
7
7
  url:
8
8
  64bit:
9
- linux: https://github.com/Blahah/snap/releases/download/v1.0dev.67.trfix1/snap_v1.0dev.67.trfix1_linux.tar.gz
10
- macosx: https://github.com/Blahah/snap/releases/download/v1.0dev.67.trfix1/snap_v1.0dev.67.trfix1_macosx.tar.gz
9
+ linux: https://github.com/Blahah/snap/releases/download/v1.0beta.18/snap_v1.0beta.18_linux.tar.gz
10
+ macosx: https://github.com/Blahah/snap/releases/download/v1.0beta.18/snap_v1.0beta.18_osx.tar.gz
11
11
  bam-read:
12
12
  binaries:
13
13
  - bam-read
14
14
  version:
15
- number: '1.0.0.beta4'
15
+ number: '1.0.0'
16
16
  command: 'bam-read'
17
17
  url:
18
18
  64bit:
19
- linux: https://github.com/Blahah/transrate-tools/releases/download/v1.0.0.beta4/bam-read_v1.0.0.beta4_linux.tar.gz
20
- macosx: https://github.com/Blahah/transrate-tools/releases/download/v1.0.0.beta4/bam-read_v1.0.0.beta4_osx.tar.gz
19
+ linux: https://github.com/Blahah/transrate-tools/releases/download/v1.0.0/bam-read_v1.0.0_linux.tar.gz
20
+ macosx: https://github.com/Blahah/transrate-tools/releases/download/v1.0.0/bam-read_v1.0.0_osx.tar.gz
21
21
  unpack: true
22
22
  salmon:
23
23
  binaries:
@@ -45,5 +45,5 @@ salmon:
45
45
  command: 'salmon -v'
46
46
  url:
47
47
  64bit:
48
- linux: https://github.com/COMBINE-lab/salmon/releases/download/v0.4.0/SalmonBeta-0.4.0_DebianSqueeze.tar.gz
49
- macosx: https://github.com/COMBINE-lab/salmon/releases/download/v0.4.0/SalmonBeta-0.4.0_OSX-10.10.tar.gz
48
+ linux: https://github.com/COMBINE-lab/salmon/releases/download/v0.4.2/SalmonBeta-0.4.2_DebianSqueeze.tar.gz
49
+ macosx: https://github.com/COMBINE-lab/salmon/releases/download/v0.4.2/SalmonBeta-0.4.2_OSX-10.10.tar.gz
@@ -26,6 +26,7 @@ module Transrate
26
26
 
27
27
  end # Transrate
28
28
 
29
+ require 'transrate/transrate'
29
30
  require 'transrate/transrater'
30
31
  require 'transrate/version'
31
32
  require 'transrate/contig'
@@ -49,7 +49,7 @@ module Transrate
49
49
  out = CSV.open("#{prefix}_score_optimisation.csv", 'w')
50
50
  out << %w[cutoff assembly_score]
51
51
  cutoffscores.each do |c, score|
52
- out << [c, score]
52
+ out << [c.round(5), score.round(5)]
53
53
  if score > @optimal
54
54
  @optimal = score
55
55
  @cutoff = c
@@ -11,7 +11,7 @@ module Transrate
11
11
  attr_reader :index_name, :bam, :read_count
12
12
 
13
13
  def initialize
14
- which_snap = Cmd.new('which snap')
14
+ which_snap = Cmd.new('which snap-aligner')
15
15
  which_snap.run
16
16
  if !which_snap.status.success?
17
17
  raise SnapError.new("could not find snap in the path")
@@ -11,7 +11,7 @@ module Transrate
11
11
  MAJOR = 1
12
12
  MINOR = 0
13
13
  PATCH = 0
14
- BUILD = 'beta5'
14
+ BUILD = nil
15
15
 
16
16
  STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join('.')
17
17
  end
@@ -8,13 +8,14 @@ SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
8
8
  SimpleCov.start
9
9
 
10
10
  require 'minitest/autorun'
11
- begin; require 'turn/autorun'; rescue LoadError; end
11
+ begin
12
+ require 'turn/autorun'
13
+ Turn.config.format = :pretty
14
+ Turn.config.trace = 5
15
+ rescue LoadError
16
+ end
12
17
  require 'shoulda/context'
13
18
  require 'transrate'
14
- require 'transrate/transrate.so'
15
-
16
- Turn.config.format = :pretty
17
- Turn.config.trace = 5
18
19
 
19
20
  # download large fastq files into test/data/.
20
21
  path = "https://github.com/HibberdLab/transrate-test-files/raw/master"
@@ -27,4 +28,4 @@ test_files.each do |file|
27
28
  cmd = Transrate::Cmd.new(wget_cmd)
28
29
  cmd.run
29
30
  end
30
- end
31
+ end
@@ -31,7 +31,7 @@ class TestReadMetrics < Test::Unit::TestCase
31
31
  stats = @read_metrics.read_stats
32
32
  assert @read_metrics.has_run, "has run"
33
33
  assert_equal 25006, stats[:fragments], 'number of read pairs'
34
- assert_in_delta 21744, stats[:fragments_mapped], 10, 'number mapping'
34
+ assert_in_delta 21732, stats[:fragments_mapped], 10, 'number mapping'
35
35
  assert_in_delta 0.84, stats[:p_fragments_mapped].round(4), 0.05
36
36
  'proportion mapping'
37
37
  assert_in_delta 17983, stats[:good_mappings], 50, 'good mapping'
@@ -61,7 +61,7 @@ class TestReadMetrics < Test::Unit::TestCase
61
61
 
62
62
  edit_a = a[:p_seq_true].round(5)
63
63
  edit_b = b[:p_seq_true].round(5)
64
- assert_in_delta 0.6597, edit_a.round(4), 0.01, "edit distance 1"
64
+ assert_in_delta 0.7086, edit_a.round(4), 0.01, "edit distance 1"
65
65
  assert_in_delta 0.9364, edit_b.round(4), 0.01, "edit distance 2"
66
66
 
67
67
  assert_in_delta 0.5714, a[:p_good].round(4), 0.01, "prop of good mappings"
@@ -4,7 +4,7 @@ require File.expand_path('../lib/transrate/version', __FILE__)
4
4
 
5
5
  Gem::Specification.new do |gem|
6
6
  gem.name = 'transrate'
7
- gem.authors = [ "Richard Smith-Unna", "Chris Boursnell" ]
7
+ gem.authors = [ "Richard Smith-Unna", "Chris Boursnell", "Rob Patro", "Julian Hibberd", "Steven Kelly" ]
8
8
  gem.email = "rds45@cam.ac.uk"
9
9
  gem.licenses = ["MIT"]
10
10
  gem.homepage = 'https://github.com/Blahah/transrate'
@@ -25,11 +25,12 @@ Gem::Specification.new do |gem|
25
25
  gem.add_dependency 'fix-trinity-output', '~> 1.0', '>= 1.0'
26
26
  gem.add_dependency 'colorize', '~> 0.7', '>= 0.7.7'
27
27
 
28
+ gem.add_development_dependency 'test-unit', '~> 3.0'
28
29
  gem.add_development_dependency 'rake', '~> 10.3', '>= 10.3.2'
29
30
  gem.add_development_dependency 'rake-compiler', '~> 0.9', '>= 0.9.2'
30
31
  gem.add_development_dependency 'turn', '~> 0.9', '>= 0.9.7'
31
32
  gem.add_development_dependency 'minitest', '~> 4', '>= 4.7.5'
32
33
  gem.add_development_dependency 'simplecov', '~> 0.8', '>= 0.8.2'
33
- gem.add_development_dependency 'shoulda-context', '~> 1.2', '>= 1.2.1'
34
+ gem.add_development_dependency 'shoulda', '~> 3.5', '>= 3.5.0'
34
35
  gem.add_development_dependency 'coveralls', '~> 0.7', '>= 0.7.2'
35
36
  end
metadata CHANGED
@@ -1,15 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: transrate
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.beta5
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Smith-Unna
8
8
  - Chris Boursnell
9
+ - Rob Patro
10
+ - Julian Hibberd
11
+ - Steven Kelly
9
12
  autorequire:
10
13
  bindir: bin
11
14
  cert_chain: []
12
- date: 2015-06-11 00:00:00.000000000 Z
15
+ date: 2015-06-15 00:00:00.000000000 Z
13
16
  dependencies:
14
17
  - !ruby/object:Gem::Dependency
15
18
  name: yell
@@ -151,6 +154,20 @@ dependencies:
151
154
  - - ">="
152
155
  - !ruby/object:Gem::Version
153
156
  version: 0.7.7
157
+ - !ruby/object:Gem::Dependency
158
+ name: test-unit
159
+ requirement: !ruby/object:Gem::Requirement
160
+ requirements:
161
+ - - "~>"
162
+ - !ruby/object:Gem::Version
163
+ version: '3.0'
164
+ type: :development
165
+ prerelease: false
166
+ version_requirements: !ruby/object:Gem::Requirement
167
+ requirements:
168
+ - - "~>"
169
+ - !ruby/object:Gem::Version
170
+ version: '3.0'
154
171
  - !ruby/object:Gem::Dependency
155
172
  name: rake
156
173
  requirement: !ruby/object:Gem::Requirement
@@ -252,25 +269,25 @@ dependencies:
252
269
  - !ruby/object:Gem::Version
253
270
  version: 0.8.2
254
271
  - !ruby/object:Gem::Dependency
255
- name: shoulda-context
272
+ name: shoulda
256
273
  requirement: !ruby/object:Gem::Requirement
257
274
  requirements:
258
275
  - - "~>"
259
276
  - !ruby/object:Gem::Version
260
- version: '1.2'
277
+ version: '3.5'
261
278
  - - ">="
262
279
  - !ruby/object:Gem::Version
263
- version: 1.2.1
280
+ version: 3.5.0
264
281
  type: :development
265
282
  prerelease: false
266
283
  version_requirements: !ruby/object:Gem::Requirement
267
284
  requirements:
268
285
  - - "~>"
269
286
  - !ruby/object:Gem::Version
270
- version: '1.2'
287
+ version: '3.5'
271
288
  - - ">="
272
289
  - !ruby/object:Gem::Version
273
- version: 1.2.1
290
+ version: 3.5.0
274
291
  - !ruby/object:Gem::Dependency
275
292
  name: coveralls
276
293
  requirement: !ruby/object:Gem::Requirement
@@ -367,9 +384,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
367
384
  version: '0'
368
385
  required_rubygems_version: !ruby/object:Gem::Requirement
369
386
  requirements:
370
- - - ">"
387
+ - - ">="
371
388
  - !ruby/object:Gem::Version
372
- version: 1.3.1
389
+ version: '0'
373
390
  requirements: []
374
391
  rubyforge_project:
375
392
  rubygems_version: 2.4.6