bio 0.7.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.
Files changed (201) hide show
  1. data/bin/bioruby +107 -0
  2. data/bin/br_biofetch.rb +59 -0
  3. data/bin/br_bioflat.rb +294 -0
  4. data/bin/br_biogetseq.rb +57 -0
  5. data/bin/br_pmfetch.rb +431 -0
  6. data/doc/BioRuby.rd.ja +225 -0
  7. data/doc/Changes-0.7.rd +236 -0
  8. data/doc/Design.rd.ja +341 -0
  9. data/doc/KEGG_API.rd +1437 -0
  10. data/doc/KEGG_API.rd.ja +1399 -0
  11. data/doc/TODO.rd.ja +138 -0
  12. data/doc/Tutorial.rd +1138 -0
  13. data/doc/Tutorial.rd.ja +2110 -0
  14. data/etc/bioinformatics/seqdatabase.ini +210 -0
  15. data/lib/bio.rb +256 -0
  16. data/lib/bio/alignment.rb +1906 -0
  17. data/lib/bio/appl/bl2seq/report.rb +350 -0
  18. data/lib/bio/appl/blast.rb +269 -0
  19. data/lib/bio/appl/blast/format0.rb +1402 -0
  20. data/lib/bio/appl/blast/format8.rb +95 -0
  21. data/lib/bio/appl/blast/report.rb +652 -0
  22. data/lib/bio/appl/blast/rexml.rb +151 -0
  23. data/lib/bio/appl/blast/wublast.rb +553 -0
  24. data/lib/bio/appl/blast/xmlparser.rb +222 -0
  25. data/lib/bio/appl/blat/report.rb +392 -0
  26. data/lib/bio/appl/clustalw.rb +191 -0
  27. data/lib/bio/appl/clustalw/report.rb +154 -0
  28. data/lib/bio/appl/emboss.rb +68 -0
  29. data/lib/bio/appl/fasta.rb +262 -0
  30. data/lib/bio/appl/fasta/format10.rb +428 -0
  31. data/lib/bio/appl/fasta/format6.rb +37 -0
  32. data/lib/bio/appl/genscan/report.rb +570 -0
  33. data/lib/bio/appl/hmmer.rb +129 -0
  34. data/lib/bio/appl/hmmer/report.rb +556 -0
  35. data/lib/bio/appl/mafft.rb +222 -0
  36. data/lib/bio/appl/mafft/report.rb +119 -0
  37. data/lib/bio/appl/psort.rb +555 -0
  38. data/lib/bio/appl/psort/report.rb +473 -0
  39. data/lib/bio/appl/sim4.rb +134 -0
  40. data/lib/bio/appl/sim4/report.rb +501 -0
  41. data/lib/bio/appl/sosui/report.rb +166 -0
  42. data/lib/bio/appl/spidey/report.rb +604 -0
  43. data/lib/bio/appl/targetp/report.rb +283 -0
  44. data/lib/bio/appl/tmhmm/report.rb +238 -0
  45. data/lib/bio/command.rb +166 -0
  46. data/lib/bio/data/aa.rb +354 -0
  47. data/lib/bio/data/codontable.rb +740 -0
  48. data/lib/bio/data/na.rb +226 -0
  49. data/lib/bio/db.rb +340 -0
  50. data/lib/bio/db/aaindex.rb +280 -0
  51. data/lib/bio/db/embl/common.rb +332 -0
  52. data/lib/bio/db/embl/embl.rb +446 -0
  53. data/lib/bio/db/embl/sptr.rb +954 -0
  54. data/lib/bio/db/embl/swissprot.rb +32 -0
  55. data/lib/bio/db/embl/trembl.rb +31 -0
  56. data/lib/bio/db/embl/uniprot.rb +32 -0
  57. data/lib/bio/db/fantom.rb +604 -0
  58. data/lib/bio/db/fasta.rb +869 -0
  59. data/lib/bio/db/genbank/common.rb +299 -0
  60. data/lib/bio/db/genbank/ddbj.rb +34 -0
  61. data/lib/bio/db/genbank/genbank.rb +354 -0
  62. data/lib/bio/db/genbank/genpept.rb +73 -0
  63. data/lib/bio/db/genbank/refseq.rb +31 -0
  64. data/lib/bio/db/gff.rb +106 -0
  65. data/lib/bio/db/go.rb +497 -0
  66. data/lib/bio/db/kegg/brite.rb +51 -0
  67. data/lib/bio/db/kegg/cell.rb +88 -0
  68. data/lib/bio/db/kegg/compound.rb +130 -0
  69. data/lib/bio/db/kegg/enzyme.rb +125 -0
  70. data/lib/bio/db/kegg/expression.rb +173 -0
  71. data/lib/bio/db/kegg/genes.rb +293 -0
  72. data/lib/bio/db/kegg/genome.rb +362 -0
  73. data/lib/bio/db/kegg/glycan.rb +213 -0
  74. data/lib/bio/db/kegg/keggtab.rb +418 -0
  75. data/lib/bio/db/kegg/kgml.rb +299 -0
  76. data/lib/bio/db/kegg/ko.rb +178 -0
  77. data/lib/bio/db/kegg/reaction.rb +97 -0
  78. data/lib/bio/db/litdb.rb +131 -0
  79. data/lib/bio/db/medline.rb +317 -0
  80. data/lib/bio/db/nbrf.rb +199 -0
  81. data/lib/bio/db/pdb.rb +38 -0
  82. data/lib/bio/db/pdb/atom.rb +60 -0
  83. data/lib/bio/db/pdb/chain.rb +117 -0
  84. data/lib/bio/db/pdb/model.rb +106 -0
  85. data/lib/bio/db/pdb/pdb.rb +1682 -0
  86. data/lib/bio/db/pdb/residue.rb +122 -0
  87. data/lib/bio/db/pdb/utils.rb +234 -0
  88. data/lib/bio/db/prosite.rb +616 -0
  89. data/lib/bio/db/rebase.rb +417 -0
  90. data/lib/bio/db/transfac.rb +387 -0
  91. data/lib/bio/feature.rb +201 -0
  92. data/lib/bio/io/brdb.rb +103 -0
  93. data/lib/bio/io/das.rb +471 -0
  94. data/lib/bio/io/dbget.rb +212 -0
  95. data/lib/bio/io/ddbjxml.rb +614 -0
  96. data/lib/bio/io/fastacmd.rb +123 -0
  97. data/lib/bio/io/fetch.rb +114 -0
  98. data/lib/bio/io/flatfile.rb +496 -0
  99. data/lib/bio/io/flatfile/bdb.rb +266 -0
  100. data/lib/bio/io/flatfile/index.rb +1308 -0
  101. data/lib/bio/io/flatfile/indexer.rb +778 -0
  102. data/lib/bio/io/higet.rb +92 -0
  103. data/lib/bio/io/keggapi.rb +863 -0
  104. data/lib/bio/io/pubmed.rb +189 -0
  105. data/lib/bio/io/registry.rb +308 -0
  106. data/lib/bio/io/soapwsdl.rb +114 -0
  107. data/lib/bio/io/sql.rb +428 -0
  108. data/lib/bio/location.rb +650 -0
  109. data/lib/bio/pathway.rb +991 -0
  110. data/lib/bio/reference.rb +308 -0
  111. data/lib/bio/sequence.rb +593 -0
  112. data/lib/bio/shell.rb +51 -0
  113. data/lib/bio/shell/core.rb +512 -0
  114. data/lib/bio/shell/plugin/codon.rb +228 -0
  115. data/lib/bio/shell/plugin/entry.rb +85 -0
  116. data/lib/bio/shell/plugin/flatfile.rb +119 -0
  117. data/lib/bio/shell/plugin/keggapi.rb +187 -0
  118. data/lib/bio/shell/plugin/midi.rb +448 -0
  119. data/lib/bio/shell/plugin/obda.rb +63 -0
  120. data/lib/bio/shell/plugin/seq.rb +238 -0
  121. data/lib/bio/shell/session.rb +214 -0
  122. data/lib/bio/util/color_scheme.rb +214 -0
  123. data/lib/bio/util/color_scheme/buried.rb +78 -0
  124. data/lib/bio/util/color_scheme/helix.rb +78 -0
  125. data/lib/bio/util/color_scheme/hydropathy.rb +83 -0
  126. data/lib/bio/util/color_scheme/nucleotide.rb +50 -0
  127. data/lib/bio/util/color_scheme/strand.rb +78 -0
  128. data/lib/bio/util/color_scheme/taylor.rb +69 -0
  129. data/lib/bio/util/color_scheme/turn.rb +78 -0
  130. data/lib/bio/util/color_scheme/zappo.rb +69 -0
  131. data/lib/bio/util/contingency_table.rb +337 -0
  132. data/lib/bio/util/sirna.rb +306 -0
  133. data/lib/bioruby.rb +34 -0
  134. data/sample/biofetch.rb +475 -0
  135. data/sample/color_scheme_na.rb +99 -0
  136. data/sample/dbget +37 -0
  137. data/sample/fasta2tab.rb +99 -0
  138. data/sample/fsplit.rb +51 -0
  139. data/sample/gb2fasta.rb +31 -0
  140. data/sample/gb2tab.rb +325 -0
  141. data/sample/gbtab2mysql.rb +161 -0
  142. data/sample/genes2nuc.rb +33 -0
  143. data/sample/genes2pep.rb +33 -0
  144. data/sample/genes2tab.rb +81 -0
  145. data/sample/genome2rb.rb +29 -0
  146. data/sample/genome2tab.rb +76 -0
  147. data/sample/goslim.rb +311 -0
  148. data/sample/gt2fasta.rb +47 -0
  149. data/sample/pmfetch.rb +42 -0
  150. data/sample/pmsearch.rb +42 -0
  151. data/sample/psortplot_html.rb +222 -0
  152. data/sample/ssearch2tab.rb +96 -0
  153. data/sample/tdiary.rb +158 -0
  154. data/sample/tfastx2tab.rb +100 -0
  155. data/sample/vs-genes.rb +212 -0
  156. data/test/data/SOSUI/sample.report +11 -0
  157. data/test/data/TMHMM/sample.report +21 -0
  158. data/test/data/blast/eco:b0002.faa +15 -0
  159. data/test/data/blast/eco:b0002.faa.m0 +128 -0
  160. data/test/data/blast/eco:b0002.faa.m7 +65 -0
  161. data/test/data/blast/eco:b0002.faa.m8 +1 -0
  162. data/test/data/embl/AB090716.embl +65 -0
  163. data/test/data/genscan/sample.report +63 -0
  164. data/test/data/prosite/prosite.dat +2233 -0
  165. data/test/data/refseq/nm_126355.entret +64 -0
  166. data/test/data/uniprot/p53_human.uniprot +1456 -0
  167. data/test/runner.rb +10 -0
  168. data/test/unit/bio/appl/blast/test_report.rb +427 -0
  169. data/test/unit/bio/appl/blast/test_xmlparser.rb +400 -0
  170. data/test/unit/bio/appl/genscan/test_report.rb +195 -0
  171. data/test/unit/bio/appl/sosui/test_report.rb +94 -0
  172. data/test/unit/bio/appl/targetp/test_report.rb +159 -0
  173. data/test/unit/bio/appl/test_blast.rb +159 -0
  174. data/test/unit/bio/appl/test_fasta.rb +142 -0
  175. data/test/unit/bio/appl/tmhmm/test_report.rb +139 -0
  176. data/test/unit/bio/data/test_aa.rb +103 -0
  177. data/test/unit/bio/data/test_codontable.rb +120 -0
  178. data/test/unit/bio/data/test_na.rb +89 -0
  179. data/test/unit/bio/db/embl/test_common.rb +130 -0
  180. data/test/unit/bio/db/embl/test_embl.rb +227 -0
  181. data/test/unit/bio/db/embl/test_sptr.rb +268 -0
  182. data/test/unit/bio/db/embl/test_uniprot.rb +44 -0
  183. data/test/unit/bio/db/kegg/test_genes.rb +58 -0
  184. data/test/unit/bio/db/test_fasta.rb +263 -0
  185. data/test/unit/bio/db/test_gff.rb +140 -0
  186. data/test/unit/bio/db/test_prosite.rb +1450 -0
  187. data/test/unit/bio/io/test_ddbjxml.rb +87 -0
  188. data/test/unit/bio/io/test_soapwsdl.rb +45 -0
  189. data/test/unit/bio/shell/plugin/test_seq.rb +175 -0
  190. data/test/unit/bio/test_alignment.rb +1028 -0
  191. data/test/unit/bio/test_command.rb +71 -0
  192. data/test/unit/bio/test_db.rb +109 -0
  193. data/test/unit/bio/test_feature.rb +128 -0
  194. data/test/unit/bio/test_location.rb +51 -0
  195. data/test/unit/bio/test_pathway.rb +485 -0
  196. data/test/unit/bio/test_sequence.rb +386 -0
  197. data/test/unit/bio/test_shell.rb +31 -0
  198. data/test/unit/bio/util/test_color_scheme.rb +45 -0
  199. data/test/unit/bio/util/test_contingency_table.rb +106 -0
  200. data/test/unit/bio/util/test_sirna.rb +258 -0
  201. metadata +295 -0
