bio 1.3.1 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (303) hide show
  1. data/ChangeLog +2105 -3728
  2. data/KNOWN_ISSUES.rdoc +35 -3
  3. data/README.rdoc +8 -2
  4. data/RELEASE_NOTES.rdoc +166 -0
  5. data/bin/bioruby +4 -1
  6. data/bioruby.gemspec +146 -1
  7. data/bioruby.gemspec.erb +3 -1
  8. data/doc/ChangeLog-before-1.3.1 +3961 -0
  9. data/doc/Tutorial.rd +154 -22
  10. data/doc/Tutorial.rd.html +125 -68
  11. data/lib/bio.rb +21 -6
  12. data/lib/bio/appl/bl2seq/report.rb +11 -202
  13. data/lib/bio/appl/blast/format0.rb +0 -193
  14. data/lib/bio/appl/blast/report.rb +2 -147
  15. data/lib/bio/appl/blast/wublast.rb +0 -208
  16. data/lib/bio/appl/fasta.rb +4 -19
  17. data/lib/bio/appl/fasta/format10.rb +0 -14
  18. data/lib/bio/appl/genscan/report.rb +0 -176
  19. data/lib/bio/appl/hmmer.rb +1 -15
  20. data/lib/bio/appl/hmmer/report.rb +0 -100
  21. data/lib/bio/appl/meme/mast.rb +156 -0
  22. data/lib/bio/appl/meme/mast/report.rb +91 -0
  23. data/lib/bio/appl/meme/motif.rb +48 -0
  24. data/lib/bio/appl/psort.rb +0 -111
  25. data/lib/bio/appl/psort/report.rb +1 -45
  26. data/lib/bio/appl/pts1.rb +2 -4
  27. data/lib/bio/appl/sosui/report.rb +5 -54
  28. data/lib/bio/appl/targetp/report.rb +1 -104
  29. data/lib/bio/appl/tmhmm/report.rb +0 -36
  30. data/lib/bio/command.rb +94 -10
  31. data/lib/bio/data/aa.rb +1 -77
  32. data/lib/bio/data/codontable.rb +1 -95
  33. data/lib/bio/data/na.rb +1 -26
  34. data/lib/bio/db/aaindex.rb +1 -38
  35. data/lib/bio/db/fasta.rb +1 -134
  36. data/lib/bio/db/fasta/format_qual.rb +204 -0
  37. data/lib/bio/db/fasta/qual.rb +102 -0
  38. data/lib/bio/db/fastq.rb +645 -0
  39. data/lib/bio/db/fastq/fastq_to_biosequence.rb +40 -0
  40. data/lib/bio/db/fastq/format_fastq.rb +175 -0
  41. data/lib/bio/db/genbank/genbank.rb +1 -86
  42. data/lib/bio/db/gff.rb +0 -17
  43. data/lib/bio/db/go.rb +4 -72
  44. data/lib/bio/db/kegg/common.rb +112 -0
  45. data/lib/bio/db/kegg/compound.rb +29 -20
  46. data/lib/bio/db/kegg/drug.rb +74 -34
  47. data/lib/bio/db/kegg/enzyme.rb +26 -5
  48. data/lib/bio/db/kegg/genes.rb +128 -15
  49. data/lib/bio/db/kegg/genome.rb +3 -41
  50. data/lib/bio/db/kegg/glycan.rb +19 -24
  51. data/lib/bio/db/kegg/orthology.rb +16 -56
  52. data/lib/bio/db/kegg/reaction.rb +81 -28
  53. data/lib/bio/db/kegg/taxonomy.rb +1 -52
  54. data/lib/bio/db/litdb.rb +1 -16
  55. data/lib/bio/db/phyloxml/phyloxml.xsd +582 -0
  56. data/lib/bio/db/phyloxml/phyloxml_elements.rb +1174 -0
  57. data/lib/bio/db/phyloxml/phyloxml_parser.rb +954 -0
  58. data/lib/bio/db/phyloxml/phyloxml_writer.rb +228 -0
  59. data/lib/bio/db/prosite.rb +2 -95
  60. data/lib/bio/db/rebase.rb +5 -6
  61. data/lib/bio/db/sanger_chromatogram/abif.rb +120 -0
  62. data/lib/bio/db/sanger_chromatogram/chromatogram.rb +133 -0
  63. data/lib/bio/db/sanger_chromatogram/chromatogram_to_biosequence.rb +32 -0
  64. data/lib/bio/db/sanger_chromatogram/scf.rb +210 -0
  65. data/lib/bio/io/das.rb +0 -44
  66. data/lib/bio/io/ddbjxml.rb +1 -181
  67. data/lib/bio/io/flatfile.rb +1 -7
  68. data/lib/bio/io/flatfile/autodetection.rb +6 -0
  69. data/lib/bio/io/keggapi.rb +0 -442
  70. data/lib/bio/io/ncbirest.rb +130 -132
  71. data/lib/bio/io/ncbisoap.rb +2 -1
  72. data/lib/bio/io/pubmed.rb +0 -88
  73. data/lib/bio/location.rb +0 -73
  74. data/lib/bio/pathway.rb +0 -171
  75. data/lib/bio/sequence.rb +18 -1
  76. data/lib/bio/sequence/adapter.rb +3 -0
  77. data/lib/bio/sequence/format.rb +16 -0
  78. data/lib/bio/sequence/quality_score.rb +205 -0
  79. data/lib/bio/tree.rb +70 -5
  80. data/lib/bio/util/restriction_enzyme/single_strand.rb +3 -2
  81. data/lib/bio/util/sirna.rb +1 -23
  82. data/lib/bio/version.rb +1 -1
  83. data/sample/demo_aaindex.rb +67 -0
  84. data/sample/demo_aminoacid.rb +101 -0
  85. data/sample/demo_bl2seq_report.rb +220 -0
  86. data/sample/demo_blast_report.rb +285 -0
  87. data/sample/demo_codontable.rb +119 -0
  88. data/sample/demo_das.rb +105 -0
  89. data/sample/demo_ddbjxml.rb +212 -0
  90. data/sample/demo_fasta_remote.rb +51 -0
  91. data/sample/demo_fastaformat.rb +105 -0
  92. data/sample/demo_genbank.rb +132 -0
  93. data/sample/demo_genscan_report.rb +202 -0
  94. data/sample/demo_gff1.rb +49 -0
  95. data/sample/demo_go.rb +98 -0
  96. data/sample/demo_hmmer_report.rb +149 -0
  97. data/sample/demo_kegg_compound.rb +57 -0
  98. data/sample/demo_kegg_drug.rb +65 -0
  99. data/sample/demo_kegg_genome.rb +74 -0
  100. data/sample/demo_kegg_glycan.rb +72 -0
  101. data/sample/demo_kegg_orthology.rb +62 -0
  102. data/sample/demo_kegg_reaction.rb +66 -0
  103. data/sample/demo_kegg_taxonomy.rb +92 -0
  104. data/sample/demo_keggapi.rb +502 -0
  105. data/sample/demo_litdb.rb +42 -0
  106. data/sample/demo_locations.rb +99 -0
  107. data/sample/demo_ncbi_rest.rb +130 -0
  108. data/sample/demo_nucleicacid.rb +49 -0
  109. data/sample/demo_pathway.rb +196 -0
  110. data/sample/demo_prosite.rb +120 -0
  111. data/sample/demo_psort.rb +138 -0
  112. data/sample/demo_psort_report.rb +70 -0
  113. data/sample/demo_pubmed.rb +118 -0
  114. data/sample/demo_sirna.rb +63 -0
  115. data/sample/demo_sosui_report.rb +89 -0
  116. data/sample/demo_targetp_report.rb +135 -0
  117. data/sample/demo_tmhmm_report.rb +68 -0
  118. data/sample/pmfetch.rb +13 -4
  119. data/sample/pmsearch.rb +15 -4
  120. data/sample/test_phyloxml_big.rb +205 -0
  121. data/test/bioruby_test_helper.rb +61 -0
  122. data/test/data/KEGG/1.1.1.1.enzyme +935 -0
  123. data/test/data/KEGG/C00025.compound +102 -0
  124. data/test/data/KEGG/D00063.drug +104 -0
  125. data/test/data/KEGG/G00024.glycan +47 -0
  126. data/test/data/KEGG/G01366.glycan +18 -0
  127. data/test/data/KEGG/K02338.orthology +902 -0
  128. data/test/data/KEGG/R00006.reaction +14 -0
  129. data/test/data/fastq/README.txt +109 -0
  130. data/test/data/fastq/error_diff_ids.fastq +20 -0
  131. data/test/data/fastq/error_double_qual.fastq +22 -0
  132. data/test/data/fastq/error_double_seq.fastq +22 -0
  133. data/test/data/fastq/error_long_qual.fastq +20 -0
  134. data/test/data/fastq/error_no_qual.fastq +20 -0
  135. data/test/data/fastq/error_qual_del.fastq +20 -0
  136. data/test/data/fastq/error_qual_escape.fastq +20 -0
  137. data/test/data/fastq/error_qual_null.fastq +0 -0
  138. data/test/data/fastq/error_qual_space.fastq +21 -0
  139. data/test/data/fastq/error_qual_tab.fastq +21 -0
  140. data/test/data/fastq/error_qual_unit_sep.fastq +20 -0
  141. data/test/data/fastq/error_qual_vtab.fastq +20 -0
  142. data/test/data/fastq/error_short_qual.fastq +20 -0
  143. data/test/data/fastq/error_spaces.fastq +20 -0
  144. data/test/data/fastq/error_tabs.fastq +21 -0
  145. data/test/data/fastq/error_trunc_at_plus.fastq +19 -0
  146. data/test/data/fastq/error_trunc_at_qual.fastq +19 -0
  147. data/test/data/fastq/error_trunc_at_seq.fastq +18 -0
  148. data/test/data/fastq/error_trunc_in_plus.fastq +19 -0
  149. data/test/data/fastq/error_trunc_in_qual.fastq +20 -0
  150. data/test/data/fastq/error_trunc_in_seq.fastq +18 -0
  151. data/test/data/fastq/error_trunc_in_title.fastq +17 -0
  152. data/test/data/fastq/illumina_full_range_as_illumina.fastq +8 -0
  153. data/test/data/fastq/illumina_full_range_as_sanger.fastq +8 -0
  154. data/test/data/fastq/illumina_full_range_as_solexa.fastq +8 -0
  155. data/test/data/fastq/illumina_full_range_original_illumina.fastq +8 -0
  156. data/test/data/fastq/longreads_as_illumina.fastq +40 -0
  157. data/test/data/fastq/longreads_as_sanger.fastq +40 -0
  158. data/test/data/fastq/longreads_as_solexa.fastq +40 -0
  159. data/test/data/fastq/longreads_original_sanger.fastq +120 -0
  160. data/test/data/fastq/misc_dna_as_illumina.fastq +16 -0
  161. data/test/data/fastq/misc_dna_as_sanger.fastq +16 -0
  162. data/test/data/fastq/misc_dna_as_solexa.fastq +16 -0
  163. data/test/data/fastq/misc_dna_original_sanger.fastq +16 -0
  164. data/test/data/fastq/misc_rna_as_illumina.fastq +16 -0
  165. data/test/data/fastq/misc_rna_as_sanger.fastq +16 -0
  166. data/test/data/fastq/misc_rna_as_solexa.fastq +16 -0
  167. data/test/data/fastq/misc_rna_original_sanger.fastq +16 -0
  168. data/test/data/fastq/sanger_full_range_as_illumina.fastq +8 -0
  169. data/test/data/fastq/sanger_full_range_as_sanger.fastq +8 -0
  170. data/test/data/fastq/sanger_full_range_as_solexa.fastq +8 -0
  171. data/test/data/fastq/sanger_full_range_original_sanger.fastq +8 -0
  172. data/test/data/fastq/solexa_full_range_as_illumina.fastq +8 -0
  173. data/test/data/fastq/solexa_full_range_as_sanger.fastq +8 -0
  174. data/test/data/fastq/solexa_full_range_as_solexa.fastq +8 -0
  175. data/test/data/fastq/solexa_full_range_original_solexa.fastq +8 -0
  176. data/test/data/fastq/wrapping_as_illumina.fastq +12 -0
  177. data/test/data/fastq/wrapping_as_sanger.fastq +12 -0
  178. data/test/data/fastq/wrapping_as_solexa.fastq +12 -0
  179. data/test/data/fastq/wrapping_original_sanger.fastq +24 -0
  180. data/test/data/meme/db +0 -0
  181. data/test/data/meme/mast +0 -0
  182. data/test/data/meme/mast.out +13 -0
  183. data/test/data/meme/meme.out +3 -0
  184. data/test/data/phyloxml/apaf.xml +666 -0
  185. data/test/data/phyloxml/bcl_2.xml +2097 -0
  186. data/test/data/phyloxml/made_up.xml +144 -0
  187. data/test/data/phyloxml/ncbi_taxonomy_mollusca_short.xml +65 -0
  188. data/test/data/phyloxml/phyloxml_examples.xml +415 -0
  189. data/test/data/sanger_chromatogram/test_chromatogram_abif.ab1 +0 -0
  190. data/test/data/sanger_chromatogram/test_chromatogram_scf_v2.scf +0 -0
  191. data/test/data/sanger_chromatogram/test_chromatogram_scf_v3.scf +0 -0
  192. data/test/functional/bio/appl/test_pts1.rb +7 -5
  193. data/test/functional/bio/io/test_ensembl.rb +4 -3
  194. data/test/functional/bio/io/test_pubmed.rb +9 -3
  195. data/test/functional/bio/io/test_soapwsdl.rb +5 -4
  196. data/test/functional/bio/io/test_togows.rb +5 -4
  197. data/test/functional/bio/sequence/test_output_embl.rb +6 -4
  198. data/test/functional/bio/test_command.rb +54 -5
  199. data/test/runner.rb +5 -3
  200. data/test/unit/bio/appl/bl2seq/test_report.rb +5 -4
  201. data/test/unit/bio/appl/blast/test_ncbioptions.rb +4 -2
  202. data/test/unit/bio/appl/blast/test_report.rb +5 -4
  203. data/test/unit/bio/appl/blast/test_rpsblast.rb +5 -4
  204. data/test/unit/bio/appl/gcg/test_msf.rb +5 -5
  205. data/test/unit/bio/appl/genscan/test_report.rb +8 -9
  206. data/test/unit/bio/appl/hmmer/test_report.rb +5 -4
  207. data/test/unit/bio/appl/iprscan/test_report.rb +6 -5
  208. data/test/unit/bio/appl/mafft/test_report.rb +6 -5
  209. data/test/unit/bio/appl/meme/mast/test_report.rb +46 -0
  210. data/test/unit/bio/appl/meme/test_mast.rb +103 -0
  211. data/test/unit/bio/appl/meme/test_motif.rb +38 -0
  212. data/test/unit/bio/appl/paml/codeml/test_rates.rb +5 -4
  213. data/test/unit/bio/appl/paml/codeml/test_report.rb +5 -4
  214. data/test/unit/bio/appl/paml/test_codeml.rb +5 -4
  215. data/test/unit/bio/appl/sim4/test_report.rb +5 -4
  216. data/test/unit/bio/appl/sosui/test_report.rb +6 -5
  217. data/test/unit/bio/appl/targetp/test_report.rb +5 -3
  218. data/test/unit/bio/appl/test_blast.rb +5 -4
  219. data/test/unit/bio/appl/test_fasta.rb +4 -2
  220. data/test/unit/bio/appl/test_pts1.rb +4 -2
  221. data/test/unit/bio/appl/tmhmm/test_report.rb +6 -5
  222. data/test/unit/bio/data/test_aa.rb +5 -3
  223. data/test/unit/bio/data/test_codontable.rb +5 -4
  224. data/test/unit/bio/data/test_na.rb +5 -3
  225. data/test/unit/bio/db/biosql/tc_biosql.rb +5 -1
  226. data/test/unit/bio/db/embl/test_common.rb +4 -2
  227. data/test/unit/bio/db/embl/test_embl.rb +6 -6
  228. data/test/unit/bio/db/embl/test_embl_rel89.rb +6 -6
  229. data/test/unit/bio/db/embl/test_embl_to_bioseq.rb +7 -8
  230. data/test/unit/bio/db/embl/test_sptr.rb +6 -8
  231. data/test/unit/bio/db/embl/test_uniprot.rb +6 -5
  232. data/test/unit/bio/db/fasta/test_format_qual.rb +346 -0
  233. data/test/unit/bio/db/kegg/test_compound.rb +146 -0
  234. data/test/unit/bio/db/kegg/test_drug.rb +194 -0
  235. data/test/unit/bio/db/kegg/test_enzyme.rb +241 -0
  236. data/test/unit/bio/db/kegg/test_genes.rb +32 -4
  237. data/test/unit/bio/db/kegg/test_glycan.rb +260 -0
  238. data/test/unit/bio/db/kegg/test_orthology.rb +50 -0
  239. data/test/unit/bio/db/kegg/test_reaction.rb +96 -0
  240. data/test/unit/bio/db/pdb/test_pdb.rb +4 -2
  241. data/test/unit/bio/db/sanger_chromatogram/test_abif.rb +76 -0
  242. data/test/unit/bio/db/sanger_chromatogram/test_scf.rb +98 -0
  243. data/test/unit/bio/db/test_aaindex.rb +6 -6
  244. data/test/unit/bio/db/test_fasta.rb +5 -46
  245. data/test/unit/bio/db/test_fastq.rb +829 -0
  246. data/test/unit/bio/db/test_gff.rb +4 -2
  247. data/test/unit/bio/db/test_lasergene.rb +7 -5
  248. data/test/unit/bio/db/test_medline.rb +4 -2
  249. data/test/unit/bio/db/test_newick.rb +6 -6
  250. data/test/unit/bio/db/test_nexus.rb +4 -2
  251. data/test/unit/bio/db/test_phyloxml.rb +769 -0
  252. data/test/unit/bio/db/test_phyloxml_writer.rb +328 -0
  253. data/test/unit/bio/db/test_prosite.rb +6 -5
  254. data/test/unit/bio/db/test_qual.rb +63 -0
  255. data/test/unit/bio/db/test_rebase.rb +5 -3
  256. data/test/unit/bio/db/test_soft.rb +7 -6
  257. data/test/unit/bio/io/flatfile/test_autodetection.rb +6 -7
  258. data/test/unit/bio/io/flatfile/test_buffer.rb +6 -5
  259. data/test/unit/bio/io/flatfile/test_splitter.rb +4 -4
  260. data/test/unit/bio/io/test_ddbjxml.rb +4 -3
  261. data/test/unit/bio/io/test_ensembl.rb +5 -3
  262. data/test/unit/bio/io/test_fastacmd.rb +4 -3
  263. data/test/unit/bio/io/test_flatfile.rb +6 -5
  264. data/test/unit/bio/io/test_soapwsdl.rb +4 -3
  265. data/test/unit/bio/io/test_togows.rb +4 -2
  266. data/test/unit/bio/sequence/test_aa.rb +5 -3
  267. data/test/unit/bio/sequence/test_common.rb +4 -2
  268. data/test/unit/bio/sequence/test_compat.rb +4 -2
  269. data/test/unit/bio/sequence/test_dblink.rb +5 -3
  270. data/test/unit/bio/sequence/test_na.rb +4 -2
  271. data/test/unit/bio/sequence/test_quality_score.rb +330 -0
  272. data/test/unit/bio/shell/plugin/test_seq.rb +5 -3
  273. data/test/unit/bio/test_alignment.rb +5 -3
  274. data/test/unit/bio/test_command.rb +4 -3
  275. data/test/unit/bio/test_db.rb +5 -3
  276. data/test/unit/bio/test_feature.rb +4 -2
  277. data/test/unit/bio/test_location.rb +4 -2
  278. data/test/unit/bio/test_map.rb +5 -3
  279. data/test/unit/bio/test_pathway.rb +4 -2
  280. data/test/unit/bio/test_reference.rb +4 -2
  281. data/test/unit/bio/test_sequence.rb +5 -3
  282. data/test/unit/bio/test_shell.rb +5 -3
  283. data/test/unit/bio/test_tree.rb +6 -6
  284. data/test/unit/bio/util/restriction_enzyme/analysis/test_calculated_cuts.rb +4 -2
  285. data/test/unit/bio/util/restriction_enzyme/analysis/test_cut_ranges.rb +4 -2
  286. data/test/unit/bio/util/restriction_enzyme/analysis/test_sequence_range.rb +4 -2
  287. data/test/unit/bio/util/restriction_enzyme/double_stranded/test_aligned_strands.rb +4 -2
  288. data/test/unit/bio/util/restriction_enzyme/double_stranded/test_cut_location_pair.rb +4 -2
  289. data/test/unit/bio/util/restriction_enzyme/double_stranded/test_cut_location_pair_in_enzyme_notation.rb +4 -2
  290. data/test/unit/bio/util/restriction_enzyme/double_stranded/test_cut_locations.rb +4 -2
  291. data/test/unit/bio/util/restriction_enzyme/double_stranded/test_cut_locations_in_enzyme_notation.rb +4 -2
  292. data/test/unit/bio/util/restriction_enzyme/single_strand/test_cut_locations_in_enzyme_notation.rb +4 -2
  293. data/test/unit/bio/util/restriction_enzyme/test_analysis.rb +4 -2
  294. data/test/unit/bio/util/restriction_enzyme/test_cut_symbol.rb +4 -2
  295. data/test/unit/bio/util/restriction_enzyme/test_double_stranded.rb +4 -2
  296. data/test/unit/bio/util/restriction_enzyme/test_single_strand.rb +17 -13
  297. data/test/unit/bio/util/restriction_enzyme/test_single_strand_complement.rb +17 -13
  298. data/test/unit/bio/util/restriction_enzyme/test_string_formatting.rb +4 -2
  299. data/test/unit/bio/util/test_color_scheme.rb +5 -3
  300. data/test/unit/bio/util/test_contingency_table.rb +5 -3
  301. data/test/unit/bio/util/test_restriction_enzyme.rb +4 -2
  302. data/test/unit/bio/util/test_sirna.rb +6 -4
  303. metadata +147 -2
