class Bio::Hinv::HitPubmedId
serv = Bio::Hinv::HitPubmedId.new
serv.query(“hit” => “HIT000053961”) puts serv.result
Public Class Methods
new()
click to toggle source
# File lib/bio/io/hinv.rb 235 def initialize 236 @url = BASE_URI + "hit_pubmedid.php" 237 end
Public Instance Methods
result()
click to toggle source
<?xml version=‘1.0’ encoding=‘UTF-8’?> <H-Inv>
<CDNA_DB-REFERENCE_PUBMED>7624364</CDNA_DB-REFERENCE_PUBMED> <CDNA_DB-REFERENCE_PUBMED>11279095</CDNA_DB-REFERENCE_PUBMED> <CDNA_DB-REFERENCE_PUBMED>15489334</CDNA_DB-REFERENCE_PUBMED>
</H-Inv>
# File lib/bio/io/hinv.rb 245 def result 246 list = [] 247 @xml.elements.each('//CDNA_DB-REFERENCE_PUBMED') do |e| 248 list << e.text.to_i 249 end 250 return list 251 end