bio 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (340) hide show
  1. data/bin/bioruby +14 -122
  2. data/bin/br_biofetch.rb +2 -2
  3. data/bin/br_bioflat.rb +2 -2
  4. data/bin/br_biogetseq.rb +2 -2
  5. data/bin/br_pmfetch.rb +3 -3
  6. data/doc/Changes-0.7.rd +77 -0
  7. data/doc/KEGG_API.rd +523 -232
  8. data/doc/KEGG_API.rd.ja +529 -207
  9. data/doc/Tutorial.rd +48 -11
  10. data/lib/bio.rb +59 -6
  11. data/lib/bio/alignment.rb +713 -103
  12. data/lib/bio/appl/bl2seq/report.rb +2 -18
  13. data/lib/bio/appl/blast.rb +108 -91
  14. data/lib/bio/appl/blast/format0.rb +33 -18
  15. data/lib/bio/appl/blast/format8.rb +6 -20
  16. data/lib/bio/appl/blast/report.rb +293 -429
  17. data/lib/bio/appl/blast/rexml.rb +8 -22
  18. data/lib/bio/appl/blast/wublast.rb +21 -12
  19. data/lib/bio/appl/blast/xmlparser.rb +180 -183
  20. data/lib/bio/appl/blat/report.rb +127 -30
  21. data/lib/bio/appl/clustalw.rb +87 -59
  22. data/lib/bio/appl/clustalw/report.rb +20 -22
  23. data/lib/bio/appl/emboss.rb +113 -20
  24. data/lib/bio/appl/fasta.rb +173 -198
  25. data/lib/bio/appl/fasta/format10.rb +244 -347
  26. data/lib/bio/appl/gcg/msf.rb +212 -0
  27. data/lib/bio/appl/gcg/seq.rb +195 -0
  28. data/lib/bio/appl/genscan/report.rb +5 -23
  29. data/lib/bio/appl/hmmer.rb +8 -45
  30. data/lib/bio/appl/hmmer/report.rb +2 -20
  31. data/lib/bio/appl/iprscan/report.rb +374 -0
  32. data/lib/bio/appl/mafft.rb +87 -50
  33. data/lib/bio/appl/mafft/report.rb +151 -44
  34. data/lib/bio/appl/muscle.rb +52 -0
  35. data/lib/bio/appl/phylip/alignment.rb +129 -0
  36. data/lib/bio/appl/phylip/distance_matrix.rb +96 -0
  37. data/lib/bio/appl/probcons.rb +41 -0
  38. data/lib/bio/appl/psort.rb +89 -96
  39. data/lib/bio/appl/psort/report.rb +6 -22
  40. data/lib/bio/appl/pts1.rb +263 -0
  41. data/lib/bio/appl/sim4.rb +26 -36
  42. data/lib/bio/appl/sim4/report.rb +2 -18
  43. data/lib/bio/appl/sosui/report.rb +5 -20
  44. data/lib/bio/appl/spidey/report.rb +2 -2
  45. data/lib/bio/appl/targetp/report.rb +4 -20
  46. data/lib/bio/appl/tcoffee.rb +55 -0
  47. data/lib/bio/appl/tmhmm/report.rb +4 -20
  48. data/lib/bio/command.rb +235 -64
  49. data/lib/bio/data/aa.rb +21 -26
  50. data/lib/bio/data/codontable.rb +2 -20
  51. data/lib/bio/data/na.rb +19 -4
  52. data/lib/bio/db.rb +27 -12
  53. data/lib/bio/db/aaindex.rb +2 -20
  54. data/lib/bio/db/embl/common.rb +4 -21
  55. data/lib/bio/db/embl/embl.rb +33 -85
  56. data/lib/bio/db/embl/sptr.rb +612 -302
  57. data/lib/bio/db/embl/swissprot.rb +10 -29
  58. data/lib/bio/db/embl/trembl.rb +10 -29
  59. data/lib/bio/db/embl/uniprot.rb +10 -29
  60. data/lib/bio/db/fantom.rb +15 -20
  61. data/lib/bio/db/fasta.rb +3 -3
  62. data/lib/bio/db/genbank/common.rb +37 -46
  63. data/lib/bio/db/genbank/ddbj.rb +6 -18
  64. data/lib/bio/db/genbank/genbank.rb +47 -186
  65. data/lib/bio/db/genbank/genpept.rb +4 -17
  66. data/lib/bio/db/genbank/refseq.rb +4 -17
  67. data/lib/bio/db/gff.rb +103 -35
  68. data/lib/bio/db/go.rb +4 -20
  69. data/lib/bio/db/kegg/brite.rb +26 -36
  70. data/lib/bio/db/kegg/compound.rb +81 -85
  71. data/lib/bio/db/kegg/drug.rb +98 -0
  72. data/lib/bio/db/kegg/enzyme.rb +133 -110
  73. data/lib/bio/db/kegg/expression.rb +2 -20
  74. data/lib/bio/db/kegg/genes.rb +208 -238
  75. data/lib/bio/db/kegg/genome.rb +164 -285
  76. data/lib/bio/db/kegg/glycan.rb +114 -157
  77. data/lib/bio/db/kegg/keggtab.rb +242 -303
  78. data/lib/bio/db/kegg/kgml.rb +117 -160
  79. data/lib/bio/db/kegg/orthology.rb +112 -0
  80. data/lib/bio/db/kegg/reaction.rb +54 -69
  81. data/lib/bio/db/kegg/taxonomy.rb +331 -0
  82. data/lib/bio/db/lasergene.rb +209 -0
  83. data/lib/bio/db/litdb.rb +3 -27
  84. data/lib/bio/db/medline.rb +228 -249
  85. data/lib/bio/db/nbrf.rb +3 -3
  86. data/lib/bio/db/newick.rb +510 -0
  87. data/lib/bio/db/nexus.rb +1854 -0
  88. data/lib/bio/db/pdb.rb +5 -17
  89. data/lib/bio/db/pdb/atom.rb +2 -18
  90. data/lib/bio/db/pdb/chain.rb +2 -18
  91. data/lib/bio/db/pdb/chemicalcomponent.rb +2 -18
  92. data/lib/bio/db/pdb/model.rb +2 -18
  93. data/lib/bio/db/pdb/pdb.rb +73 -34
  94. data/lib/bio/db/pdb/residue.rb +4 -20
  95. data/lib/bio/db/pdb/utils.rb +2 -18
  96. data/lib/bio/db/prosite.rb +403 -422
  97. data/lib/bio/db/rebase.rb +84 -40
  98. data/lib/bio/db/soft.rb +404 -0
  99. data/lib/bio/db/transfac.rb +5 -17
  100. data/lib/bio/feature.rb +106 -52
  101. data/lib/bio/io/das.rb +32 -42
  102. data/lib/bio/io/dbget.rb +2 -20
  103. data/lib/bio/io/ddbjxml.rb +77 -138
  104. data/lib/bio/io/ebisoap.rb +158 -0
  105. data/lib/bio/io/ensembl.rb +229 -0
  106. data/lib/bio/io/fastacmd.rb +89 -82
  107. data/lib/bio/io/fetch.rb +163 -96
  108. data/lib/bio/io/flatfile.rb +170 -73
  109. data/lib/bio/io/flatfile/bdb.rb +3 -16
  110. data/lib/bio/io/flatfile/index.rb +2 -2
  111. data/lib/bio/io/flatfile/indexer.rb +3 -2
  112. data/lib/bio/io/higet.rb +12 -31
  113. data/lib/bio/io/keggapi.rb +210 -269
  114. data/lib/bio/io/ncbisoap.rb +155 -0
  115. data/lib/bio/io/pubmed.rb +169 -147
  116. data/lib/bio/io/registry.rb +4 -20
  117. data/lib/bio/io/soapwsdl.rb +43 -38
  118. data/lib/bio/io/sql.rb +242 -305
  119. data/lib/bio/location.rb +407 -285
  120. data/lib/bio/map.rb +410 -0
  121. data/lib/bio/pathway.rb +558 -695
  122. data/lib/bio/reference.rb +272 -75
  123. data/lib/bio/sequence.rb +255 -13
  124. data/lib/bio/sequence/aa.rb +71 -10
  125. data/lib/bio/sequence/common.rb +187 -33
  126. data/lib/bio/sequence/compat.rb +59 -4
  127. data/lib/bio/sequence/format.rb +54 -7
  128. data/lib/bio/sequence/generic.rb +3 -3
  129. data/lib/bio/sequence/na.rb +328 -26
  130. data/lib/bio/shell.rb +11 -4
  131. data/lib/bio/shell/core.rb +221 -160
  132. data/lib/bio/shell/demo.rb +18 -15
  133. data/lib/bio/shell/interface.rb +14 -12
  134. data/lib/bio/shell/irb.rb +95 -0
  135. data/lib/bio/shell/object.rb +45 -26
  136. data/lib/bio/shell/plugin/blast.rb +42 -0
  137. data/lib/bio/shell/plugin/codon.rb +22 -14
  138. data/lib/bio/shell/plugin/das.rb +58 -0
  139. data/lib/bio/shell/plugin/emboss.rb +2 -2
  140. data/lib/bio/shell/plugin/entry.rb +22 -11
  141. data/lib/bio/shell/plugin/flatfile.rb +2 -2
  142. data/lib/bio/shell/plugin/keggapi.rb +13 -6
  143. data/lib/bio/shell/plugin/midi.rb +4 -4
  144. data/lib/bio/shell/plugin/obda.rb +2 -2
  145. data/lib/bio/shell/plugin/psort.rb +56 -0
  146. data/lib/bio/shell/plugin/seq.rb +35 -8
  147. data/lib/bio/shell/plugin/soap.rb +87 -0
  148. data/lib/bio/shell/rails/vendor/plugins/generators/bioruby/bioruby_generator.rb +29 -0
  149. data/lib/bio/shell/rails/vendor/plugins/generators/bioruby/templates/_classes.rhtml +4 -0
  150. data/lib/bio/shell/rails/vendor/plugins/generators/bioruby/templates/_log.rhtml +27 -0
  151. data/lib/bio/shell/rails/vendor/plugins/generators/bioruby/templates/_methods.rhtml +11 -0
  152. data/lib/bio/shell/rails/vendor/plugins/generators/bioruby/templates/_modules.rhtml +4 -0
  153. data/lib/bio/shell/rails/vendor/plugins/generators/bioruby/templates/_variables.rhtml +7 -0
  154. data/lib/bio/shell/rails/vendor/plugins/generators/bioruby/templates/bioruby-bg.gif +0 -0
  155. data/lib/bio/shell/rails/vendor/plugins/generators/bioruby/templates/bioruby-console.png +0 -0
  156. data/lib/bio/shell/rails/{public/images/icon.png → vendor/plugins/generators/bioruby/templates/bioruby-gem.png} +0 -0
  157. data/lib/bio/shell/rails/vendor/plugins/generators/bioruby/templates/bioruby-link.gif +0 -0
  158. data/lib/bio/shell/rails/vendor/plugins/generators/bioruby/templates/bioruby.css +369 -0
  159. data/lib/bio/shell/rails/vendor/plugins/generators/bioruby/templates/bioruby.rhtml +47 -0
  160. data/lib/bio/shell/rails/vendor/plugins/generators/bioruby/templates/bioruby_controller.rb +144 -0
  161. data/lib/bio/shell/rails/vendor/plugins/generators/bioruby/templates/bioruby_helper.rb +47 -0
  162. data/lib/bio/shell/rails/vendor/plugins/generators/bioruby/templates/commands.rhtml +8 -0
  163. data/lib/bio/shell/rails/vendor/plugins/generators/bioruby/templates/history.rhtml +10 -0
  164. data/lib/bio/shell/rails/vendor/plugins/generators/bioruby/templates/index.rhtml +22 -0
  165. data/lib/bio/shell/script.rb +25 -0
  166. data/lib/bio/shell/setup.rb +109 -0
  167. data/lib/bio/shell/web.rb +70 -58
  168. data/lib/bio/tree.rb +850 -0
  169. data/lib/bio/util/color_scheme.rb +84 -107
  170. data/lib/bio/util/color_scheme/buried.rb +5 -24
  171. data/lib/bio/util/color_scheme/helix.rb +5 -24
  172. data/lib/bio/util/color_scheme/hydropathy.rb +5 -24
  173. data/lib/bio/util/color_scheme/nucleotide.rb +5 -24
  174. data/lib/bio/util/color_scheme/strand.rb +5 -24
  175. data/lib/bio/util/color_scheme/taylor.rb +5 -24
  176. data/lib/bio/util/color_scheme/turn.rb +5 -24
  177. data/lib/bio/util/color_scheme/zappo.rb +5 -24
  178. data/lib/bio/util/contingency_table.rb +70 -43
  179. data/lib/bio/util/restriction_enzyme.rb +228 -0
  180. data/lib/bio/util/restriction_enzyme/analysis.rb +249 -0
  181. data/lib/bio/util/restriction_enzyme/analysis_basic.rb +217 -0
  182. data/lib/bio/util/restriction_enzyme/cut_symbol.rb +107 -0
  183. data/lib/bio/util/restriction_enzyme/double_stranded.rb +321 -0
  184. data/lib/bio/util/restriction_enzyme/double_stranded/aligned_strands.rb +130 -0
  185. data/lib/bio/util/restriction_enzyme/double_stranded/cut_location_pair.rb +103 -0
  186. data/lib/bio/util/restriction_enzyme/double_stranded/cut_location_pair_in_enzyme_notation.rb +38 -0
  187. data/lib/bio/util/restriction_enzyme/double_stranded/cut_locations.rb +76 -0
  188. data/lib/bio/util/restriction_enzyme/double_stranded/cut_locations_in_enzyme_notation.rb +107 -0
  189. data/lib/bio/util/restriction_enzyme/enzymes.yaml +7061 -0
  190. data/lib/bio/util/restriction_enzyme/range/cut_range.rb +24 -0
  191. data/lib/bio/util/restriction_enzyme/range/cut_ranges.rb +47 -0
  192. data/lib/bio/util/restriction_enzyme/range/horizontal_cut_range.rb +67 -0
  193. data/lib/bio/util/restriction_enzyme/range/sequence_range.rb +257 -0
  194. data/lib/bio/util/restriction_enzyme/range/sequence_range/calculated_cuts.rb +242 -0
  195. data/lib/bio/util/restriction_enzyme/range/sequence_range/fragment.rb +51 -0
  196. data/lib/bio/util/restriction_enzyme/range/sequence_range/fragments.rb +41 -0
  197. data/lib/bio/util/restriction_enzyme/range/vertical_cut_range.rb +77 -0
  198. data/lib/bio/util/restriction_enzyme/single_strand.rb +199 -0
  199. data/lib/bio/util/restriction_enzyme/single_strand/cut_locations_in_enzyme_notation.rb +135 -0
  200. data/lib/bio/util/restriction_enzyme/single_strand_complement.rb +23 -0
  201. data/lib/bio/util/restriction_enzyme/string_formatting.rb +111 -0
  202. data/lib/bio/util/sirna.rb +4 -22
  203. data/sample/color_scheme_na.rb +4 -12
  204. data/sample/enzymes.rb +78 -0
  205. data/sample/goslim.rb +5 -13
  206. data/sample/psortplot_html.rb +4 -12
  207. data/test/data/blast/2.2.15.blastp.m7 +876 -0
  208. data/test/data/embl/AB090716.embl.rel89 +63 -0
  209. data/test/data/fasta/example1.txt +75 -0
  210. data/test/data/fasta/example2.txt +21 -0
  211. data/test/data/iprscan/merged.raw +32 -0
  212. data/test/data/iprscan/merged.txt +74 -0
  213. data/test/data/soft/GDS100_partial.soft +92 -0
  214. data/test/data/soft/GSE3457_family_partial.soft +874 -0
  215. data/test/functional/bio/io/test_ensembl.rb +103 -0
  216. data/test/functional/bio/io/test_soapwsdl.rb +5 -17
  217. data/test/unit/bio/appl/bl2seq/test_report.rb +2 -2
  218. data/test/unit/bio/appl/blast/test_report.rb +3 -16
  219. data/test/unit/bio/appl/blast/test_xmlparser.rb +4 -16
  220. data/test/unit/bio/appl/genscan/test_report.rb +3 -16
  221. data/test/unit/bio/appl/hmmer/test_report.rb +3 -16
  222. data/test/unit/bio/appl/iprscan/test_report.rb +338 -0
  223. data/test/unit/bio/appl/mafft/test_report.rb +63 -0
  224. data/test/unit/bio/appl/sosui/test_report.rb +3 -16
  225. data/test/unit/bio/appl/targetp/test_report.rb +3 -16
  226. data/test/unit/bio/appl/test_blast.rb +3 -16
  227. data/test/unit/bio/appl/test_fasta.rb +4 -16
  228. data/test/unit/bio/appl/test_pts1.rb +140 -0
  229. data/test/unit/bio/appl/tmhmm/test_report.rb +3 -16
  230. data/test/unit/bio/data/test_aa.rb +4 -17
  231. data/test/unit/bio/data/test_codontable.rb +3 -16
  232. data/test/unit/bio/data/test_na.rb +3 -3
  233. data/test/unit/bio/db/embl/test_common.rb +3 -16
  234. data/test/unit/bio/db/embl/test_embl.rb +3 -16
  235. data/test/unit/bio/db/embl/test_embl_rel89.rb +219 -0
  236. data/test/unit/bio/db/embl/test_sptr.rb +1548 -41
  237. data/test/unit/bio/db/embl/test_uniprot.rb +3 -16
  238. data/test/unit/bio/db/kegg/test_genes.rb +3 -16
  239. data/test/unit/bio/db/pdb/test_pdb.rb +7 -24
  240. data/test/unit/bio/db/test_aaindex.rb +2 -2
  241. data/test/unit/bio/db/test_fasta.rb +3 -16
  242. data/test/unit/bio/db/test_gff.rb +3 -16
  243. data/test/unit/bio/db/test_lasergene.rb +95 -0
  244. data/test/unit/bio/db/test_newick.rb +56 -0
  245. data/test/unit/bio/db/test_nexus.rb +360 -0
  246. data/test/unit/bio/db/test_prosite.rb +5 -18
  247. data/test/unit/bio/db/test_rebase.rb +11 -25
  248. data/test/unit/bio/db/test_soft.rb +138 -0
  249. data/test/unit/bio/io/test_ddbjxml.rb +5 -17
  250. data/test/unit/bio/io/test_ensembl.rb +109 -0
  251. data/test/unit/bio/io/test_fastacmd.rb +3 -16
  252. data/test/unit/bio/io/test_flatfile.rb +237 -0
  253. data/test/unit/bio/io/test_soapwsdl.rb +4 -17
  254. data/test/unit/bio/sequence/test_aa.rb +3 -3
  255. data/test/unit/bio/sequence/test_common.rb +3 -16
  256. data/test/unit/bio/sequence/test_compat.rb +3 -16
  257. data/test/unit/bio/sequence/test_na.rb +29 -3
  258. data/test/unit/bio/shell/plugin/test_seq.rb +8 -8
  259. data/test/unit/bio/test_alignment.rb +16 -27
  260. data/test/unit/bio/test_command.rb +242 -25
  261. data/test/unit/bio/test_db.rb +3 -16
  262. data/test/unit/bio/test_feature.rb +4 -16
  263. data/test/unit/bio/test_location.rb +4 -16
  264. data/test/unit/bio/test_map.rb +230 -0
  265. data/test/unit/bio/test_pathway.rb +4 -16
  266. data/test/unit/bio/test_reference.rb +2 -2
  267. data/test/unit/bio/test_sequence.rb +7 -19
  268. data/test/unit/bio/test_shell.rb +3 -16
  269. data/test/unit/bio/test_tree.rb +593 -0
  270. data/test/unit/bio/util/restriction_enzyme/analysis/test_calculated_cuts.rb +299 -0
  271. data/test/unit/bio/util/restriction_enzyme/analysis/test_cut_ranges.rb +103 -0
  272. data/test/unit/bio/util/restriction_enzyme/analysis/test_sequence_range.rb +240 -0
  273. data/test/unit/bio/util/restriction_enzyme/double_stranded/test_aligned_strands.rb +100 -0
  274. data/test/unit/bio/util/restriction_enzyme/double_stranded/test_cut_location_pair.rb +75 -0
  275. data/test/unit/bio/util/restriction_enzyme/double_stranded/test_cut_location_pair_in_enzyme_notation.rb +73 -0
  276. data/test/unit/bio/util/restriction_enzyme/double_stranded/test_cut_locations.rb +53 -0
  277. data/test/unit/bio/util/restriction_enzyme/double_stranded/test_cut_locations_in_enzyme_notation.rb +104 -0
  278. data/test/unit/bio/util/restriction_enzyme/single_strand/test_cut_locations_in_enzyme_notation.rb +83 -0
  279. data/test/unit/bio/util/restriction_enzyme/test_analysis.rb +246 -0
  280. data/test/unit/bio/util/restriction_enzyme/test_cut_symbol.rb +44 -0
  281. data/test/unit/bio/util/restriction_enzyme/test_double_stranded.rb +115 -0
  282. data/test/unit/bio/util/restriction_enzyme/test_single_strand.rb +147 -0
  283. data/test/unit/bio/util/restriction_enzyme/test_single_strand_complement.rb +147 -0
  284. data/test/unit/bio/util/restriction_enzyme/test_string_formatting.rb +60 -0
  285. data/test/unit/bio/util/test_color_scheme.rb +6 -18
  286. data/test/unit/bio/util/test_contingency_table.rb +6 -18
  287. data/test/unit/bio/util/test_restriction_enzyme.rb +42 -0
  288. data/test/unit/bio/util/test_sirna.rb +3 -16
  289. metadata +228 -169
  290. data/doc/BioRuby.rd.ja +0 -225
  291. data/doc/Design.rd.ja +0 -341
  292. data/doc/TODO.rd.ja +0 -138
  293. data/lib/bio/appl/fasta/format6.rb +0 -37
  294. data/lib/bio/db/kegg/cell.rb +0 -88
  295. data/lib/bio/db/kegg/ko.rb +0 -178
  296. data/lib/bio/shell/rails/Rakefile +0 -10
  297. data/lib/bio/shell/rails/app/controllers/application.rb +0 -4
  298. data/lib/bio/shell/rails/app/controllers/shell_controller.rb +0 -94
  299. data/lib/bio/shell/rails/app/helpers/application_helper.rb +0 -3
  300. data/lib/bio/shell/rails/app/models/shell_connection.rb +0 -30
  301. data/lib/bio/shell/rails/app/views/layouts/shell.rhtml +0 -37
  302. data/lib/bio/shell/rails/app/views/shell/history.rhtml +0 -5
  303. data/lib/bio/shell/rails/app/views/shell/index.rhtml +0 -2
  304. data/lib/bio/shell/rails/app/views/shell/show.rhtml +0 -13
  305. data/lib/bio/shell/rails/config/boot.rb +0 -19
  306. data/lib/bio/shell/rails/config/database.yml +0 -85
  307. data/lib/bio/shell/rails/config/environment.rb +0 -53
  308. data/lib/bio/shell/rails/config/environments/development.rb +0 -19
  309. data/lib/bio/shell/rails/config/environments/production.rb +0 -19
  310. data/lib/bio/shell/rails/config/environments/test.rb +0 -19
  311. data/lib/bio/shell/rails/config/routes.rb +0 -19
  312. data/lib/bio/shell/rails/doc/README_FOR_APP +0 -2
  313. data/lib/bio/shell/rails/public/404.html +0 -8
  314. data/lib/bio/shell/rails/public/500.html +0 -8
  315. data/lib/bio/shell/rails/public/dispatch.cgi +0 -10
  316. data/lib/bio/shell/rails/public/dispatch.fcgi +0 -24
  317. data/lib/bio/shell/rails/public/dispatch.rb +0 -10
  318. data/lib/bio/shell/rails/public/favicon.ico +0 -0
  319. data/lib/bio/shell/rails/public/images/rails.png +0 -0
  320. data/lib/bio/shell/rails/public/index.html +0 -277
  321. data/lib/bio/shell/rails/public/javascripts/controls.js +0 -750
  322. data/lib/bio/shell/rails/public/javascripts/dragdrop.js +0 -584
  323. data/lib/bio/shell/rails/public/javascripts/effects.js +0 -854
  324. data/lib/bio/shell/rails/public/javascripts/prototype.js +0 -1785
  325. data/lib/bio/shell/rails/public/robots.txt +0 -1
  326. data/lib/bio/shell/rails/public/stylesheets/main.css +0 -187
  327. data/lib/bio/shell/rails/script/about +0 -3
  328. data/lib/bio/shell/rails/script/breakpointer +0 -3
  329. data/lib/bio/shell/rails/script/console +0 -3
  330. data/lib/bio/shell/rails/script/destroy +0 -3
  331. data/lib/bio/shell/rails/script/generate +0 -3
  332. data/lib/bio/shell/rails/script/performance/benchmarker +0 -3
  333. data/lib/bio/shell/rails/script/performance/profiler +0 -3
  334. data/lib/bio/shell/rails/script/plugin +0 -3
  335. data/lib/bio/shell/rails/script/process/reaper +0 -3
  336. data/lib/bio/shell/rails/script/process/spawner +0 -3
  337. data/lib/bio/shell/rails/script/process/spinner +0 -3
  338. data/lib/bio/shell/rails/script/runner +0 -3
  339. data/lib/bio/shell/rails/script/server +0 -42
  340. data/lib/bio/shell/rails/test/test_helper.rb +0 -28
