bio 1.4.3.0001 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.travis.yml +39 -33
- data/BSDL +22 -0
- data/COPYING +2 -2
- data/COPYING.ja +36 -36
- data/ChangeLog +2404 -1025
- data/KNOWN_ISSUES.rdoc +15 -55
- data/README.rdoc +17 -23
- data/RELEASE_NOTES.rdoc +246 -183
- data/Rakefile +3 -2
- data/bin/br_biofetch.rb +29 -5
- data/bioruby.gemspec +15 -32
- data/bioruby.gemspec.erb +10 -20
- data/doc/ChangeLog-1.4.3 +1478 -0
- data/doc/RELEASE_NOTES-1.4.3.rdoc +204 -0
- data/doc/Tutorial.rd +0 -6
- data/doc/Tutorial.rd.html +7 -12
- data/doc/Tutorial.rd.ja +960 -1064
- data/doc/Tutorial.rd.ja.html +977 -1067
- data/gemfiles/Gemfile.travis-jruby1.8 +2 -1
- data/gemfiles/Gemfile.travis-jruby1.9 +2 -4
- data/gemfiles/Gemfile.travis-rbx +13 -0
- data/gemfiles/Gemfile.travis-ruby1.8 +2 -1
- data/gemfiles/Gemfile.travis-ruby1.9 +2 -4
- data/gemfiles/Gemfile.travis-ruby2.2 +9 -0
- data/lib/bio.rb +10 -43
- data/lib/bio/alignment.rb +8 -14
- data/lib/bio/appl/blast.rb +1 -2
- data/lib/bio/appl/blast/format0.rb +18 -7
- data/lib/bio/appl/blast/remote.rb +0 -9
- data/lib/bio/appl/blast/report.rb +1 -1
- data/lib/bio/appl/clustalw/report.rb +3 -1
- data/lib/bio/appl/genscan/report.rb +1 -2
- data/lib/bio/appl/iprscan/report.rb +1 -2
- data/lib/bio/appl/meme/mast.rb +4 -4
- data/lib/bio/appl/meme/mast/report.rb +1 -1
- data/lib/bio/appl/paml/codeml.rb +2 -2
- data/lib/bio/appl/paml/codeml/report.rb +1 -0
- data/lib/bio/appl/paml/common.rb +1 -1
- data/lib/bio/appl/sosui/report.rb +1 -2
- data/lib/bio/command.rb +62 -2
- data/lib/bio/data/aa.rb +13 -31
- data/lib/bio/data/codontable.rb +1 -2
- data/lib/bio/db/biosql/biosql_to_biosequence.rb +1 -0
- data/lib/bio/db/biosql/sequence.rb +1 -1
- data/lib/bio/db/embl/common.rb +1 -1
- data/lib/bio/db/embl/embl.rb +5 -4
- data/lib/bio/db/embl/format_embl.rb +3 -3
- data/lib/bio/db/embl/sptr.rb +9 -1444
- data/lib/bio/db/embl/swissprot.rb +12 -29
- data/lib/bio/db/embl/trembl.rb +13 -30
- data/lib/bio/db/embl/uniprot.rb +12 -29
- data/lib/bio/db/embl/uniprotkb.rb +1455 -0
- data/lib/bio/db/fasta.rb +17 -0
- data/lib/bio/db/fasta/defline.rb +1 -3
- data/lib/bio/db/fastq.rb +1 -1
- data/lib/bio/db/genbank/ddbj.rb +9 -5
- data/lib/bio/db/genbank/refseq.rb +11 -3
- data/lib/bio/db/gff.rb +3 -4
- data/lib/bio/db/go.rb +5 -6
- data/lib/bio/db/kegg/module.rb +4 -5
- data/lib/bio/db/kegg/pathway.rb +4 -5
- data/lib/bio/db/kegg/reaction.rb +1 -1
- data/lib/bio/db/nexus.rb +3 -2
- data/lib/bio/db/pdb/pdb.rb +2 -2
- data/lib/bio/db/phyloxml/phyloxml_elements.rb +82 -59
- data/lib/bio/db/phyloxml/phyloxml_parser.rb +2 -2
- data/lib/bio/db/phyloxml/phyloxml_writer.rb +1 -2
- data/lib/bio/db/sanger_chromatogram/chromatogram.rb +1 -2
- data/lib/bio/db/transfac.rb +1 -1
- data/lib/bio/io/das.rb +40 -41
- data/lib/bio/io/fastacmd.rb +0 -16
- data/lib/bio/io/fetch.rb +111 -55
- data/lib/bio/io/flatfile/buffer.rb +4 -5
- data/lib/bio/io/hinv.rb +2 -3
- data/lib/bio/io/ncbirest.rb +43 -6
- data/lib/bio/io/pubmed.rb +76 -81
- data/lib/bio/io/togows.rb +33 -10
- data/lib/bio/map.rb +1 -1
- data/lib/bio/pathway.rb +1 -1
- data/lib/bio/sequence/compat.rb +1 -1
- data/lib/bio/sequence/na.rb +63 -12
- data/lib/bio/shell.rb +0 -2
- data/lib/bio/shell/core.rb +5 -6
- data/lib/bio/shell/interface.rb +3 -4
- data/lib/bio/shell/irb.rb +1 -2
- data/lib/bio/shell/plugin/entry.rb +2 -3
- data/lib/bio/shell/plugin/seq.rb +7 -6
- data/lib/bio/shell/setup.rb +1 -2
- data/lib/bio/tree.rb +2 -2
- data/lib/bio/util/contingency_table.rb +0 -2
- data/lib/bio/util/restriction_enzyme/range/sequence_range.rb +2 -2
- data/lib/bio/util/sirna.rb +76 -16
- data/lib/bio/version.rb +8 -9
- data/sample/benchmark_clustalw_report.rb +47 -0
- data/sample/biofetch.rb +248 -151
- data/setup.rb +6 -7
- data/test/data/clustalw/example1-seqnos.aln +58 -0
- data/test/network/bio/appl/blast/test_remote.rb +1 -15
- data/test/network/bio/appl/test_blast.rb +0 -12
- data/test/network/bio/io/test_pubmed.rb +49 -0
- data/test/network/bio/io/test_togows.rb +0 -1
- data/test/network/bio/test_command.rb +65 -2
- data/test/unit/bio/appl/bl2seq/test_report.rb +0 -1
- data/test/unit/bio/appl/blast/test_report.rb +110 -48
- data/test/unit/bio/appl/clustalw/test_report.rb +67 -51
- data/test/unit/bio/appl/sim4/test_report.rb +46 -17
- data/test/unit/bio/appl/test_blast.rb +2 -2
- data/test/unit/bio/db/embl/test_embl.rb +0 -1
- data/test/unit/bio/db/embl/test_embl_rel89.rb +0 -1
- data/test/unit/bio/db/embl/{test_sptr.rb → test_uniprotkb.rb} +111 -115
- data/test/unit/bio/db/embl/{test_uniprot_new_part.rb → test_uniprotkb_new_part.rb} +11 -11
- data/test/unit/bio/db/genbank/test_genbank.rb +10 -4
- data/test/unit/bio/db/pdb/test_pdb.rb +14 -8
- data/test/unit/bio/db/test_fasta.rb +41 -1
- data/test/unit/bio/db/test_fastq.rb +14 -4
- data/test/unit/bio/db/test_gff.rb +2 -2
- data/test/unit/bio/db/test_phyloxml.rb +30 -30
- data/test/unit/bio/db/test_phyloxml_writer.rb +2 -2
- data/test/unit/bio/io/flatfile/test_autodetection.rb +1 -2
- data/test/unit/bio/io/flatfile/test_buffer.rb +7 -1
- data/test/unit/bio/io/flatfile/test_splitter.rb +1 -1
- data/test/unit/bio/io/test_togows.rb +3 -2
- data/test/unit/bio/sequence/test_dblink.rb +1 -1
- data/test/unit/bio/sequence/test_na.rb +3 -1
- data/test/unit/bio/test_alignment.rb +1 -2
- data/test/unit/bio/test_command.rb +5 -4
- data/test/unit/bio/test_db.rb +4 -2
- data/test/unit/bio/test_pathway.rb +25 -10
- data/test/unit/bio/util/test_sirna.rb +22 -22
- metadata +656 -1430
- data/doc/KEGG_API.rd +0 -1843
- data/doc/KEGG_API.rd.ja +0 -1834
- data/extconf.rb +0 -2
- data/lib/bio/appl/blast/ddbj.rb +0 -131
- data/lib/bio/db/kegg/taxonomy.rb +0 -280
- data/lib/bio/io/dbget.rb +0 -194
- data/lib/bio/io/ddbjrest.rb +0 -344
- data/lib/bio/io/ddbjxml.rb +0 -458
- data/lib/bio/io/ebisoap.rb +0 -158
- data/lib/bio/io/ensembl.rb +0 -229
- data/lib/bio/io/higet.rb +0 -73
- data/lib/bio/io/keggapi.rb +0 -363
- data/lib/bio/io/ncbisoap.rb +0 -156
- data/lib/bio/io/soapwsdl.rb +0 -119
- data/lib/bio/shell/plugin/keggapi.rb +0 -181
- data/lib/bio/shell/plugin/soap.rb +0 -87
- data/sample/dbget +0 -37
- data/sample/demo_ddbjxml.rb +0 -212
- data/sample/demo_kegg_taxonomy.rb +0 -92
- data/sample/demo_keggapi.rb +0 -502
- data/sample/psortplot_html.rb +0 -214
- data/test/network/bio/io/test_ddbjrest.rb +0 -47
- data/test/network/bio/io/test_ensembl.rb +0 -230
- data/test/network/bio/io/test_soapwsdl.rb +0 -53
- data/test/unit/bio/io/test_ddbjxml.rb +0 -81
- data/test/unit/bio/io/test_ensembl.rb +0 -111
- data/test/unit/bio/io/test_soapwsdl.rb +0 -33
@@ -1,92 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# = sample/demo_kegg_taxonomy.rb - demonstration of Bio::KEGG::Taxonomy
|
3
|
-
#
|
4
|
-
# Copyright:: Copyright (C) 2007 Toshiaki Katayama <k@bioruby.org>
|
5
|
-
# License:: The Ruby License
|
6
|
-
#
|
7
|
-
#
|
8
|
-
# == Description
|
9
|
-
#
|
10
|
-
# IMPORTANT NOTE: currently, this sample does not work!
|
11
|
-
#
|
12
|
-
# Demonstration of Bio::KEGG::Taxonomy.
|
13
|
-
#
|
14
|
-
# == Usage
|
15
|
-
#
|
16
|
-
# Specify a file containing KEGG Taxonomy data.
|
17
|
-
#
|
18
|
-
# $ ruby demo_kegg_taxonomy.rb file
|
19
|
-
#
|
20
|
-
# Optionally, when a file containing organisms list (1 line per 1 organism)
|
21
|
-
# is specified after the file, only the specified organisms are shown.
|
22
|
-
#
|
23
|
-
# $ ruby demo_kegg_taxonomy.rb kegg_taxonomy_file org_list_file
|
24
|
-
#
|
25
|
-
# == Example of running this script
|
26
|
-
#
|
27
|
-
# Download test data.
|
28
|
-
#
|
29
|
-
# $ wget ftp://ftp.genome.jp/pub/kegg/genes/taxonomy
|
30
|
-
#
|
31
|
-
# The downloaded filename is "taxonomy".
|
32
|
-
#
|
33
|
-
# Run this script.
|
34
|
-
#
|
35
|
-
# $ ruby -Ilib sample/demo_kegg_taxonomy.rb taxonomy
|
36
|
-
#
|
37
|
-
# == Development information
|
38
|
-
#
|
39
|
-
# The code was moved from lib/bio/db/kegg/taxonomy.rb.
|
40
|
-
#
|
41
|
-
|
42
|
-
require 'bio'
|
43
|
-
|
44
|
-
#if __FILE__ == $0
|
45
|
-
|
46
|
-
# Usage:
|
47
|
-
# % wget ftp://ftp.genome.jp/pub/kegg/genes/taxonomy
|
48
|
-
# % ruby taxonomy.rb taxonomy | less -S
|
49
|
-
|
50
|
-
taxonomy = ARGV.shift
|
51
|
-
org_list = ARGV.shift || nil
|
52
|
-
|
53
|
-
if org_list
|
54
|
-
orgs = File.readlines(org_list).map{|x| x.strip}
|
55
|
-
else
|
56
|
-
orgs = nil
|
57
|
-
end
|
58
|
-
|
59
|
-
tree = Bio::KEGG::Taxonomy.new(taxonomy, orgs)
|
60
|
-
|
61
|
-
puts ">>> tree - original"
|
62
|
-
puts tree
|
63
|
-
|
64
|
-
puts ">>> tree - after compact"
|
65
|
-
tree.compact
|
66
|
-
puts tree
|
67
|
-
|
68
|
-
puts ">>> tree - after reduce"
|
69
|
-
tree.reduce
|
70
|
-
puts tree
|
71
|
-
|
72
|
-
puts ">>> path - sorted"
|
73
|
-
tree.path.sort.each do |path|
|
74
|
-
puts path.join("/")
|
75
|
-
end
|
76
|
-
|
77
|
-
puts ">>> group : orgs"
|
78
|
-
tree.dfs(tree.root) do |parent, children|
|
79
|
-
if orgs = tree.organisms(parent)
|
80
|
-
puts "#{parent.ljust(30)} (#{orgs.size})\t#{orgs.join(', ')}"
|
81
|
-
end
|
82
|
-
end
|
83
|
-
|
84
|
-
puts ">>> group : subgroups"
|
85
|
-
tree.dfs_with_level(tree.root) do |parent, children, level|
|
86
|
-
subgroups = children.keys.sort
|
87
|
-
indent = " " * level
|
88
|
-
label = "#{indent} #{level} #{parent}"
|
89
|
-
puts "#{label.ljust(35)}\t#{subgroups.join(', ')}"
|
90
|
-
end
|
91
|
-
|
92
|
-
#end
|
data/sample/demo_keggapi.rb
DELETED
@@ -1,502 +0,0 @@
|
|
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
|
-
|