Class: Bio::Hinv
Overview
Bio::Hinv
Accessing the H-invDB web services.
Defined Under Namespace
Modules: Common Classes: Acc2hit, Hit2acc, HitCnt, HitDefinition, HitPubmedId, HitXML, Hix2hit, HixCnt, HixRepresent, HixXML, IdSearch, KeywordSearch
Constant Summary collapse
- BASE_URI =
"http://www.jbirc.aist.go.jp/hinv/hws/"
Class Method Summary collapse
-
.acc2hit(acc) ⇒ Object
Bio::Hinv.acc2hit(“BC053657”) # => “HIT000053961”.
-
.hit2acc(hit) ⇒ Object
Bio::Hinv.hit2acc(“HIT000022181”) # => “AK097327”.
-
.hit_cnt ⇒ Object
Bio::Hinv.hit_cnt # => 187156.
-
.hit_definition(hit) ⇒ Object
Bio::Hinv.hit_definition(“HIT000000001”) # => “Rho guanine …”.
-
.hit_pubmedid(hit) ⇒ Object
Bio::Hinv.hit_pubmedid(“HIT000053961”) # => [7624364, 11279095, … ].
-
.hit_xml(hit) ⇒ Object
Bio::Hinv.hit_xml(“HIT000000001”) # => “<?xml version=”1.0“ …”.
-
.hix2hit(hix) ⇒ Object
Bio::Hinv.hix2hit(“HIX0000004”) # => [“HIT000012846”, … ].
-
.hix_cnt ⇒ Object
Bio::Hinv.hix_cnt # => 36073.
-
.hix_represent(hix) ⇒ Object
Bio::Hinv.hix_represent(“HIX0000001”) # => “HIT000022181”.
-
.id_search(query) ⇒ Object
Bio::Hinv.id_search(“HIT00002218*”) # => [“HIT000022181”, … ].
-
.keyword_search(query) ⇒ Object
Bio::Hinv.keyword_search(“HIT00002218*”) # => [“HIT000022181”, … ].
Class Method Details
.acc2hit(acc) ⇒ Object
Bio::Hinv.acc2hit(“BC053657”) # => “HIT000053961”
36 37 38 39 40 |
# File 'lib/bio/io/hinv.rb', line 36 def self.acc2hit(acc) serv = Acc2hit.new serv.query("acc" => acc) serv.result end |
.hit2acc(hit) ⇒ Object
Bio::Hinv.hit2acc(“HIT000022181”) # => “AK097327”
43 44 45 46 47 |
# File 'lib/bio/io/hinv.rb', line 43 def self.hit2acc(hit) serv = Hit2acc.new serv.query("hit" => hit) serv.result end |
.hit_cnt ⇒ Object
Bio::Hinv.hit_cnt # => 187156
50 51 52 53 54 |
# File 'lib/bio/io/hinv.rb', line 50 def self.hit_cnt serv = HitCnt.new serv.query serv.result end |
.hit_definition(hit) ⇒ Object
Bio::Hinv.hit_definition(“HIT000000001”) # => “Rho guanine …”
57 58 59 60 61 |
# File 'lib/bio/io/hinv.rb', line 57 def self.hit_definition(hit) serv = HitDefinition.new serv.query("hit" => hit) serv.result end |
.hit_pubmedid(hit) ⇒ Object
Bio::Hinv.hit_pubmedid(“HIT000053961”) # => [7624364, 11279095, … ]
64 65 66 67 68 |
# File 'lib/bio/io/hinv.rb', line 64 def self.hit_pubmedid(hit) serv = HitPubmedId.new serv.query("hit" => hit) serv.result end |
.hit_xml(hit) ⇒ Object
Bio::Hinv.hit_xml(“HIT000000001”) # => “<?xml version=”1.0“ …”
71 72 73 74 75 |
# File 'lib/bio/io/hinv.rb', line 71 def self.hit_xml(hit) serv = Bio::Hinv::HitXML.new serv.query("hit" => hit) puts serv.result end |
.hix2hit(hix) ⇒ Object
Bio::Hinv.hix2hit(“HIX0000004”) # => [“HIT000012846”, … ]
78 79 80 81 82 |
# File 'lib/bio/io/hinv.rb', line 78 def self.hix2hit(hix) serv = Bio::Hinv::Hix2hit.new serv.query("hix" => hix) serv.result end |
.hix_cnt ⇒ Object
Bio::Hinv.hix_cnt # => 36073
85 86 87 88 89 |
# File 'lib/bio/io/hinv.rb', line 85 def self.hix_cnt serv = HixCnt.new serv.query serv.result end |
.hix_represent(hix) ⇒ Object
Bio::Hinv.hix_represent(“HIX0000001”) # => “HIT000022181”
92 93 94 95 96 |
# File 'lib/bio/io/hinv.rb', line 92 def self.hix_represent(hix) serv = HixRepresent.new serv.query("hix" => hix) serv.result end |
.id_search(query) ⇒ Object
Bio::Hinv.id_search(“HIT00002218*”) # => [“HIT000022181”, … ]
99 100 101 102 103 |
# File 'lib/bio/io/hinv.rb', line 99 def self.id_search(query) serv = IdSearch.new serv.query("query" => query) serv.result end |
.keyword_search(query) ⇒ Object
Bio::Hinv.keyword_search(“HIT00002218*”) # => [“HIT000022181”, … ]
106 107 108 109 110 |
# File 'lib/bio/io/hinv.rb', line 106 def self.keyword_search(query) serv = KeywordSearch.new serv.query("query" => query) serv.result end |