@@ -1,23 +1,11 @@
1
1
  #
2
- # bio/db/pdb.rb - PDB database classes
2
+ # = bio/db/pdb.rb - PDB database classes
3
3
  #
4
- # Copyright (C) 2004 GOTO Naohisa <ngoto@gen-info.osaka-u.ac.jp>
4
+ # Copyright:: Copyright (C) 2004
5
+ # GOTO Naohisa <ngoto@gen-info.osaka-u.ac.jp>
6
+ # License:: The Ruby License
5
7
  #
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: pdb.rb,v 1.6 2006/01/29 06:54:13 ngoto Exp $
8
+ # $Id: pdb.rb,v 1.8 2007/04/05 23:35:40 trevor Exp $
21
9
  #
22
10
 
23
11
  require 'bio/db'
@@ -4,25 +4,9 @@
4
4
  # Copyright:: Copyright (C) 2004, 2006
5
5
  # Alex Gutteridge <alexg@ebi.ac.uk>
6
6
  # Naohisa Goto <ng@bioruby.org>
7
- # License:: LGPL
7
+ # License:: The Ruby License
8
8
  #
9
- # $Id: atom.rb,v 1.6 2006/01/08 12:59:04 ngoto Exp $
10
- #
11
- #--
12
- # This library is free software; you can redistribute it and/or
13
- # modify it under the terms of the GNU Lesser General Public
14
- # License as published by the Free Software Foundation; either
15
- # version 2 of the License, or (at your option) any later version.
16
- #
17
- # This library is distributed in the hope that it will be useful,
18
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
19
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20
- # Lesser General Public License for more details.
21
- #
22
- # You should have received a copy of the GNU Lesser General Public
23
- # License along with this library; if not, write to the Free Software
24
- # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25
- #++
9
+ # $Id: atom.rb,v 1.8 2007/04/05 23:35:41 trevor Exp $
26
10
  #
