assemblotron 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,16 @@
1
+ require 'simplecov'
2
+ require 'coveralls'
3
+
4
+ SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
5
+ SimpleCov::Formatter::HTMLFormatter,
6
+ Coveralls::SimpleCov::Formatter
7
+ ]
8
+ SimpleCov.start
9
+
10
+ require 'minitest/autorun'
11
+ begin; require 'turn/autorun'; rescue LoadError; end
12
+ require 'shoulda-context'
13
+ require 'assemblotron'
14
+
15
+ Turn.config.format = :pretty
16
+ Turn.config.trace = 1
@@ -0,0 +1,27 @@
1
+ require 'helper'
2
+
3
+ class TestInstaller < Test::Unit::TestCase
4
+
5
+ context 'Installer' do
6
+
7
+ setup do
8
+ @c = Assemblotron::Controller.new
9
+ @c.init_settings
10
+ end
11
+
12
+ should 'expect a YAML set of download sources for an assembler' do
13
+
14
+ assert_equal 1, 2
15
+ end
16
+
17
+ should 'download the appropriate version for the host system' do
18
+ assert_equal 1, 2
19
+ end
20
+
21
+ should 'install missing assemblers and make them available in PATH' do
22
+ assert_equal 1, 2
23
+ end
24
+
25
+ end # context
26
+
27
+ end # TestInstaller
@@ -0,0 +1,28 @@
1
+ require 'helper'
2
+
3
+ class TestSample < Test::Unit::TestCase
4
+
5
+ context 'Sample' do
6
+
7
+ setup do
8
+ datadir = File.join(File.dirname(__FILE__), 'data')
9
+ datadir = File.absolute_path datadir
10
+ l = File.join(datadir, 'thousand_reads_l.fq')
11
+ r = File.join(datadir, 'thousand_reads_r.fq')
12
+ @sample = Assemblotron::Sample.new(l, r)
13
+ end
14
+
15
+ should 'subsample the specified number of reads' do
16
+ ns = [50, 100, 200, 500]
17
+ ns.each do |n|
18
+ l, r = @sample.subsample n
19
+ actual_n_l = `wc -l #{l}`.to_i / 4
20
+ actual_n_r = `wc -l #{r}`.to_i / 4
21
+ assert_equal n, actual_n_l, "left read subsample size should be #{n}"
22
+ assert_equal n, actual_n_r, "right read subsample size should be #{n}"
23
+ end
24
+ end
25
+
26
+ end # context
27
+
28
+ end # TestSample
@@ -0,0 +1,52 @@
1
+ require 'helper'
2
+
3
+ class TestSoapDenovoTrans < Test::Unit::TestCase
4
+
5
+ context "SoapDenovoTrans constructor" do
6
+
7
+ setup do
8
+ @c = Assemblotron::Controller.new
9
+ @c.init_settings
10
+ @t = Biopsy::Target.new
11
+ @t.load_by_name 'soap_denovo_trans'
12
+ @s = SoapDenovoTrans.new
13
+ @params = {
14
+ :readformat => 'fastq',
15
+ :insertsize => '200',
16
+ :l => 'l.fq',
17
+ :r => 'r.fq',
18
+ :path => 'SOAPdenovo-Trans',
19
+ :memory => 12,
20
+ :threads => 8,
21
+ :out => 1,
22
+ }
23
+ end
24
+
25
+ should "construct a valid command" do
26
+ params = {
27
+ :K => 1,
28
+ :d => 2,
29
+ :M => 9,
30
+ :F => true,
31
+ :L => 200,
32
+ :u => false,
33
+ :e => 6,
34
+ :t => 6
35
+ }
36
+ @params.merge! params
37
+ expected = "SOAPdenovo-Trans all -s soapdt.config"
38
+ expected += " -a 12 -o 1 -p 8 -K 1 -d 2 -F -M 9 -L 200"
39
+ expected += " -e 6 -t 6 -G 50"
40
+ assert_equal expected, @s.construct_command(@params)
41
+ end
42
+
43
+ should "automatically include defaults" do
44
+ expected = "SOAPdenovo-Trans all -s soapdt.config"
45
+ expected += " -a 12 -o 1 -p 8 -K 23 -d 0 -F -M 1"
46
+ expected += " -L 100 -e 2 -t 5 -G 50"
47
+ assert_equal expected, @s.construct_command(@params)
48
+ end
49
+
50
+ end # SoapDenovoTrans constructor context
51
+
52
+ end # TestSoapDenovoTrans
metadata ADDED
@@ -0,0 +1,205 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: assemblotron
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.2
5
+ platform: ruby
6
+ authors:
7
+ - Richard Smith
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-04-22 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rake
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '10.1'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '10.1'
27
+ - !ruby/object:Gem::Dependency
28
+ name: biopsy
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '='
32
+ - !ruby/object:Gem::Version
33
+ version: 0.1.8
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '='
39
+ - !ruby/object:Gem::Version
40
+ version: 0.1.8
41
+ - !ruby/object:Gem::Dependency
42
+ name: trollop
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '2.0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '2.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: transrate
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - '='
60
+ - !ruby/object:Gem::Version
61
+ version: 0.0.12
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - '='
67
+ - !ruby/object:Gem::Version
68
+ version: 0.0.12
69
+ - !ruby/object:Gem::Dependency
70
+ name: RubyInline
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '3.12'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '3.12'
83
+ - !ruby/object:Gem::Dependency
84
+ name: minitest
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: turn
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: simplecov
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: shoulda-context
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: coveralls
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "~>"
144
+ - !ruby/object:Gem::Version
145
+ version: 0.6.7
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - "~>"
151
+ - !ruby/object:Gem::Version
152
+ version: 0.6.7
153
+ description:
154
+ email: rds45@cam.ac.uk
155
+ executables: []
156
+ extensions: []
157
+ extra_rdoc_files: []
158
+ files:
159
+ - README.md
160
+ - Rakefile
161
+ - lib/assemblotron.rb
162
+ - lib/assemblotron/assemblers/constructors/abyss.rb
163
+ - lib/assemblotron/assemblers/constructors/read_joiner.rb
164
+ - lib/assemblotron/assemblers/constructors/sga.rb
165
+ - lib/assemblotron/assemblers/constructors/soap_denovo_trans.rb
166
+ - lib/assemblotron/assemblers/constructors/velvet_oases.rb
167
+ - lib/assemblotron/assemblers/soap_denovo_trans.rb
168
+ - lib/assemblotron/assemblers/soap_denovo_trans.yml
169
+ - lib/assemblotron/objectives/assembly_score.rb
170
+ - lib/assemblotron/sample.rb
171
+ - lib/assemblotron/system.rb
172
+ - lib/assemblotron/version.rb
173
+ - test/data/subset.thousand_reads_l.fq
174
+ - test/data/subset.thousand_reads_r.fq
175
+ - test/data/thousand_reads_l.fq
176
+ - test/data/thousand_reads_r.fq
177
+ - test/helper.rb
178
+ - test/test_installer.rb
179
+ - test/test_sample.rb
180
+ - test/test_soap_denovo_trans.rb
181
+ homepage: https://github.com/blahah/assemblotron
182
+ licenses: []
183
+ metadata: {}
184
+ post_install_message:
185
+ rdoc_options: []
186
+ require_paths:
187
+ - lib
188
+ required_ruby_version: !ruby/object:Gem::Requirement
189
+ requirements:
190
+ - - ">="
191
+ - !ruby/object:Gem::Version
192
+ version: '0'
193
+ required_rubygems_version: !ruby/object:Gem::Requirement
194
+ requirements:
195
+ - - ">="
196
+ - !ruby/object:Gem::Version
197
+ version: '0'
198
+ requirements: []
199
+ rubyforge_project:
200
+ rubygems_version: 2.2.2
201
+ signing_key:
202
+ specification_version: 4
203
+ summary: automatically produce *optimal* assemblies from DNA/RNA sequencing reads
204
+ test_files: []
205
+ has_rdoc: