bio 1.0.0 → 1.1.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 (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,10 @@
1
1
  #
2
- # bio/appl/blast/report.rb - BLAST Report class
2
+ # = bio/appl/blast/report.rb - BLAST Report class
3
3
  #
4
- # Copyright (C) 2003 KATAYAMA Toshiaki <k@bioruby.org>
4
+ # Copyright:: Copyright (C) 2003 Toshiaki Katayama <k@bioruby.org>
5
+ # License:: The Ruby License
5
6
  #
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: report.rb,v 1.9 2005/09/26 13:00:04 k Exp $
7
+ # $Id: report.rb,v 1.11 2007/04/05 23:35:39 trevor Exp $
21
8
  #
22
9
 
23
10
  require 'bio/appl/blast'
@@ -26,182 +13,320 @@ require 'bio/appl/blast/rexml'
26
13
  require 'bio/appl/blast/format8'
27
14
 
28
15
  module Bio
29
- class Blast
30
-
31
- class Report
16
+ class Blast
32
17
 
33
- # for Bio::FlatFile support (only for XML data)
34
- DELIMITER = RS = "</BlastOutput>\n"
18
+ # = Bio::Blast::Report
19
+ #
20
+ # Parsed results of the blast execution for Tab-delimited and XML output
21
+ # format. Tab-delimited reports are consists of
22
+ #
23
+ # Query id,
24
+ # Subject id,
25
+ # percent of identity,
26
+ # alignment length,
27
+ # number of mismatches (not including gaps),
28
+ # number of gap openings,
29
+ # start of alignment in query,
30
+ # end of alignment in query,
31
+ # start of alignment in subject,
32
+ # end of alignment in subject,
33
+ # expected value,
34
+ # bit score.
35
+ #
36
+ # according to the MEGABLAST document (README.mbl). As for XML output,
37
+ # see the following DTDs.
38
+ #
39
+ # * http://www.ncbi.nlm.nih.gov/dtd/NCBI_BlastOutput.dtd
40
+ # * http://www.ncbi.nlm.nih.gov/dtd/NCBI_BlastOutput.mod
41
+ # * http://www.ncbi.nlm.nih.gov/dtd/NCBI_Entity.mod
42
+ #
43
+ class Report
35
44
 
36
- def self.xmlparser(data)
37
- self.new(data, :xmlparser)
38
- end
39
- def self.rexml(data)
40
- self.new(data, :rexml)
41
- end
42
- def self.tab(data)
43
- self.new(data, :tab)
44
- end
45
+ # for Bio::FlatFile support (only for XML data)
46
+ DELIMITER = RS = "</BlastOutput>\n"
45
47
 
46
- def auto_parse(data)
47
- if /<?xml/.match(data[/.*/])
48
- if defined?(XMLParser)
49
- xmlparser_parse(data)
50
- else
51
- rexml_parse(data)
52
- end
53
- else
54
- tab_parse(data)
55
- end
56
- end
57
- private :auto_parse
58
-
59
- def initialize(data, parser = nil)
60
- @iterations = []
61
- @parameters = {}
62
- case parser
63
- when :xmlparser # format 7
64
- xmlparser_parse(data)
65
- when :rexml # format 7
66
- rexml_parse(data)
67
- when :tab # format 8
68
- tab_parse(data)
69
- else
70
- auto_parse(data)
71
- end
72
- end
73
- attr_reader :iterations, :parameters,
74
- :program, :version, :reference, :db, :query_id, :query_def, :query_len
75
-
76
- # shortcut for @parameters
77
- def matrix; @parameters['matrix']; end
78
- def expect; @parameters['expect'].to_i; end
79
- def inclusion; @parameters['include'].to_i; end
80
- def sc_match; @parameters['sc-match'].to_i; end
81
- def sc_mismatch; @parameters['sc-mismatch'].to_i; end
82
- def gap_open; @parameters['gap-open'].to_i; end
83
- def gap_extend; @parameters['gap-extend'].to_i; end
84
- def filter; @parameters['filter']; end
85
- def pattern; @parameters['pattern']; end
86
- def entrez_query; @parameters['entrez-query']; end
87
-
88
- # <for blastpgp>
89
- def each_iteration
90
- @iterations.each do |x|
91
- yield x
92
- end
93
- end
48
+ # Specify to use XMLParser to parse XML (-m 7) output.
49
+ def self.xmlparser(data)
50
+ self.new(data, :xmlparser)
51
+ end
94
52
 
95
- # <for blastall> shortcut for the last iteration's hits
96
- def each_hit
97
- @iterations.last.each do |x|
98
- yield x
99
- end
100
- end
101
- alias each each_hit
53
+ # Specify to use REXML to parse XML (-m 7) output.
54
+ def self.rexml(data)
55
+ self.new(data, :rexml)
56
+ end
102
57
 
103
- # shortcut for the last iteration's hits
104
- def hits
105
- @iterations.last.hits
106
- end
58
+ # Specify to use tab delimited output parser.
59
+ def self.tab(data)
60
+ self.new(data, :tab)
61
+ end
107
62
 
108
- # shortcut for the last iteration's statistics
109
- def statistics
110
- @iterations.last.statistics
111
- end
112
- def db_num; statistics['db-num']; end
113
- def db_len; statistics['db-len']; end
114
- def hsp_len; statistics['hsp-len']; end
115
- def eff_space; statistics['eff-space']; end
116
- def kappa; statistics['kappa']; end
117
- def lambda; statistics['lambda']; end
118
- def entropy; statistics['entropy']; end
119
-
120
- # shortcut for the last iteration's message (for checking 'CONVERGED')
121
- def message
122
- @iterations.last.message
63
+ def auto_parse(data)
64
+ if /<?xml/.match(data[/.*/])
65
+ if defined?(XMLParser)
66
+ xmlparser_parse(data)
67
+ else
68
+ rexml_parse(data)
123
69
  end
70
+ else
71
+ tab_parse(data)
72
+ end
73
+ end
74
+ private :auto_parse
75
+
76
+ # Passing a BLAST output from 'blastall -m 7' or '-m 8' as a String.
77
+ # Formats are auto detected.
78
+ def initialize(data, parser = nil)
79
+ @iterations = []
80
+ @parameters = {}
81
+ case parser
82
+ when :xmlparser # format 7
83
+ xmlparser_parse(data)
84
+ when :rexml # format 7
85
+ rexml_parse(data)
86
+ when :tab # format 8
87
+ tab_parse(data)
88
+ else
89
+ auto_parse(data)
90
+ end
91
+ end
124
92
 
93
+ # Returns an Array of Bio::Blast::Report::Iteration objects.
94
+ attr_reader :iterations
95
+
96
+ # Returns a Hash containing execution parameters. Valid keys are:
97
+ # 'matrix', 'expect', 'include', 'sc-match', 'sc-mismatch',
98
+ # 'gap-open', 'gap-extend', 'filter'
99
+ attr_reader :parameters
100
+
101
+ # Shortcut for BlastOutput values.
102
+ attr_reader :program, :version, :reference, :db, :query_id, :query_def, :query_len
103
+
104
+ # Matrix used (-M) : shortcuts for @parameters
105
+ def matrix; @parameters['matrix']; end
106
+ # Expectation threshold (-e) : shortcuts for @parameters
107
+ def expect; @parameters['expect'].to_i; end
108
+ # Inclusion threshold (-h) : shortcuts for @parameters
109
+ def inclusion; @parameters['include'].to_i; end
110
+ # Match score for NT (-r) : shortcuts for @parameters
111
+ def sc_match; @parameters['sc-match'].to_i; end
112
+ # Mismatch score for NT (-q) : shortcuts for @parameters
113
+ def sc_mismatch; @parameters['sc-mismatch'].to_i; end
114
+ # Gap opening cost (-G) : shortcuts for @parameters
115
+ def gap_open; @parameters['gap-open'].to_i; end
116
+ # Gap extension cost (-E) : shortcuts for @parameters
117
+ def gap_extend; @parameters['gap-extend'].to_i; end
118
+ # Filtering options (-F) : shortcuts for @parameters
119
+ def filter; @parameters['filter']; end
120
+ # PHI-BLAST pattern : shortcuts for @parameters
121
+ def pattern; @parameters['pattern']; end
122
+ # Limit of request to Entrez : shortcuts for @parameters
123
+ def entrez_query; @parameters['entrez-query']; end
124
+
125
+ # Iterates on each Bio::Blast::Report::Iteration object. (for blastpgp)
126
+ def each_iteration
127
+ @iterations.each do |x|
128
+ yield x
129
+ end
130
+ end
125
131
 
126
- # Bio::Blast::Report::Iteration
127
- class Iteration
128
- def initialize
129
- @message = nil
130
- @statistics = {}
131
- @num = 1
132
- @hits = []
133
- end
134
- attr_reader :hits, :statistics
135
- attr_accessor :num, :message
132
+ # Iterates on each Bio::Blast::Report::Hit object of the the last Iteration.
133
+ # Shortcut for the last iteration's hits (for blastall)
134
+ def each_hit
135
+ @iterations.last.each do |x|
136
+ yield x
137
+ end
138
+ end
139
+ alias each each_hit
136
140
 
137
- def each
138
- @hits.each do |x|
139
- yield x
140
- end
141
- end
142
- end
141
+ # Returns a Array of Bio::Blast::Report::Hits of the last iteration.
142
+ # Shortcut for the last iteration's hits
143
+ def hits
144
+ @iterations.last.hits
145
+ end
143
146
 
147
+ # Returns a Hash containing execution statistics of the last iteration.
148
+ # Valid keys are:
149
+ # 'db-num', 'db-len', 'hsp-len', 'eff-space', 'kappa', 'lambda', 'entropy'
150
+ # Shortcut for the last iteration's statistics.
151
+ def statistics
152
+ @iterations.last.statistics
153
+ end
144
154
 
145
- # Bio::Blast::Report::Hit
146
- class Hit
147
- def initialize
148
- @hsps = []
149
- end
150
- attr_reader :hsps
151
- attr_accessor :query_id, :query_def, :query_len,
152
- :num, :hit_id, :len, :definition, :accession
153
-
154
- def each
155
- @hsps.each do |x|
156
- yield x
157
- end
158
- end
155
+ # Number of sequences in BLAST db
156
+ def db_num; statistics['db-num']; end
157
+ # Length of BLAST db
158
+ def db_len; statistics['db-len']; end
159
+ # Effective HSP length
160
+ def hsp_len; statistics['hsp-len']; end
161
+ # Effective search space
162
+ def eff_space; statistics['eff-space']; end
163
+ # Karlin-Altschul parameter K
164
+ def kappa; statistics['kappa']; end
165
+ # Karlin-Altschul parameter Lamba
166
+ def lambda; statistics['lambda']; end
167
+ # Karlin-Altschul parameter H
168
+ def entropy; statistics['entropy']; end
169
+
170
+ # Returns a String (or nil) containing execution message of the last
171
+ # iteration (typically "CONVERGED").
172
+ # Shortcut for the last iteration's message (for checking 'CONVERGED')
173
+ def message
174
+ @iterations.last.message
175
+ end
159
176
 
160
- # Compatible with Bio::Fasta::Report::Hit
161
177
 
162
- alias target_id accession
163
- alias target_def definition
164
- alias target_len len
178
+ # Bio::Blast::Report::Iteration
179
+ class Iteration
180
+ def initialize
181
+ @message = nil
182
+ @statistics = {}
183
+ @num = 1
184
+ @hits = []
185
+ end
186
+ # Returns an Array of Bio::Blast::Report::Hit objects.
187
+ attr_reader :hits
165
188
 
166
- # Shortcut methods for the best Hsp
189
+ # Returns a Hash containing execution statistics.
190
+ # Valid keys are:
191
+ # 'db-len', 'db-num', 'eff-space', 'entropy', 'hsp-len', 'kappa', 'lambda'
192
+ attr_reader :statistics
167
193
 
168
- def evalue; @hsps.first.evalue; end
169
- def bit_score; @hsps.first.bit_score; end
170
- def identity; @hsps.first.identity; end
171
- def percent_identity; @hsps.first.percent_identity; end
172
- def overlap; @hsps.first.align_len; end
194
+ # Returns the number of iteration counts.
195
+ attr_accessor :num
173
196
 
174
- def query_seq; @hsps.first.qseq; end
175
- def target_seq; @hsps.first.hseq; end
176
- def midline; @hsps.first.midline; end
197
+ # Returns a String (or nil) containing execution message (typically
198
+ # "CONVERGED").
199
+ attr_accessor :message
177
200
 
178
- def query_start; @hsps.first.query_from; end
179
- def query_end; @hsps.first.query_to; end
180
- def target_start; @hsps.first.hit_from; end
181
- def target_end; @hsps.first.hit_to; end
182
- def lap_at
183
- [ query_start, query_end, target_start, target_end ]
184
- end
201
+ # Iterates on each Bio::Blast::Report::Hit object.
202
+ def each
203
+ @hits.each do |x|
204
+ yield x
185
205
  end
206
+ end
207
+ end
186
208
 
187
209
 
188
- # Bio::Blast::Report::Hsp
189
- class Hsp
190
- def initialize
191
- @hsp = {}
192
- end
193
- attr_reader :hsp
194
- attr_accessor :num, :bit_score, :score, :evalue,
195
- :query_from, :query_to, :hit_from, :hit_to,
196
- :pattern_from, :pattern_to, :query_frame, :hit_frame,
197
- :identity, :positive, :gaps, :align_len, :density,
198
- :qseq, :hseq, :midline,
199
- :percent_identity, :mismatch_count # only for '-m 8'
210
+ # Bio::Blast::Report::Hit
211
+ class Hit
212
+ def initialize
213
+ @hsps = []
214
+ end
215
+
216
+ # Returns an Array of Bio::Blast::Report::Hsp objects.
217
+ attr_reader :hsps
218
+
219
+ # Hit number
220
+ attr_accessor :num
221
+ # SeqId of subject
222
+ attr_accessor :hit_id
223
+ # Length of subject
224
+ attr_accessor :len
225
+ # Definition line of subject
226
+ attr_accessor :definition
227
+ # Accession
228
+ attr_accessor :accession
229
+
230
+ # Iterates on each Hsp object.
231
+ def each
232
+ @hsps.each do |x|
233
+ yield x
200
234
  end
235
+ end
201
236
 
237
+ # Compatible method with Bio::Fasta::Report::Hit class.
238
+ attr_accessor :query_id
239
+ # Compatible method with Bio::Fasta::Report::Hit class.
240
+ attr_accessor :query_def
241
+ # Compatible method with Bio::Fasta::Report::Hit class.
242
+ attr_accessor :query_len
243
+
244
+ # Compatible method with Bio::Fasta::Report::Hit class.
245
+ alias target_id accession
246
+ # Compatible method with Bio::Fasta::Report::Hit class.
247
+ alias target_def definition
248
+ # Compatible method with Bio::Fasta::Report::Hit class.
249
+ alias target_len len
250
+
251
+ # Shortcut methods for the best Hsp, some are also compatible with
252
+ # Bio::Fasta::Report::Hit class.
253
+ def evalue; @hsps.first.evalue; end
254
+ def bit_score; @hsps.first.bit_score; end
255
+ def identity; @hsps.first.identity; end
256
+ def percent_identity; @hsps.first.percent_identity; end
257
+ def overlap; @hsps.first.align_len; end
258
+
259
+ def query_seq; @hsps.first.qseq; end
260
+ def target_seq; @hsps.first.hseq; end
261
+ def midline; @hsps.first.midline; end
262
+
263
+ def query_start; @hsps.first.query_from; end
264
+ def query_end; @hsps.first.query_to; end
265
+ def target_start; @hsps.first.hit_from; end
266
+ def target_end; @hsps.first.hit_to; end
267
+ def lap_at
268
+ [ query_start, query_end, target_start, target_end ]
202
269
  end
203
270
  end
204
- end
271
+
272
+
273
+ # Bio::Blast::Report::Hsp
274
+ class Hsp
275
+ def initialize
276
+ @hsp = {}
277
+ end
278
+ attr_reader :hsp
279
+
280
+ # HSP number
281
+ attr_accessor :num
282
+ # Score (in bits) of HSP
283
+ attr_accessor :bit_score
284
+ # Sscore of HSP
285
+ attr_accessor :score
286
+ # E-value of HSP
287
+ attr_accessor :evalue
288
+ # Start of HSP in query
289
+ attr_accessor :query_from
290
+ # End of HSP
291
+ attr_accessor :query_to
292
+ # Start of HSP in subject
293
+ attr_accessor :hit_from
294
+ # End of HSP
295
+ attr_accessor :hit_to
296
+ # Start of PHI-BLAST pattern
297
+ attr_accessor :pattern_from
298
+ # End of PHI-BLAST pattern
299
+ attr_accessor :pattern_to
300
+ # Translation frame of query
301
+ attr_accessor :query_frame
302
+ # Translation frame of subject
303
+ attr_accessor :hit_frame
304
+ # Number of identities in HSP
305
+ attr_accessor :identity
306
+ # Number of positives in HSP
307
+ attr_accessor :positive
308
+ # Number of gaps in HSP
309
+ attr_accessor :gaps
310
+ # Length of the alignment used
311
+ attr_accessor :align_len
312
+ # Score density
313
+ attr_accessor :density
314
+ # Alignment string for the query (with gaps)
315
+ attr_accessor :qseq
316
+ # Alignment string for subject (with gaps)
317
+ attr_accessor :hseq
318
+ # Formating middle line
319
+ attr_accessor :midline
320
+ # Available only for '-m 8' format outputs.
321
+ attr_accessor :percent_identity
322
+ # Available only for '-m 8' format outputs.
323
+ attr_accessor :mismatch_count
324
+ end
325
+
326
+ end # Report
327
+
328
+ end # Blast
329
+ end # Bio
205
330
 
206
331
 
207
332
  if __FILE__ == $0
@@ -389,264 +514,3 @@ if __FILE__ == $0
389
514
  end
390
515
 
391
516
 
392
- =begin
393
-
394
- = Bio::Blast::Report
395
-
396
- Parsed results of the blast execution for Tab-delimited and XML output
397
- format. Tab-delimited reports are consists of
398
-
399
- Query id,
400
- Subject id,
401
- percent of identity,
402
- alignment length,
403
- number of mismatches (not including gaps),
404
- number of gap openings,
405
- start of alignment in query,
406
- end of alignment in query,
407
- start of alignment in subject,
408
- end of alignment in subject,
409
- expected value,
410
- bit score.
411
-
412
- according to the MEGABLAST document (README.mbl). As for XML output,
413
- see the following DTDs.
414
-
415
- * http://www.ncbi.nlm.nih.gov/dtd/NCBI_BlastOutput.dtd
416
- * http://www.ncbi.nlm.nih.gov/dtd/NCBI_BlastOutput.mod
417
- * http://www.ncbi.nlm.nih.gov/dtd/NCBI_Entity.mod
418
-
419
-
420
- --- Bio::Blast::Report.new(data)
421
-
422
- Passing a BLAST output from 'blastall -m 7' or '-m 8' as a String.
423
- Formats are auto detected.
424
-
425
- --- Bio::Blast::Report.xmlparaser(xml)
426
-
427
- Specify to use XMLParser to parse XML (-m 7) output.
428
-
429
- --- Bio::Blast::Report.rexml(xml)
430
-
431
- Specify to use REXML to parse XML (-m 7) output.
432
-
433
- --- Bio::Blast::Report.tab(data)
434
-
435
- Specify to use tab delimited output parser.
436
-
437
- --- Bio::Blast::Report#program
438
- --- Bio::Blast::Report#version
439
- --- Bio::Blast::Report#reference
440
- --- Bio::Blast::Report#db
441
- --- Bio::Blast::Report#query_id
442
- --- Bio::Blast::Report#query_def
443
- --- Bio::Blast::Report#query_len
444
-
445
- Shortcut for BlastOutput values.
446
-
447
- --- Bio::Blast::Report#parameters
448
-
449
- Returns a Hash containing execution parameters. Valid keys are:
450
- 'matrix', 'expect', 'include', 'sc-match', 'sc-mismatch',
451
- 'gap-open', 'gap-extend', 'filter'
452
-
453
- --- Bio::Blast::Report#matrix
454
- * Matrix used (-M)
455
- --- Bio::Blast::Report#expect
456
- * Expectation threshold (-e)
457
- --- Bio::Blast::Report#inclusion
458
- * Inclusion threshold (-h)
459
- --- Bio::Blast::Report#sc_match
460
- * Match score for NT (-r)
461
- --- Bio::Blast::Report#sc_mismatch
462
- * Mismatch score for NT (-q)
463
- --- Bio::Blast::Report#gap_open
464
- * Gap opening cost (-G)
465
- --- Bio::Blast::Report#gap_extend
466
- * Gap extension cost (-E)
467
- --- Bio::Blast::Report#filter
468
- * Filtering options (-F)
469
- --- Bio::Blast::Report#pattern
470
- * PHI-BLAST pattern
471
- --- Bio::Blast::Report#entrez_query
472
- * Limit of request to Entrez
473
-
474
- These are shortcuts for parameters.
475
-
476
-
477
- --- Bio::Blast::Report#iterations
478
-
479
- Returns an Array of Bio::Blast::Report::Iteration objects.
480
-
481
- --- Bio::Blast::Report#each_iteration
482
-
483
- Iterates on each Bio::Blast::Report::Iteration object.
484
-
485
- --- Bio::Blast::Report#each_hit
486
- --- Bio::Blast::Report#each
487
-
488
- Iterates on each Bio::Blast::Report::Hit object of the the
489
- last Iteration.
490
-
491
- --- Bio::Blast::Report#statistics
492
-
493
- Returns a Hash containing execution statistics of the last iteration.
494
- Valid keys are:
495
- 'db-num', 'db-len', 'hsp-len', 'eff-space', 'kappa',
496
- 'lambda', 'entropy'
497
-
498
- --- Bio::Blast::Report#db_num
499
- * Number of sequences in BLAST db
500
- --- Bio::Blast::Report#db_len
501
- * Length of BLAST db
502
- --- Bio::Blast::Report#hsp_len
503
- * Effective HSP length
504
- --- Bio::Blast::Report#eff_space
505
- * Effective search space
506
- --- Bio::Blast::Report#kappa
507
- * Karlin-Altschul parameter K
508
- --- Bio::Blast::Report#lambda
509
- * Karlin-Altschul parameter Lamba
510
- --- Bio::Blast::Report#entropy
511
- * Karlin-Altschul parameter H
512
-
513
- These are shortcuts for statistics.
514
-
515
-
516
- --- Bio::Blast::Report#message
517
-
518
- Returns a String (or nil) containing execution message of the last
519
- iteration (typically "CONVERGED").
520
-
521
- --- Bio::Blast::Report#hits
522
-
523
- Returns a Array of Bio::Blast::Report::Hits of the last iteration.
524
-
525
-
526
- == Bio::Blast::Report::Iteration
527
-
528
- --- Bio::Blast::Report::Iteration#num
529
-
530
- Returns the number of iteration counts.
531
-
532
- --- Bio::Blast::Report::Iteration#hits
533
-
534
- Returns an Array of Bio::Blast::Report::Hit objects.
535
-
536
- --- Bio::Blast::Report::Iteration#each
537
-
538
- Iterates on each Bio::Blast::Report::Hit object.
539
-
540
- --- Bio::Blast::Report::Iteration#statistics
541
-
542
- Returns a Hash containing execution statistics.
543
- Valid keys are:
544
- 'db-len', 'db-num', 'eff-space', 'entropy', 'hsp-len',
545
- 'kappa', 'lambda'
546
-
547
- --- Bio::Blast::Report::Iteration#message
548
-
549
- Returns a String (or nil) containing execution message (typically
550
- "CONVERGED").
551
-
552
-
553
- == Bio::Blast::Report::Hit
554
-
555
- --- Bio::Blast::Report::Hit#each
556
-
557
- Iterates on each Hsp object.
558
-
559
- --- Bio::Blast::Report::Hit#hsps
560
-
561
- Returns an Array of Bio::Blast::Report::Hsp objects.
562
-
563
- --- Bio::Blast::Report::Hit#num
564
- * hit number
565
- --- Bio::Blast::Report::Hit#hit_id
566
- * SeqId of subject
567
- --- Bio::Blast::Report::Hit#len
568
- * length of subject
569
- --- Bio::Blast::Report::Hit#definition
570
- * definition line of subject
571
- --- Bio::Blast::Report::Hit#accession
572
- * accession
573
-
574
- Accessors for the Hit values.
575
-
576
- --- Bio::Blast::Report::Hit#query_id
577
- --- Bio::Blast::Report::Hit#query_def
578
- --- Bio::Blast::Report::Hit#query_len
579
- --- Bio::Blast::Report::Hit#target_id
580
- --- Bio::Blast::Report::Hit#target_def
581
- --- Bio::Blast::Report::Hit#target_len
582
-
583
- Compatible methods with Bio::Fasta::Report::Hit class.
584
-
585
- --- Bio::Blast::Report::Hit#evalue
586
- --- Bio::Blast::Report::Hit#bit_score
587
- --- Bio::Blast::Report::Hit#identity
588
- --- Bio::Blast::Report::Hit#overlap
589
-
590
- --- Bio::Blast::Report::Hit#query_seq
591
- --- Bio::Blast::Report::Hit#midline
592
- --- Bio::Blast::Report::Hit#target_seq
593
-
594
- --- Bio::Blast::Report::Hit#query_start
595
- --- Bio::Blast::Report::Hit#query_end
596
- --- Bio::Blast::Report::Hit#target_start
597
- --- Bio::Blast::Report::Hit#target_end
598
- --- Bio::Blast::Report::Hit#lap_at
599
-
600
- Shortcut methods for the best Hsp, some are also compatible with
601
- Bio::Fasta::Report::Hit class.
602
-
603
-
604
- == Bio::Blast::Report::Hsp
605
-
606
- --- Bio::Blast::Report::Hsp#num
607
- * HSP number
608
- --- Bio::Blast::Report::Hsp#bit_score
609
- * score (in bits) of HSP
610
- --- Bio::Blast::Report::Hsp#score
611
- * score of HSP
612
- --- Bio::Blast::Report::Hsp#evalue
613
- * e-value of HSP
614
- --- Bio::Blast::Report::Hsp#query_from
615
- * start of HSP in query
616
- --- Bio::Blast::Report::Hsp#query_to
617
- * end of HSP
618
- --- Bio::Blast::Report::Hsp#hit_from
619
- * start of HSP in subject
620
- --- Bio::Blast::Report::Hsp#hit_to
621
- * end of HSP
622
- --- Bio::Blast::Report::Hsp#pattern_from
623
- * start of PHI-BLAST pattern
624
- --- Bio::Blast::Report::Hsp#pattern_to
625
- * end of PHI-BLAST pattern
626
- --- Bio::Blast::Report::Hsp#query_frame
627
- * translation frame of query
628
- --- Bio::Blast::Report::Hsp#hit_frame
629
- * translation frame of subject
630
- --- Bio::Blast::Report::Hsp#identity
631
- * number of identities in HSP
632
- --- Bio::Blast::Report::Hsp#positive
633
- * number of positives in HSP
634
- --- Bio::Blast::Report::Hsp#gaps
635
- * number of gaps in HSP
636
- --- Bio::Blast::Report::Hsp#align_len
637
- * length of the alignment used
638
- --- Bio::Blast::Report::Hsp#density
639
- * score density
640
- --- Bio::Blast::Report::Hsp#qseq
641
- * alignment string for the query (with gaps)
642
- --- Bio::Blast::Report::Hsp#hseq
643
- * alignment string for subject (with gaps)
644
- --- Bio::Blast::Report::Hsp#midline
645
- * formating middle line
646
-
647
- --- Bio::Blast::Report::Hsp#percent_identity
648
- --- Bio::Blast::Report::Hsp#mismatch_count
649
-
650
- Available only for '-m 8' format outputs.
651
-
652
- =end