@@ -1,12 +1,10 @@
1
1
  # This document is generated with a version of rd2html (part of Hiki)
2
2
  #
3
- # A possible test run could be from rdtool (on Debian package rdtool)
4
- #
5
- # rd2 $BIORUBYPATH/doc/Tutorial.rd
3
+ # rd2 Tutorial.rd
6
4
  #
7
5
  # or with style sheet:
8
6
  #
9
- # rd2 -r rd/rd2html-lib.rb --with-css=bioruby.css $BIORUBYPATH/doc/Tutorial.rd > ~/bioruby.html
7
+ # rd2 -r rd/rd2html-lib.rb --with-css=bioruby.css Tutorial.rd > Tutorial.rd.html
10
8
  #
11
9
  # in Debian:
12
10
  #
@@ -17,9 +15,18 @@
17
15
  # To add tests run Toshiaki's bioruby shell and paste in the query plus
18
16
  # results.
19
17
  #
20
- # To run the embedded Ruby doctests you can use the rubydoctest tool, part
21
- # of the bioruby-support repository at http://github.com/pjotrp/bioruby-support/
18
+ # To run the embedded Ruby doctests you can use the rubydoctest tool, though
19
+ # it needs a little conversion. Like:
20
+ #
21
+ # cat Tutorial.rd | sed -e "s,bioruby>,>>," | sed "s,==>,=>," > Tutorial.rd.tmp
22
+ # rubydoctest Tutorial.rd.tmp
23
+ #
24
+ # Rubydoctest is useful to verify an example in this document (still) works
25
+ #
22
26
  #
