bio 1.3.1 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- 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
@@ -0,0 +1,502 @@
|
|
1
|
+
#
|
2
|
+
# = sample/demo_keggapi.rb - demonstration of Bio::KEGG::API web service client
|
3
|
+
#
|
4
|
+
# Copyright:: Copyright (C) 2003, 2004 Toshiaki Katayama <k@bioruby.org>
|
5
|
+
# License:: The Ruby License
|
6
|
+
#
|
7
|
+
#
|
8
|
+
# == Description
|
9
|
+
#
|
10
|
+
# Demonstration of Bio::KEGG::API, the KEGG API web service client via
|
11
|
+
# SOAP/WSDL.
|
12
|
+
#
|
13
|
+
# == Requirements
|
14
|
+
#
|
15
|
+
# Internet connection is needed.
|
16
|
+
#
|
17
|
+
# == Usage
|
18
|
+
#
|
19
|
+
# Simply run this script.
|
20
|
+
#
|
21
|
+
# $ ruby demo_keggapi.rb
|
22
|
+
#
|
23
|
+
# == Notes
|
24
|
+
#
|
25
|
+
# * It may take long time to run this script.
|
26
|
+
# * It can not be run with Ruby 1.9 because SOAP4R (SOAP support for Ruby)
|
27
|
+
# currently does not support Ruby 1.9.
|
28
|
+
#
|
29
|
+
# == Development information
|
30
|
+
#
|
31
|
+
# The code was moved from lib/bio/io/keggapi.rb, and modified as below:
|
32
|
+
#
|
33
|
+
# * Commented out deprecated methods: get_neighbors_by_gene,
|
34
|
+
# get_similarity_between_genes, get_ko_members, get_oc_members_by_gene,
|
35
|
+
# get_pc_members_by_gene.
|
36
|
+
# * Commented out some methods internally using the deprecated methods:
|
37
|
+
# get_all_neighbors_by_gene, get_all_oc_members_by_gene,
|
38
|
+
# get_all_pc_members_by_gene.
|
39
|
+
#
|
40
|
+
|
41
|
+
require 'bio'
|
42
|
+
|
43
|
+
#if __FILE__ == $0
|
44
|
+
|
45
|
+
begin
|
46
|
+
require 'pp'
|
47
|
+
alias p pp
|
48
|
+
rescue LoadError
|
49
|
+
end
|
50
|
+
|
51
|
+
puts ">>> KEGG API"
|
52
|
+
serv = Bio::KEGG::API.new
|
53
|
+
# serv.log = STDERR
|
54
|
+
|
55
|
+
puts "# * parameters"
|
56
|
+
puts " wsdl : #{serv.wsdl}"
|
57
|
+
puts " log : #{serv.log}"
|
58
|
+
puts " start : #{serv.start}"
|
59
|
+
puts " max_results : #{serv.max_results}"
|
60
|
+
|
61
|
+
puts "=== META"
|
62
|
+
|
63
|
+
puts "### list_databases"
|
64
|
+
list = serv.list_databases
|
65
|
+
list.each do |db|
|
66
|
+
print db.entry_id, "\t", db.definition, "\n"
|
67
|
+
end
|
68
|
+
|
69
|
+
puts "### list_organisms"
|
70
|
+
list = serv.list_organisms
|
71
|
+
list.each do |org|
|
72
|
+
print org.entry_id, "\t", org.definition, "\n"
|
73
|
+
end
|
74
|
+
|
75
|
+
puts "### list_pathways('map') : reference pathway"
|
76
|
+
list = serv.list_pathways("map")
|
77
|
+
list.each do |path|
|
78
|
+
print path.entry_id, "\t", path.definition, "\n"
|
79
|
+
end
|
80
|
+
|
81
|
+
puts "### list_pathways('eco') : E. coli pathway"
|
82
|
+
list = serv.list_pathways("eco")
|
83
|
+
list.each do |path|
|
84
|
+
print path.entry_id, "\t", path.definition, "\n"
|
85
|
+
end
|
86
|
+
|
87
|
+
puts "=== DBGET"
|
88
|
+
|
89
|
+
puts "### binfo('all')"
|
90
|
+
puts serv.binfo("all")
|
91
|
+
|
92
|
+
puts "### binfo('genbank')"
|
93
|
+
puts serv.binfo("genbank")
|
94
|
+
|
95
|
+
puts "### bfind('genbank kinase cell cycle human')"
|
96
|
+
puts serv.bfind("genbank kinase cell cycle human")
|
97
|
+
|
98
|
+
puts "### bget('gb:AJ617376')"
|
99
|
+
puts serv.bget("gb:AJ617376")
|
100
|
+
|
101
|
+
puts "### bget('eco:b0002 eco:b0003')"
|
102
|
+
puts serv.bget("eco:b0002 eco:b0003")
|
103
|
+
|
104
|
+
puts "### btit('eco:b0002 eco:b0003')"
|
105
|
+
puts serv.btit("eco:b0002 eco:b0003")
|
106
|
+
|
107
|
+
puts "# * get_entries(['eco:b0002', 'eco:b0003'])"
|
108
|
+
puts serv.get_entries(["eco:b0002", "eco:b0003"])
|
109
|
+
|
110
|
+
puts "# * get_aaseqs(['eco:b0002', 'eco:b0003'])"
|
111
|
+
puts serv.get_aaseqs(["eco:b0002", "eco:b0003"])
|
112
|
+
|
113
|
+
puts "# * get_naseqs(['eco:b0002', 'eco:b0003'])"
|
114
|
+
puts serv.get_naseqs(["eco:b0002", "eco:b0003"])
|
115
|
+
|
116
|
+
puts "# * get_definitions(['eco:b0002', 'eco:b0003'])"
|
117
|
+
puts serv.get_definitions(["eco:b0002", "eco:b0003"])
|
118
|
+
|
119
|
+
puts "# * get_definitions(('eco:b0001'..'eco:b0200').to_a)"
|
120
|
+
puts serv.get_definitions(("eco:b0001".."eco:b0200").to_a)
|
121
|
+
|
122
|
+
puts "=== LinkDB"
|
123
|
+
|
124
|
+
puts "### get_linkdb_by_entry('eco:b0002', 'pathway', 1, 5)"
|
125
|
+
list = serv.get_linkdb_by_entry("eco:b0002", "pathway", 1, 5)
|
126
|
+
list.each do |link|
|
127
|
+
puts [ link.entry_id1, link.entry_id2, link.type, link.path ].join("\t")
|
128
|
+
end
|
129
|
+
|
130
|
+
puts "# * get_all_linkdb_by_entry('eco:b0002', 'pathway')"
|
131
|
+
list = serv.get_all_linkdb_by_entry("eco:b0002", "pathway")
|
132
|
+
list.each do |link|
|
133
|
+
puts [ link.entry_id1, link.entry_id2, link.type, link.path ].join("\t")
|
134
|
+
end
|
135
|
+
|
136
|
+
puts "=== SSDB"
|
137
|
+
|
138
|
+
# The method "get_neighbors_by_gene" is deprecated in 2005-02-20.
|
139
|
+
#
|
140
|
+
#puts "### get_neighbors_by_gene('eco:b0002', 'all', 1, 5)"
|
141
|
+
#list = serv.get_neighbors_by_gene("eco:b0002", "all", 1, 5)
|
142
|
+
#list.each do |hit|
|
143
|
+
# puts [ hit.genes_id1, hit.genes_id2, hit.sw_score ].join("\t")
|
144
|
+
#end
|
145
|
+
|
146
|
+
# The method "get_all_neighbors_by_gene" can not be used because
|
147
|
+
# it internally uses the deprecated "get_neighbors_by_gene" method.
|
148
|
+
#
|
149
|
+
#puts "# * get_all_neighbors_by_gene('eco:b0002', 'bsu')"
|
150
|
+
#list = serv.get_all_neighbors_by_gene("eco:b0002", "bsu")
|
151
|
+
#list.each do |hit|
|
152
|
+
# puts [ hit.genes_id1, hit.genes_id2, hit.sw_score ].join("\t")
|
153
|
+
#end
|
154
|
+
|
155
|
+
puts "### get_best_best_neighbors_by_gene('eco:b0002', 1, 5)"
|
156
|
+
list = serv.get_best_best_neighbors_by_gene("eco:b0002", 1, 5)
|
157
|
+
list.each do |hit|
|
158
|
+
puts [ hit.genes_id1, hit.genes_id2, hit.sw_score ].join("\t")
|
159
|
+
end
|
160
|
+
|
161
|
+
puts "# * get_all_best_best_neighbors_by_gene('eco:b0002')"
|
162
|
+
list = serv.get_all_best_best_neighbors_by_gene("eco:b0002")
|
163
|
+
list.each do |hit|
|
164
|
+
puts [ hit.genes_id1, hit.genes_id2, hit.sw_score ].join("\t")
|
165
|
+
end
|
166
|
+
|
167
|
+
puts "### get_best_neighbors_by_gene('eco:b0002', 1, 5)"
|
168
|
+
list = serv.get_best_neighbors_by_gene("eco:b0002", 1, 5)
|
169
|
+
list.each do |hit|
|
170
|
+
puts [ hit.genes_id1, hit.genes_id2, hit.sw_score ].join("\t")
|
171
|
+
end
|
172
|
+
|
173
|
+
puts "# * get_all_best_neighbors_by_gene('eco:b0002')"
|
174
|
+
list = serv.get_all_best_neighbors_by_gene("eco:b0002")
|
175
|
+
list.each do |hit|
|
176
|
+
puts [ hit.genes_id1, hit.genes_id2, hit.sw_score ].join("\t")
|
177
|
+
end
|
178
|
+
|
179
|
+
puts "### get_reverse_best_neighbors_by_gene('eco:b0002', 1, 5)"
|
180
|
+
list = serv.get_reverse_best_neighbors_by_gene("eco:b0002", 1, 5)
|
181
|
+
list.each do |hit|
|
182
|
+
puts [ hit.genes_id1, hit.genes_id2, hit.sw_score ].join("\t")
|
183
|
+
end
|
184
|
+
|
185
|
+
puts "# * get_all_reverse_best_neighbors_by_gene('eco:b0002')"
|
186
|
+
list = serv.get_all_reverse_best_neighbors_by_gene("eco:b0002")
|
187
|
+
list.each do |hit|
|
188
|
+
puts [ hit.genes_id1, hit.genes_id2, hit.sw_score ].join("\t")
|
189
|
+
end
|
190
|
+
|
191
|
+
puts "### get_paralogs_by_gene('eco:b0002', 1, 5)"
|
192
|
+
list = serv.get_paralogs_by_gene("eco:b0002", 1, 5)
|
193
|
+
list.each do |hit|
|
194
|
+
puts [ hit.genes_id1, hit.genes_id2, hit.sw_score ].join("\t")
|
195
|
+
end
|
196
|
+
|
197
|
+
puts "# * get_all_paralogs_by_gene('eco:b0002')"
|
198
|
+
list = serv.get_all_paralogs_by_gene("eco:b0002")
|
199
|
+
list.each do |hit|
|
200
|
+
puts [ hit.genes_id1, hit.genes_id2, hit.sw_score ].join("\t")
|
201
|
+
end
|
202
|
+
|
203
|
+
# The method "get_similarity_between_genes" is deprecated in 2005-02-20.
|
204
|
+
#
|
205
|
+
#puts "### get_similarity_between_genes('eco:b0002', 'bsu:BG10350')"
|
206
|
+
#relation = serv.get_similarity_between_genes("eco:b0002", "bsu:BG10350")
|
207
|
+
#puts " genes_id1 : #{relation.genes_id1}" # string
|
208
|
+
#puts " genes_id2 : #{relation.genes_id2}" # string
|
209
|
+
#puts " sw_score : #{relation.sw_score}" # int
|
210
|
+
#puts " bit_score : #{relation.bit_score}" # float
|
211
|
+
#puts " identity : #{relation.identity}" # float
|
212
|
+
#puts " overlap : #{relation.overlap}" # int
|
213
|
+
#puts " start_position1 : #{relation.start_position1}" # int
|
214
|
+
#puts " end_position1 : #{relation.end_position1}" # int
|
215
|
+
#puts " start_position2 : #{relation.start_position2}" # int
|
216
|
+
#puts " end_position2 : #{relation.end_position2}" # int
|
217
|
+
#puts " best_flag_1to2 : #{relation.best_flag_1to2}" # boolean
|
218
|
+
#puts " best_flag_2to1 : #{relation.best_flag_2to1}" # boolean
|
219
|
+
#puts " definition1 : #{relation.definition1}" # string
|
220
|
+
#puts " definition2 : #{relation.definition2}" # string
|
221
|
+
#puts " length1 : #{relation.length1}" # int
|
222
|
+
#puts " length2 : #{relation.length2}" # int
|
223
|
+
|
224
|
+
puts "=== MOTIF"
|
225
|
+
|
226
|
+
puts "### get_motifs_by_gene('eco:b0002', 'pfam')"
|
227
|
+
list = serv.get_motifs_by_gene("eco:b0002", "pfam")
|
228
|
+
list.each do |motif|
|
229
|
+
puts motif.motif_id
|
230
|
+
end if list
|
231
|
+
|
232
|
+
puts "### get_motifs_by_gene('eco:b0002', 'tfam')"
|
233
|
+
list = serv.get_motifs_by_gene("eco:b0002", "tfam")
|
234
|
+
list.each do |motif|
|
235
|
+
puts motif.motif_id
|
236
|
+
end if list
|
237
|
+
|
238
|
+
puts "### get_motifs_by_gene('eco:b0002', 'pspt')"
|
239
|
+
list = serv.get_motifs_by_gene("eco:b0002", "pspt")
|
240
|
+
list.each do |motif|
|
241
|
+
puts motif.motif_id
|
242
|
+
end if list
|
243
|
+
|
244
|
+
puts "### get_motifs_by_gene('eco:b0002', 'pspf')"
|
245
|
+
list = serv.get_motifs_by_gene("eco:b0002", "pspf")
|
246
|
+
list.each do |motif|
|
247
|
+
puts motif.motif_id
|
248
|
+
end if list
|
249
|
+
|
250
|
+
puts "### get_motifs_by_gene('eco:b0002', 'all')"
|
251
|
+
list = serv.get_motifs_by_gene("eco:b0002", "all")
|
252
|
+
list.each do |motif|
|
253
|
+
puts "# * motif result"
|
254
|
+
puts " motif_id : #{motif.motif_id}"
|
255
|
+
puts " definition : #{motif.definition}"
|
256
|
+
puts " genes_id : #{motif.genes_id}"
|
257
|
+
puts " start_position : #{motif.start_position}"
|
258
|
+
puts " end_position : #{motif.end_position}"
|
259
|
+
puts " score : #{motif.score}"
|
260
|
+
puts " evalue : #{motif.evalue}"
|
261
|
+
end
|
262
|
+
|
263
|
+
puts "### get_genes_by_motifs(['pf:ACT', 'ps:ASPARTOKINASE'], 1, 5)"
|
264
|
+
list = serv.get_genes_by_motifs(["pf:ACT", "ps:ASPARTOKINASE"], 1, 5)
|
265
|
+
list.each do |gene|
|
266
|
+
puts [ gene.entry_id, gene.definition ].join("\t")
|
267
|
+
end
|
268
|
+
|
269
|
+
puts "# * get_all_genes_by_motifs(['pf:ACT', 'ps:ASPARTOKINASE'])"
|
270
|
+
list = serv.get_all_genes_by_motifs(["pf:ACT", "ps:ASPARTOKINASE"])
|
271
|
+
list.each do |gene|
|
272
|
+
puts [ gene.entry_id, gene.definition ].join("\t")
|
273
|
+
end
|
274
|
+
|
275
|
+
puts "=== KO, OC, PC"
|
276
|
+
|
277
|
+
puts "### get_ko_by_gene('eco:b0002')"
|
278
|
+
list = serv.get_ko_by_gene("eco:b0002")
|
279
|
+
list.each do |ko|
|
280
|
+
puts ko
|
281
|
+
end
|
282
|
+
|
283
|
+
# The method "get_ko_members" is removed in 2005-06-01.
|
284
|
+
#
|
285
|
+
#puts "### get_ko_members('ko:K00003')"
|
286
|
+
#list = serv.get_ko_members("ko:K00003")
|
287
|
+
#list.each do |gene|
|
288
|
+
# puts gene
|
289
|
+
#end
|
290
|
+
|
291
|
+
# The method "get_oc_members_by_gene" is removed in 2006-10-04.
|
292
|
+
#
|
293
|
+
#puts "### get_oc_members_by_gene('eco:b0002', 1, 5)"
|
294
|
+
#list = serv.get_oc_members_by_gene("eco:b0002", 1, 5)
|
295
|
+
#list.each do |gene|
|
296
|
+
# puts gene
|
297
|
+
#end
|
298
|
+
|
299
|
+
# The method "get_all_oc_members_by_gene" can not be used because
|
300
|
+
# it internally uses the deprecated "get_oc_members_by_gene" method.
|
301
|
+
#
|
302
|
+
#puts "# * get_all_oc_members_by_gene('eco:b0002')"
|
303
|
+
#list = serv.get_all_oc_members_by_gene("eco:b0002")
|
304
|
+
#list.each do |gene|
|
305
|
+
# puts gene
|
306
|
+
#end
|
307
|
+
|
308
|
+
# The method "get_pc_members_by_gene" is removed in 2006-10-04.
|
309
|
+
#
|
310
|
+
#puts "### get_pc_members_by_gene('eco:b0002', 1, 5)"
|
311
|
+
#list = serv.get_pc_members_by_gene("eco:b0002", 1, 5)
|
312
|
+
#list.each do |gene|
|
313
|
+
# puts gene
|
314
|
+
#end
|
315
|
+
|
316
|
+
# The method "get_all_pc_members_by_gene" can not be used because
|
317
|
+
# it internally uses the deprecated "get_pc_members_by_gene" method.
|
318
|
+
#
|
319
|
+
#puts "# * get_all_pc_members_by_gene('eco:b0002')"
|
320
|
+
#list = serv.get_all_pc_members_by_gene("eco:b0002")
|
321
|
+
#list.each do |gene|
|
322
|
+
# puts gene
|
323
|
+
#end
|
324
|
+
|
325
|
+
puts "=== PATHWAY"
|
326
|
+
|
327
|
+
puts "==== coloring pathway"
|
328
|
+
|
329
|
+
puts "### mark_pathway_by_objects('path:eco00260', obj_list)"
|
330
|
+
puts " obj_list = ['eco:b0002', 'cpd:C00263']"
|
331
|
+
obj_list = ["eco:b0002", "cpd:C00263"]
|
332
|
+
url = serv.mark_pathway_by_objects("path:eco00260", obj_list)
|
333
|
+
puts url
|
334
|
+
|
335
|
+
puts "### color_pathway_by_objects('path:eco00053', obj_list, fg_list, bg_list)"
|
336
|
+
puts " obj_list = ['eco:b0207', 'eco:b1300']"
|
337
|
+
puts " fg_list = ['blue', '#00ff00']"
|
338
|
+
puts " bg_list = ['#ff0000', 'yellow']"
|
339
|
+
obj_list = ["eco:b0207", "eco:b1300"]
|
340
|
+
fg_list = ["blue", "#00ff00"]
|
341
|
+
bg_list = ["#ff0000", "yellow"]
|
342
|
+
url = serv.color_pathway_by_objects("path:eco00053", obj_list, fg_list, bg_list)
|
343
|
+
puts url
|
344
|
+
|
345
|
+
#puts "# * save_image(#{url})"
|
346
|
+
#filename = serv.save_image(url, "test.gif")
|
347
|
+
#filename = serv.save_image(url)
|
348
|
+
#puts filename
|
349
|
+
|
350
|
+
puts "==== objects on pathway"
|
351
|
+
|
352
|
+
puts "### get_genes_by_pathway('path:map00010')"
|
353
|
+
list = serv.get_genes_by_pathway("path:map00010")
|
354
|
+
list.each do |gene|
|
355
|
+
puts gene
|
356
|
+
end
|
357
|
+
|
358
|
+
puts "### get_genes_by_pathway('path:eco00010')"
|
359
|
+
list = serv.get_genes_by_pathway("path:eco00010")
|
360
|
+
list.each do |gene|
|
361
|
+
puts gene
|
362
|
+
end
|
363
|
+
|
364
|
+
puts "### get_enzymes_by_pathway('path:map00010')"
|
365
|
+
list = serv.get_enzymes_by_pathway("path:map00010")
|
366
|
+
list.each do |enzyme|
|
367
|
+
puts enzyme
|
368
|
+
end
|
369
|
+
|
370
|
+
puts "### get_enzymes_by_pathway('path:eco00010')"
|
371
|
+
list = serv.get_enzymes_by_pathway("path:eco00010")
|
372
|
+
list.each do |enzyme|
|
373
|
+
puts enzyme
|
374
|
+
end
|
375
|
+
|
376
|
+
puts "### get_compounds_by_pathway('path:map00010')"
|
377
|
+
list = serv.get_compounds_by_pathway("path:map00010")
|
378
|
+
list.each do |compound|
|
379
|
+
puts compound
|
380
|
+
end
|
381
|
+
|
382
|
+
puts "### get_compounds_by_pathway('path:eco00010')"
|
383
|
+
list = serv.get_compounds_by_pathway("path:eco00010")
|
384
|
+
list.each do |compound|
|
385
|
+
puts compound
|
386
|
+
end
|
387
|
+
|
388
|
+
puts "### get_reactions_by_pathway('path:map00010')"
|
389
|
+
list = serv.get_reactions_by_pathway("path:map00010")
|
390
|
+
list.each do |reaction|
|
391
|
+
puts reaction
|
392
|
+
end
|
393
|
+
|
394
|
+
puts "### get_reactions_by_pathway('path:eco00010')"
|
395
|
+
list = serv.get_reactions_by_pathway("path:eco00010")
|
396
|
+
list.each do |reaction|
|
397
|
+
puts reaction
|
398
|
+
end
|
399
|
+
|
400
|
+
puts "==== pathway by objects"
|
401
|
+
|
402
|
+
puts "### get_pathways_by_genes(['eco:b0756', 'eco:b1002'])"
|
403
|
+
list = serv.get_pathways_by_genes(["eco:b0756", "eco:b1002"])
|
404
|
+
list.each do |path|
|
405
|
+
puts path
|
406
|
+
end
|
407
|
+
|
408
|
+
puts "### get_pathways_by_enzymes(['ec:5.1.3.3', 'ec:3.1.3.10'])"
|
409
|
+
list = serv.get_pathways_by_enzymes(["ec:5.1.3.3", "ec:3.1.3.10"])
|
410
|
+
list.each do |path|
|
411
|
+
puts path
|
412
|
+
end
|
413
|
+
|
414
|
+
puts "### get_pathways_by_compounds(['cpd:C00221', 'cpd:C00267'])"
|
415
|
+
list = serv.get_pathways_by_compounds(["cpd:C00221", "cpd:C00267"])
|
416
|
+
list.each do |path|
|
417
|
+
puts path
|
418
|
+
end
|
419
|
+
|
420
|
+
puts "### get_pathways_by_reactions(['rn:R00014', 'rn:R00710'])"
|
421
|
+
list = serv.get_pathways_by_reactions(["rn:R00014", "rn:R00710"])
|
422
|
+
list.each do |path|
|
423
|
+
puts path
|
424
|
+
end
|
425
|
+
|
426
|
+
puts "==== relation between objects"
|
427
|
+
|
428
|
+
puts "### get_linked_pathways('path:eco00620')"
|
429
|
+
list = serv.get_linked_pathways('path:eco00620')
|
430
|
+
list.each do |path|
|
431
|
+
puts path
|
432
|
+
end
|
433
|
+
|
434
|
+
puts "### get_genes_by_enzyme('ec:1.1.1.1', 'eco')"
|
435
|
+
list = serv.get_genes_by_enzyme("ec:1.1.1.1", "eco")
|
436
|
+
list.each do |gene|
|
437
|
+
puts gene
|
438
|
+
end
|
439
|
+
|
440
|
+
puts "### get_enzymes_by_gene('eco:b0002')"
|
441
|
+
list = serv.get_enzymes_by_gene("eco:b0002")
|
442
|
+
list.each do |enzyme|
|
443
|
+
puts enzyme
|
444
|
+
end
|
445
|
+
|
446
|
+
puts "### get_enzymes_by_compound('cpd:C00345')"
|
447
|
+
list = serv.get_enzymes_by_compound("cpd:C00345")
|
448
|
+
list.each do |enzyme|
|
449
|
+
puts enzyme
|
450
|
+
end
|
451
|
+
|
452
|
+
puts "### get_enzymes_by_reaction('rn:R00100')"
|
453
|
+
list = serv.get_enzymes_by_reaction("rn:R00100")
|
454
|
+
list.each do |enzyme|
|
455
|
+
puts enzyme
|
456
|
+
end
|
457
|
+
|
458
|
+
puts "### get_compounds_by_enzyme('ec:2.7.1.12')"
|
459
|
+
list = serv.get_compounds_by_enzyme("ec:2.7.1.12")
|
460
|
+
list.each do |compound|
|
461
|
+
puts compound
|
462
|
+
end
|
463
|
+
|
464
|
+
puts "### get_compounds_by_reaction('rn:R00100')"
|
465
|
+
list = serv.get_compounds_by_reaction("rn:R00100")
|
466
|
+
list.each do |compound|
|
467
|
+
puts compound
|
468
|
+
end
|
469
|
+
|
470
|
+
puts "### get_reactions_by_enzyme('ec:2.7.1.12')"
|
471
|
+
list = serv.get_reactions_by_enzyme("ec:2.7.1.12")
|
472
|
+
list.each do |reaction|
|
473
|
+
puts reaction
|
474
|
+
end
|
475
|
+
|
476
|
+
puts "### get_reactions_by_compound('cpd:C00199')"
|
477
|
+
list = serv.get_reactions_by_compound("cpd:C00199")
|
478
|
+
list.each do |reaction|
|
479
|
+
puts reaction
|
480
|
+
end
|
481
|
+
|
482
|
+
puts "=== GENES"
|
483
|
+
|
484
|
+
puts "### get_genes_by_organism('mge', 1, 5)"
|
485
|
+
list = serv.get_genes_by_organism("mge", 1, 5)
|
486
|
+
list.each do |gene|
|
487
|
+
puts gene
|
488
|
+
end
|
489
|
+
|
490
|
+
puts "# * get_all_genes_by_organism('mge')"
|
491
|
+
list = serv.get_all_genes_by_organism("mge")
|
492
|
+
list.each do |gene|
|
493
|
+
puts gene
|
494
|
+
end
|
495
|
+
|
496
|
+
puts "=== GENOME"
|
497
|
+
|
498
|
+
puts "### get_number_of_genes_by_organism(org)"
|
499
|
+
puts serv.get_number_of_genes_by_organism("mge")
|
500
|
+
|
501
|
+
#end
|
502
|
+
|