Class: Bio::BlastXMLParser::NokogiriBlastHsp

Inherits:
Object
  • Object
show all
Includes:
MapXPath
Defined in:
lib/bio/db/blast/parser/nokogiri.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from MapXPath

#[], define_f, define_i, define_s

Methods included from XPath

#field

Constructor Details

#initialize(xml, parent) ⇒ NokogiriBlastHsp

Returns a new instance of NokogiriBlastHsp.



76
77
78
79
# File 'lib/bio/db/blast/parser/nokogiri.rb', line 76

def initialize xml, parent
  @xml = xml
  @parent = parent
end

Instance Attribute Details

#parentObject (readonly)

Returns the value of attribute parent.



56
57
58
# File 'lib/bio/db/blast/parser/nokogiri.rb', line 56

def parent
  @parent
end

Instance Method Details

#to_sObject



81
82
83
84
85
# File 'lib/bio/db/blast/parser/nokogiri.rb', line 81

def to_s
  s = <<EOM
  hit_num=#{parent.hit_num}, hsp_num=#{hsp_num}, score=#{score}, bit_score=#{bit_score}
EOM
end