27
11
  # = Bio::PDB::Coordinate
28
12
  #
@@ -4,25 +4,9 @@
4
4
  # Copyright:: Copyright (C) 2004, 2006
5
5
  # Alex Gutteridge <alexg@ebi.ac.uk>
6
6
  # Naohisa Goto <ng@bioruby.org>
7
- # License:: LGPL
7
+ # License:: The Ruby License
8
8
  #
9
- # $Id: chain.rb,v 1.6 2006/01/20 13:54:08 ngoto Exp $
10
- #
11
- #--
12
- # This library is free software; you can redistribute it and/or
13
- # modify it under the terms of the GNU Lesser General Public
14
- # License as published by the Free Software Foundation; either
15
- # version 2 of the License, or (at your option) any later version.
16
- #
17
- # This library is distributed in the hope that it will be useful,
18
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
19
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20
- # Lesser General Public License for more details.
21
- #
22
- # You should have received a copy of the GNU Lesser General Public
23
- # License along with this library; if not, write to the Free Software
24
- # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25
- #++
9
+ # $Id: chain.rb,v 1.8 2007/04/05 23:35:41 trevor Exp $
26
10
  #
27
11
  # = Bio::PDB::Chain
28
12
  #
@@ -3,25 +3,9 @@
3
3
  #
