bio 1.1.0 → 1.2.0
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.
- data/bin/bioruby +4 -3
- data/lib/bio.rb +3 -3
- data/lib/bio/appl/blast/format0.rb +3 -2
- data/lib/bio/appl/blast/format8.rb +5 -3
- data/lib/bio/db/kegg/compound.rb +6 -1
- data/lib/bio/db/kegg/enzyme.rb +3 -3
- data/lib/bio/db/kegg/genes.rb +2 -2
- data/lib/bio/db/kegg/glycan.rb +5 -5
- data/lib/bio/db/kegg/orthology.rb +27 -3
- data/lib/bio/db/newick.rb +203 -55
- data/lib/bio/io/flatfile.rb +2 -2
- data/lib/bio/io/flatfile/indexer.rb +2 -2
- data/lib/bio/io/keggapi.rb +2 -1
- data/lib/bio/io/pubmed.rb +223 -81
- data/lib/bio/sequence/common.rb +6 -3
- data/lib/bio/shell/interface.rb +2 -2
- data/lib/bio/shell/rails/vendor/plugins/generators/bioruby/bioruby_generator.rb +5 -5
- data/lib/bio/shell/rails/vendor/plugins/generators/bioruby/templates/bioruby.css +7 -8
- data/lib/bio/shell/rails/vendor/plugins/generators/bioruby/templates/bioruby.rhtml +1 -1
- data/lib/bio/shell/rails/vendor/plugins/generators/bioruby/templates/index.rhtml +21 -17
- data/lib/bio/shell/rails/vendor/plugins/generators/bioruby/templates/spinner.gif +0 -0
- data/test/functional/bio/io/test_ensembl.rb +87 -4
- data/test/unit/bio/db/test_newick.rb +238 -1
- data/test/unit/bio/sequence/test_aa.rb +3 -2
- data/test/unit/bio/sequence/test_common.rb +11 -2
- data/test/unit/bio/sequence/test_na.rb +63 -1
- metadata +4 -4
- data/lib/bio/shell/rails/vendor/plugins/generators/bioruby/templates/bioruby-console.png +0 -0
@@ -5,7 +5,7 @@
|
|
5
5
|
# Mitsuteru C. Nakao <n@bioruby.org>
|
6
6
|
# License:: The Ruby License
|
7
7
|
#
|
8
|
-
# $Id: test_aa.rb,v 1.
|
8
|
+
# $Id: test_aa.rb,v 1.5 2007/12/03 06:19:12 nakao Exp $
|
9
9
|
#
|
10
10
|
|
11
11
|
require 'pathname'
|
@@ -19,8 +19,8 @@ require 'bio/sequence/aa'
|
|
19
19
|
|
20
20
|
module Bio
|
21
21
|
|
22
|
-
|
23
22
|
class TestSequenceAANew < Test::Unit::TestCase
|
23
|
+
|
24
24
|
def test_new
|
25
25
|
str = "RRLEHTFVFL RNFSLMLLRY"
|
26
26
|
assert(Bio::Sequence::AA.new(str))
|
@@ -86,6 +86,7 @@ module Bio
|
|
86
86
|
"leucine", "leucine", "arginine", "tyrosine"]
|
87
87
|
assert_equal(ary, @obj.names)
|
88
88
|
end
|
89
|
+
|
89
90
|
end
|
90
91
|
|
91
92
|
|
@@ -4,7 +4,7 @@
|
|
4
4
|
# Copyright:: Copyright (C) 2006 Mitsuteru C. Nakao <n@bioruby.org>
|
5
5
|
# License:: The Ruby License
|
6
6
|
#
|
7
|
-
# $Id: test_common.rb,v 1.
|
7
|
+
# $Id: test_common.rb,v 1.5 2007/12/03 06:19:12 nakao Exp $
|
8
8
|
#
|
9
9
|
|
10
10
|
require 'pathname'
|
@@ -31,18 +31,27 @@ module Bio
|
|
31
31
|
assert_equal('atgcatgcatgcatgcaaaa', @obj.to_s)
|
32
32
|
end
|
33
33
|
|
34
|
+
def test_to_str
|
35
|
+
assert_equal('atgcatgcatgcatgcaaaa', @obj.to_str)
|
36
|
+
end
|
37
|
+
|
34
38
|
def test_seq
|
35
39
|
str = "atgcatgcatgcatgcaaaa"
|
36
40
|
assert_equal(str, @obj.seq)
|
37
41
|
end
|
38
42
|
|
39
|
-
|
40
43
|
# <<(*arg)
|
41
44
|
def test_push
|
42
45
|
str = "atgcatgcatgcatgcaaaaA"
|
43
46
|
assert_equal(str, @obj << "A")
|
44
47
|
end
|
45
48
|
|
49
|
+
# concat(*arg)
|
50
|
+
def test_concat
|
51
|
+
str = "atgcatgcatgcatgcaaaaA"
|
52
|
+
assert_equal(str, @obj.concat("A"))
|
53
|
+
end
|
54
|
+
|
46
55
|
# +(*arg)
|
47
56
|
def test_sum
|
48
57
|
str = "atgcatgcatgcatgcaaaaatgcatgcatgcatgcaaaa"
|
@@ -5,7 +5,7 @@
|
|
5
5
|
# Mitsuteru C. Nakao <n@bioruby.org>
|
6
6
|
# License:: The Ruby License
|
7
7
|
#
|
8
|
-
# $Id: test_na.rb,v 1.
|
8
|
+
# $Id: test_na.rb,v 1.6 2007/12/03 06:19:12 nakao Exp $
|
9
9
|
#
|
10
10
|
|
11
11
|
require 'pathname'
|
@@ -175,6 +175,68 @@ module Bio
|
|
175
175
|
|
176
176
|
end
|
177
177
|
|
178
|
+
class TestSequenceCommon < Test::Unit::TestCase
|
179
|
+
|
180
|
+
def setup
|
181
|
+
@obj = Bio::Sequence::NA.new('atgcatgcatgcatgcaaaa')
|
182
|
+
end
|
183
|
+
|
184
|
+
def test_to_s
|
185
|
+
assert_equal('atgcatgcatgcatgcaaaa', @obj.to_s)
|
186
|
+
end
|
187
|
+
|
188
|
+
def test_to_str
|
189
|
+
assert_equal('atgcatgcatgcatgcaaaa', @obj.to_str)
|
190
|
+
end
|
191
|
+
|
192
|
+
def test_seq
|
193
|
+
str = "atgcatgcatgcatgcaaaa"
|
194
|
+
assert_equal(str, @obj.seq)
|
195
|
+
end
|
196
|
+
|
197
|
+
# <<(*arg)
|
198
|
+
def test_push
|
199
|
+
str = "atgcatgcatgcatgcaaaaa"
|
200
|
+
assert_equal(str, @obj << "A")
|
201
|
+
end
|
202
|
+
|
203
|
+
# concat(*arg)
|
204
|
+
def test_concat
|
205
|
+
str = "atgcatgcatgcatgcaaaaa"
|
206
|
+
assert_equal(str, @obj.concat("A"))
|
207
|
+
end
|
208
|
+
|
209
|
+
# +(*arg)
|
210
|
+
def test_sum
|
211
|
+
str = "atgcatgcatgcatgcaaaaatgcatgcatgcatgcaaaa"
|
212
|
+
assert_equal(str, @obj + @obj)
|
213
|
+
end
|
214
|
+
|
215
|
+
# window_search(window_size, step_size = 1)
|
216
|
+
def test_window_search
|
217
|
+
@obj.window_search(4) do |subseq|
|
218
|
+
assert_equal(20, @obj.size)
|
219
|
+
end
|
220
|
+
end
|
221
|
+
|
222
|
+
#total(hash)
|
223
|
+
def test_total
|
224
|
+
hash = {'a' => 1, 'c' => 2, 'g' => 4, 't' => 3}
|
225
|
+
assert_equal(44.0, @obj.total(hash))
|
226
|
+
end
|
227
|
+
|
228
|
+
def test_composition
|
229
|
+
composition = {"a"=>8, "c"=>4, "g"=>4, "t"=>4}
|
230
|
+
assert_equal(composition, @obj.composition)
|
231
|
+
end
|
232
|
+
|
233
|
+
def test_splicing
|
234
|
+
#(position)
|
235
|
+
assert_equal("atgcatgc", @obj.splicing("join(1..4, 13..16)"))
|
236
|
+
end
|
237
|
+
end
|
238
|
+
|
239
|
+
|
178
240
|
class TestSequenceNATranslation < Test::Unit::TestCase
|
179
241
|
def setup
|
180
242
|
|
metadata
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.9.
|
2
|
+
rubygems_version: 0.9.4
|
3
3
|
specification_version: 1
|
4
4
|
name: bio
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 1.
|
7
|
-
date: 2007-
|
6
|
+
version: 1.2.0
|
7
|
+
date: 2007-12-15 00:00:00 +09:00
|
8
8
|
summary: Bioinformatics library
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -220,7 +220,6 @@ files:
|
|
220
220
|
- lib/bio/shell/rails/vendor/plugins/generators/bioruby/templates/_modules.rhtml
|
221
221
|
- lib/bio/shell/rails/vendor/plugins/generators/bioruby/templates/_variables.rhtml
|
222
222
|
- lib/bio/shell/rails/vendor/plugins/generators/bioruby/templates/bioruby-bg.gif
|
223
|
-
- lib/bio/shell/rails/vendor/plugins/generators/bioruby/templates/bioruby-console.png
|
224
223
|
- lib/bio/shell/rails/vendor/plugins/generators/bioruby/templates/bioruby-gem.png
|
225
224
|
- lib/bio/shell/rails/vendor/plugins/generators/bioruby/templates/bioruby-link.gif
|
226
225
|
- lib/bio/shell/rails/vendor/plugins/generators/bioruby/templates/bioruby.css
|
@@ -230,6 +229,7 @@ files:
|
|
230
229
|
- lib/bio/shell/rails/vendor/plugins/generators/bioruby/templates/commands.rhtml
|
231
230
|
- lib/bio/shell/rails/vendor/plugins/generators/bioruby/templates/history.rhtml
|
232
231
|
- lib/bio/shell/rails/vendor/plugins/generators/bioruby/templates/index.rhtml
|
232
|
+
- lib/bio/shell/rails/vendor/plugins/generators/bioruby/templates/spinner.gif
|
233
233
|
- lib/bio/shell/script.rb
|
234
234
|
- lib/bio/shell/setup.rb
|
235
235
|
- lib/bio/shell/web.rb
|