Class: Bio::Hinv::HixRepresent

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

Overview

serv = Bio::Hinv::HixRepresent.new serv.query(“hix” => “HIX0000001”) puts serv.result puts serv.rep_h_invitational_id puts serv.rep_accession_no

Instance Method Summary collapse

Methods included from Common

#query

Constructor Details

#initializeHixRepresent

Returns a new instance of HixRepresent.



335
336
337
# File 'lib/bio/io/hinv.rb', line 335

def initialize
  @url = BASE_URI + "hix_represent.php"
end

Instance Method Details

#rep_accession_noObject



352
353
354
# File 'lib/bio/io/hinv.rb', line 352

def rep_accession_no
  @xml.elements['//REP-ACCESSION-NO'].text
end

#resultObject Also known as: rep_h_invitational_id

<?xml version=‘1.0’ encoding=‘UTF-8’?> <H-Inv>

<LOCUS>
 <CLUSTER-ID>HIX0000001</CLUSTER-ID>
 <REP-H-INVITATIONAL-ID>HIT000022181</REP-H-INVITATIONAL-ID>
 <REP-ACCESSION-NO>AK097327</REP-ACCESSION-NO>
</LOCUS>

</H-Inv>



347
348
349
# File 'lib/bio/io/hinv.rb', line 347

def result
  @xml.elements['//REP-H-INVITATIONAL-ID'].text
end