4
4
  # Copyright:: Copyright (C) 2006
5
5
  # GOTO Naohisa <ngoto@gen-info.osaka-u.ac.jp>
6
- # License:: LGPL
6
+ # License:: The Ruby License
7
7
  #
8
- # $Id: chemicalcomponent.rb,v 1.1 2006/01/29 06:54:13 ngoto Exp $
9
- #
10
- #--
11
- # This library is free software; you can redistribute it and/or
12
- # modify it under the terms of the GNU Lesser General Public
13
- # License as published by the Free Software Foundation; either
14
- # version 2 of the License, or (at your option) any later version.
15
- #
16
- # This library is distributed in the hope that it will be useful,
17
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
18
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19
- # Lesser General Public License for more details.
20
- #
21
- # You should have received a copy of the GNU Lesser General Public
22
- # License along with this library; if not, write to the Free Software
23
- # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24
- #++
8
+ # $Id: chemicalcomponent.rb,v 1.3 2007/04/05 23:35:41 trevor Exp $
25
9
  #
26
10
  # = About Bio::PDB::ChemicalComponent
27
11
  #
@@ -4,25 +4,9 @@
4
4
  # Copyright:: Copyright (C) 2004, 2006
5
5
  # Alex Gutteridge <alexg@ebi.ac.uk>
6
6
  # Naohisa Goto <ng@bioruby.org>
7
- # License:: LGPL
7
+ # License:: The Ruby License
8
8
  #
9
- # $Id: model.rb,v 1.7 2006/01/20 13:54:08 ngoto Exp $
10
- #
11
- #--
12
- # This library is free software; you can redistribute it and/or
13
- # modify it under the terms of the GNU Lesser General Public
14
- # License as published by the Free Software Foundation; either
15
- # version 2 of the License, or (at your option) any later version.
16
- #
17
- # This library is distributed in the hope that it will be useful,
18
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
19
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20
- # Lesser General Public License for more details.
21
- #
22
- # You should have received a copy of the GNU Lesser General Public
23
- # License along with this library; if not, write to the Free Software
24
- # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25
- #++
9
+ # $Id: model.rb,v 1.9 2007/04/05 23:35:41 trevor Exp $
26
10
  #
27
11
  # = Bio::PDB::Model
28
12
  #
@@ -4,25 +4,9 @@
4
4
  # Copyright:: Copyright (C) 2003-2006
5
5
  # GOTO Naohisa <ngoto@gen-info.osaka-u.ac.jp>
6
6
  # Alex Gutteridge <alexg@ebi.ac.uk>
7
- # License:: LGPL
7
+ # License:: The Ruby License
8
8
  #
9
- # $Id: pdb.rb,v 1.15 2006/02/20 13:00:43 ngoto Exp $
10
- #
11
- #--
12
- # This library is free software; you can redistribute it and/or
13
- # modify it under the terms of the GNU Lesser General Public
14
- # License as published by the Free Software Foundation; either
15
- # version 2 of the License, or (at your option) any later version.
16
- #
17
- # This library is distributed in the hope that it will be useful,
18
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
19
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20
- # Lesser General Public License for more details.
21
- #
22
- # You should have received a copy of the GNU Lesser General Public
23
- # License along with this library; if not, write to the Free Software
24
- # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25
- #++
9
+ # $Id: pdb.rb,v 1.23 2007/07/10 10:44:46 ngoto Exp $
26
10
  #
27
11
  # = About Bio::PDB
28
12
  #
@@ -135,7 +119,7 @@ module Bio
135
119
  m
136
120
  end
137
121
  def self.new(str)
138
- String.new(str)
122
+ String.new(str.to_s)
139
123
  end
140
124
  end
141
125
 
@@ -354,7 +338,7 @@ module Bio
354
338
  # need to call it .
355
339
  #
356
340
  def do_parse
357
- return self if @parsed
341
+ return self if @parsed or !@str
358
342
  str = @str
359
343
  each_symbol do |key, klass, ranges|
360
344
  #If we only have one range then pull that out
@@ -990,31 +974,79 @@ module Bio
990
974
  end
991
975
 
992
976
  def do_parse
993
- return self if @parsed
977
+ return self if @parsed or !@str
994
978
  self.serial = @str[6..10].to_i
995
- self.name = @str[12..15]
979
+ self.name = @str[12..15].strip
996
980
  self.altLoc = @str[16..16]
997
- self.resName = @str[17..19].rstrip
981
+ self.resName = @str[17..19].strip
998
982
  self.chainID = @str[21..21]
999
983
  self.resSeq = @str[22..25].to_i
1000
- self.iCode = @str[26..26]
984
+ self.iCode = @str[26..26].strip
1001
985
  self.x = @str[30..37].to_f
1002
986
  self.y = @str[38..45].to_f
1003
987
  self.z = @str[46..53].to_f
1004
988
  self.occupancy = @str[54..59].to_f
1005
989
  self.tempFactor = @str[60..65].to_f
1006
- self.segID = @str[72..75]
1007
- self.element = @str[76..77]
1008
- self.charge = @str[78..79]
990
+ self.segID = @str[72..75].to_s.rstrip
991
+ self.element = @str[76..77].to_s.lstrip
992
+ self.charge = @str[78..79].to_s.strip
1009
993
  @parsed = true
1010
994
  self
1011
995
  end
1012
996
 
997
+ def justify_atomname
998
+ atomname = self.name.to_s
999
+ return atomname[0, 4] if atomname.length >= 4
1000
+ case atomname.length
1001
+ when 0
1002
+ return ' '
1003
+ when 1
1004
+ return ' ' + atomname + ' '
1005
+ when 2
1006
+ if /\A[0-9]/ =~ atomname then
1007
+ return sprintf('%-4s', atomname)
1008
+ elsif /[0-9]\z/ =~ atomname then
1009
+ return sprintf(' %-3s', atomname)
1010
+ end
1011
+ when 3
1012
+ if /\A[0-9]/ =~ atomname then
1013
+ return sprintf('%-4s', atomname)
1014
+ end
1015
+ end
1016
+ # ambiguous case for two- or three-letter name
1017
+ elem = self.element.to_s.strip
1018
+ if elem.size > 0 and i = atomname.index(elem) then
1019
+ if i == 0 and elem.size == 1 then
1020
+ return sprintf(' %-3s', atomname)
1021
+ else
1022
+ return sprintf('%-4s', atomname)
1023
+ end
1024
+ end
1025
+ if self.kind_of?(HETATM) then
1026
+ if /\A(B[^AEHIKR]|C[^ADEFLMORSU]|F[^EMR]|H[^EFGOS]|I[^NR]|K[^R]|N[^ABDEIOP]|O[^S]|P[^ABDMORTU]|S[^BCEGIMNR]|V|W|Y[^B])/ =~
1027
+ atomname then
1028
+ return sprintf(' %-3s', atomname)
1029
+ else
1030
+ return sprintf('%-4s', atomname)
1031
+ end
1032
+ else # ATOM
1033
+ if /\A[CHONSP]/ =~ atomname then
1034
+ return sprintf(' %-3s', atomname)
1035
+ else
1036
+ return sprintf('%-4s', atomname)
1037
+ end
1038
+ end
1039
+ # could not be reached here
1040
+ raise 'bug!'
1041
+ end
1042
+ private :justify_atomname
1043
+
1013
1044
  def to_s
