bio 1.3.1 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/ChangeLog +2105 -3728
- data/KNOWN_ISSUES.rdoc +35 -3
- data/README.rdoc +8 -2
- data/RELEASE_NOTES.rdoc +166 -0
- data/bin/bioruby +4 -1
- data/bioruby.gemspec +146 -1
- data/bioruby.gemspec.erb +3 -1
- data/doc/ChangeLog-before-1.3.1 +3961 -0
- data/doc/Tutorial.rd +154 -22
- data/doc/Tutorial.rd.html +125 -68
- data/lib/bio.rb +21 -6
- data/lib/bio/appl/bl2seq/report.rb +11 -202
- data/lib/bio/appl/blast/format0.rb +0 -193
- data/lib/bio/appl/blast/report.rb +2 -147
- data/lib/bio/appl/blast/wublast.rb +0 -208
- data/lib/bio/appl/fasta.rb +4 -19
- data/lib/bio/appl/fasta/format10.rb +0 -14
- data/lib/bio/appl/genscan/report.rb +0 -176
- data/lib/bio/appl/hmmer.rb +1 -15
- data/lib/bio/appl/hmmer/report.rb +0 -100
- data/lib/bio/appl/meme/mast.rb +156 -0
- data/lib/bio/appl/meme/mast/report.rb +91 -0
- data/lib/bio/appl/meme/motif.rb +48 -0
- data/lib/bio/appl/psort.rb +0 -111
- data/lib/bio/appl/psort/report.rb +1 -45
- data/lib/bio/appl/pts1.rb +2 -4
- data/lib/bio/appl/sosui/report.rb +5 -54
- data/lib/bio/appl/targetp/report.rb +1 -104
- data/lib/bio/appl/tmhmm/report.rb +0 -36
- data/lib/bio/command.rb +94 -10
- data/lib/bio/data/aa.rb +1 -77
- data/lib/bio/data/codontable.rb +1 -95
- data/lib/bio/data/na.rb +1 -26
- data/lib/bio/db/aaindex.rb +1 -38
- data/lib/bio/db/fasta.rb +1 -134
- data/lib/bio/db/fasta/format_qual.rb +204 -0
- data/lib/bio/db/fasta/qual.rb +102 -0
- data/lib/bio/db/fastq.rb +645 -0
- data/lib/bio/db/fastq/fastq_to_biosequence.rb +40 -0
- data/lib/bio/db/fastq/format_fastq.rb +175 -0
- data/lib/bio/db/genbank/genbank.rb +1 -86
- data/lib/bio/db/gff.rb +0 -17
- data/lib/bio/db/go.rb +4 -72
- data/lib/bio/db/kegg/common.rb +112 -0
- data/lib/bio/db/kegg/compound.rb +29 -20
- data/lib/bio/db/kegg/drug.rb +74 -34
- data/lib/bio/db/kegg/enzyme.rb +26 -5
- data/lib/bio/db/kegg/genes.rb +128 -15
- data/lib/bio/db/kegg/genome.rb +3 -41
- data/lib/bio/db/kegg/glycan.rb +19 -24
- data/lib/bio/db/kegg/orthology.rb +16 -56
- data/lib/bio/db/kegg/reaction.rb +81 -28
- data/lib/bio/db/kegg/taxonomy.rb +1 -52
- data/lib/bio/db/litdb.rb +1 -16
- data/lib/bio/db/phyloxml/phyloxml.xsd +582 -0
- data/lib/bio/db/phyloxml/phyloxml_elements.rb +1174 -0
- data/lib/bio/db/phyloxml/phyloxml_parser.rb +954 -0
- data/lib/bio/db/phyloxml/phyloxml_writer.rb +228 -0
- data/lib/bio/db/prosite.rb +2 -95
- data/lib/bio/db/rebase.rb +5 -6
- data/lib/bio/db/sanger_chromatogram/abif.rb +120 -0
- data/lib/bio/db/sanger_chromatogram/chromatogram.rb +133 -0
- data/lib/bio/db/sanger_chromatogram/chromatogram_to_biosequence.rb +32 -0
- data/lib/bio/db/sanger_chromatogram/scf.rb +210 -0
- data/lib/bio/io/das.rb +0 -44
- data/lib/bio/io/ddbjxml.rb +1 -181
- data/lib/bio/io/flatfile.rb +1 -7
- data/lib/bio/io/flatfile/autodetection.rb +6 -0
- data/lib/bio/io/keggapi.rb +0 -442
- data/lib/bio/io/ncbirest.rb +130 -132
- data/lib/bio/io/ncbisoap.rb +2 -1
- data/lib/bio/io/pubmed.rb +0 -88
- data/lib/bio/location.rb +0 -73
- data/lib/bio/pathway.rb +0 -171
- data/lib/bio/sequence.rb +18 -1
- data/lib/bio/sequence/adapter.rb +3 -0
- data/lib/bio/sequence/format.rb +16 -0
- data/lib/bio/sequence/quality_score.rb +205 -0
- data/lib/bio/tree.rb +70 -5
- data/lib/bio/util/restriction_enzyme/single_strand.rb +3 -2
- data/lib/bio/util/sirna.rb +1 -23
- data/lib/bio/version.rb +1 -1
- data/sample/demo_aaindex.rb +67 -0
- data/sample/demo_aminoacid.rb +101 -0
- data/sample/demo_bl2seq_report.rb +220 -0
- data/sample/demo_blast_report.rb +285 -0
- data/sample/demo_codontable.rb +119 -0
- data/sample/demo_das.rb +105 -0
- data/sample/demo_ddbjxml.rb +212 -0
- data/sample/demo_fasta_remote.rb +51 -0
- data/sample/demo_fastaformat.rb +105 -0
- data/sample/demo_genbank.rb +132 -0
- data/sample/demo_genscan_report.rb +202 -0
- data/sample/demo_gff1.rb +49 -0
- data/sample/demo_go.rb +98 -0
- data/sample/demo_hmmer_report.rb +149 -0
- data/sample/demo_kegg_compound.rb +57 -0
- data/sample/demo_kegg_drug.rb +65 -0
- data/sample/demo_kegg_genome.rb +74 -0
- data/sample/demo_kegg_glycan.rb +72 -0
- data/sample/demo_kegg_orthology.rb +62 -0
- data/sample/demo_kegg_reaction.rb +66 -0
- data/sample/demo_kegg_taxonomy.rb +92 -0
- data/sample/demo_keggapi.rb +502 -0
- data/sample/demo_litdb.rb +42 -0
- data/sample/demo_locations.rb +99 -0
- data/sample/demo_ncbi_rest.rb +130 -0
- data/sample/demo_nucleicacid.rb +49 -0
- data/sample/demo_pathway.rb +196 -0
- data/sample/demo_prosite.rb +120 -0
- data/sample/demo_psort.rb +138 -0
- data/sample/demo_psort_report.rb +70 -0
- data/sample/demo_pubmed.rb +118 -0
- data/sample/demo_sirna.rb +63 -0
- data/sample/demo_sosui_report.rb +89 -0
- data/sample/demo_targetp_report.rb +135 -0
- data/sample/demo_tmhmm_report.rb +68 -0
- data/sample/pmfetch.rb +13 -4
- data/sample/pmsearch.rb +15 -4
- data/sample/test_phyloxml_big.rb +205 -0
- data/test/bioruby_test_helper.rb +61 -0
- data/test/data/KEGG/1.1.1.1.enzyme +935 -0
- data/test/data/KEGG/C00025.compound +102 -0
- data/test/data/KEGG/D00063.drug +104 -0
- data/test/data/KEGG/G00024.glycan +47 -0
- data/test/data/KEGG/G01366.glycan +18 -0
- data/test/data/KEGG/K02338.orthology +902 -0
- data/test/data/KEGG/R00006.reaction +14 -0
- data/test/data/fastq/README.txt +109 -0
- data/test/data/fastq/error_diff_ids.fastq +20 -0
- data/test/data/fastq/error_double_qual.fastq +22 -0
- data/test/data/fastq/error_double_seq.fastq +22 -0
- data/test/data/fastq/error_long_qual.fastq +20 -0
- data/test/data/fastq/error_no_qual.fastq +20 -0
- data/test/data/fastq/error_qual_del.fastq +20 -0
- data/test/data/fastq/error_qual_escape.fastq +20 -0
- data/test/data/fastq/error_qual_null.fastq +0 -0
- data/test/data/fastq/error_qual_space.fastq +21 -0
- data/test/data/fastq/error_qual_tab.fastq +21 -0
- data/test/data/fastq/error_qual_unit_sep.fastq +20 -0
- data/test/data/fastq/error_qual_vtab.fastq +20 -0
- data/test/data/fastq/error_short_qual.fastq +20 -0
- data/test/data/fastq/error_spaces.fastq +20 -0
- data/test/data/fastq/error_tabs.fastq +21 -0
- data/test/data/fastq/error_trunc_at_plus.fastq +19 -0
- data/test/data/fastq/error_trunc_at_qual.fastq +19 -0
- data/test/data/fastq/error_trunc_at_seq.fastq +18 -0
- data/test/data/fastq/error_trunc_in_plus.fastq +19 -0
- data/test/data/fastq/error_trunc_in_qual.fastq +20 -0
- data/test/data/fastq/error_trunc_in_seq.fastq +18 -0
- data/test/data/fastq/error_trunc_in_title.fastq +17 -0
- data/test/data/fastq/illumina_full_range_as_illumina.fastq +8 -0
- data/test/data/fastq/illumina_full_range_as_sanger.fastq +8 -0
- data/test/data/fastq/illumina_full_range_as_solexa.fastq +8 -0
- data/test/data/fastq/illumina_full_range_original_illumina.fastq +8 -0
- data/test/data/fastq/longreads_as_illumina.fastq +40 -0
- data/test/data/fastq/longreads_as_sanger.fastq +40 -0
- data/test/data/fastq/longreads_as_solexa.fastq +40 -0
- data/test/data/fastq/longreads_original_sanger.fastq +120 -0
- data/test/data/fastq/misc_dna_as_illumina.fastq +16 -0
- data/test/data/fastq/misc_dna_as_sanger.fastq +16 -0
- data/test/data/fastq/misc_dna_as_solexa.fastq +16 -0
- data/test/data/fastq/misc_dna_original_sanger.fastq +16 -0
- data/test/data/fastq/misc_rna_as_illumina.fastq +16 -0
- data/test/data/fastq/misc_rna_as_sanger.fastq +16 -0
- data/test/data/fastq/misc_rna_as_solexa.fastq +16 -0
- data/test/data/fastq/misc_rna_original_sanger.fastq +16 -0
- data/test/data/fastq/sanger_full_range_as_illumina.fastq +8 -0
- data/test/data/fastq/sanger_full_range_as_sanger.fastq +8 -0
- data/test/data/fastq/sanger_full_range_as_solexa.fastq +8 -0
- data/test/data/fastq/sanger_full_range_original_sanger.fastq +8 -0
- data/test/data/fastq/solexa_full_range_as_illumina.fastq +8 -0
- data/test/data/fastq/solexa_full_range_as_sanger.fastq +8 -0
- data/test/data/fastq/solexa_full_range_as_solexa.fastq +8 -0
- data/test/data/fastq/solexa_full_range_original_solexa.fastq +8 -0
- data/test/data/fastq/wrapping_as_illumina.fastq +12 -0
- data/test/data/fastq/wrapping_as_sanger.fastq +12 -0
- data/test/data/fastq/wrapping_as_solexa.fastq +12 -0
- data/test/data/fastq/wrapping_original_sanger.fastq +24 -0
- data/test/data/meme/db +0 -0
- data/test/data/meme/mast +0 -0
- data/test/data/meme/mast.out +13 -0
- data/test/data/meme/meme.out +3 -0
- data/test/data/phyloxml/apaf.xml +666 -0
- data/test/data/phyloxml/bcl_2.xml +2097 -0
- data/test/data/phyloxml/made_up.xml +144 -0
- data/test/data/phyloxml/ncbi_taxonomy_mollusca_short.xml +65 -0
- data/test/data/phyloxml/phyloxml_examples.xml +415 -0
- data/test/data/sanger_chromatogram/test_chromatogram_abif.ab1 +0 -0
- data/test/data/sanger_chromatogram/test_chromatogram_scf_v2.scf +0 -0
- data/test/data/sanger_chromatogram/test_chromatogram_scf_v3.scf +0 -0
- data/test/functional/bio/appl/test_pts1.rb +7 -5
- data/test/functional/bio/io/test_ensembl.rb +4 -3
- data/test/functional/bio/io/test_pubmed.rb +9 -3
- data/test/functional/bio/io/test_soapwsdl.rb +5 -4
- data/test/functional/bio/io/test_togows.rb +5 -4
- data/test/functional/bio/sequence/test_output_embl.rb +6 -4
- data/test/functional/bio/test_command.rb +54 -5
- data/test/runner.rb +5 -3
- data/test/unit/bio/appl/bl2seq/test_report.rb +5 -4
- data/test/unit/bio/appl/blast/test_ncbioptions.rb +4 -2
- data/test/unit/bio/appl/blast/test_report.rb +5 -4
- data/test/unit/bio/appl/blast/test_rpsblast.rb +5 -4
- data/test/unit/bio/appl/gcg/test_msf.rb +5 -5
- data/test/unit/bio/appl/genscan/test_report.rb +8 -9
- data/test/unit/bio/appl/hmmer/test_report.rb +5 -4
- data/test/unit/bio/appl/iprscan/test_report.rb +6 -5
- data/test/unit/bio/appl/mafft/test_report.rb +6 -5
- data/test/unit/bio/appl/meme/mast/test_report.rb +46 -0
- data/test/unit/bio/appl/meme/test_mast.rb +103 -0
- data/test/unit/bio/appl/meme/test_motif.rb +38 -0
- data/test/unit/bio/appl/paml/codeml/test_rates.rb +5 -4
- data/test/unit/bio/appl/paml/codeml/test_report.rb +5 -4
- data/test/unit/bio/appl/paml/test_codeml.rb +5 -4
- data/test/unit/bio/appl/sim4/test_report.rb +5 -4
- data/test/unit/bio/appl/sosui/test_report.rb +6 -5
- data/test/unit/bio/appl/targetp/test_report.rb +5 -3
- data/test/unit/bio/appl/test_blast.rb +5 -4
- data/test/unit/bio/appl/test_fasta.rb +4 -2
- data/test/unit/bio/appl/test_pts1.rb +4 -2
- data/test/unit/bio/appl/tmhmm/test_report.rb +6 -5
- data/test/unit/bio/data/test_aa.rb +5 -3
- data/test/unit/bio/data/test_codontable.rb +5 -4
- data/test/unit/bio/data/test_na.rb +5 -3
- data/test/unit/bio/db/biosql/tc_biosql.rb +5 -1
- data/test/unit/bio/db/embl/test_common.rb +4 -2
- data/test/unit/bio/db/embl/test_embl.rb +6 -6
- data/test/unit/bio/db/embl/test_embl_rel89.rb +6 -6
- data/test/unit/bio/db/embl/test_embl_to_bioseq.rb +7 -8
- data/test/unit/bio/db/embl/test_sptr.rb +6 -8
- data/test/unit/bio/db/embl/test_uniprot.rb +6 -5
- data/test/unit/bio/db/fasta/test_format_qual.rb +346 -0
- data/test/unit/bio/db/kegg/test_compound.rb +146 -0
- data/test/unit/bio/db/kegg/test_drug.rb +194 -0
- data/test/unit/bio/db/kegg/test_enzyme.rb +241 -0
- data/test/unit/bio/db/kegg/test_genes.rb +32 -4
- data/test/unit/bio/db/kegg/test_glycan.rb +260 -0
- data/test/unit/bio/db/kegg/test_orthology.rb +50 -0
- data/test/unit/bio/db/kegg/test_reaction.rb +96 -0
- data/test/unit/bio/db/pdb/test_pdb.rb +4 -2
- data/test/unit/bio/db/sanger_chromatogram/test_abif.rb +76 -0
- data/test/unit/bio/db/sanger_chromatogram/test_scf.rb +98 -0
- data/test/unit/bio/db/test_aaindex.rb +6 -6
- data/test/unit/bio/db/test_fasta.rb +5 -46
- data/test/unit/bio/db/test_fastq.rb +829 -0
- data/test/unit/bio/db/test_gff.rb +4 -2
- data/test/unit/bio/db/test_lasergene.rb +7 -5
- data/test/unit/bio/db/test_medline.rb +4 -2
- data/test/unit/bio/db/test_newick.rb +6 -6
- data/test/unit/bio/db/test_nexus.rb +4 -2
- data/test/unit/bio/db/test_phyloxml.rb +769 -0
- data/test/unit/bio/db/test_phyloxml_writer.rb +328 -0
- data/test/unit/bio/db/test_prosite.rb +6 -5
- data/test/unit/bio/db/test_qual.rb +63 -0
- data/test/unit/bio/db/test_rebase.rb +5 -3
- data/test/unit/bio/db/test_soft.rb +7 -6
- data/test/unit/bio/io/flatfile/test_autodetection.rb +6 -7
- data/test/unit/bio/io/flatfile/test_buffer.rb +6 -5
- data/test/unit/bio/io/flatfile/test_splitter.rb +4 -4
- data/test/unit/bio/io/test_ddbjxml.rb +4 -3
- data/test/unit/bio/io/test_ensembl.rb +5 -3
- data/test/unit/bio/io/test_fastacmd.rb +4 -3
- data/test/unit/bio/io/test_flatfile.rb +6 -5
- data/test/unit/bio/io/test_soapwsdl.rb +4 -3
- data/test/unit/bio/io/test_togows.rb +4 -2
- data/test/unit/bio/sequence/test_aa.rb +5 -3
- data/test/unit/bio/sequence/test_common.rb +4 -2
- data/test/unit/bio/sequence/test_compat.rb +4 -2
- data/test/unit/bio/sequence/test_dblink.rb +5 -3
- data/test/unit/bio/sequence/test_na.rb +4 -2
- data/test/unit/bio/sequence/test_quality_score.rb +330 -0
- data/test/unit/bio/shell/plugin/test_seq.rb +5 -3
- data/test/unit/bio/test_alignment.rb +5 -3
- data/test/unit/bio/test_command.rb +4 -3
- data/test/unit/bio/test_db.rb +5 -3
- data/test/unit/bio/test_feature.rb +4 -2
- data/test/unit/bio/test_location.rb +4 -2
- data/test/unit/bio/test_map.rb +5 -3
- data/test/unit/bio/test_pathway.rb +4 -2
- data/test/unit/bio/test_reference.rb +4 -2
- data/test/unit/bio/test_sequence.rb +5 -3
- data/test/unit/bio/test_shell.rb +5 -3
- data/test/unit/bio/test_tree.rb +6 -6
- data/test/unit/bio/util/restriction_enzyme/analysis/test_calculated_cuts.rb +4 -2
- data/test/unit/bio/util/restriction_enzyme/analysis/test_cut_ranges.rb +4 -2
- data/test/unit/bio/util/restriction_enzyme/analysis/test_sequence_range.rb +4 -2
- data/test/unit/bio/util/restriction_enzyme/double_stranded/test_aligned_strands.rb +4 -2
- data/test/unit/bio/util/restriction_enzyme/double_stranded/test_cut_location_pair.rb +4 -2
- data/test/unit/bio/util/restriction_enzyme/double_stranded/test_cut_location_pair_in_enzyme_notation.rb +4 -2
- data/test/unit/bio/util/restriction_enzyme/double_stranded/test_cut_locations.rb +4 -2
- data/test/unit/bio/util/restriction_enzyme/double_stranded/test_cut_locations_in_enzyme_notation.rb +4 -2
- data/test/unit/bio/util/restriction_enzyme/single_strand/test_cut_locations_in_enzyme_notation.rb +4 -2
- data/test/unit/bio/util/restriction_enzyme/test_analysis.rb +4 -2
- data/test/unit/bio/util/restriction_enzyme/test_cut_symbol.rb +4 -2
- data/test/unit/bio/util/restriction_enzyme/test_double_stranded.rb +4 -2
- data/test/unit/bio/util/restriction_enzyme/test_single_strand.rb +17 -13
- data/test/unit/bio/util/restriction_enzyme/test_single_strand_complement.rb +17 -13
- data/test/unit/bio/util/restriction_enzyme/test_string_formatting.rb +4 -2
- data/test/unit/bio/util/test_color_scheme.rb +5 -3
- data/test/unit/bio/util/test_contingency_table.rb +5 -3
- data/test/unit/bio/util/test_restriction_enzyme.rb +4 -2
- data/test/unit/bio/util/test_sirna.rb +6 -4
- metadata +147 -2
data/doc/Tutorial.rd
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
# This document is generated with a version of rd2html (part of Hiki)
|
|
2
2
|
#
|
|
3
|
-
#
|
|
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
|
|
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,
|
|
21
|
-
#
|
|
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/
|
|
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
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
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)
|
data/doc/Tutorial.rd.html
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
<li>Copyright (C) 2001-2003 KATAYAMA Toshiaki <k .at. bioruby.org></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/
|
|
16
|
+
<p>This document was last modified: 2009/12/27
|
|
17
17
|
Current editor: Pjotr Prins <p .at. bioruby.org></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>
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
==> "blastp 2.2.18 [Mar-02-2008]"
|
|
666
|
-
|
|
667
|
-
==> ["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
|
+
# ==> "blastp 2.2.18 [Mar-02-2008]"
|
|
666
|
+
result
|
|
667
|
+
# ==> ["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
|
-
<
|
|
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"><URL:http://libxml.rubyforge.org/install.xml></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
|
+
#=> output is an object representation
|
|
1012
|
+
|
|
1013
|
+
#Print in a readable way
|
|
1014
|
+
puts phyloxml.other[0].to_xml, "\n"
|
|
1015
|
+
#=>:
|
|
1016
|
+
#
|
|
1017
|
+
#<align:alignment xmlns:align="http://example.org/align">
|
|
1018
|
+
# <seq name="A">acgtcgcggcccgtggaagtcctctcct</seq>
|
|
1019
|
+
# <seq name="B">aggtcgcggcctgtggaagtcctctcct</seq>
|
|
1020
|
+
# <seq name="C">taaatcgc--cccgtgg-agtccc-cct</seq>
|
|
1021
|
+
#</align:alignment>
|
|
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
|
+
#=>
|
|
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-
|
|
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-
|
|
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/"><URL:http://bioruby.org/rdoc/></a>.</p>
|
|
997
|
-
<h2><a name="label-
|
|
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-
|
|
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/"><URL:http://rtags.rubyforge.org/></a></p>
|
|
1012
|
-
<h1><a name="label-
|
|
1013
|
-
<h2><a name="label-
|
|
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"><URL:http://www.genome.jp/kegg/soap/doc/keggapi_manual.html></a> ) and</p>
|
|
1015
1065
|
<ul>
|
|
1016
1066
|
<li><a href="http://www.genome.jp/kegg/soap/"><URL:http://www.genome.jp/kegg/soap/></a></li>
|
|
1017
1067
|
</ul>
|
|
1018
|
-
<h2><a name="label-
|
|
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"><URL:http://wiki.github.com/jandot/ruby-ensembl-api></a>
|
|
1022
1072
|
for more information.</p>
|
|
1023
|
-
<h3><a name="label-
|
|
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-
|
|
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"><URL:http://sciruby.codeforpeople.com/sr.cgi/BioProjects></a></p>
|
|
1042
|
-
<h2><a name="label-
|
|
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"><URL:http://sciruby.codeforpeople.com/sr.cgi/RubyWithRlang></a></p>
|
|
1044
|
-
<h2><a name="label-
|
|
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-
|
|
1047
|
-
<p>At this point for using BioRuby no additional libraries are needed
|
|
1048
|
-
|
|
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
|
-
<
|
|
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"><URL:http://libxml.rubyforge.org/install.xml></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-
|
|
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
|