rbbt-util 5.28.5 → 5.28.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rbbt/entity.rb +1 -1
- data/lib/rbbt/fix_width_table.rb +5 -4
- data/lib/rbbt/persist.rb +1 -0
- data/lib/rbbt/persist/tsv/adapter.rb +0 -1
- data/lib/rbbt/persist/tsv/fix_width_table.rb +5 -3
- data/lib/rbbt/tsv/accessor.rb +10 -2
- data/lib/rbbt/tsv/dumper.rb +14 -2
- data/lib/rbbt/tsv/parallel/traverse.rb +3 -0
- data/lib/rbbt/tsv/util.rb +5 -1
- data/lib/rbbt/util/cmd.rb +1 -0
- data/lib/rbbt/util/config.rb +2 -1
- data/lib/rbbt/util/misc/bgzf.rb +1 -1
- data/lib/rbbt/util/misc/inspect.rb +1 -1
- data/lib/rbbt/util/misc/system.rb +1 -1
- data/lib/rbbt/util/named_array.rb +1 -1
- data/lib/rbbt/util/open.rb +18 -17
- data/lib/rbbt/workflow.rb +1 -0
- data/lib/rbbt/workflow/accessor.rb +94 -93
- data/lib/rbbt/workflow/definition.rb +8 -4
- data/lib/rbbt/workflow/integration/ansible.rb +53 -0
- data/lib/rbbt/workflow/integration/ansible/workflow.rb +60 -0
- data/lib/rbbt/workflow/remote_workflow/driver/rest.rb +5 -1
- data/lib/rbbt/workflow/step.rb +22 -5
- data/lib/rbbt/workflow/step/accessor.rb +7 -5
- data/lib/rbbt/workflow/usage.rb +1 -1
- data/lib/rbbt/workflow/util/archive.rb +3 -0
- data/lib/rbbt/workflow/util/orchestrator.rb +228 -0
- data/lib/rbbt/workflow/util/trace.rb +182 -0
- data/share/rbbt_commands/ansible +55 -0
- data/share/rbbt_commands/purge_job +2 -5
- data/share/rbbt_commands/system/status +1 -1
- data/share/rbbt_commands/workflow/forget_deps +10 -3
- data/share/rbbt_commands/workflow/server +2 -0
- data/test/rbbt/association/test_index.rb +6 -6
- data/test/rbbt/knowledge_base/test_query.rb +3 -3
- data/test/rbbt/knowledge_base/test_registry.rb +1 -1
- data/test/rbbt/persist/tsv/test_cdb.rb +0 -7
- data/test/rbbt/persist/tsv/test_kyotocabinet.rb +2 -8
- data/test/rbbt/persist/tsv/test_leveldb.rb +0 -6
- data/test/rbbt/persist/tsv/test_lmdb.rb +0 -6
- data/test/rbbt/persist/tsv/test_tokyocabinet.rb +15 -14
- data/test/rbbt/test_entity.rb +0 -1
- data/test/rbbt/test_knowledge_base.rb +3 -4
- data/test/rbbt/test_persist.rb +10 -6
- data/test/rbbt/test_workflow.rb +17 -16
- data/test/rbbt/tsv/parallel/test_traverse.rb +14 -0
- data/test/rbbt/tsv/test_accessor.rb +11 -0
- data/test/rbbt/tsv/test_attach.rb +0 -2
- data/test/rbbt/tsv/test_index.rb +6 -7
- data/test/rbbt/tsv/test_manipulate.rb +22 -3
- data/test/rbbt/util/R/test_model.rb +2 -1
- data/test/rbbt/util/R/test_plot.rb +0 -2
- data/test/rbbt/util/concurrency/test_processes.rb +1 -1
- data/test/rbbt/util/misc/test_bgzf.rb +11 -7
- data/test/rbbt/util/misc/test_lock.rb +0 -1
- data/test/rbbt/util/misc/test_multipart_payload.rb +1 -1
- data/test/rbbt/util/misc/test_pipes.rb +0 -5
- data/test/rbbt/util/test_R.rb +1 -0
- data/test/rbbt/util/test_log.rb +4 -6
- data/test/rbbt/util/test_misc.rb +0 -2
- data/test/rbbt/util/test_open.rb +0 -1
- data/test/rbbt/util/test_python.rb +17 -1
- data/test/rbbt/workflow/test_remote_workflow.rb +1 -1
- data/test/rbbt/workflow/test_schedule.rb +0 -0
- data/test/rbbt/workflow/test_step.rb +8 -3
- data/test/rbbt/workflow/util/test_orchestrator.rb +273 -0
- metadata +11 -5
- data/lib/rbbt/workflow/schedule.rb +0 -238
- data/test/rbbt/workflow/remote/test_client.rb +0 -56
@@ -4,7 +4,8 @@ require 'rbbt/annotations'
|
|
4
4
|
require 'rbbt/util/tmpfile'
|
5
5
|
require 'test/unit'
|
6
6
|
|
7
|
-
|
7
|
+
|
8
|
+
module TestAnnotationModule
|
8
9
|
extend Annotation
|
9
10
|
|
10
11
|
self.annotation :test_annotation
|
@@ -25,8 +26,8 @@ class TestPersistTSVTC < Test::Unit::TestCase
|
|
25
26
|
entity1 = "Entity 1"
|
26
27
|
entity2 = "Entity 2"
|
27
28
|
|
28
|
-
|
29
|
-
|
29
|
+
TestAnnotationModule.setup(entity1, :test_annotation => "1")
|
30
|
+
TestAnnotationModule.setup(entity2, :test_annotation => "2")
|
30
31
|
|
31
32
|
annotations = [entity1, entity2]
|
32
33
|
|
@@ -56,9 +57,9 @@ class TestPersistTSVTC < Test::Unit::TestCase
|
|
56
57
|
entity2 = "Entity 2"
|
57
58
|
entity2bis = "Entity 2"
|
58
59
|
|
59
|
-
|
60
|
-
|
61
|
-
|
60
|
+
TestAnnotationModule.setup(entity1, :test_annotation => "1")
|
61
|
+
TestAnnotationModule.setup(entity2, :test_annotation => "2")
|
62
|
+
TestAnnotationModule.setup(entity2bis, :test_annotation => "2")
|
62
63
|
|
63
64
|
annotations = [entity1, entity2, entity2bis]
|
64
65
|
|
@@ -105,8 +106,8 @@ class TestPersistTSVTC < Test::Unit::TestCase
|
|
105
106
|
entity1 = "Entity 1"
|
106
107
|
entity2 = "Entity 2"
|
107
108
|
|
108
|
-
|
109
|
-
|
109
|
+
TestAnnotationModule.setup(entity1, :test_annotation => "1")
|
110
|
+
TestAnnotationModule.setup(entity2, :test_annotation => "2")
|
110
111
|
|
111
112
|
annotations = [entity1, entity2]
|
112
113
|
|
@@ -138,7 +139,7 @@ class TestPersistTSVTC < Test::Unit::TestCase
|
|
138
139
|
entity2 = "Entity 2"
|
139
140
|
|
140
141
|
annotations = [entity1, entity2]
|
141
|
-
|
142
|
+
TestAnnotationModule.setup(annotations, :test_annotation => "1")
|
142
143
|
annotations.extend AnnotatedArray
|
143
144
|
|
144
145
|
persisted_annotations = Persist.persist("Test", :annotations, :annotation_repo => repo) do
|
@@ -171,11 +172,11 @@ class TestPersistTSVTC < Test::Unit::TestCase
|
|
171
172
|
entity2 = "Entity 2"
|
172
173
|
|
173
174
|
annotations = [entity1, entity2]
|
174
|
-
|
175
|
+
TestAnnotationModule.setup(annotations, :test_annotation => "1")
|
175
176
|
annotations.extend AnnotatedArray
|
176
177
|
|
177
178
|
annotations_ary = [annotations]
|
178
|
-
|
179
|
+
TestAnnotationModule.setup(annotations_ary, :test_annotation => "1")
|
179
180
|
annotations_ary.extend AnnotatedArray
|
180
181
|
|
181
182
|
persisted_annotations = Persist.persist("Test", :annotations, :annotation_repo => repo) do
|
@@ -210,9 +211,9 @@ class TestPersistTSVTC < Test::Unit::TestCase
|
|
210
211
|
entity2 = "Entity 2"
|
211
212
|
entity2bis = "Entity 2"
|
212
213
|
|
213
|
-
|
214
|
-
|
215
|
-
|
214
|
+
TestAnnotationModule.setup(entity1, :test_annotation => "1")
|
215
|
+
TestAnnotationModule.setup(entity2, :test_annotation => "2")
|
216
|
+
TestAnnotationModule.setup(entity2bis, :test_annotation => "2")
|
216
217
|
|
217
218
|
annotations = [entity1, entity2, entity2bis]
|
218
219
|
|
data/test/rbbt/test_entity.rb
CHANGED
@@ -62,7 +62,7 @@ class TestKnowledgeBase < Test::Unit::TestCase
|
|
62
62
|
kb = KnowledgeBase.new tmpdir, Organism.default_code("Hsa")
|
63
63
|
kb.format = {"Gene" => "Ensembl Gene ID"}
|
64
64
|
|
65
|
-
kb.register :tfacts,
|
65
|
+
kb.register :tfacts, TFactS.regulators, :source =>"=~Associated Gene Name"
|
66
66
|
|
67
67
|
kb.get_index(:tfacts).reverse
|
68
68
|
end
|
@@ -74,7 +74,7 @@ class TestKnowledgeBase < Test::Unit::TestCase
|
|
74
74
|
kb = KnowledgeBase.new tmpdir, Organism.default_code("Hsa")
|
75
75
|
kb.format = {"Gene" => "Ensembl Gene ID"}
|
76
76
|
|
77
|
-
kb.register :tfacts,
|
77
|
+
kb.register :tfacts, TFactS.regulators, :source =>"=~Associated Gene Name"
|
78
78
|
|
79
79
|
assert_equal "Ensembl Gene ID", kb.get_database(:tfacts).key_field
|
80
80
|
|
@@ -113,10 +113,9 @@ class TestKnowledgeBase < Test::Unit::TestCase
|
|
113
113
|
|
114
114
|
def test_knowledge_base_reuse
|
115
115
|
organism = Organism.default_code("Hsa")
|
116
|
-
Log.severity = 0
|
117
116
|
TmpFile.with_file do |tmpdir|
|
118
117
|
Path.setup(tmpdir)
|
119
|
-
Association.index(
|
118
|
+
Association.index(TFactS.regulators, :persist_file => tmpdir.tfacts, :format => {"Gene" => "Ensembl Gene ID"}, :namespace => Organism.default_code("Hsa"))
|
120
119
|
|
121
120
|
kb = KnowledgeBase.load(tmpdir)
|
122
121
|
assert kb.identify_source('tfacts', "TP53") =~ /ENSG/
|
data/test/rbbt/test_persist.rb
CHANGED
@@ -4,12 +4,6 @@ require 'rbbt/annotations'
|
|
4
4
|
require 'rbbt/util/tmpfile'
|
5
5
|
require 'test/unit'
|
6
6
|
|
7
|
-
module TestAnnotation
|
8
|
-
extend Annotation
|
9
|
-
|
10
|
-
self.annotation :test_annotation
|
11
|
-
end
|
12
|
-
|
13
7
|
class TestPersist < Test::Unit::TestCase
|
14
8
|
|
15
9
|
def test_array_persist
|
@@ -78,4 +72,14 @@ class TestPersist < Test::Unit::TestCase
|
|
78
72
|
stream.join
|
79
73
|
end
|
80
74
|
end
|
75
|
+
|
76
|
+
def test_newer
|
77
|
+
TmpFile.with_file("Test1") do |tmp1|
|
78
|
+
sleep 1
|
79
|
+
TmpFile.with_file("Test1") do |tmp2|
|
80
|
+
assert Persist.newer?(tmp1, tmp2)
|
81
|
+
assert ! Persist.newer?(tmp2, tmp1)
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
81
85
|
end
|
data/test/rbbt/test_workflow.rb
CHANGED
@@ -204,7 +204,6 @@ class TestWorkflow < Test::Unit::TestCase
|
|
204
204
|
|
205
205
|
def test_update_on_input_dependency_update
|
206
206
|
Open.repository_dirs << File.join(ENV["HOME"],".rbbt/tmp/test/workflow")
|
207
|
-
Log.severity = 0
|
208
207
|
Misc.with_env "RBBT_UPDATE", "true" do
|
209
208
|
send_input_dep_to_reverse_job = TestWF.job(:send_input_dep_to_reverse, nil, :name => "Miguel")
|
210
209
|
send_input_dep_to_reverse_job.clean
|
@@ -376,21 +375,23 @@ class TestWorkflow < Test::Unit::TestCase
|
|
376
375
|
def test_delete_dep
|
377
376
|
job = TestWF.job(:t3).recursive_clean
|
378
377
|
job.run
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
378
|
+
Misc.with_env "RBBT_UPDATE", 'true' do
|
379
|
+
assert job.checks.select{|d| d.task_name.to_s == "t1" }.any?
|
380
|
+
job = TestWF.job(:t3)
|
381
|
+
job.step(:t1).clean
|
382
|
+
assert job.checks.select{|d| d.task_name.to_s == "t1" }.empty?
|
383
|
+
job = TestWF.job(:t3).recursive_clean
|
384
|
+
job.run
|
385
|
+
assert job.checks.select{|d| d.task_name.to_s == "t1" }.any?
|
386
|
+
job = TestWF.job(:t3)
|
387
|
+
sleep 1
|
388
|
+
Open.touch job.step(:t1).path
|
389
|
+
Misc.with_env "RBBT_UPDATE", "false" do
|
390
|
+
assert job.updated?
|
391
|
+
end
|
392
|
+
Misc.with_env "RBBT_UPDATE", "true" do
|
393
|
+
assert ! job.updated?
|
394
|
+
end
|
394
395
|
end
|
395
396
|
end
|
396
397
|
|
@@ -392,6 +392,20 @@ class TestTSVParallelThrough < Test::Unit::TestCase
|
|
392
392
|
assert_equal size, stream.read.split("\n").length
|
393
393
|
end
|
394
394
|
|
395
|
+
def test_traverse_into_path
|
396
|
+
size = 100
|
397
|
+
array = (1..size).to_a.collect{|n| n.to_s}
|
398
|
+
TmpFile.with_file do |tmpfile|
|
399
|
+
Path.setup(tmpfile)
|
400
|
+
io = TSV.traverse array, :into => tmpfile do |e|
|
401
|
+
e
|
402
|
+
end
|
403
|
+
io.join
|
404
|
+
assert_equal size, Open.read(tmpfile).split("\n").length
|
405
|
+
end
|
406
|
+
end
|
407
|
+
|
408
|
+
|
395
409
|
def test_traverse_progress
|
396
410
|
size = 1000
|
397
411
|
array = (1..size).to_a.collect{|n| n.to_s}
|
@@ -222,6 +222,17 @@ row2 aa|aa|AA|AA b1|b2|B1|B2 Id1|Id1|Id2|Id2
|
|
222
222
|
end
|
223
223
|
end
|
224
224
|
|
225
|
+
def test_to_s_no_fields
|
226
|
+
file1 =<<-EOF
|
227
|
+
row6 dd dd ee
|
228
|
+
row1 a b c
|
229
|
+
row2 A B C
|
230
|
+
row3 1 2 3
|
231
|
+
EOF
|
232
|
+
tsv1 = TSV.open StringIO.new(file1), :sep => " "
|
233
|
+
assert tsv1.to_s(:sort, true).include?('dd')
|
234
|
+
end
|
235
|
+
|
225
236
|
def test_to_s_unmerge_expand
|
226
237
|
content =<<-EOF
|
227
238
|
#Id ValueA ValueB OtherID
|
@@ -630,10 +630,8 @@ E B
|
|
630
630
|
tsv1 = Rbbt.tmp.test.test1.data.tsv :double, :sep => /\s+/
|
631
631
|
tsv2 = Rbbt.tmp.test.test2.data.tsv :double, :sep => /\s+/
|
632
632
|
|
633
|
-
Log.severity = 0
|
634
633
|
tsv1.attach tsv2, :fields => ["ValueE"] #, :persist_input => true
|
635
634
|
Log.tsv tsv1
|
636
|
-
ppp tsv1
|
637
635
|
|
638
636
|
end
|
639
637
|
end
|
data/test/rbbt/tsv/test_index.rb
CHANGED
@@ -29,7 +29,7 @@ row2 A B Id3
|
|
29
29
|
|
30
30
|
TmpFile.with_file(content) do |filename|
|
31
31
|
tsv = TSV.open(File.open(filename), :sep => /\s+/, :key_field => "OtherID", :persistence => false)
|
32
|
-
index = tsv.index(:
|
32
|
+
index = tsv.index(:persistence => true)
|
33
33
|
assert index["row1"].include? "Id1"
|
34
34
|
assert_equal "OtherID", index.fields.first
|
35
35
|
end
|
@@ -45,9 +45,8 @@ row2 A B Id3
|
|
45
45
|
|
46
46
|
TmpFile.with_file(content) do |filename|
|
47
47
|
tsv = TSV.open(File.open(filename), :sep => /\s+/, :key_field => "OtherID", :persistence => false)
|
48
|
-
|
49
|
-
|
50
|
-
Log.tsv index
|
48
|
+
index = tsv.index(:persistence => false, :fields => ["Id"], :target => "ValueA")
|
49
|
+
assert_equal "A", index["row2"]
|
51
50
|
end
|
52
51
|
|
53
52
|
end
|
@@ -243,7 +242,7 @@ g: ____
|
|
243
242
|
EOF
|
244
243
|
TmpFile.with_file(data) do |datafile|
|
245
244
|
load_segment_data(datafile)
|
246
|
-
TmpFile.with_file(load_segment_data(datafile)) do |tsvfile|
|
245
|
+
TmpFile.with_file(load_segment_data(datafile).to_s) do |tsvfile|
|
247
246
|
f = TSV.range_index(tsvfile, "Start", "End", :persistence => true)
|
248
247
|
|
249
248
|
#assert_equal %w(), f[0].sort
|
@@ -286,8 +285,8 @@ f: ___
|
|
286
285
|
g: ____
|
287
286
|
EOF
|
288
287
|
TmpFile.with_file(data) do |datafile|
|
289
|
-
TmpFile.with_file(load_segment_data(datafile)) do |tsvfile|
|
290
|
-
f = TSV.range_index(tsvfile, "Start", "End", :filters => [["field:Start", "3"]])
|
288
|
+
TmpFile.with_file(load_segment_data(datafile).to_s) do |tsvfile|
|
289
|
+
f = TSV.range_index(tsvfile, "Start", "End", :filters => [["field:Start", "3"]], :persist_update => true)
|
291
290
|
|
292
291
|
assert_equal %w(), f[0].sort
|
293
292
|
assert_equal %w(), f[1].sort
|
@@ -117,6 +117,26 @@ row2 A B C
|
|
117
117
|
end
|
118
118
|
end
|
119
119
|
|
120
|
+
def test_slice_empty
|
121
|
+
content =<<-EOF
|
122
|
+
#ID ValueA ValueB Comment
|
123
|
+
row1 a b c
|
124
|
+
row2 A B C
|
125
|
+
EOF
|
126
|
+
|
127
|
+
TmpFile.with_file(content) do |filename|
|
128
|
+
tsv = TSV.open(File.open(filename), :type => :list, :sep => /\s/)
|
129
|
+
tsv = tsv.slice []
|
130
|
+
assert tsv.fields.empty?
|
131
|
+
TmpFile.with_file do |tmpfile|
|
132
|
+
iii tsv.to_s
|
133
|
+
Open.write(tmpfile, tsv.to_s)
|
134
|
+
tsv = TSV.open tmpfile
|
135
|
+
assert tsv.fields.empty?
|
136
|
+
end
|
137
|
+
end
|
138
|
+
end
|
139
|
+
|
120
140
|
def test_select
|
121
141
|
content =<<-EOF
|
122
142
|
#Id ValueA ValueB OtherID
|
@@ -264,7 +284,7 @@ row3 a C Id4
|
|
264
284
|
|
265
285
|
def test_reorder_flat
|
266
286
|
content =<<-EOF
|
267
|
-
#Id ValueA
|
287
|
+
#Id ValueA
|
268
288
|
row1 a aa aaa
|
269
289
|
row2 A
|
270
290
|
row3 a
|
@@ -272,9 +292,8 @@ row3 a
|
|
272
292
|
|
273
293
|
TmpFile.with_file(content) do |filename|
|
274
294
|
tsv = TSV.open(File.open(filename), :sep => /\s+/, :type => :flat)
|
275
|
-
|
276
|
-
assert_equal ["row1", "row3"].sort, tsv.reorder("ValueA")["a"]
|
277
295
|
|
296
|
+
assert_equal ["row1", "row3"].sort, tsv.reorder("ValueA")["a"]
|
278
297
|
end
|
279
298
|
end
|
280
299
|
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require File.join(File.expand_path(File.dirname(__FILE__)), '../../..', 'test_helper.rb')
|
2
|
+
require 'rbbt/util/R'
|
2
3
|
require 'rbbt/util/R/model'
|
3
4
|
|
4
5
|
class TestRModel < Test::Unit::TestCase
|
@@ -49,7 +50,7 @@ data = rbbt.model.inpute(data, CI ~ Dose, method=drm, classes='numeric', fct=LL.
|
|
49
50
|
assert_equal result.size, result.column("CI").values.flatten.reject{|p| p.nil? or p.empty? or p == "NA"}.length
|
50
51
|
end
|
51
52
|
|
52
|
-
def
|
53
|
+
def __test_ab_surv_corr
|
53
54
|
require 'rbbt/workflow'
|
54
55
|
Workflow.require_workflow "Miller"
|
55
56
|
|
@@ -5,7 +5,6 @@ require 'rbbt/util/R/plot'
|
|
5
5
|
class TestRPlot < Test::Unit::TestCase
|
6
6
|
def __test_ggplotgif
|
7
7
|
|
8
|
-
Log.severity = 0
|
9
8
|
x = R.eval_a 'rnorm(100, 0, 1)'
|
10
9
|
data = TSV.setup(x, "Num~#:type=:single#:cast=:to_f")
|
11
10
|
|
@@ -22,7 +21,6 @@ ggplot(data) + geom_density(bw=frame.value, aes(x=Val))
|
|
22
21
|
|
23
22
|
def test_gif
|
24
23
|
|
25
|
-
Log.severity = 0
|
26
24
|
x = R.eval_a 'rnorm(100, 0, 1)'
|
27
25
|
data = TSV.setup(x, "Num~#:type=:single#:cast=:to_f")
|
28
26
|
|
@@ -2,12 +2,14 @@ require File.join(File.expand_path(File.dirname(__FILE__)), '../../..', 'test_he
|
|
2
2
|
require 'rbbt/util/misc/bgzf'
|
3
3
|
|
4
4
|
class TestBgzf < Test::Unit::TestCase
|
5
|
-
def
|
5
|
+
def _test_Bgzf
|
6
6
|
content = "1234567890" * 1000000
|
7
7
|
TmpFile.with_file(content) do |file|
|
8
8
|
compressed = file + '.gz'
|
9
9
|
`bgzip #{file} -c > #{compressed}`
|
10
10
|
stream = Bgzf.setup File.open(compressed)
|
11
|
+
assert_equal "1234", stream.read(4)
|
12
|
+
assert_equal "56", stream.read(2)
|
11
13
|
stream.seek 500003
|
12
14
|
assert_equal "4567", stream.read(4)
|
13
15
|
assert_equal "89", stream.read(2)
|
@@ -20,23 +22,25 @@ class TestBgzf < Test::Unit::TestCase
|
|
20
22
|
Misc.benchmark do
|
21
23
|
tsv = TSV.open(Open.open(file))
|
22
24
|
end
|
23
|
-
compressed = file + '.bgz'
|
24
25
|
|
25
|
-
`
|
26
|
-
stream =
|
26
|
+
`gzip #{file}`
|
27
|
+
stream = Open.open(file + '.gz')
|
27
28
|
Misc.benchmark do
|
28
29
|
tsv = TSV.open(stream)
|
29
30
|
end
|
30
31
|
|
31
|
-
`
|
32
|
-
|
32
|
+
`gunzip #{file}.gz`
|
33
|
+
compressed = file + '.bgz'
|
34
|
+
`bgzip #{file} -c > #{compressed}`
|
35
|
+
stream = Bgzf.setup File.open(compressed)
|
33
36
|
Misc.benchmark do
|
34
37
|
tsv = TSV.open(stream)
|
35
38
|
end
|
39
|
+
|
36
40
|
end
|
37
41
|
end
|
38
42
|
|
39
|
-
def
|
43
|
+
def _test_bgzip
|
40
44
|
assert File.exist?(Bgzf.bgzip_cmd)
|
41
45
|
assert 'bgzip', File.basename(Bgzf.bgzip_cmd)
|
42
46
|
end
|