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
data/lib/bio/io/ebisoap.rb
DELETED
@@ -1,158 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# = bio/io/emblsoap.rb - EBI SOAP server access class
|
3
|
-
#
|
4
|
-
# Copyright:: Copyright (C) 2006
|
5
|
-
# Toshiaki Katayama <k@bioruby.org>
|
6
|
-
# License:: The Ruby License
|
7
|
-
#
|
8
|
-
# $Id: ebisoap.rb,v 1.3 2007/04/05 23:35:41 trevor Exp $
|
9
|
-
#
|
10
|
-
|
11
|
-
require 'bio/io/soapwsdl'
|
12
|
-
|
13
|
-
module Bio
|
14
|
-
class EBI
|
15
|
-
|
16
|
-
class SOAP < Bio::SOAPWSDL
|
17
|
-
|
18
|
-
BASE_URI = "http://www.ebi.ac.uk/Tools/webservices/wsdl/"
|
19
|
-
|
20
|
-
# set default to Dbfetch
|
21
|
-
SERVER_URI = BASE_URI + "WSDbfetch.wsdl"
|
22
|
-
|
23
|
-
def initialize(wsdl = nil)
|
24
|
-
super(wsdl || self.class::SERVER_URI)
|
25
|
-
end
|
26
|
-
|
27
|
-
# * fetchData
|
28
|
-
# * getSupportedDBs
|
29
|
-
# * getSupportedFormats
|
30
|
-
# * getSupportedStyles
|
31
|
-
class Dbfetch < Bio::EBI::SOAP
|
32
|
-
SERVER_URI = BASE_URI + "WSDbfetch.wsdl"
|
33
|
-
end
|
34
|
-
|
35
|
-
# * checkStatus
|
36
|
-
# * doIprscan
|
37
|
-
# * getResults
|
38
|
-
# * poll
|
39
|
-
# * polljob
|
40
|
-
# * runInterProScan
|
41
|
-
# * test
|
42
|
-
class InterProScan < Bio::EBI::SOAP
|
43
|
-
SERVER_URI = BASE_URI + "WSInterProScan.wsdl"
|
44
|
-
end
|
45
|
-
|
46
|
-
# * checkStatus
|
47
|
-
# * getInfo
|
48
|
-
# * getResults
|
49
|
-
# * getTools
|
50
|
-
# * poll
|
51
|
-
# * run
|
52
|
-
# * test
|
53
|
-
class Emboss < Bio::EBI::SOAP
|
54
|
-
SERVER_URI = BASE_URI + "WSEmboss.wsdl"
|
55
|
-
end
|
56
|
-
|
57
|
-
# * checkStatus
|
58
|
-
# * getResults
|
59
|
-
# * poll
|
60
|
-
# * runClustalW
|
61
|
-
# * test
|
62
|
-
class ClustalW < Bio::EBI::SOAP
|
63
|
-
SERVER_URI = BASE_URI + "WSClustalW.wsdl"
|
64
|
-
end
|
65
|
-
|
66
|
-
# * checkStatus
|
67
|
-
# * getResults
|
68
|
-
# * poll
|
69
|
-
# * runTCoffee
|
70
|
-
class TCoffee < Bio::EBI::SOAP
|
71
|
-
SERVER_URI = BASE_URI + "WSTCoffee.wsdl"
|
72
|
-
end
|
73
|
-
|
74
|
-
# * checkStatus
|
75
|
-
# * getResults
|
76
|
-
# * poll
|
77
|
-
# * runMuscle
|
78
|
-
# * test
|
79
|
-
class Muscle < Bio::EBI::SOAP
|
80
|
-
SERVER_URI = BASE_URI + "WSMuscle.wsdl"
|
81
|
-
end
|
82
|
-
|
83
|
-
# * checkStatus
|
84
|
-
# * doFasta
|
85
|
-
# * getResults
|
86
|
-
# * poll
|
87
|
-
# * polljob
|
88
|
-
# * runFasta
|
89
|
-
class Fasta < Bio::EBI::SOAP
|
90
|
-
SERVER_URI = BASE_URI + "WSFasta.wsdl"
|
91
|
-
end
|
92
|
-
|
93
|
-
# * checkStatus
|
94
|
-
# * doWUBlast
|
95
|
-
# * getIds
|
96
|
-
# * getResults
|
97
|
-
# * poll
|
98
|
-
# * polljob
|
99
|
-
# * runWUBlast
|
100
|
-
# * test
|
101
|
-
class WUBlast < Bio::EBI::SOAP
|
102
|
-
SERVER_URI = BASE_URI + "WSWUBlast.wsdl"
|
103
|
-
end
|
104
|
-
|
105
|
-
# * checkStatus
|
106
|
-
# * getResults
|
107
|
-
# * poll
|
108
|
-
# * runMPsrch
|
109
|
-
# * test
|
110
|
-
class MPsrch < Bio::EBI::SOAP
|
111
|
-
SERVER_URI = BASE_URI + "WSMPsrch.wsdl"
|
112
|
-
end
|
113
|
-
|
114
|
-
# * checkStatus
|
115
|
-
# * getResults
|
116
|
-
# * poll
|
117
|
-
# * runScanPS
|
118
|
-
# * test
|
119
|
-
class ScanPS < Bio::EBI::SOAP
|
120
|
-
SERVER_URI = BASE_URI + "WSScanPS.wsdl"
|
121
|
-
end
|
122
|
-
|
123
|
-
class MSD < Bio::EBI::SOAP
|
124
|
-
SERVER_URI = "http://www.ebi.ac.uk/msd-srv/docs/api/msd_soap_service.wsdl"
|
125
|
-
end
|
126
|
-
|
127
|
-
class Ontology < Bio::EBI::SOAP
|
128
|
-
SERVER_URI = "http://www.ebi.ac.uk/ontology-lookup/OntologyQuery.wsdl"
|
129
|
-
end
|
130
|
-
|
131
|
-
class Citation < Bio::EBI::SOAP
|
132
|
-
SERVER_URI = "http://www.ebi.ac.uk/citations/webservices/wsdl"
|
133
|
-
end
|
134
|
-
|
135
|
-
end # SOAP
|
136
|
-
|
137
|
-
end # EBI
|
138
|
-
end # Bio
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
if __FILE__ == $0
|
143
|
-
serv = Bio::EBI::SOAP::Dbfetch.new
|
144
|
-
p serv.getSupportedDBs
|
145
|
-
|
146
|
-
require 'base64'
|
147
|
-
|
148
|
-
serv = Bio::EBI::SOAP::Emboss.new
|
149
|
-
hash = {"tool" => "water",
|
150
|
-
"asequence" => "uniprot:alk1_human",
|
151
|
-
"bsequence" => "uniprot:alk1_mouse",
|
152
|
-
"email" => "ebisoap@example.org"}
|
153
|
-
poll = serv.run(hash, [])
|
154
|
-
puts poll
|
155
|
-
base = serv.poll(poll, "tooloutput")
|
156
|
-
puts Base64.decode64(base)
|
157
|
-
end
|
158
|
-
|
data/lib/bio/io/ensembl.rb
DELETED
@@ -1,229 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# = bio/io/ensembl.rb - An Ensembl Genome Browser client.
|
3
|
-
#
|
4
|
-
# Copyright:: Copyright (C) 2006
|
5
|
-
# Mitsuteru C. Nakao <n@bioruby.org>
|
6
|
-
# License:: The Ruby License
|
7
|
-
#
|
8
|
-
# $Id:$
|
9
|
-
#
|
10
|
-
# == Description
|
11
|
-
#
|
12
|
-
# Client classes for Ensembl Genome Browser.
|
13
|
-
#
|
14
|
-
# == Examples
|
15
|
-
#
|
16
|
-
# human = Bio::Ensembl.new('Homo_sapiens')
|
17
|
-
# seq = human.exportview(1, 1000, 100000)
|
18
|
-
# gff = human.exportview(1, 1000, 100000, ['gene', 'variation', 'genscan'])
|
19
|
-
#
|
20
|
-
# human = Bio::Ensembl.human
|
21
|
-
# seq = human.exportview(1, 1000, 100000)
|
22
|
-
# gff = human.exportview(1, 1000, 100000, ['gene'])
|
23
|
-
#
|
24
|
-
# seq = Bio::Ensembl.human.exportview(1, 1000, 100000)
|
25
|
-
# gff = Bio::Ensembl.human.exportview(1, 1000, 100000, ['gene', 'variation', 'genscan'])
|
26
|
-
#
|
27
|
-
#
|
28
|
-
# == References
|
29
|
-
#
|
30
|
-
# * Ensembl
|
31
|
-
# http:/www.ensembl.org/
|
32
|
-
#
|
33
|
-
|
34
|
-
require 'bio/command'
|
35
|
-
|
36
|
-
module Bio
|
37
|
-
|
38
|
-
# == Description
|
39
|
-
#
|
40
|
-
# An Ensembl Genome Browser client class.
|
41
|
-
#
|
42
|
-
# == Examples
|
43
|
-
#
|
44
|
-
# human = Bio::Ensembl.new('Homo_sapiens')
|
45
|
-
# seq = human.exportview(1, 1000, 100000)
|
46
|
-
# gff = human.exportview(1, 1000, 100000, ['gene'])
|
47
|
-
#
|
48
|
-
# mouse = Bio::Ensembl.new('Mus_musculus')
|
49
|
-
# seq = mouse.exportview(1, 1000, 100000)
|
50
|
-
# gff = mouse.exportview(1, 1000, 100000, ['gene', 'variation', 'genscan'])
|
51
|
-
#
|
52
|
-
# rice = Bio::Enesmbl.new('Oryza_sativa', 'http://www.gramene.org')
|
53
|
-
# seq = rice.exportview(1, 1000, 100000)
|
54
|
-
#
|
55
|
-
# == References
|
56
|
-
#
|
57
|
-
# * Ensembl
|
58
|
-
# http:/www.ensembl.org/
|
59
|
-
#
|
60
|
-
# * GRAMENE
|
61
|
-
# http://www.gramene.org/
|
62
|
-
#
|
63
|
-
class Ensembl
|
64
|
-
|
65
|
-
ENSEMBL_URL = 'http://www.ensembl.org'
|
66
|
-
|
67
|
-
# Server URL (ex. 'http://www.ensembl.org')
|
68
|
-
attr_reader :server
|
69
|
-
|
70
|
-
# Organism name. (ex. 'Homo_sapiens').
|
71
|
-
attr_reader :organism
|
72
|
-
|
73
|
-
def initialize(organism, server = nil)
|
74
|
-
@server = server || ENSEMBL_URL
|
75
|
-
@organism = organism
|
76
|
-
@uri = [ @server.chomp('/'), @organism ].join('/')
|
77
|
-
end
|
78
|
-
|
79
|
-
def self.human
|
80
|
-
self.new("Homo_sapiens")
|
81
|
-
end
|
82
|
-
|
83
|
-
def self.mouse
|
84
|
-
self.new("Mus_musculus")
|
85
|
-
end
|
86
|
-
|
87
|
-
# Ensembl ExportView Client.
|
88
|
-
#
|
89
|
-
# Retrieve genomic sequence/features from Ensembl ExportView in plain text.
|
90
|
-
# Ensembl ExportView exports genomic data (sequence and features) in
|
91
|
-
# several file formats including fasta, GFF and tab.
|
92
|
-
#
|
93
|
-
# * ExportViwe (http://www.ensembl.org/Homo_sapiens/exportview).
|
94
|
-
#
|
95
|
-
# == Examples
|
96
|
-
#
|
97
|
-
# human = Bio::Ensembl.new('Homo_sapiens')
|
98
|
-
# or
|
99
|
-
# human = Bio::Ensembl.human
|
100
|
-
#
|
101
|
-
# # Genomic sequence in Fasta format
|
102
|
-
# human.exportview(:seq_region_name => 1,
|
103
|
-
# :anchor1 => 1149206, :anchor2 => 1149229)
|
104
|
-
# human.exportview(1, 1149206, 1149229)
|
105
|
-
#
|
106
|
-
# # Feature in GFF
|
107
|
-
# human.exportview(:seq_region_name => 1,
|
108
|
-
# :anchor1 => 1149206, :anchor2 => 1150000,
|
109
|
-
# :options => ['similarity', 'repeat',
|
110
|
-
# 'genscan', 'variation', 'gene'])
|
111
|
-
# human.exportview(1, 1149206, 1150000, ['variation', 'gene'])
|
112
|
-
#
|
113
|
-
# Feature in TAB
|
114
|
-
# human.exportview(:seq_region_name => 1,
|
115
|
-
# :anchor1 => 1149206, :anchor2 => 1150000,
|
116
|
-
# :options => ['similarity', 'repeat',
|
117
|
-
# 'genscan', 'variation', 'gene'],
|
118
|
-
# :format => 'tab')
|
119
|
-
#
|
120
|
-
# == Arguments
|
121
|
-
#
|
122
|
-
# Bio::Ensembl#exportview method allow both orderd arguments and
|
123
|
-
# named arguments. (Note: mandatory arguments are marked by '*').
|
124
|
-
#
|
125
|
-
# === Orderd Arguments
|
126
|
-
#
|
127
|
-
# 1. seq_region_name - Chromosome number (*)
|
128
|
-
# 2. anchor1 - From coordination (*)
|
129
|
-
# 3. anchor2 - To coordination (*)
|
130
|
-
# 4. options - Features to export (in :format => 'gff' or 'tab')
|
131
|
-
# ['similarity', 'repeat', 'genscan', 'variation',
|
132
|
-
# 'gene']
|
133
|
-
#
|
134
|
-
# === Named Arguments
|
135
|
-
#
|
136
|
-
# * :seq_region_name - Chromosome number (*)
|
137
|
-
# * :anchor1 - From coordination (*)
|
138
|
-
# * :anchor2 - To coordination (*)
|
139
|
-
# * :type1 - From coordination type ['bp', ]
|
140
|
-
# * :type2 - To coordination type ['bp', ]
|
141
|
-
# * :upstream - Bp upstream
|
142
|
-
# * :downstream - Bp downstream
|
143
|
-
# * :format - File format ['fasta', 'gff', 'tab']
|
144
|
-
# * :options - Features to export (for :format => 'gff' or 'tab')
|
145
|
-
# ['similarity', 'repeat', 'genscan', 'variation',
|
146
|
-
# 'gene']
|
147
|
-
#
|
148
|
-
def exportview(*args)
|
149
|
-
defaults = {
|
150
|
-
:type1 => 'bp',
|
151
|
-
:type2 => 'bp',
|
152
|
-
:downstream => '',
|
153
|
-
:upstream => '',
|
154
|
-
:format => 'fasta',
|
155
|
-
:options => [],
|
156
|
-
:action => 'export',
|
157
|
-
:_format => 'Text',
|
158
|
-
:output => 'txt',
|
159
|
-
:submit => 'Continue >>'
|
160
|
-
}
|
161
|
-
|
162
|
-
if args.first.class == Hash
|
163
|
-
options = args.first
|
164
|
-
if options[:options] and options[:format] != 'fasta' and options[:format] != 'tab'
|
165
|
-
options.update({:format => 'gff'})
|
166
|
-
end
|
167
|
-
else
|
168
|
-
options = {
|
169
|
-
:seq_region_name => args[0],
|
170
|
-
:anchor1 => args[1],
|
171
|
-
:anchor2 => args[2],
|
172
|
-
}
|
173
|
-
|
174
|
-
case args[3]
|
175
|
-
when Array
|
176
|
-
options.update({:format => 'gff', :options => args[3]})
|
177
|
-
when Hash
|
178
|
-
options.update(args[3])
|
179
|
-
end
|
180
|
-
|
181
|
-
if args[4].class == Hash
|
182
|
-
options.update(args[4])
|
183
|
-
end
|
184
|
-
end
|
185
|
-
|
186
|
-
params = defaults.update(options)
|
187
|
-
|
188
|
-
result = Bio::Command.post_form("#{@uri}/exportview", params)
|
189
|
-
|
190
|
-
return result.body
|
191
|
-
end
|
192
|
-
|
193
|
-
end # class Ensembl
|
194
|
-
|
195
|
-
end # module Bio
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
# Codes for backward-compatibility.
|
200
|
-
#
|
201
|
-
class Bio::Ensembl
|
202
|
-
EBIServerURI = ENSEMBL_URL
|
203
|
-
|
204
|
-
def self.server_uri(uri = nil)
|
205
|
-
if uri
|
206
|
-
@uri = uri
|
207
|
-
else
|
208
|
-
@uri || EBIServerURI
|
209
|
-
end
|
210
|
-
end
|
211
|
-
|
212
|
-
class Base
|
213
|
-
def self.exportview(*args)
|
214
|
-
Bio::Ensembl.new(Organism).exportview(*args)
|
215
|
-
end
|
216
|
-
end
|
217
|
-
|
218
|
-
class Human < Base
|
219
|
-
Organism = Bio::Ensembl.human.organism
|
220
|
-
end
|
221
|
-
|
222
|
-
class Mouse < Base
|
223
|
-
Organism = Bio::Ensembl.mouse.organism
|
224
|
-
end
|
225
|
-
end # class Bio::Ensembl
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
data/lib/bio/io/higet.rb
DELETED
@@ -1,73 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# = bio/io/higet.rb - SOAP interface for HGC HiGet
|
3
|
-
#
|
4
|
-
# Copyright:: Copyright (C) 2005 Toshiaki Katayama <k@bioruby.org>
|
5
|
-
#
|
6
|
-
# $Id: higet.rb,v 1.3 2006/09/19 05:46:22 k Exp $
|
7
|
-
#
|
8
|
-
|
9
|
-
require 'bio/io/soapwsdl'
|
10
|
-
|
11
|
-
module Bio
|
12
|
-
class HGC
|
13
|
-
|
14
|
-
# == Description
|
15
|
-
#
|
16
|
-
# Interface for the HiGet service provided by Human Genome Center (HGC), Japan.
|
17
|
-
# HiGet performs full-text search against various biological databases.
|
18
|
-
#
|
19
|
-
# == References
|
20
|
-
#
|
21
|
-
# * http://higet.hgc.jp/
|
22
|
-
#
|
23
|
-
class HiGet < Bio::SOAPWSDL
|
24
|
-
|
25
|
-
SERVER_URI = "http://higet.hgc.jp/soap/higet.wsdl"
|
26
|
-
|
27
|
-
def initialize(wsdl = nil)
|
28
|
-
super(wsdl || SERVER_URI)
|
29
|
-
end
|
30
|
-
|
31
|
-
def higet_in_fasta(db, entries)
|
32
|
-
self.higet(db, entries, "-d fasta")
|
33
|
-
end
|
34
|
-
|
35
|
-
def higet_in_xml(db, entries)
|
36
|
-
self.higet(db, entries, "-d xml")
|
37
|
-
end
|
38
|
-
|
39
|
-
end
|
40
|
-
|
41
|
-
end # HGC
|
42
|
-
end # Bio
|
43
|
-
|
44
|
-
|
45
|
-
if __FILE__ == $0
|
46
|
-
|
47
|
-
begin
|
48
|
-
require 'pp'
|
49
|
-
alias p pp
|
50
|
-
rescue LoadError
|
51
|
-
end
|
52
|
-
|
53
|
-
puts ">>> Bio::HGC::HiGet"
|
54
|
-
serv = Bio::HGC::HiGet.new
|
55
|
-
serv.log = STDERR
|
56
|
-
|
57
|
-
puts "### HiFind"
|
58
|
-
puts serv.hifind("genbank", "human kinase", "-l 10")
|
59
|
-
|
60
|
-
puts "### HiGet"
|
61
|
-
puts serv.higet("genbank", "S40289", "")
|
62
|
-
|
63
|
-
puts "### HiGet (FASTA)"
|
64
|
-
puts serv.higet("genbank", "S40289", "-d fasta")
|
65
|
-
|
66
|
-
puts "### HiGet higet_in_fasta"
|
67
|
-
puts serv.higet_in_fasta("genbank", "S40289")
|
68
|
-
|
69
|
-
puts "### HiGet higet_in_xml"
|
70
|
-
puts serv.higet_in_xml("genbank", "S40289")
|
71
|
-
|
72
|
-
end
|
73
|
-
|