27
+ #
28
+
29
+ bioruby> $: << '../lib'
23
30
 
24
31
  =begin
25
32
  #doctest Testing bioruby
@@ -29,7 +36,7 @@
29
36
  * Copyright (C) 2001-2003 KATAYAMA Toshiaki <k .at. bioruby.org>
30
37
  * Copyright (C) 2005-2009 Pjotr Prins, Naohisa Goto and others
31
38
 
32
- This document was last modified: 2009/03/17
39
+ This document was last modified: 2009/12/27
33
40
  Current editor: Pjotr Prins <p .at. bioruby.org>
34
41
 
35
42
  The latest version resides in the GIT source code repository: ./doc/((<Tutorial.rd|URL:http://github.com/pjotrp/bioruby/raw/documentation/doc/Tutorial.rd>)).
@@ -202,7 +209,6 @@ use all methods on the subsequence. For example,
202
209
  bioruby> a
203
210
  ==> ["MHAIK", "HAIKL", "AIKLI", "IKLIP", "KLIPI", "LIPIR", "IPIRS", "PIRSS", "IRSSR", "RSSRS", "SSRSS", "SRSSK", "RSSKK", "SSKKK"]
204
211
 
205
-
206
212
  Finally, the window_search method returns the last leftover
207
213
  subsequence. This allows for example
208
214
 
@@ -785,19 +791,19 @@ which supports the "-m 0" default and "-m 7" XML type output format.
785
791
 
786
792
  * For example:
787
793
 
788
- bioruby> blast_version = nil; result = []
789
- bioruby> Bio::Blast.reports(File.new("../test/data/blast/blastp-multi.m7")) do |report|
790
- bioruby> blast_version = report.version
791
- bioruby> report.iterations.each do |itr|
792
- bioruby> itr.hits.each do |hit|
793
- bioruby> result.push hit.target_id
794
- bioruby> end
795
- bioruby> end
796
- bioruby> end
797
- bioruby> blast_version
798
- ==> "blastp 2.2.18 [Mar-02-2008]"
799
- bioruby> result
800
- ==> ["BAB38768", "BAB38768", "BAB38769", "BAB37741"]
794
+ blast_version = nil; result = []
795
+ Bio::Blast.reports(File.new("../test/data/blast/blastp-multi.m7")) do |report|
796
+ blast_version = report.version
797
+ report.iterations.each do |itr|
798
+ itr.hits.each do |hit|
799
+ result.push hit.target_id
800
+ end
801
+ end
802
+ end
803
+ blast_version
804
+ # ==> "blastp 2.2.18 [Mar-02-2008]"
805
+ result
806
+ # ==> ["BAB38768", "BAB38768", "BAB38769", "BAB37741"]
801
807
 
802
808
  * another example:
803
809
 
@@ -843,6 +849,8 @@ When you write above routines, please send to the BioRuby project and
843
849
  they may be included.
844
850
 
845
851
  == Generate a reference list using PubMed (Bio::PubMed)
852
+ =end
853
+ (EDITORs NOTE: examples in this section do not work and should be rewritten.)
846
854
 
847
855
  Below script is an example which seaches PubMed and creates a reference list.
848
856
 
@@ -891,6 +899,7 @@ bold and italic font output.
891
899
 
892
900
  (EDITORs NOTE: do we have some simple object that can be queried for
893
901
  author, title etc.?)
902
+ =begin
894
903
 
895
904
  Nowadays using NCBI E-Utils is recommended. Use Bio::PubMed.esearch
896
905
  and Bio::PubMed.efetch instead of above methods.
@@ -900,6 +909,11 @@ and Bio::PubMed.efetch instead of above methods.
900
909
 
901
910
  require 'bio'
902
911
 
912
+ # NCBI announces that queries without email address will return error
913
+ # after June 2010. When you modify the script, please enter your email
914
+ # address instead of the staff's.
915
+ Bio::NCBI.default_email = 'staff@bioruby.org'
916
+
903
917
  keywords = ARGV.join(' ')
904
918
 
905
919
  options = {
@@ -1199,6 +1213,110 @@ Bio::Fetch.query method.)
1199
1213
 
1200
1214
  to be written...
1201
1215
 
1216
+ = PhyloXML
1217
+
1218
+ PhyloXML is an XML language for saving, analyzing and exchanging data of
1219
+ annotated phylogenetic trees. PhyloXML parser in BioRuby is implemented in
1220
+ Bio::PhyloXML::Parser and writer in Bio::PhyloXML::Writer.
1221
+ More information at www.phyloxml.org
1222
+
1223
+ == Requirements
1224
+
1225
+ In addition to BioRuby library you need a libxml ruby bindings. To install:
1226
+
1227
+ % gem install -r libxml-ruby
1228
+
1229
+ For more information see ((<URL:http://libxml.rubyforge.org/install.xml>))
1230
+
1231
+ == Parsing a file
1232
+
1233
+ require 'bio'
1234
+
1235
+ # Create new phyloxml parser
1236
+ phyloxml = Bio::PhyloXML::Parser.open('example.xml')
1237
+
1238
+ # Print the names of all trees in the file
1239
+ phyloxml.each do |tree|
1240
+ puts tree.name
1241
+ end
1242
+
1243
+ If there are several trees in the file, you can access the one you wish by an index
1244
+
1245
+ tree = phyloxml[3]
1246
+
1247
+ You can use all Bio::Tree methods on the tree, since PhyloXML::Tree inherits from Bio::Tree. For example,
1248
+
1249
+ tree.leaves.each do |node|
1250
+ puts node.name
1251
+ end
1252
+
1253
+ PhyloXML files can hold additional information besides phylogenies at the end of the file. This info can be accessed through the 'other' array of the parser object.
1254
+
1255
+ phyloxml = Bio::PhyloXML::Parser.open('example.xml')
1256
+ while tree = phyloxml.next_tree
1257
+ # do stuff with trees
1258
+ end
1259
+
1260
+ puts phyloxml.other
1261
+
1262
+ == Writing a file
1263
+
1264
+ # Create new phyloxml writer
1265
+ writer = Bio::PhyloXML::Writer.new('tree.xml')
1266
+
1267
+ # Write tree to the file tree.xml
1268
+ writer.write(tree1)
1269
+
1270
+ # Add another tree to the file
1271
+ writer.write(tree2)
1272
+
1273
+ == Retrieving data
1274
+
1275
+ Here is an example of how to retrieve the scientific name of the clades.
1276
+
1277
+ require 'bio'
1278
+
1279
+ phyloxml = Bio::PhyloXML::Parser.open('ncbi_taxonomy_mollusca.xml')
1280
+ phyloxml.each do |tree|
1281
+ tree.each_node do |node|
1282
+ print "Scientific name: ", node.taxonomies[0].scientific_name, "\n"
1283
+ end
1284
+ end
1285
+
1286
+ == Retrieving 'other' data
1287
+
1288
+ require 'bio'
1289
+
1290
+ phyloxml = Bio::PhyloXML::Parser.open('phyloxml_examples.xml')
1291
+ while tree = phyloxml.next_tree
1292
+ #do something with the trees
1293
+ end
1294
+
1295
+ p phyloxml.other
1296
+ puts "\n"
1297
+ #=> output is an object representation
1298
+
1299
+ #Print in a readable way
1300
+ puts phyloxml.other[0].to_xml, "\n"
1301
+ #=>:
1302
+ #
1303
+ #<align:alignment xmlns:align="http://example.org/align">
1304
+ # <seq name="A">acgtcgcggcccgtggaagtcctctcct</seq>
1305
+ # <seq name="B">aggtcgcggcctgtggaagtcctctcct</seq>
1306
+ # <seq name="C">taaatcgc--cccgtgg-agtccc-cct</seq>
1307
+ #</align:alignment>
1308
+
1309
+ #Once we know whats there, lets output just sequences
1310
+ phyloxml.other[0].children.each do |node|
1311
+ puts node.value
1312
+ end
1313
+ #=>
1314
+ #
1315
+ #acgtcgcggcccgtggaagtcctctcct
1316
+ #aggtcgcggcctgtggaagtcctctcct
1317
+ #taaatcgc--cccgtgg-agtccc-cct
1318
+
1319
+
1202
1320
  == The BioRuby example programs
1203
1321
 
1204
1322
  Some sample programs are stored in ./samples/ directory. Run for example:
@@ -1296,7 +1414,9 @@ At the moment there is no easy way of accessing BioPerl from Ruby. The best way,
1296
1414
 
1297
1415
  == Installing required external library
1298
1416
 
1299
- At this point for using BioRuby no additional libraries are needed.
1417
+ At this point for using BioRuby no additional libraries are needed, except if
1418
+ you are using Bio::PhyloXML module. Then you have to install libxml-ruby.
1419
+
1300
1420
  This may change, so keep an eye on the Bioruby website. Also when
1301
1421
  a package is missing BioRuby should show an informative message.
1302
1422
 
@@ -1305,6 +1425,18 @@ painful, as the gem standard for packages evolved late and some still
1305
1425
  force you to copy things by hand. Therefore read the README's
1306
1426
  carefully that come with each package.
1307
1427
 
1428
+ === Installing libxml-ruby
1429
+
1430
+ The simplest way is to use gem packaging system.
1431
+
1432
+ gem install -r libxml-ruby
1433
+
1434
+ If you get `require': no such file to load - mkmf (LoadError) error then do
1435
+
1436
+ sudo apt-get install ruby-dev
1437
+
1438
+ If you have other problems with installation, then see ((<URL:http://libxml.rubyforge.org/install.xml>))
1439
+
1308
1440
  == Trouble shooting
1309
1441
 
1310
1442
  * Error: in `require': no such file to load -- bio (LoadError)
@@ -13,7 +13,7 @@
13
13
  <li>Copyright (C) 2001-2003 KATAYAMA Toshiaki &lt;k .at. bioruby.org&gt;</li>
14
14
  <li>Copyright (C) 2005-2009 Pjotr Prins, Naohisa Goto and others</li>
15
15
  </ul>
16
- <p>This document was last modified: 2009/03/17
16
+ <p>This document was last modified: 2009/12/27
17
17
  Current editor: Pjotr Prins &lt;p .at. bioruby.org&gt;</p>
18
18
  <p>The latest version resides in the GIT source code repository: ./doc/<a href="http://github.com/pjotrp/bioruby/raw/documentation/doc/Tutorial.rd">Tutorial.rd</a>.</p>
19
19
  <h2><a name="label-1" id="label-1">Introduction</a></h2><!-- RDLabel: "Introduction" -->
@@ -652,19 +652,19 @@ Bio::Blast factory object. For this purpose use Bio::Blast.reports,
652
652
  which supports the "-m 0" default and "-m 7" XML type output format.</p>
653
653
  <ul>
654
654
  <li><p>For example: </p>
655
- <pre>bioruby&gt; blast_version = nil; result = []
656
- bioruby&gt; Bio::Blast.reports(File.new("../test/data/blast/blastp-multi.m7")) do |report|
657
- bioruby&gt; blast_version = report.version
658
- bioruby&gt; report.iterations.each do |itr|
659
- bioruby&gt; itr.hits.each do |hit|
660
- bioruby&gt; result.push hit.target_id
661
- bioruby&gt; end
662
- bioruby&gt; end
663
- bioruby&gt; end
664
- bioruby&gt; blast_version
665
- ==&gt; "blastp 2.2.18 [Mar-02-2008]"
666
- bioruby&gt; result
667
- ==&gt; ["BAB38768", "BAB38768", "BAB38769", "BAB37741"]</pre></li>
655
+ <pre>blast_version = nil; result = []
656
+ Bio::Blast.reports(File.new("../test/data/blast/blastp-multi.m7")) do |report|
657
+ blast_version = report.version
658
+ report.iterations.each do |itr|
659
+ itr.hits.each do |hit|
660
+ result.push hit.target_id
661
+ end
662
+ end
663
+ end
664
+ blast_version
665
+ # ==&gt; "blastp 2.2.18 [Mar-02-2008]"
666
+ result
667
+ # ==&gt; ["BAB38768", "BAB38768", "BAB38769", "BAB37741"]</pre></li>
668
668
  <li><p>another example:</p>
669
669
  <pre>require 'bio'
670
670
  Bio::Blast.reports(ARGF) do |report|
@@ -699,49 +699,17 @@ Bio::Blast::Report.new(or Bio::Blast::Default::Report.new):</p>
699
699
  <p>When you write above routines, please send to the BioRuby project and
700
700
  they may be included.</p>
701
701
  <h2><a name="label-14" id="label-14">Generate a reference list using PubMed (Bio::PubMed)</a></h2><!-- RDLabel: "Generate a reference list using PubMed (Bio::PubMed)" -->
702
- <p>Below script is an example which seaches PubMed and creates a reference list.</p>
703
- <pre>ARGV.each do |id|
704
- entry = Bio::PubMed.query(id) # searches PubMed and get entry
705
- medline = Bio::MEDLINE.new(entry) # creates Bio::MEDLINE object from entry text
706
- reference = medline.reference # converts into Bio::Reference object
707
- puts reference.bibtex # shows BibTeX formatted text
708
- end</pre>
709
- <p>We named the script pmfetch.rb.</p>
710
- <pre>% ./pmfetch.rb 11024183 10592278 10592173</pre>
711
- <p>To give some PubMed ID (PMID) in arguments, the script retrieves informations
712
- from NCBI, parses MEDLINE format text, converts into BibTeX format and
713
- shows them.</p>
714
- <p>A keyword search is also available.</p>
715
- <pre>#!/usr/bin/env ruby
716
-
717
- require 'bio'
718
-
719
- # Concatinates argument keyword list to a string
720
- keywords = ARGV.join(' ')
721
-
722
- # PubMed keyword search
723
- entries = Bio::PubMed.search(keywords)
724
-
725
- entries.each do |entry|
726
- medline = Bio::MEDLINE.new(entry) # creates Bio::MEDLINE object from text
727
- reference = medline.reference # converts into Bio::Reference object
728
- puts reference.bibtex # shows BibTeX format text
729
- end</pre>
730
- <p>We named the script pmsearch.rb.</p>
731
- <pre>% ./pmsearch.rb genome bioinformatics</pre>
732
- <p>To give keywords in arguments, the script searches PubMed by given
733
- keywords and shows bibliography informations in a BibTex format. Other
734
- output formats are also avaialble like the bibitem method described
735
- below. Some journal formats like nature and nar can be used, but lack
736
- bold and italic font output.</p>
737
- <p>(EDITORs NOTE: do we have some simple object that can be queried for
738
- author, title etc.?)</p>
739
702
  <p>Nowadays using NCBI E-Utils is recommended. Use Bio::PubMed.esearch
740
703
  and Bio::PubMed.efetch instead of above methods.</p>
741
704
  <pre>#!/usr/bin/env ruby
742
705
 
743
706
  require 'bio'
744
707
 
708
+ # NCBI announces that queries without email address will return error
709
+ # after June 2010. When you modify the script, please enter your email
710
+ # address instead of the staff's.
711
+ Bio::NCBI.default_email = 'staff@bioruby.org'
712
+
745
713
  keywords = ARGV.join(' ')
746
714
 
747
715
  options = {
@@ -979,22 +947,104 @@ from other BioFetch servers, we used bioruby.org server with
979
947
  Bio::Fetch.query method.)</p>
980
948
  <h2><a name="label-22" id="label-22">BioSQL</a></h2><!-- RDLabel: "BioSQL" -->
981
949
  <p>to be written...</p>
982
- <h2><a name="label-23" id="label-23">The BioRuby example programs</a></h2><!-- RDLabel: "The BioRuby example programs" -->
950
+ <h1><a name="label-23" id="label-23">PhyloXML</a></h1><!-- RDLabel: "PhyloXML" -->
951
+ <p>PhyloXML is an XML language for saving, analyzing and exchanging data of
952
+ annotated phylogenetic trees. PhyloXML parser in BioRuby is implemented in
953
+ Bio::PhyloXML::Parser and writer in Bio::PhyloXML::Writer.
954
+ More information at www.phyloxml.org</p>
955
+ <h2><a name="label-24" id="label-24">Requirements</a></h2><!-- RDLabel: "Requirements" -->
956
+ <p>In addition to BioRuby library you need a libxml ruby bindings. To install:</p>
957
+ <pre>% gem install -r libxml-ruby</pre>
958
+ <p>For more information see <a href="http://libxml.rubyforge.org/install.xml">&lt;URL:http://libxml.rubyforge.org/install.xml&gt;</a></p>
959
+ <h2><a name="label-25" id="label-25">Parsing a file</a></h2><!-- RDLabel: "Parsing a file" -->
960
+ <pre>require 'bio'
961
+
962
+ # Create new phyloxml parser
963
+ phyloxml = Bio::PhyloXML::Parser.open('example.xml')
964
+
965
+ # Print the names of all trees in the file
966
+ phyloxml.each do |tree|
967
+ puts tree.name
968
+ end</pre>
969
+ <p>If there are several trees in the file, you can access the one you wish by an index</p>
970
+ <pre>tree = phyloxml[3]</pre>
971
+ <p>You can use all Bio::Tree methods on the tree, since PhyloXML::Tree inherits from Bio::Tree. For example,</p>
972
+ <pre>tree.leaves.each do |node|
973
+ puts node.name
974
+ end</pre>
975
+ <p>PhyloXML files can hold additional information besides phylogenies at the end of the file. This info can be accessed through the 'other' array of the parser object.</p>
976
+ <pre>phyloxml = Bio::PhyloXML::Parser.open('example.xml')
977
+ while tree = phyloxml.next_tree
978
+ # do stuff with trees
979
+ end
980
+
981
+ puts phyloxml.other</pre>
982
+ <h2><a name="label-26" id="label-26">Writing a file</a></h2><!-- RDLabel: "Writing a file" -->
983
+ <pre># Create new phyloxml writer
984
+ writer = Bio::PhyloXML::Writer.new('tree.xml')
985
+
986
+ # Write tree to the file tree.xml
987
+ writer.write(tree1)
988
+
989
+ # Add another tree to the file
990
+ writer.write(tree2)</pre>
991
+ <h2><a name="label-27" id="label-27">Retrieving data</a></h2><!-- RDLabel: "Retrieving data" -->
992
+ <p>Here is an example of how to retrieve the scientific name of the clades.</p>
993
+ <pre>require 'bio'
994
+
995
+ phyloxml = Bio::PhyloXML::Parser.open('ncbi_taxonomy_mollusca.xml')
996
+ phyloxml.each do |tree|
997
+ tree.each_node do |node|
998
+ print "Scientific name: ", node.taxonomies[0].scientific_name, "\n"
999
+ end
1000
+ end</pre>
1001
+ <h2><a name="label-28" id="label-28">Retrieving 'other' data</a></h2><!-- RDLabel: "Retrieving 'other' data" -->
1002
+ <pre>require 'bio'
1003
+
1004
+ phyloxml = Bio::PhyloXML::Parser.open('phyloxml_examples.xml')
1005
+ while tree = phyloxml.next_tree
1006
+ #do something with the trees
1007
+ end
1008
+
1009
+ p phyloxml.other
1010
+ puts "\n"
1011
+ #=&gt; output is an object representation
1012
+
1013
+ #Print in a readable way
1014
+ puts phyloxml.other[0].to_xml, "\n"
1015
+ #=&gt;:
1016
+ #
1017
+ #&lt;align:alignment xmlns:align="http://example.org/align"&gt;
1018
+ # &lt;seq name="A"&gt;acgtcgcggcccgtggaagtcctctcct&lt;/seq&gt;
1019
+ # &lt;seq name="B"&gt;aggtcgcggcctgtggaagtcctctcct&lt;/seq&gt;
1020
+ # &lt;seq name="C"&gt;taaatcgc--cccgtgg-agtccc-cct&lt;/seq&gt;
1021
+ #&lt;/align:alignment&gt;
1022
+
1023
+ #Once we know whats there, lets output just sequences
1024
+ phyloxml.other[0].children.each do |node|
1025
+ puts node.value
1026
+ end
1027
+ #=&gt;
1028
+ #
1029
+ #acgtcgcggcccgtggaagtcctctcct
1030
+ #aggtcgcggcctgtggaagtcctctcct
1031
+ #taaatcgc--cccgtgg-agtccc-cct</pre>
1032
+ <h2><a name="label-29" id="label-29">The BioRuby example programs</a></h2><!-- RDLabel: "The BioRuby example programs" -->
983
1033
  <p>Some sample programs are stored in ./samples/ directory. Run for example:</p>
984
1034
  <pre>./sample/na2aa.rb test/data/fasta/example1.txt </pre>
985
- <h2><a name="label-24" id="label-24">Unit testing and doctests</a></h2><!-- RDLabel: "Unit testing and doctests" -->
1035
+ <h2><a name="label-30" id="label-30">Unit testing and doctests</a></h2><!-- RDLabel: "Unit testing and doctests" -->
986
1036
  <p>BioRuby comes with an extensive testing framework with over 1300 tests and 2700
987
1037
  assertions. To run the unit tests:</p>
988
1038
  <pre>cd test
989
1039
  ruby runner.rb</pre>
990
1040
  <p>We have also started with doctest for Ruby. We are porting the examples
991
1041
  in this tutorial to doctest - more info upcoming.</p>
992
- <h2><a name="label-25" id="label-25">Further reading</a></h2><!-- RDLabel: "Further reading" -->
1042
+ <h2><a name="label-31" id="label-31">Further reading</a></h2><!-- RDLabel: "Further reading" -->
993
1043
  <p>See the BioRuby in anger Wiki. A lot of BioRuby's documentation exists in the
994
1044
  source code and unit tests. To really dive in you will need the latest source
995
1045
  code tree. The embedded rdoc documentation can be viewed online at
996
1046
  <a href="http://bioruby.org/rdoc/">&lt;URL:http://bioruby.org/rdoc/&gt;</a>.</p>
997
- <h2><a name="label-26" id="label-26">BioRuby Shell</a></h2><!-- RDLabel: "BioRuby Shell" -->
1047
+ <h2><a name="label-32" id="label-32">BioRuby Shell</a></h2><!-- RDLabel: "BioRuby Shell" -->
998
1048
  <p>The BioRuby shell implementation you find in ./lib/bio/shell. It is very interesting
999
1049
  as it uses IRB (the Ruby intepreter) which is a powerful environment described in
1000
1050
  <a href="http://ruby-doc.org/docs/ProgrammingRuby/html/irb.html">Programming Ruby's irb chapter</a>. IRB commands can directly be typed in the shell, e.g.</p>
@@ -1003,24 +1053,24 @@ as it uses IRB (the Ruby intepreter) which is a powerful environment described i
1003
1053
  <p>optionally you also may want to install the optional Ruby readline support -
1004
1054
  with Debian libreadline-ruby. To edit a previous line you may have to press
1005
1055
  line down (arrow down) first.</p>
1006
- <h1><a name="label-27" id="label-27">Helpful tools</a></h1><!-- RDLabel: "Helpful tools" -->
1056
+ <h1><a name="label-33" id="label-33">Helpful tools</a></h1><!-- RDLabel: "Helpful tools" -->
1007
1057
  <p>Apart from rdoc you may also want to use rtags - which allows jumping around
1008
1058
  source code by clicking on class and method names. </p>
1009
1059
  <pre>cd bioruby/lib
1010
1060
  rtags -R --vi</pre>
1011
1061
  <p>For a tutorial see <a href="http://rtags.rubyforge.org/">&lt;URL:http://rtags.rubyforge.org/&gt;</a></p>
1012
- <h1><a name="label-28" id="label-28">APPENDIX</a></h1><!-- RDLabel: "APPENDIX" -->
1013
- <h2><a name="label-29" id="label-29">KEGG API</a></h2><!-- RDLabel: "KEGG API" -->
1062
+ <h1><a name="label-34" id="label-34">APPENDIX</a></h1><!-- RDLabel: "APPENDIX" -->
1063
+ <h2><a name="label-35" id="label-35">KEGG API</a></h2><!-- RDLabel: "KEGG API" -->
1014
1064
  <p>Please refer to KEGG_API.rd.ja (English version: <a href="http://www.genome.jp/kegg/soap/doc/keggapi_manual.html">&lt;URL:http://www.genome.jp/kegg/soap/doc/keggapi_manual.html&gt;</a> ) and</p>
1015
1065
  <ul>
1016
1066
  <li><a href="http://www.genome.jp/kegg/soap/">&lt;URL:http://www.genome.jp/kegg/soap/&gt;</a></li>
1017
1067
  </ul>
1018
- <h2><a name="label-30" id="label-30">Ruby Ensembl API</a></h2><!-- RDLabel: "Ruby Ensembl API" -->
1068
+ <h2><a name="label-36" id="label-36">Ruby Ensembl API</a></h2><!-- RDLabel: "Ruby Ensembl API" -->
1019
1069
  <p>Ruby Ensembl API is a ruby API to the Ensembl database. It is NOT currently
1020
1070
  included in the BioRuby archives. To install it, see
1021
1071
  <a href="http://wiki.github.com/jandot/ruby-ensembl-api">&lt;URL:http://wiki.github.com/jandot/ruby-ensembl-api&gt;</a>
1022
1072
  for more information.</p>
1023
- <h3><a name="label-31" id="label-31">Gene Ontology (GO) through the Ruby Ensembl API</a></h3><!-- RDLabel: "Gene Ontology (GO) through the Ruby Ensembl API" -->
1073
+ <h3><a name="label-37" id="label-37">Gene Ontology (GO) through the Ruby Ensembl API</a></h3><!-- RDLabel: "Gene Ontology (GO) through the Ruby Ensembl API" -->
1024
1074
  <p>Gene Ontologies can be fetched through the Ruby Ensembl API package:</p>
1025
1075
  <pre>require 'ensembl'
1026
1076
  Ensembl::Core::DBConnection.connect('drosophila_melanogaster')
@@ -1037,28 +1087,35 @@ infile.each do |line|
1037
1087
  end</pre>
1038
1088
  <p>Prints each mosq. accession/uniq identifier and the GO terms from the Drosphila
1039
1089
  homologues.</p>
1040
- <h2><a name="label-32" id="label-32">Comparing BioProjects</a></h2><!-- RDLabel: "Comparing BioProjects" -->
1090
+ <h2><a name="label-38" id="label-38">Comparing BioProjects</a></h2><!-- RDLabel: "Comparing BioProjects" -->
1041
1091
  <p>For a quick functional comparison of BioRuby, BioPerl, BioPython and Bioconductor (R) see <a href="http://sciruby.codeforpeople.com/sr.cgi/BioProjects">&lt;URL:http://sciruby.codeforpeople.com/sr.cgi/BioProjects&gt;</a></p>
1042
- <h2><a name="label-33" id="label-33">Using BioRuby with R</a></h2><!-- RDLabel: "Using BioRuby with R" -->
1092
+ <h2><a name="label-39" id="label-39">Using BioRuby with R</a></h2><!-- RDLabel: "Using BioRuby with R" -->
1043
1093
  <p>Using Ruby with R Pjotr wrote a section on SciRuby. See <a href="http://sciruby.codeforpeople.com/sr.cgi/RubyWithRlang">&lt;URL:http://sciruby.codeforpeople.com/sr.cgi/RubyWithRlang&gt;</a></p>
1044
- <h2><a name="label-34" id="label-34">Using BioPerl or BioPython from Ruby</a></h2><!-- RDLabel: "Using BioPerl or BioPython from Ruby" -->
1094
+ <h2><a name="label-40" id="label-40">Using BioPerl or BioPython from Ruby</a></h2><!-- RDLabel: "Using BioPerl or BioPython from Ruby" -->
1045
1095
  <p>At the moment there is no easy way of accessing BioPerl from Ruby. The best way, perhaps, is to create a Perl server that gets accessed through XML/RPC or SOAP.</p>
1046
- <h2><a name="label-35" id="label-35">Installing required external library</a></h2><!-- RDLabel: "Installing required external library" -->
1047
- <p>At this point for using BioRuby no additional libraries are needed.
1048
- This may change, so keep an eye on the Bioruby website. Also when
1096
+ <h2><a name="label-41" id="label-41">Installing required external library</a></h2><!-- RDLabel: "Installing required external library" -->
1097
+ <p>At this point for using BioRuby no additional libraries are needed, except if
1098
+ you are using Bio::PhyloXML module. Then you have to install libxml-ruby.</p>
1099
+ <p>This may change, so keep an eye on the Bioruby website. Also when
1049
1100
  a package is missing BioRuby should show an informative message.</p>
1050
1101
  <p>At this point installing third party Ruby packages can be a bit
1051
1102
  painful, as the gem standard for packages evolved late and some still
1052
1103
  force you to copy things by hand. Therefore read the README's
1053
1104
  carefully that come with each package.</p>
1054
- <h2><a name="label-36" id="label-36">Trouble shooting</a></h2><!-- RDLabel: "Trouble shooting" -->
1105
+ <h3><a name="label-42" id="label-42">Installing libxml-ruby</a></h3><!-- RDLabel: "Installing libxml-ruby" -->
1106
+ <p>The simplest way is to use gem packaging system.</p>
1107
+ <pre>gem install -r libxml-ruby</pre>
1108
+ <p>If you get `require': no such file to load - mkmf (LoadError) error then do</p>
1109
+ <pre>sudo apt-get install ruby-dev</pre>
1110
+ <p>If you have other problems with installation, then see <a href="http://libxml.rubyforge.org/install.xml">&lt;URL:http://libxml.rubyforge.org/install.xml&gt;</a> </p>
1111
+ <h2><a name="label-43" id="label-43">Trouble shooting</a></h2><!-- RDLabel: "Trouble shooting" -->
1055
1112
  <ul>
1056
1113
  <li>Error: in `require': no such file to load -- bio (LoadError)</li>
1057
1114
  </ul>
1058
1115
  <p>Ruby fails to find the BioRuby libraries - add it to the RUBYLIB path, or pass
1059
1116
  it to the interpeter. For example:</p>
1060
1117
  <pre>ruby -I$BIORUBYPATH/lib yourprogram.rb</pre>
1061
- <h2><a name="label-37" id="label-37">Modifying this page</a></h2><!-- RDLabel: "Modifying this page" -->
1118
+ <h2><a name="label-44" id="label-44">Modifying this page</a></h2><!-- RDLabel: "Modifying this page" -->
1062
1119
  <p>IMPORTANT NOTICE: This page is maintained in the BioRuby source code
1063
1120
  repository. Please edit the file there otherwise changes may get
1064
1121
  lost. See <!-- Reference, RDLabel "BioRuby Developer Information" doesn't exist --><em class="label-not-found">BioRuby Developer Information</em><!-- Reference end --> for repository and mailing list