Class: Bio::Hinv

Inherits:
Object show all
Defined in:
lib/bio/io/hinv.rb

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

BASE_URI =
"http://www.jbirc.aist.go.jp/hinv/hws/"

Class Method Summary (collapse)

Class Method Details

+ (Object) acc2hit(acc)

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

+ (Object) hit2acc(hit)

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

+ (Object) hit_cnt

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

+ (Object) hit_definition(hit)

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

+ (Object) hit_pubmedid(hit)

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

+ (Object) hit_xml(hit)

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

+ (Object) hix2hit(hix)

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

+ (Object) hix_cnt

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

+ (Object) hix_represent(hix)

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

+ (Object) id_search(query)

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

+ (Object) keyword_search(query)

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