@@ -0,0 +1,106 @@
1
+ #
2
+ # test/unit/bio/util/test_contingency_table.rb - Unit test for Bio::ContingencyTable
3
+ #
4
+ # Copyright (C) 2005 Trevor Wennblom <trevor@corevx.com>
5
+ #
6
+ # This library is free software; you can redistribute it and/or
7
+ # modify it under the terms of the GNU Lesser General Public
8
+ # License as published by the Free Software Foundation; either
9
+ # version 2 of the License, or (at your option) any later version.
10
+ #
11
+ # This library is distributed in the hope that it will be useful,
12
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
+ # Lesser General Public License for more details.
15
+ #
16
+ # You should have received a copy of the GNU Lesser General Public
17
+ # License along with this library; if not, write to the Free Software
18
+ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19
+ #
20
+ # $Id: test_contingency_table.rb,v 1.2 2005/11/23 11:55:17 nakao Exp $
21
+ #
22
+
23
+ require 'pathname'
24
+ libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 4 , 'lib')).cleanpath.to_s
25
+ $:.unshift(libpath) unless $:.include?(libpath)
26
+
27
+ require 'test/unit'
28
+ require 'bio/util/contingency_table'
29
+
30
+ module Bio
31
+ class TestContingencyTable < Test::Unit::TestCase
32
+
33
+ def lite_example(sequences, max_length, characters)
34
+
35
+ output = []
36
+
37
+ 0.upto(max_length - 1) do |i|
38
+ (i+1).upto(max_length - 1) do |j|
39
+ ctable = Bio::ContingencyTable.new( characters )
40
+ sequences.each do |seq|
41
+ i_char = seq[i].chr
42
+ j_char = seq[j].chr
43
+ ctable.table[i_char][j_char] += 1
44
+ end
45
+ chi_square = ctable.chi_square
46
+ contingency_coefficient = ctable.contingency_coefficient
47
+ output << [(i+1), (j+1), chi_square, contingency_coefficient]
48
+ end
49
+ end
50
+
51
+ return output
52
+ end
53
+
54
+
55
+ def test_lite_example
56
+ ctable = Bio::ContingencyTable
57
+ allowed_letters = 'abcdefghijk'.split('')
58
+
59
+ seqs = Array.new
60
+ seqs << 'abcde'
61
+ seqs << 'abcde'
62
+ seqs << 'kacje'
63
+ seqs << 'aacae'
64
+ seqs << 'akcfa'
65
+ seqs << 'akcfe'
66
+
67
+ length_of_every_sequence = seqs[0].size # 5 letters long
68
+
69
+ results = lite_example(seqs, length_of_every_sequence, allowed_letters)
70
+
71
+ =begin
72
+ i j chi_square contingency_coefficient
73
+ 1 2 2.4 0.534522483824849
74
+ 1 3 0.0 0.0
75
+ 1 4 6.0 0.707106781186548
76
+ 1 5 0.24 0.196116135138184
77
+ 2 3 0.0 0.0
78
+ 2 4 12.0 0.816496580927726
79
+ 2 5 2.4 0.534522483824849
80
+ 3 4 0.0 0.0
81
+ 3 5 0.0 0.0
82
+ 4 5 2.4 0.534522483824849
83
+ =end
84
+
85
+
86
+ #assert_equal(2.4, results[0][2])
87
+ assert_equal('2.4', results[0][2].to_s)
88
+ assert_equal('0.534522483824849', results[0][3].to_s)
89
+
90
+ assert_equal('12.0', results[5][2].to_s)
91
+ assert_equal('0.816496580927726', results[5][3].to_s)
92
+
93
+ assert_equal('2.4', results[9][2].to_s)
94
+ assert_equal('0.534522483824849', results[9][3].to_s)
95
+
96
+ ctable = Bio::ContingencyTable.new
97
+ ctable.table['a']['t'] = 4
98
+ ctable.table['a']['g'] = 2
99
+ ctable.table['g']['t'] = 3
100
+ assert_equal('1.28571428571429', ctable.chi_square.to_s)
101
+ assert_equal(ctable.column_sum_all, ctable.row_sum_all)
102
+ assert_equal(ctable.column_sum_all, ctable.table_sum_all)
103
+ end
104
+
105
+ end
106
+ end
@@ -0,0 +1,258 @@
1
+ #
2
+ # test/unit/bio/util/test_sirna.rb - Unit test for Bio::SiRNA.
3
+ #
4
+ # Copyright (C) 2005 Mitsuteru C. Nakap <n@bioruby.org>
5
+ #
6
+ # This library is free software; you can redistribute it and/or
7
+ # modify it under the terms of the GNU Lesser General Public
8
+ # License as published by the Free Software Foundation; either
9
+ # version 2 of the License, or (at your option) any later version.
10
+ #
11
+ # This library is distributed in the hope that it will be useful,
12
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
+ # Lesser General Public License for more details.
15
+ #
16
+ # You should have received a copy of the GNU Lesser General Public
17
+ # License along with this library; if not, write to the Free Software
18
+ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19
+ #
20
+ # $Id: test_sirna.rb,v 1.1 2005/11/14 14:46:06 nakao Exp $
21
+ #
22
+
23
+ require 'pathname'
24
+ libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 4 , 'lib')).cleanpath.to_s
25
+ $:.unshift(libpath) unless $:.include?(libpath)
26
+
27
+ require 'test/unit'
28
+ require 'bio/util/sirna'
29
+
30
+ module Bio
31
+ class TestSiRNANew < Test::Unit::TestCase
32
+ def test_new
33
+ srand(1)
34
+ naseq = Bio::Sequence::NA.new("ACGT" * 100).randomize
35
+ assert(Bio::SiRNA.new(naseq))
36
+ assert(Bio::SiRNA.new(naseq, 21))
37
+ assert(Bio::SiRNA.new(naseq, 21, 60.0))
38
+ assert(Bio::SiRNA.new(naseq, 21, 60.0, 40.0))
39
+ assert_raise(ArgumentError) { Bio::SiRNA.new(naseq, 21, 60.0, 40.0, 10.0) }
40
+ end
41
+
42
+ end
43
+
44
+ class TestSiRNA < Test::Unit::TestCase
45
+ def setup
46
+ srand(1)
47
+ naseq = Bio::Sequence::NA.new("ACGT" * 100).randomize
48
+ @obj = Bio::SiRNA.new(naseq)
49
+ end
50
+
51
+ def test_antisense_size
52
+ assert_equal(21, @obj.antisense_size)
53
+ end
54
+
55
+ def test_max_gc_percent
56
+ assert_equal(60.0, @obj.max_gc_percent)
57
+ end
58
+
59
+ def test_min_gc_percent
60
+ assert_equal(40.0, @obj.min_gc_percent)
61
+ end
62
+
63
+ def test_uitei?
64
+ target = "aaGaa"
65
+ assert_equal(false, @obj.uitei?(target))
66
+ target = "aaAaa"
67
+ assert_equal(false, @obj.uitei?(target))
68
+ target = "G" * 9
69
+ assert_equal(false, @obj.uitei?(target))
70
+ end
71
+
72
+ def test_reynolds?
73
+ target = "G" * 9
74
+ assert_equal(false, @obj.reynolds?(target))
75
+ target = "aaaaAaaaaaaUaaAaaaaaAaa"
76
+ assert_equal(true, @obj.reynolds?(target))
77
+ end
78
+
79
+ def test_uitei
80
+ assert(@obj.uitei)
81
+ end
82
+
83
+ def test_reynolds
84
+ assert(@obj.reynolds)
85
+ end
86
+
87
+ def test_design
88
+ assert(@obj.design)
89
+ end
90
+
91
+
92
+ def test_design_uitei
93
+ assert(@obj.design('uitei'))
94
+ end
95
+
96
+ def test_design_reynolds
97
+ assert(@obj.design('reynolds'))
98
+ end
99
+ end
100
+
101
+ class TestSiRNAPairNew < Test::Unit::TestCase
102
+ def test_new
103
+ target = ""
104
+ sense = ""
105
+ antisense = ""
106
+ start = 0
107
+ stop = 1
108
+ rule = 'rule'
109
+ gc_percent = 60.0
110
+ assert_raise(ArgumentError) { Bio::SiRNA::Pair.new(target, sense, antisense, start, stop, rule) }
111
+ assert(Bio::SiRNA::Pair.new(target, sense, antisense, start, stop, rule, gc_percent))
112
+ assert_raise(ArgumentError) { Bio::SiRNA::Pair.new(target, sense, antisense, start, stop, rule, gc_percent, "") }
113
+ end
114
+ end
115
+
116
+
117
+ class TestSiRNAPair < Test::Unit::TestCase
118
+ def setup
119
+ srand(1)
120
+ naseq = Bio::Sequence::NA.new("ACGT" * 100).randomize
121
+ @obj = Bio::SiRNA.new(naseq).design.first
122
+ end
123
+
124
+ def test_target
125
+ assert_equal("gcggacguaaggaguauuccugu", @obj.target)
126
+ end
127
+
128
+ def test_sense
129
+ assert_equal("ggacguaaggaguauuccugu", @obj.sense)
130
+ end
131
+
132
+ def test_antisense
133
+ assert_equal("aggaauacuccuuacguccgc", @obj.antisense)
134
+ end
135
+
136
+ def test_start
137
+ assert_equal(9, @obj.start)
138
+ end
139
+
140
+ def test_stop
141
+ assert_equal(32, @obj.stop)
142
+ end
143
+
144
+ def test_rule
145
+ assert_equal("uitei", @obj.rule)
146
+ end
147
+
148
+ def test_gc_percent
149
+ assert_equal(52.0, @obj.gc_percent)
150
+ end
151
+
152
+ def test_report
153
+ report =<<END
154
+ ### siRNA
155
+ Start: 9
156
+ Stop: 32
157
+ Rule: uitei
158
+ GC %: 52
159
+ Target: GCGGACGUAAGGAGUAUUCCUGU
160
+ Sense: GGACGUAAGGAGUAUUCCUGU
161
+ Antisense: CGCCUGCAUUCCUCAUAAGGA
162
+ END
163
+ assert_equal(report, @obj.report)
164
+ end
165
+ end
166
+
167
+ class TestShRNANew < Test::Unit::TestCase
168
+ def test_new
169
+ pair = ""
170
+ assert(Bio::SiRNA::ShRNA.new(pair))
171
+ assert_raise(ArgumentError) { Bio::SiRNA::ShRNA.new }
172
+ assert_raise(ArgumentError) { Bio::SiRNA::ShRNA.new(pair, "") }
173
+ end
174
+ end
175
+
176
+ class TestShRNA < Test::Unit::TestCase
177
+ def setup
178
+ srand(1)
179
+ naseq = Bio::Sequence::NA.new("ACGT" * 100).randomize
180
+ sirna = Bio::SiRNA.new(naseq)
181
+ pairs = sirna.design
182
+ @obj = Bio::SiRNA::ShRNA.new(pairs.first)
183
+ end
184
+
185
+ def test_top_strand
186
+ @obj.design
187
+ assert_equal("caccggacguaaggaguauuccugugtgtgctgtccacaggaauacuccuuacgucc", @obj.top_strand)
188
+ end
189
+
190
+ def test_top_strand_class
191
+ @obj.design
192
+ assert_equal(Bio::Sequence::NA, @obj.top_strand.class)
193
+ end
194
+
195
+ def test_top_strand_nil
196
+ assert_equal(nil, @obj.top_strand)
197
+ end
198
+
199
+ def test_bottom_strand
200
+ @obj.design
201
+ assert_equal("aaaaggacguaaggaguauuccuguggacagcacacacaggaauacuccuuacgucc", @obj.bottom_strand)
202
+ end
203
+
204
+ def test_bottom_strand_class
205
+ @obj.design
206
+ assert_equal(Bio::Sequence::NA, @obj.bottom_strand.class)
207
+ end
208
+
209
+ def test_bottom_strand_nil
210
+ assert_equal(nil, @obj.bottom_strand)
211
+ end
212
+
213
+ def test_design
214
+ assert(@obj.design)
215
+ end
216
+
217
+ def test_design_BLOCK_IT
218
+ assert_raises(NotImplementedError) { @obj.design('BLOCK-IT') }
219
+ end
220
+
221
+ def test_blocK_it
222
+ assert_equal("aaaaggacguaaggaguauuccuguggacagcacacacaggaauacuccuuacgucc", @obj.block_it)
223
+ end
224
+
225
+ def test_blocK_it_BLOCK_iT
226
+ assert_equal("aaaaggacguaaggaguauuccuguggacagcacacacaggaauacuccuuacgucc", @obj.block_it)
227
+ end
228
+
229
+ def test_blocK_it_BLOCK_IT
230
+ assert_raises(NotImplementedError) { @obj.block_it('BLOCK-IT') }
231
+ end
232
+
233
+ def test_blocK_it_piGene
234
+ assert_equal("aaaaggacguaaggaguauuccuguggacagcacacacaggaauacuccuuacgucc", @obj.block_it('piGENE'))
235
+ end
236
+
237
+ def test_blocK_it_
238
+ assert_raises(NotImplementedError) { @obj.block_it("") }
239
+ end
240
+
241
+ def test_report
242
+ report =<<END
243
+ ### shRNA
244
+ Top strand shRNA (57 nt):
245
+ 5'-CACCGGACGUAAGGAGUAUUCCUGUGTGTGCTGTCCACAGGAAUACUCCUUACGUCC-3'
246
+ Bottom strand shRNA (57 nt):
247
+ 3'-CCUGCAUUCCUCAUAAGGACACACACGACAGGUGUCCUUAUGAGGAAUGCAGGAAAA-5'
248
+ END
249
+ @obj.design
250
+ assert_equal(report, @obj.report)
251
+ end
252
+
253
+ def test_report_before_design
254
+ assert_raises(NoMethodError) { @obj.report }
255
+ end
256
+ end
257
+
258
+ end
metadata ADDED
@@ -0,0 +1,295 @@
1
+ --- !ruby/object:Gem::Specification
2
+ rubygems_version: 0.8.11
3
+ specification_version: 1
4
+ name: bio
5
+ version: !ruby/object:Gem::Version
6
+ version: 0.7.0
7
+ date: 2005-12-19 00:00:00 +09:00
8
+ summary: BioRuby is a library for bioinformatics (biology + information science).
9
+ require_paths:
10
+ - lib
11
+ email: staff@bioruby.org
12
+ homepage: http://bioruby.org/
13
+ rubyforge_project:
14
+ description:
15
+ autorequire: bio
16
+ default_executable:
17
+ bindir: bin
18
+ has_rdoc: false
19
+ required_ruby_version: !ruby/object:Gem::Version::Requirement
20
+ requirements:
21
+ -
22
+ - ">"
23
+ - !ruby/object:Gem::Version
24
+ version: 0.0.0
25
+ version:
26
+ platform: ruby
27
+ signing_key:
28
+ cert_chain:
29
+ authors:
30
+ - BioRuby project
31
+ files:
32
+ - bin/bioruby
33
+ - bin/br_biofetch.rb
34
+ - bin/br_bioflat.rb
35
+ - bin/br_biogetseq.rb
36
+ - bin/br_pmfetch.rb
37
+ - doc/BioRuby.rd.ja
38
+ - doc/Changes-0.7.rd
39
+ - doc/Design.rd.ja
40
+ - doc/KEGG_API.rd
41
+ - doc/KEGG_API.rd.ja
42
+ - doc/TODO.rd.ja
43
+ - doc/Tutorial.rd
44
+ - doc/Tutorial.rd.ja
45
+ - etc/bioinformatics
46
+ - etc/bioinformatics/seqdatabase.ini
47
+ - lib/bio
48
+ - lib/bio.rb
49
+ - lib/bioruby.rb
50
+ - lib/bio/alignment.rb
51
+ - lib/bio/appl
52
+ - lib/bio/command.rb
53
+ - lib/bio/data
54
+ - lib/bio/db
55
+ - lib/bio/db.rb
56
+ - lib/bio/feature.rb
57
+ - lib/bio/io
58
+ - lib/bio/location.rb
59
+ - lib/bio/pathway.rb
60
+ - lib/bio/reference.rb
61
+ - lib/bio/sequence.rb
62
+ - lib/bio/shell
63
+ - lib/bio/shell.rb
64
+ - lib/bio/util
65
+ - lib/bio/appl/bl2seq
66
+ - lib/bio/appl/blast
67
+ - lib/bio/appl/blast.rb
68
+ - lib/bio/appl/blat
69
+ - lib/bio/appl/clustalw
70
+ - lib/bio/appl/clustalw.rb
71
+ - lib/bio/appl/emboss.rb
72
+ - lib/bio/appl/fasta
73
+ - lib/bio/appl/fasta.rb
74
+ - lib/bio/appl/genscan
75
+ - lib/bio/appl/hmmer
76
+ - lib/bio/appl/hmmer.rb
77
+ - lib/bio/appl/mafft
78
+ - lib/bio/appl/mafft.rb
79
+ - lib/bio/appl/psort
80
+ - lib/bio/appl/psort.rb
81
+ - lib/bio/appl/sim4
82
+ - lib/bio/appl/sim4.rb
83
+ - lib/bio/appl/sosui
84
+ - lib/bio/appl/spidey
85
+ - lib/bio/appl/targetp
86
+ - lib/bio/appl/tmhmm
87
+ - lib/bio/appl/bl2seq/report.rb
88
+ - lib/bio/appl/blast/format0.rb
89
+ - lib/bio/appl/blast/format8.rb
90
+ - lib/bio/appl/blast/report.rb
91
+ - lib/bio/appl/blast/rexml.rb
92
+ - lib/bio/appl/blast/wublast.rb
93
+ - lib/bio/appl/blast/xmlparser.rb
94
+ - lib/bio/appl/blat/report.rb
95
+ - lib/bio/appl/clustalw/report.rb
96
+ - lib/bio/appl/fasta/format10.rb
97
+ - lib/bio/appl/fasta/format6.rb
98
+ - lib/bio/appl/genscan/report.rb
99
+ - lib/bio/appl/hmmer/report.rb
100
+ - lib/bio/appl/mafft/report.rb
101
+ - lib/bio/appl/psort/report.rb
102
+ - lib/bio/appl/sim4/report.rb
103
+ - lib/bio/appl/sosui/report.rb
104
+ - lib/bio/appl/spidey/report.rb
105
+ - lib/bio/appl/targetp/report.rb
106
+ - lib/bio/appl/tmhmm/report.rb
107
+ - lib/bio/data/aa.rb
108
+ - lib/bio/data/codontable.rb
109
+ - lib/bio/data/na.rb
110
+ - lib/bio/db/aaindex.rb
111
+ - lib/bio/db/embl
112
+ - lib/bio/db/fantom.rb
113
+ - lib/bio/db/fasta.rb
114
+ - lib/bio/db/genbank
115
+ - lib/bio/db/gff.rb
116
+ - lib/bio/db/go.rb
117
+ - lib/bio/db/kegg
118
+ - lib/bio/db/litdb.rb
119
+ - lib/bio/db/medline.rb
120
+ - lib/bio/db/nbrf.rb
121
+ - lib/bio/db/pdb
122
+ - lib/bio/db/pdb.rb
123
+ - lib/bio/db/prosite.rb
124
+ - lib/bio/db/rebase.rb
125
+ - lib/bio/db/transfac.rb
126
+ - lib/bio/db/embl/common.rb
127
+ - lib/bio/db/embl/embl.rb
128
+ - lib/bio/db/embl/sptr.rb
129
+ - lib/bio/db/embl/swissprot.rb
130
+ - lib/bio/db/embl/trembl.rb
131
+ - lib/bio/db/embl/uniprot.rb
132
+ - lib/bio/db/genbank/common.rb
133
+ - lib/bio/db/genbank/ddbj.rb
134
+ - lib/bio/db/genbank/genbank.rb
135
+ - lib/bio/db/genbank/genpept.rb
136
+ - lib/bio/db/genbank/refseq.rb
137
+ - lib/bio/db/kegg/brite.rb
138
+ - lib/bio/db/kegg/cell.rb
139
+ - lib/bio/db/kegg/compound.rb
140
+ - lib/bio/db/kegg/enzyme.rb
141
+ - lib/bio/db/kegg/expression.rb
142
+ - lib/bio/db/kegg/genes.rb
143
+ - lib/bio/db/kegg/genome.rb
144
+ - lib/bio/db/kegg/glycan.rb
145
+ - lib/bio/db/kegg/keggtab.rb
146
+ - lib/bio/db/kegg/kgml.rb
147
+ - lib/bio/db/kegg/ko.rb
148
+ - lib/bio/db/kegg/reaction.rb
149
+ - lib/bio/db/pdb/atom.rb
150
+ - lib/bio/db/pdb/chain.rb
151
+ - lib/bio/db/pdb/model.rb
152
+ - lib/bio/db/pdb/pdb.rb
153
+ - lib/bio/db/pdb/residue.rb
154
+ - lib/bio/db/pdb/utils.rb
155
+ - lib/bio/io/brdb.rb
156
+ - lib/bio/io/das.rb
157
+ - lib/bio/io/dbget.rb
158
+ - lib/bio/io/ddbjxml.rb
159
+ - lib/bio/io/fastacmd.rb
160
+ - lib/bio/io/fetch.rb
161
+ - lib/bio/io/flatfile
162
+ - lib/bio/io/flatfile.rb
163
+ - lib/bio/io/higet.rb
164
+ - lib/bio/io/keggapi.rb
165
+ - lib/bio/io/pubmed.rb
166
+ - lib/bio/io/registry.rb
167
+ - lib/bio/io/soapwsdl.rb
168
+ - lib/bio/io/sql.rb
169
+ - lib/bio/io/flatfile/bdb.rb
170
+ - lib/bio/io/flatfile/index.rb
171
+ - lib/bio/io/flatfile/indexer.rb
172
+ - lib/bio/shell/core.rb
173
+ - lib/bio/shell/plugin
174
+ - lib/bio/shell/session.rb
175
+ - lib/bio/shell/plugin/codon.rb
176
+ - lib/bio/shell/plugin/entry.rb
177
+ - lib/bio/shell/plugin/flatfile.rb
178
+ - lib/bio/shell/plugin/keggapi.rb
179
+ - lib/bio/shell/plugin/midi.rb
180
+ - lib/bio/shell/plugin/obda.rb
181
+ - lib/bio/shell/plugin/seq.rb
182
+ - lib/bio/util/color_scheme
183
+ - lib/bio/util/color_scheme.rb
184
+ - lib/bio/util/contingency_table.rb
185
+ - lib/bio/util/sirna.rb
186
+ - lib/bio/util/color_scheme/buried.rb
187
+ - lib/bio/util/color_scheme/helix.rb
188
+ - lib/bio/util/color_scheme/hydropathy.rb
189
+ - lib/bio/util/color_scheme/nucleotide.rb
190
+ - lib/bio/util/color_scheme/strand.rb
191
+ - lib/bio/util/color_scheme/taylor.rb
192
+ - lib/bio/util/color_scheme/turn.rb
193
+ - lib/bio/util/color_scheme/zappo.rb
194
+ - sample/biofetch.rb
195
+ - sample/color_scheme_na.rb
196
+ - sample/dbget
197
+ - sample/fasta2tab.rb
198
+ - sample/fsplit.rb
199
+ - sample/gb2fasta.rb
200
+ - sample/gb2tab.rb
201
+ - sample/gbtab2mysql.rb
202
+ - sample/genes2nuc.rb
203
+ - sample/genes2pep.rb
204
+ - sample/genes2tab.rb
205
+ - sample/genome2rb.rb
206
+ - sample/genome2tab.rb
207
+ - sample/goslim.rb
208
+ - sample/gt2fasta.rb
209
+ - sample/pmfetch.rb
210
+ - sample/pmsearch.rb
211
+ - sample/psortplot_html.rb
212
+ - sample/ssearch2tab.rb
213
+ - sample/tdiary.rb
214
+ - sample/tfastx2tab.rb
215
+ - sample/vs-genes.rb
216
+ - test/data
217
+ - test/functional
218
+ - test/runner.rb
219
+ - test/unit
220
+ - test/data/blast
221
+ - test/data/embl
222
+ - test/data/genscan
223
+ - test/data/prosite
224
+ - test/data/refseq
225
+ - test/data/SOSUI
226
+ - test/data/TMHMM
227
+ - test/data/uniprot
228
+ - test/data/blast/eco:b0002.faa
229
+ - test/data/blast/eco:b0002.faa.m0
230
+ - test/data/blast/eco:b0002.faa.m7
231
+ - test/data/blast/eco:b0002.faa.m8
232
+ - test/data/embl/AB090716.embl
233
+ - test/data/genscan/sample.report
234
+ - test/data/prosite/prosite.dat
235
+ - test/data/refseq/nm_126355.entret
236
+ - test/data/SOSUI/sample.report
237
+ - test/data/TMHMM/sample.report
238
+ - test/data/uniprot/p53_human.uniprot
239
+ - test/functional/bio
240
+ - test/functional/bio/io
241
+ - test/unit/bio
242
+ - test/unit/bio/appl
243
+ - test/unit/bio/data
244
+ - test/unit/bio/db
245
+ - test/unit/bio/io
246
+ - test/unit/bio/shell
247
+ - test/unit/bio/test_alignment.rb
248
+ - test/unit/bio/test_command.rb
249
+ - test/unit/bio/test_db.rb
250
+ - test/unit/bio/test_feature.rb
251
+ - test/unit/bio/test_location.rb
252
+ - test/unit/bio/test_pathway.rb
253
+ - test/unit/bio/test_sequence.rb
254
+ - test/unit/bio/test_shell.rb
255
+ - test/unit/bio/util
256
+ - test/unit/bio/appl/blast
257
+ - test/unit/bio/appl/genscan
258
+ - test/unit/bio/appl/sosui
259
+ - test/unit/bio/appl/targetp
260
+ - test/unit/bio/appl/test_blast.rb
261
+ - test/unit/bio/appl/test_fasta.rb
262
+ - test/unit/bio/appl/tmhmm
263
+ - test/unit/bio/appl/blast/test_report.rb
264
+ - test/unit/bio/appl/blast/test_xmlparser.rb
265
+ - test/unit/bio/appl/genscan/test_report.rb
266
+ - test/unit/bio/appl/sosui/test_report.rb
267
+ - test/unit/bio/appl/targetp/test_report.rb
268
+ - test/unit/bio/appl/tmhmm/test_report.rb
269
+ - test/unit/bio/data/test_aa.rb
270
+ - test/unit/bio/data/test_codontable.rb
271
+ - test/unit/bio/data/test_na.rb
272
+ - test/unit/bio/db/embl
273
+ - test/unit/bio/db/kegg
274
+ - test/unit/bio/db/test_fasta.rb
275
+ - test/unit/bio/db/test_gff.rb
276
+ - test/unit/bio/db/test_prosite.rb
277
+ - test/unit/bio/db/embl/test_common.rb
278
+ - test/unit/bio/db/embl/test_embl.rb
279
+ - test/unit/bio/db/embl/test_sptr.rb
280
+ - test/unit/bio/db/embl/test_uniprot.rb
281
+ - test/unit/bio/db/kegg/test_genes.rb
282
+ - test/unit/bio/io/test_ddbjxml.rb
283
+ - test/unit/bio/io/test_soapwsdl.rb
284
+ - test/unit/bio/shell/plugin
285
+ - test/unit/bio/shell/plugin/test_seq.rb
286
+ - test/unit/bio/util/test_color_scheme.rb
287
+ - test/unit/bio/util/test_contingency_table.rb
288
+ - test/unit/bio/util/test_sirna.rb
289
+ test_files: []
290
+ rdoc_options: []
291
+ extra_rdoc_files: []
292
+ executables: []
293
+ extensions: []
294
+ requirements: []
295
+ dependencies: []