Class: Bio::LazyBlast::Report::Iteration::Hit::Hsp
- Inherits:
-
Object
- Object
- Bio::LazyBlast::Report::Iteration::Hit::Hsp
- Defined in:
- lib/bio/appl/blast/lazyblastxml.rb
Instance Attribute Summary collapse
-
#align_len ⇒ Object
readonly
Returns the value of attribute align_len.
-
#bit_score ⇒ Object
readonly
Returns the value of attribute bit_score.
-
#density ⇒ Object
readonly
Returns the value of attribute density.
-
#evalue ⇒ Object
readonly
Returns the value of attribute evalue.
-
#gaps ⇒ Object
readonly
Returns the value of attribute gaps.
-
#hit_frame ⇒ Object
readonly
Returns the value of attribute hit_frame.
-
#hit_from ⇒ Object
readonly
Returns the value of attribute hit_from.
-
#hit_to ⇒ Object
readonly
Returns the value of attribute hit_to.
-
#hseq ⇒ Object
readonly
Returns the value of attribute hseq.
-
#identity ⇒ Object
readonly
Returns the value of attribute identity.
-
#midline ⇒ Object
readonly
Returns the value of attribute midline.
-
#mismatch_count ⇒ Object
readonly
Returns the value of attribute mismatch_count.
-
#num ⇒ Object
readonly
Returns the value of attribute num.
-
#percent_identity ⇒ Object
readonly
Returns the value of attribute percent_identity.
-
#positive ⇒ Object
readonly
Returns the value of attribute positive.
-
#qseq ⇒ Object
readonly
Returns the value of attribute qseq.
-
#query_frame ⇒ Object
readonly
Returns the value of attribute query_frame.
-
#query_from ⇒ Object
readonly
Returns the value of attribute query_from.
-
#query_to ⇒ Object
readonly
Returns the value of attribute query_to.
Instance Method Summary collapse
-
#initialize(reader) ⇒ Hsp
constructor
A new instance of Hsp.
- #setup_hsp_values ⇒ Object
Constructor Details
#initialize(reader) ⇒ Hsp
Returns a new instance of Hsp.
141 142 143 144 145 146 147 148 |
# File 'lib/bio/appl/blast/lazyblastxml.rb', line 141 def initialize(reader) @nodes = Enumerator.new do |yielder| until (reader.name == "Hsp" and reader.node_type == LibXML::XML::Reader::TYPE_END_ELEMENT) or !reader.read yielder << reader if reader.node_type == LibXML::XML::Reader::TYPE_ELEMENT end end setup_hsp_values end |
Instance Attribute Details
#align_len ⇒ Object (readonly)
Returns the value of attribute align_len.
139 140 141 |
# File 'lib/bio/appl/blast/lazyblastxml.rb', line 139 def align_len @align_len end |
#bit_score ⇒ Object (readonly)
Returns the value of attribute bit_score.
139 140 141 |
# File 'lib/bio/appl/blast/lazyblastxml.rb', line 139 def bit_score @bit_score end |
#density ⇒ Object (readonly)
Returns the value of attribute density.
139 140 141 |
# File 'lib/bio/appl/blast/lazyblastxml.rb', line 139 def density @density end |
#evalue ⇒ Object (readonly)
Returns the value of attribute evalue.
139 140 141 |
# File 'lib/bio/appl/blast/lazyblastxml.rb', line 139 def evalue @evalue end |
#gaps ⇒ Object (readonly)
Returns the value of attribute gaps.
139 140 141 |
# File 'lib/bio/appl/blast/lazyblastxml.rb', line 139 def gaps @gaps end |
#hit_frame ⇒ Object (readonly)
Returns the value of attribute hit_frame.
139 140 141 |
# File 'lib/bio/appl/blast/lazyblastxml.rb', line 139 def hit_frame @hit_frame end |
#hit_from ⇒ Object (readonly)
Returns the value of attribute hit_from.
139 140 141 |
# File 'lib/bio/appl/blast/lazyblastxml.rb', line 139 def hit_from @hit_from end |
#hit_to ⇒ Object (readonly)
Returns the value of attribute hit_to.
139 140 141 |
# File 'lib/bio/appl/blast/lazyblastxml.rb', line 139 def hit_to @hit_to end |
#hseq ⇒ Object (readonly)
Returns the value of attribute hseq.
139 140 141 |
# File 'lib/bio/appl/blast/lazyblastxml.rb', line 139 def hseq @hseq end |
#identity ⇒ Object (readonly)
Returns the value of attribute identity.
139 140 141 |
# File 'lib/bio/appl/blast/lazyblastxml.rb', line 139 def identity @identity end |
#midline ⇒ Object (readonly)
Returns the value of attribute midline.
139 140 141 |
# File 'lib/bio/appl/blast/lazyblastxml.rb', line 139 def midline @midline end |
#mismatch_count ⇒ Object (readonly)
Returns the value of attribute mismatch_count.
139 140 141 |
# File 'lib/bio/appl/blast/lazyblastxml.rb', line 139 def mismatch_count @mismatch_count end |
#num ⇒ Object (readonly)
Returns the value of attribute num.
139 140 141 |
# File 'lib/bio/appl/blast/lazyblastxml.rb', line 139 def num @num end |
#percent_identity ⇒ Object (readonly)
Returns the value of attribute percent_identity.
139 140 141 |
# File 'lib/bio/appl/blast/lazyblastxml.rb', line 139 def percent_identity @percent_identity end |
#positive ⇒ Object (readonly)
Returns the value of attribute positive.
139 140 141 |
# File 'lib/bio/appl/blast/lazyblastxml.rb', line 139 def positive @positive end |
#qseq ⇒ Object (readonly)
Returns the value of attribute qseq.
139 140 141 |
# File 'lib/bio/appl/blast/lazyblastxml.rb', line 139 def qseq @qseq end |
#query_frame ⇒ Object (readonly)
Returns the value of attribute query_frame.
139 140 141 |
# File 'lib/bio/appl/blast/lazyblastxml.rb', line 139 def query_frame @query_frame end |
#query_from ⇒ Object (readonly)
Returns the value of attribute query_from.
139 140 141 |
# File 'lib/bio/appl/blast/lazyblastxml.rb', line 139 def query_from @query_from end |
#query_to ⇒ Object (readonly)
Returns the value of attribute query_to.
139 140 141 |
# File 'lib/bio/appl/blast/lazyblastxml.rb', line 139 def query_to @query_to end |
Instance Method Details
#setup_hsp_values ⇒ Object
150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 |
# File 'lib/bio/appl/blast/lazyblastxml.rb', line 150 def setup_hsp_values @nodes.each do |node| case node.name when 'Hsp_num' @num = node.read_inner_xml.to_i when 'Hsp_bit-score' @bit_score = node.read_inner_xml.to_f when 'Hsp_evalue' @evalue = node.read_inner_xml.to_f when 'Hsp_query-from' @query_from = node.read_inner_xml.to_i when 'Hsp_query-to' @query_to = node.read_inner_xml.to_i when 'Hsp_query-frame' @query_frame = node.read_inner_xml.to_i when 'Hsp_hit-frame' @hit_frame = node.read_inner_xml.to_i when 'Hsp_identity' @identity = node.read_inner_xml.to_i when 'Hsp_positive' @positive = node.read_inner_xml.to_i when 'Hsp_align-len' @align_len = node.read_inner_xml.to_i when 'Hsp_qseq' @qseq = node.read_inner_xml when 'Hsp_hseq' @hseq = node.read_inner_xml when 'Hsp_midline' @midline = node.read_inner_xml end end end |