File: gt_ruby_include.rb

package info (click to toggle)
genometools 1.6.1%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 50,412 kB
  • sloc: ansic: 271,241; ruby: 30,339; python: 4,880; sh: 3,193; makefile: 1,194; perl: 219; pascal: 159; haskell: 37; sed: 5
file content (160 lines) | stat: -rw-r--r-- 4,783 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
Name "gtruby: genome_stream bindings (output stream)"
Keywords "gt_ruby"
Test do
  run_ruby "#{$testdata}gtruby/gff3.rb #{$testdata}gff3_file_1_short.txt"
  run "env LC_ALL=C sort #{last_stdout}"
  run "diff #{last_stdout} #{$testdata}gff3_file_1_short_sorted.txt"
end

Name "gtruby: genome_visitor bindings (output stream)"
Keywords "gt_ruby"
Test do
  run_ruby "#{$testdata}gtruby/genome_visitor.rb #{$testdata}gff3_file_1_short.txt"
  run "env LC_ALL=C sort #{last_stdout}"
  run "diff #{last_stdout} #{$testdata}gff3_file_1_short_sorted.txt"
end

Name "gtruby: feature_index and feature_stream bindings"
Keywords "gt_ruby"
Test do
  run_ruby "#{$testdata}gtruby/feature_stuff.rb " +
           "#{$testdata}gff3_file_1_short.txt"
  run "env LC_ALL=C sort #{last_stdout}"
  run "grep -v '^##sequence-region' #{$testdata}gff3_file_1_short_sorted.txt | diff #{last_stdout} -"
end
if not $arguments["nocairo"] then
  Name "gtruby: AnnotationSketch bindings (valid gff3 file)"
  Keywords "gt_ruby"
  Test do
    run_ruby "#{$testdata}gtruby/sketch.rb test.png " +
             "#{$testdata}gff3_file_1_short.txt"
  end

  Name "gtruby: AnnotationSketch bindings (corrupt gff3 file)"
  Keywords "gt_ruby"
  Test do
    run_ruby("#{$testdata}gtruby/sketch.rb test.png #{$testdata}corrupt.gff3",
             :retval => 1)
    grep last_stderr, "GenomeTools error"
  end

  Name "gtruby: AnnotationSketch bindings (nonexistent gff3 file)"
  Keywords "gt_ruby"
  Test do
    run_ruby("#{$testdata}gtruby/sketch.rb test.png " +
             "#{$testdata}nonexistent_file", :retval => 1)
    grep last_stderr, "GenomeTools error"
  end

  Name "gtruby: AnnotationSketch bindings (PNG stream)"
  Keywords "gt_ruby"
  Test do
    run_ruby "#{$testdata}gtruby/sketch_stream.rb test.png " +
             "#{$testdata}gff3_file_1_short.txt"
  end

  Name "gtruby: AnnotationSketch bindings (TrackSelectorFunc)"
  Keywords "gt_ruby"
  Test do
    run_ruby "#{$testdata}gtruby/block_stuff.rb " +
             "#{$testdata}gff3_file_1_short.txt"
    run "env LC_ALL=C sort #{last_stdout}"
    run "diff #{last_stdout} #{$testdata}standard_gene_as_tree.blocks"
  end

  Name "gtruby: AnnotationSketch bindings (style)"
  Keywords "gt_ruby"
  Test do
    run_ruby "#{$testdata}gtruby/style.rb #{$cur}/gtdata/sketch/default.style"
  end

  Name "gtruby: AnnotationSketch bindings (error reporting)"
  Keywords "gt_ruby"
  Test do
    run_ruby "#{$testdata}gtruby/sketch-failures.rb " +
             "#{$testdata}gff3_file_1_short.txt"
  end

  Name "gtruby: AnnotationSketch bindings (Graphics)"
  Keywords "gt_ruby"
  Test do
    run_ruby "#{$testdata}gtruby/graphics_stuff.rb " +
             "#{$testdata}graphics_curve_test_coords.txt " +
             "out.svg"
    # will fail e.g. if cairo toy font setup is different from test machine
    # disabled for now
    # run "diff out.svg #{$testdata}graphics_test.out"
  end

  Name "gtruby: AnnotationSketch bindings (FeatureNode(Iterator))"
  Keywords "gt_ruby"
  Test do
    run_ruby "#{$testdata}gtruby/feature_node.rb"
  end

  Name "gtruby: show_recmaps"
  Keywords "gt_ruby showrecmaps"
  Test do
    run_ruby "#{$testdata}gtruby/show_recmaps.rb " +
             "#{$testdata}standard_gene_as_tree.gff3"
    run "diff #{last_stdout} #{$testdata}standard_gene_as_tree.hotspots"
  end
end

Name "gtruby: Encseq bindings"
Keywords "gt_ruby"
Test do
  run_ruby "#{$testdata}gtruby/encseq.rb"
end

Name "gtruby: show_seqids"
Keywords "gt_ruby"
Test do
  run_ruby "#{$testdata}gtruby/show_seqids.rb #{$testdata}encode_known_genes_Mar07.gff3"
  run "diff #{last_stdout} #{$testdata}encode_known_genes_Mar07.seqids"
end

Name "gtruby: used_types"
Keywords "gt_ruby"
Test do
  run_ruby "#{$testdata}gtruby/used_types.rb " +
           "#{$testdata}standard_gene_as_tree.gff3"
  run "diff #{last_stdout} #{$testdata}standard_gene_as_tree.types"
end

Name "gtruby: {Comment,Sequence,Region,Meta,EOF}Node classes"
Keywords "gt_ruby"
Test do
  run_ruby "#{$testdata}gtruby/node_types.rb"
end

Name "gtruby: CustomStream/CustomVisitor basic tests"
Keywords "gt_ruby"
Test do
  run_ruby "#{$testdata}gtruby/custom_stuff.rb #{$testdata}eden.gff3"
  run "diff #{last_stdout} #{$testdata}custom_streams_ref.txt"
end

Name "gtruby: CustomStream/CustomVisitor all node types"
Keywords "gt_ruby"
Test do
  run_ruby "#{$testdata}gtruby/custom_visitor.rb"
end

Name "gtruby: Range class"
Keywords "gt_ruby"
Test do
  run_ruby "#{$testdata}gtruby/range.rb"
end

Name "gtruby: TypeChecker class"
Keywords "gt_ruby"
Test do
  run_ruby "#{$testdata}gtruby/type_checker.rb #{$cur}/gtdata/obo_files/so.obo"
end

Name "gtruby: TypeChecker class (failure)"
Keywords "gt_ruby"
Test do
  run_ruby "#{$testdata}gtruby/type_checker.rb #{$gtdata}/obo_files/so", :retval => 1
end