1045
+ atomname = justify_atomname
1014
1046
  sprintf("%-6s%5d %-4s%-1s%3s %-1s%4d%-1s %8.3f%8.3f%8.3f%6.2f%6.2f %-4s%2s%-2s\n",
1015
1047
  self.record_name,
1016
1048
  self.serial,
1017
- self.name,
1049
+ atomname,
1018
1050
  self.altLoc,
1019
1051
  self.resName,
1020
1052
  self.chainID,
@@ -1503,6 +1535,7 @@ module Bio
1503
1535
 
1504
1536
  when 'MODEL'
1505
1537
  c_atom = nil
1538
+ cChain = nil
1506
1539
  if cModel.model_serial or cModel.chains.size > 0 then
1507
1540
  self.addModel(cModel)
1508
1541
  end
@@ -1641,7 +1674,7 @@ module Bio
1641
1674
  # p pdb.record['HETATM']
1642
1675
  #
1643
1676
  def record(name = nil)
1644
- name ? @hash[name] : @hash
1677
+ name ? (@hash[name] || []) : @hash
1645
1678
  end
1646
1679
 
1647
1680
  #--
@@ -1804,12 +1837,13 @@ module Bio
1804
1837
 
1805
1838
  # Classification in "HEADER".
1806
1839
  def classification
1807
- self.record('HEADER').first.classification
1840
+ f = self.record('HEADER').first
1841
+ f ? f.classification : nil
1808
1842
  end
1809
1843
 
1810
1844
  # Get authors in "AUTHOR".
1811
1845
  def authors
1812
- self.record('AUTHOR').first.authorList
1846
+ self.record('AUTHOR').collect { |f| f.authorList }.flatten
1813
1847
  end
1814
1848
 
1815
1849
  #--
@@ -1818,7 +1852,10 @@ module Bio
1818
1852
 
1819
1853
  # PDB identifier written in "HEADER". (e.g. 1A00)
1820
1854
  def entry_id
1821
- @id = self.record('HEADER').first.idCode unless @id
1855
+ unless @id
1856
+ f = self.record('HEADER').first
1857
+ @id = f ? f.idCode : nil
1858
+ end
1822
1859
  @id
1823
1860
  end
1824
1861
 
@@ -1829,12 +1866,14 @@ module Bio
1829
1866
 
1830
1867
  # Title of this entry in "TITLE".
1831
1868
  def definition
1832
- self.record('TITLE').first.title
1869
+ f = self.record('TITLE').first
1870
+ f ? f.title : nil
1833
1871
  end
1834
1872
 
1835
1873
  # Current modification number in "REVDAT".
1836
1874
  def version
1837
- self.record('REVDAT').first.modNum
1875
+ f = self.record('REVDAT').first
1876
+ f ? f.modNum : nil
1838
1877
  end
1839
1878
 
1840
1879
  end #class PDB
@@ -4,25 +4,9 @@
4
4
  # Copyright:: Copyright (C) 2004, 2006
5
5
  # Alex Gutteridge <alexg@ebi.ac.uk>
6
6
  # Naohisa Goto <ng@bioruby.org>
7
- # License:: LGPL
7
+ # License:: The Ruby License
8
8
  #
9
- # $Id: residue.rb,v 1.10 2006/01/20 13:54:08 ngoto Exp $
10
- #
11
- #--
12
- # This library is free software; you can redistribute it and/or
13
- # modify it under the terms of the GNU Lesser General Public
14
- # License as published by the Free Software Foundation; either
15
- # version 2 of the License, or (at your option) any later version.
16
- #
17
- # This library is distributed in the hope that it will be useful,
18
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
19
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20
- # Lesser General Public License for more details.
21
- #
22
- # You should have received a copy of the GNU Lesser General Public
23
- # License along with this library; if not, write to the Free Software
24
- # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25
- #++
9
+ # $Id: residue.rb,v 1.13 2007/04/23 16:03:25 ngoto Exp $
26
10
  #
27
11
  # = Bio::PDB::Residue
28
12
  #
@@ -81,9 +65,9 @@ module Bio
81
65
  # Now, Residue#id is an alias of residue_id.
82
66
  alias id residue_id
83
67
 
84
- #Keyed access to atoms based on element e.g. ["CA"]
68
+ #Keyed access to atoms based on atom name e.g. ["CA"]
85
69
  def [](key)
86
- atom = @atoms.find{ |atom| key == atom.element }
70
+ atom = @atoms.find{ |atom| key == atom.name }
87
71
  end
88
72
 
89
73
  # Updates residue id. This is a private method.
@@ -4,25 +4,9 @@
4
4
  # Copyright:: Copyright (C) 2004, 2006
5
5
  # Alex Gutteridge <alexg@ebi.ac.uk>
6
6
  # Naohisa Goto <ng@bioruby.org>
7
- # License:: LGPL
7
+ # License:: The Ruby License
8
8
  #
9
- # $Id: utils.rb,v 1.5 2006/01/08 12:59:04 ngoto Exp $
10
- #
11
- #--
12
- # This library is free software; you can redistribute it and/or
13
- # modify it under the terms of the GNU Lesser General Public
14
- # License as published by the Free Software Foundation; either
15
- # version 2 of the License, or (at your option) any later version.
16
- #
17
- # This library is distributed in the hope that it will be useful,
18
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
19
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20
- # Lesser General Public License for more details.
21
- #
22
- # You should have received a copy of the GNU Lesser General Public
23
- # License along with this library; if not, write to the Free Software
24
- # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25
- #++
9
+ # $Id: utils.rb,v 1.7 2007/04/05 23:35:41 trevor Exp $
26
10
  #
27
11
  # = Bio::PDB::Utils
28
12
  #
@@ -1,525 +1,506 @@
1
1
  #
2
2
  # = bio/db/prosite.rb - PROSITE database class
3
3
  #
4
- # Copyright:: Copyright (C) 2001 KATAYAMA Toshiaki <k@bioruby.org>
5
- # Licence:: LGPL
4
+ # Copyright:: Copyright (C) 2001 Toshiaki Katayama <k@bioruby.org>
5
+ # Licence:: Ruby's
6
6
  #
7
- # $Id: prosite.rb,v 0.13 2005/12/18 18:24:08 k Exp $
8
- #
9
- # == Description
10
- #
11
- #
12
- # == Example
13
- # == References
14
- #--
15
- #
16
- # This library is free software; you can redistribute it and/or
17
- # modify it under the terms of the GNU Lesser General Public
18
- # License as published by the Free Software Foundation; either
19
- # version 2 of the License, or (at your option) any later version.
20
- #
21
- # This library is distributed in the hope that it will be useful,
22
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
23
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
24
- # Lesser General Public License for more details.
25
- #
26
- # You should have received a copy of the GNU Lesser General Public
27
- # License along with this library; if not, write to the Free Software
28
- # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29
- #
30
- #++
7
+ # $Id: prosite.rb,v 0.16 2006/09/19 06:03:51 k Exp $
31
8
  #
32
9
 
33
10
  require 'bio/db'
34
11
 
35
12
  module Bio
36
13
 
37
- class PROSITE < EMBLDB
14
+ class PROSITE < EMBLDB
38
15
 
39
- # Delimiter
40
- DELIMITER = "\n//\n"
16
+ # Delimiter
17
+ DELIMITER = "\n//\n"
41
18
 
42
- # Delimiter
43
- RS = DELIMITER
19
+ # Delimiter
20
+ RS = DELIMITER
44
21
 
45
- # Bio::DB API
46
- TAGSIZE = 5
22
+ # Bio::DB API
23
+ TAGSIZE = 5
47
24
 
48
25
 
49
- def initialize(entry)
50
- super(entry, TAGSIZE)
51
- end
26
+ def initialize(entry)
27
+ super(entry, TAGSIZE)
28
+ end
52
29
 
53
30
 
54
- # ID Identification (Begins each entry; 1 per entry)
55
- #
56
- # ID ENTRY_NAME; ENTRY_TYPE. (ENTRY_TYPE : PATTERN, MATRIX, RULE)
57
- #
58
- # Returns
59
- def name
60
- unless @data['ID']
61
- @data['ID'], @data['TYPE'] = fetch('ID').chomp('.').split('; ')
62
- end
63
- @data['ID']
31
+ # ID Identification (Begins each entry; 1 per entry)
32
+ #
33
+ # ID ENTRY_NAME; ENTRY_TYPE. (ENTRY_TYPE : PATTERN, MATRIX, RULE)
34
+ #
35
+ # Returns
36
+ def name
37
+ unless @data['ID']
38
+ @data['ID'], @data['TYPE'] = fetch('ID').chomp('.').split('; ')
64
39
  end
40
+ @data['ID']
41
+ end
65
42
 
66
- # Returns
67
- def division
68
- unless @data['TYPE']
69
- name
70
- end
71
- @data['TYPE']
43
+ # Returns
44
+ def division
45
+ unless @data['TYPE']
46
+ name
72
47
  end
48
+ @data['TYPE']
49
+ end
73
50
 
74
51
 
75
- # AC Accession number (1 per entry)
76
- #
77
- # AC PSnnnnn;
78
- #
79
- # Returns
80
- def ac
81
- unless @data['AC']
82
- @data['AC'] = fetch('AC').chomp(';')
83
- end
84
- @data['AC']
52
+ # AC Accession number (1 per entry)
53
+ #
54
+ # AC PSnnnnn;
55
+ #
56
+ # Returns
57
+ def ac
58
+ unless @data['AC']
59
+ @data['AC'] = fetch('AC').chomp(';')
85
60
  end
61
+ @data['AC']
62
+ end
86
63
 
87
- alias entry_id ac
64
+ alias entry_id ac
88
65
 
89
66
 
90
- # DT Date (1 per entry)
91
- #
92
- # DT MMM-YYYY (CREATED); MMM-YYYY (DATA UPDATE); MMM-YYYY (INFO UPDATE).
93
- #
94
- # Returns
95
- def dt
96
- field_fetch('DT')
97
- end
67
+ # DT Date (1 per entry)
68
+ #
69
+ # DT MMM-YYYY (CREATED); MMM-YYYY (DATA UPDATE); MMM-YYYY (INFO UPDATE).
70
+ #
71
+ # Returns
72
+ def dt
73
+ field_fetch('DT')
74
+ end
98
75
 
99
- alias date dt
76
+ alias date dt
100
77
 
101
78
 
102
- # DE Short description (1 per entry)
103
- #
104
- # DE Description.
105
- #
106
- # Returns
107
- def de
108
- field_fetch('DE')
109
- end
79
+ # DE Short description (1 per entry)
80
+ #
81
+ # DE Description.
82
+ #
83
+ # Returns
84
+ def de
85
+ field_fetch('DE')
86
+ end
110
87
 
111
- alias definition de
88
+ alias definition de
112
89
 
113
90
 
114
- # PA Pattern (>=0 per entry)
115
- #
116
- # see - pa2re method
117
- #
118
- # Returns
119
- def pa
120
- field_fetch('PA')
121
- @data['PA'] = fetch('PA') unless @data['PA']
122
- @data['PA'].gsub!(/\s+/, '') if @data['PA']
123
- @data['PA']
124
- end
91
+ # PA Pattern (>=0 per entry)
92
+ #
93
+ # see - pa2re method
94
+ #
95
+ # Returns
96
+ def pa
97
+ field_fetch('PA')
98
+ @data['PA'] = fetch('PA') unless @data['PA']
99
+ @data['PA'].gsub!(/\s+/, '') if @data['PA']
100
+ @data['PA']
101
+ end
125
102
 
126
- alias pattern pa
103
+ alias pattern pa
127
104
 
128
105
 
129
- # MA Matrix/profile (>=0 per entry)
130
- #
131
- # see - ma2re method
132
- #
133
- # Returns
134
- def ma
135
- field_fetch('MA')
136
- end
106
+ # MA Matrix/profile (>=0 per entry)
107
+ #
108
+ # see - ma2re method
109
+ #
110
+ # Returns
111
+ def ma
112
+ field_fetch('MA')
113
+ end
137
114
 
138
- alias profile ma
115
+ alias profile ma
139
116
 
140
117
 
141
- # RU Rule (>=0 per entry)
142
- #
143
- # RU Rule_Description.
144
- #
145
- # The rule is described in ordinary English and is free-format.
146
- #
147
- # Returns
148
- def ru
149
- field_fetch('RU')
150
- end
118
+ # RU Rule (>=0 per entry)
119
+ #
120
+ # RU Rule_Description.
121
+ #
122
+ # The rule is described in ordinary English and is free-format.
123
+ #
124
+ # Returns
125
+ def ru
126
+ field_fetch('RU')
127
+ end
151
128
 
152
- alias rule ru
153
-
154
-
155
- # NR Numerical results (>=0 per entry)
156
- #
157
- # - SWISS-PROT scan statistics of true and false positives/negatives
158
- #
159
- # /RELEASE SWISS-PROT release number and total number of sequence
160
- # entries in that release.
161
- # /TOTAL Total number of hits in SWISS-PROT.
162
- # /POSITIVE Number of hits on proteins that are known to belong to the
163
- # set in consideration.
164
- # /UNKNOWN Number of hits on proteins that could possibly belong to
165
- # the set in consideration.
166
- # /FALSE_POS Number of false hits (on unrelated proteins).
167
- # /FALSE_NEG Number of known missed hits.
168
- # /PARTIAL Number of partial sequences which belong to the set in
169
- # consideration, but which are not hit by the pattern or
170
- # profile because they are partial (fragment) sequences.
171
- #
172
- # Returns
173
- def nr
174
- unless @data['NR']
175
- hash = {} # temporal hash
176
- fetch('NR').scan(%r{/(\S+)=([^;]+);}).each do |k, v|
177
- if v =~ /^(\d+)\((\d+)\)$/
178
- hits = $1.to_i # the number of hits
179
- seqs = $2.to_i # the number of sequences
180
- v = [hits, seqs]
181
- elsif v =~ /([\d\.]+),(\d+)/
182
- sprel = $1 # the number of SWISS-PROT release
183
- spseq = $2.to_i # the number of SWISS-PROT sequences
184
- v = [sprel, spseq]
185
- else
186
- v = v.to_i
187
- end
188
- hash[k] = v
129
+ alias rule ru
130
+
131
+
132
+ # NR Numerical results (>=0 per entry)
133
+ #
134
+ # - SWISS-PROT scan statistics of true and false positives/negatives
135
+ #
136
+ # /RELEASE SWISS-PROT release number and total number of sequence
137
+ # entries in that release.
138
+ # /TOTAL Total number of hits in SWISS-PROT.
139
+ # /POSITIVE Number of hits on proteins that are known to belong to the
140
+ # set in consideration.
141
+ # /UNKNOWN Number of hits on proteins that could possibly belong to
142
+ # the set in consideration.
143
+ # /FALSE_POS Number of false hits (on unrelated proteins).
144
+ # /FALSE_NEG Number of known missed hits.
145
+ # /PARTIAL Number of partial sequences which belong to the set in
146
+ # consideration, but which are not hit by the pattern or
147
+ # profile because they are partial (fragment) sequences.
148
+ #
149
+ # Returns
150
+ def nr
151
+ unless @data['NR']
152
+ hash = {} # temporal hash
153
+ fetch('NR').scan(%r{/(\S+)=([^;]+);}).each do |k, v|
154
+ if v =~ /^(\d+)\((\d+)\)$/
155
+ hits = $1.to_i # the number of hits
156
+ seqs = $2.to_i # the number of sequences
157
+ v = [hits, seqs]
158
+ elsif v =~ /([\d\.]+),(\d+)/
159
+ sprel = $1 # the number of SWISS-PROT release
160
+ spseq = $2.to_i # the number of SWISS-PROT sequences
161
+ v = [sprel, spseq]
162
+ else
163
+ v = v.to_i
189
164
  end
190
- @data['NR'] = hash
165
+ hash[k] = v
191
166
  end
192
- @data['NR']
167
+ @data['NR'] = hash
193
168
  end
169
+ @data['NR']
170
+ end
194
171
 
195
- alias statistics nr
172
+ alias statistics nr
196
173
 
197
- # Returns
198
- def release
199
- statistics['RELEASE']
200
- end
174
+ # Returns
175
+ def release
176
+ statistics['RELEASE']
177
+ end
201
178
 
202
- # Returns
203
- def swissprot_release_number
204
- release.first
205
- end
179
+ # Returns
180
+ def swissprot_release_number
181
+ release.first
182
+ end
206
183
 
207
- # Returns
208
- def swissprot_release_sequences
209
- release.last
210
- end
184
+ # Returns
185
+ def swissprot_release_sequences
186
+ release.last
187
+ end
211
188
 
212
- # Returns
213
- def total
214
- statistics['TOTAL']
215
- end
189
+ # Returns
190
+ def total
191
+ statistics['TOTAL']
192
+ end
216
193
 
217
- # Returns
218
- def total_hits
219
- total.first
220
- end
194
+ # Returns
195
+ def total_hits
196
+ total.first
197
+ end
221
198
 
222
- # Returns
223
- def total_sequences
224
- total.last
225
- end
199
+ # Returns
200
+ def total_sequences
201
+ total.last
202
+ end
226
203
 
227
- # Returns
228
- def positive
229
- statistics['POSITIVE']
230
- end
204
+ # Returns
205
+ def positive
206
+ statistics['POSITIVE']
207
+ end
231
208
 
232
- # Returns
233
- def positive_hits
234
- positive.first
235
- end
209
+ # Returns
210
+ def positive_hits
211
+ positive.first
212
+ end
236
213
 
237
- # Returns
238
- def positive_sequences
239
- positive.last
240
- end
214
+ # Returns
215
+ def positive_sequences
216
+ positive.last
217
+ end
241
218
 
242
- # Returns
243
- def unknown
244
- statistics['UNKNOWN']
245
- end
219
+ # Returns
220
+ def unknown
221
+ statistics['UNKNOWN']
222
+ end
246
223
 
247
- # Returns
248
- def unknown_hits
249
- unknown.first
250
- end
224
+ # Returns
225
+ def unknown_hits
226
+ unknown.first
227
+ end
251
228
 
252
- # Returns
253
- def unknown_sequences
254
- unknown.last
255
- end
229
+ # Returns
230
+ def unknown_sequences
231
+ unknown.last
232
+ end
256
233
 
257
- # Returns
258
- def false_pos
259
- statistics['FALSE_POS']
260
- end
234
+ # Returns
235
+ def false_pos
236
+ statistics['FALSE_POS']
237
+ end
261
238
 
262
- # Returns
263
- def false_positive_hits
264
- false_pos.first
265
- end
239
+ # Returns
240
+ def false_positive_hits
241
+ false_pos.first
242
+ end
266
243
 
267
- # Returns
268
- def false_positive_sequences
269
- false_pos.last
270
- end
244
+ # Returns
245
+ def false_positive_sequences
246
+ false_pos.last
247
+ end
271
248
 
272
- # Returns
273
- def false_neg
274
- statistics['FALSE_NEG']
275
- end
276
- alias false_negative_hits false_neg
249
+ # Returns
250
+ def false_neg
251
+ statistics['FALSE_NEG']
252
+ end
253
+ alias false_negative_hits false_neg
277
254
 
278
- # Returns
279
- def partial
280
- statistics['PARTIAL']
281
- end
255
+ # Returns
256
+ def partial
257
+ statistics['PARTIAL']
258
+ end
282
259
 
283
260
 
284
- # CC Comments (>=0 per entry)
285
- #
286
- # CC /QUALIFIER=data; /QUALIFIER=data; .......
287
- #
288
- # /TAXO-RANGE Taxonomic range.
289
- # /MAX-REPEAT Maximum known number of repetitions of the pattern in a
290
- # single protein.
291
- # /SITE Indication of an `interesting' site in the pattern.
292
- # /SKIP-FLAG Indication of an entry that can be, in some cases, ignored
293
- # by a program (because it is too unspecific).
294
- #
295
- # Returns
296
- def cc
297
- unless @data['CC']
298
- hash = {} # temporal hash
299
- fetch('CC').scan(%r{/(\S+)=([^;]+);}).each do |k, v|
300
- hash[k] = v
301
- end
302
- @data['CC'] = hash
261
+ # CC Comments (>=0 per entry)
262
+ #
263
+ # CC /QUALIFIER=data; /QUALIFIER=data; .......
264
+ #
265
+ # /TAXO-RANGE Taxonomic range.
266
+ # /MAX-REPEAT Maximum known number of repetitions of the pattern in a
267
+ # single protein.
268
+ # /SITE Indication of an `interesting' site in the pattern.
269
+ # /SKIP-FLAG Indication of an entry that can be, in some cases, ignored
270
+ # by a program (because it is too unspecific).
271
+ #
272
+ # Returns
273
+ def cc
274
+ unless @data['CC']
275
+ hash = {} # temporal hash
276
+ fetch('CC').scan(%r{/(\S+)=([^;]+);}).each do |k, v|
277
+ hash[k] = v
303
278
  end
304
- @data['CC']
279
+ @data['CC'] = hash
305
280
  end
281
+ @data['CC']
282
+ end
306
283
 
307
- alias comment cc
308
-
309
- # Returns
310
- def taxon_range(expand = nil)
311
- range = comment['TAXO-RANGE']
312
- if range and expand
313
- expand = []
314
- range.scan(/./) do |x|
315
- case x
316
- when 'A'; expand.push('archaebacteria')
317
- when 'B'; expand.push('bacteriophages')
318
- when 'E'; expand.push('eukaryotes')
319
- when 'P'; expand.push('prokaryotes')
320
- when 'V'; expand.push('eukaryotic viruses')
321
- end
284
+ alias comment cc
285
+
286
+ # Returns
287
+ def taxon_range(expand = nil)
288
+ range = comment['TAXO-RANGE']
289
+ if range and expand
290
+ expand = []
291
+ range.scan(/./) do |x|
292
+ case x
293
+ when 'A'; expand.push('archaebacteria')
294
+ when 'B'; expand.push('bacteriophages')
295
+ when 'E'; expand.push('eukaryotes')
296
+ when 'P'; expand.push('prokaryotes')
297
+ when 'V'; expand.push('eukaryotic viruses')
322
298
  end
323
- range = expand
324
299
  end
325
- return range
300
+ range = expand
326
301
  end
302
+ return range
303
+ end
327
304
 
328
- # Returns
329
- def max_repeat
330
- comment['MAX-REPEAT'].to_i
331
- end
305
+ # Returns
306
+ def max_repeat
307
+ comment['MAX-REPEAT'].to_i
308
+ end
332
309
 
333
- # Returns
334
- def site
335
- if comment['SITE']
336
- num, desc = comment['SITE'].split(',')
337
- end
338
- return [num.to_i, desc]
310
+ # Returns
311
+ def site
312
+ if comment['SITE']
313
+ num, desc = comment['SITE'].split(',')
339
314
  end
315
+ return [num.to_i, desc]
316
+ end
340
317
 
341
- # Returns
342
- def skip_flag
343
- if comment['SKIP-FLAG'] == 'TRUE'
344
- return true
345
- end
318
+ # Returns
319
+ def skip_flag
320
+ if comment['SKIP-FLAG'] == 'TRUE'
321
+ return true
346
322
  end
323
+ end
347
324
 
348
325
 
349
- # DR Cross-references to SWISS-PROT (>=0 per entry)
350
- #
351
- # DR AC_NB, ENTRY_NAME, C; AC_NB, ENTRY_NAME, C; AC_NB, ENTRY_NAME, C;
352
- #
353
- # - `AC_NB' is the SWISS-PROT primary accession number of the entry to
354
- # which reference is being made.
355
- # - `ENTRY_NAME' is the SWISS-PROT entry name.
356
- # - `C' is a one character flag that can be one of the following:
357
- #
358
- # T For a true positive.
359
- # N For a false negative; a sequence which belongs to the set under
360
- # consideration, but which has not been picked up by the pattern or
361
- # profile.
362
- # P For a `potential' hit; a sequence that belongs to the set under
363
- # consideration, but which was not picked up because the region(s) that
364
- # are used as a 'fingerprint' (pattern or profile) is not yet available
365
- # in the data bank (partial sequence).
366
- # ? For an unknown; a sequence which possibly could belong to the set under
367
- # consideration.
368
- # F For a false positive; a sequence which does not belong to the set in
369
- # consideration.
370
- #
371
- # Returns
372
- def dr
373
- unless @data['DR']
374
- hash = {} # temporal hash
375
- if fetch('DR')
376
- fetch('DR').scan(/(\w+)\s*, (\w+)\s*, (.);/).each do |a, e, c|
377
- hash[a] = [e, c] # SWISS-PROT : accession, entry, true/false
378
- end
326
+ # DR Cross-references to SWISS-PROT (>=0 per entry)
327
+ #
328
+ # DR AC_NB, ENTRY_NAME, C; AC_NB, ENTRY_NAME, C; AC_NB, ENTRY_NAME, C;
329
+ #
330
+ # - `AC_NB' is the SWISS-PROT primary accession number of the entry to
331
+ # which reference is being made.
332
+ # - `ENTRY_NAME' is the SWISS-PROT entry name.
333
+ # - `C' is a one character flag that can be one of the following:
334
+ #
335
+ # T For a true positive.
336
+ # N For a false negative; a sequence which belongs to the set under
337
+ # consideration, but which has not been picked up by the pattern or
338
+ # profile.
339
+ # P For a `potential' hit; a sequence that belongs to the set under
340
+ # consideration, but which was not picked up because the region(s) that
341
+ # are used as a 'fingerprint' (pattern or profile) is not yet available
342
+ # in the data bank (partial sequence).
343
+ # ? For an unknown; a sequence which possibly could belong to the set under
344
+ # consideration.
345
+ # F For a false positive; a sequence which does not belong to the set in
346
+ # consideration.
347
+ #
348
+ # Returns
349
+ def dr
350
+ unless @data['DR']
351
+ hash = {} # temporal hash
352
+ if fetch('DR')
353
+ fetch('DR').scan(/(\w+)\s*, (\w+)\s*, (.);/).each do |a, e, c|
354
+ hash[a] = [e, c] # SWISS-PROT : accession, entry, true/false
379
355
  end
380
- @data['DR'] = hash
381
356
  end
382
- @data['DR']
357
+ @data['DR'] = hash
383
358
  end
359
+ @data['DR']
360
+ end
384
361
 
385
- alias sp_xref dr
386
-
387
- # Returns
388
- def list_xref(flag, by_name = nil)
389
- ary = []
390
- sp_xref.each do |sp_acc, value|
391
- if value[1] == flag
392
- if by_name
393
- sp_name = value[0]
394
- ary.push(sp_name)
395
- else
396
- ary.push(sp_acc)
397
- end
362
+ alias sp_xref dr
363
+
364
+ # Returns
365
+ def list_xref(flag, by_name = nil)
366
+ ary = []
367
+ sp_xref.each do |sp_acc, value|
368
+ if value[1] == flag
369
+ if by_name
370
+ sp_name = value[0]
371
+ ary.push(sp_name)
372
+ else
373
+ ary.push(sp_acc)
398
374
  end
399
375
  end
400
- return ary
401
376
  end
377
+ return ary
378
+ end
402
379
 
403
- # Returns
404
- def list_truepositive(by_name = nil)
405
- list_xref('T', by_name)
406
- end
380
+ # Returns
381
+ def list_truepositive(by_name = nil)
382
+ list_xref('T', by_name)
383
+ end
407
384
 
408
- # Returns
409
- def list_falsenegative(by_name = nil)
410
- list_xref('F', by_name)
411
- end
385
+ # Returns
386
+ def list_falsenegative(by_name = nil)
387
+ list_xref('F', by_name)
388
+ end
412
389
 
413
- # Returns
414
- def list_falsepositive(by_name = nil)
415
- list_xref('P', by_name)
416
- end
390
+ # Returns
391
+ def list_falsepositive(by_name = nil)
392
+ list_xref('P', by_name)
393
+ end
417
394
 
418
- # Returns
419
- def list_potentialhit(by_name = nil)
420
- list_xref('P', by_name)
421
- end
395
+ # Returns
396
+ def list_potentialhit(by_name = nil)
397
+ list_xref('P', by_name)
398
+ end
422
399
 
423
- # Returns
424
- def list_unknown(by_name = nil)
425
- list_xref('?', by_name)
426
- end
400
+ # Returns
401
+ def list_unknown(by_name = nil)
402
+ list_xref('?', by_name)
403
+ end
427
404
 
428
405
 
429
- # 3D Cross-references to PDB (>=0 per entry)
430
- #
431
- # 3D name; [name2;...]
432
- #
433
- # Returns
434
- def pdb_xref
435
- unless @data['3D']
436
- @data['3D'] = fetch('3D').split(/; */)
437
- end
438
- @data['3D']
406
+ # 3D Cross-references to PDB (>=0 per entry)
407
+ #
408
+ # 3D name; [name2;...]
409
+ #
410
+ # Returns
411
+ def pdb_xref
412
+ unless @data['3D']
413
+ @data['3D'] = fetch('3D').split(/; */)
439
414
  end
415
+ @data['3D']
416
+ end
440
417
 
441
418
 
442
- # DO Pointer to the documentation file (1 per entry)
443
- #
444
- # DO PDOCnnnnn;
445
- #
446
- # Returns
447
- def pdoc_xref
448
- @data['DO'] = fetch('DO').chomp(';')
449
- end
419
+ # DO Pointer to the documentation file (1 per entry)
420
+ #
421
+ # DO PDOCnnnnn;
422
+ #
423
+ # Returns
424
+ def pdoc_xref
425
+ @data['DO'] = fetch('DO').chomp(';')
426
+ end
450
427
 
451
428
 
452
- ### prosite pattern to regular expression
453
- #
454
- # prosite/prosuser.txt:
455
- #
456
- # The PA (PAttern) lines contains the definition of a PROSITE pattern. The
457
- # patterns are described using the following conventions:
458
- #
459
- # 0) The standard IUPAC one-letter codes for the amino acids are used.
460
- # 0) Ambiguities are indicated by listing the acceptable amino acids for a
461
- # given position, between square parentheses `[ ]'. For example: [ALT]
462
- # stands for Ala or Leu or Thr.
463
- # 1) A period ends the pattern.
464
- # 2) When a pattern is restricted to either the N- or C-terminal of a
465
- # sequence, that pattern either starts with a `<' symbol or respectively
466
- # ends with a `>' symbol.
467
- # 3) Ambiguities are also indicated by listing between a pair of curly
468
- # brackets `{ }' the amino acids that are not accepted at a given
469
- # position. For example: {AM} stands for any amino acid except Ala and
470
- # Met.
471
- # 4) Repetition of an element of the pattern can be indicated by following
472
- # that element with a numerical value or a numerical range between
473
- # parenthesis. Examples: x(3) corresponds to x-x-x, x(2,4) corresponds to
474
- # x-x or x-x-x or x-x-x-x.
475
- # 5) The symbol `x' is used for a position where any amino acid is accepted.
476
- # 6) Each element in a pattern is separated from its neighbor by a `-'.
477
- #
478
- # Examples:
479
- #
480
- # PA [AC]-x-V-x(4)-{ED}.
481
- #
482
- # This pattern is translated as: [Ala or Cys]-any-Val-any-any-any-any-{any
483
- # but Glu or Asp}
484
- #
485
- # PA <A-x-[ST](2)-x(0,1)-V.
486
- #
487
- # This pattern, which must be in the N-terminal of the sequence (`<'), is
488
- # translated as: Ala-any-[Ser or Thr]-[Ser or Thr]-(any or none)-Val
489
- #
490
- def self.pa2re(pattern)
491
- pattern.gsub!(/\s/, '') # remove white spaces
492
- pattern.sub!(/\.$/, '') # (1) remove trailing '.'
493
- pattern.sub!(/^</, '^') # (2) restricted to the N-terminal : `<'
494
- pattern.sub!(/>$/, '$') # (2) restricted to the C-terminal : `>'
495
- pattern.gsub!(/\{(\w+)\}/) { |m|
496
- '[^' + $1 + ']' # (3) not accepted at a given position : '{}'
497
- }
498
- pattern.gsub!(/\(([\d,]+)\)/) { |m|
499
- '{' + $1 + '}' # (4) repetition of an element : (n), (n,m)
500
- }
501
- pattern.tr!('x', '.') # (5) any amino acid is accepted : 'x'
502
- pattern.tr!('-', '') # (6) each element is separated by a '-'
503
- Regexp.new(pattern)
504
- end
429
+ ### prosite pattern to regular expression
430
+ #
431
+ # prosite/prosuser.txt:
432
+ #
433
+ # The PA (PAttern) lines contains the definition of a PROSITE pattern. The
434
+ # patterns are described using the following conventions:
435
+ #
436
+ # 0) The standard IUPAC one-letter codes for the amino acids are used.
437
+ # 0) Ambiguities are indicated by listing the acceptable amino acids for a
438
+ # given position, between square parentheses `[ ]'. For example: [ALT]
439
+ # stands for Ala or Leu or Thr.
440
+ # 1) A period ends the pattern.
441
+ # 2) When a pattern is restricted to either the N- or C-terminal of a
442
+ # sequence, that pattern either starts with a `<' symbol or respectively
443
+ # ends with a `>' symbol.
444
+ # 3) Ambiguities are also indicated by listing between a pair of curly
445
+ # brackets `{ }' the amino acids that are not accepted at a given
446
+ # position. For example: {AM} stands for any amino acid except Ala and
447
+ # Met.
448
+ # 4) Repetition of an element of the pattern can be indicated by following
449
+ # that element with a numerical value or a numerical range between
450
+ # parenthesis. Examples: x(3) corresponds to x-x-x, x(2,4) corresponds to
451
+ # x-x or x-x-x or x-x-x-x.
452
+ # 5) The symbol `x' is used for a position where any amino acid is accepted.
453
+ # 6) Each element in a pattern is separated from its neighbor by a `-'.
454
+ #
455
+ # Examples:
456
+ #
457
+ # PA [AC]-x-V-x(4)-{ED}.
458
+ #
459
+ # This pattern is translated as: [Ala or Cys]-any-Val-any-any-any-any-{any
460
+ # but Glu or Asp}
461
+ #
462
+ # PA <A-x-[ST](2)-x(0,1)-V.
463
+ #
464
+ # This pattern, which must be in the N-terminal of the sequence (`<'), is
465
+ # translated as: Ala-any-[Ser or Thr]-[Ser or Thr]-(any or none)-Val
466
+ #
467
+ def self.pa2re(pattern)
468
+ pattern.gsub!(/\s/, '') # remove white spaces
469
+ pattern.sub!(/\.$/, '') # (1) remove trailing '.'
470
+ pattern.sub!(/^</, '^') # (2) restricted to the N-terminal : `<'
471
+ pattern.sub!(/>$/, '$') # (2) restricted to the C-terminal : `>'
472
+ pattern.gsub!(/\{(\w+)\}/) { |m|
473
+ '[^' + $1 + ']' # (3) not accepted at a given position : '{}'
474
+ }
475
+ pattern.gsub!(/\(([\d,]+)\)/) { |m|
476
+ '{' + $1 + '}' # (4) repetition of an element : (n), (n,m)
477
+ }
478
+ pattern.tr!('x', '.') # (5) any amino acid is accepted : 'x'
479
+ pattern.tr!('-', '') # (6) each element is separated by a '-'
480
+ Regexp.new(pattern, Regexp::IGNORECASE)
481
+ end
505
482
 
506
- def pa2re(pattern)
507
- self.class.pa2re(pattern)
508
- end
483
+ def pa2re(pattern)
484
+ self.class.pa2re(pattern)
485
+ end
509
486
 
487
+ def re
488
+ self.class.pa2re(self.pa)
489
+ end
510
490
 
511
- ### prosite profile to regular expression
512
- #
513
- # prosite/profile.txt:
514
- #
515
- # Returns
516
- def ma2re(matrix)
517
- raise NotImplementedError
518
- end
519
491
 
492
+ ### prosite profile to regular expression
493
+ #
494
+ # prosite/profile.txt:
495
+ #
496
+ # Returns
497
+ def ma2re(matrix)
498
+ raise NotImplementedError
520
499
  end
521
500
 
522
- end
501
+ end # PROSITE
502
+
503
+ end # Bio
523
504
 
524
505
 
525
506
  if __FILE__ == $0