Class: SequenceServer::BLAST::HSP
- Inherits:
-
Struct
- Object
- Struct
- SequenceServer::BLAST::HSP
- Defined in:
- lib/sequenceserver/blast/hsp.rb
Overview
Structure to hold data for each HSP.
Constant Summary collapse
- INTEGER_ARGS =
[1, 3].concat((5..15).to_a).freeze
- FLOAT_ARGS =
[2, 4].freeze
Instance Attribute Summary collapse
-
#bit_score ⇒ Object
Returns the value of attribute bit_score.
-
#evalue ⇒ Object
Returns the value of attribute evalue.
-
#gaps ⇒ Object
Returns the value of attribute gaps.
-
#hit ⇒ Object
Returns the value of attribute hit.
-
#identity ⇒ Object
Returns the value of attribute identity.
-
#length ⇒ Object
Returns the value of attribute length.
-
#midline ⇒ Object
Returns the value of attribute midline.
-
#number ⇒ Object
Returns the value of attribute number.
-
#positives ⇒ Object
Returns the value of attribute positives.
-
#qcovhsp ⇒ Object
Returns the value of attribute qcovhsp.
-
#qend ⇒ Object
Returns the value of attribute qend.
-
#qframe ⇒ Object
Returns the value of attribute qframe.
-
#qseq ⇒ Object
Returns the value of attribute qseq.
-
#qstart ⇒ Object
Returns the value of attribute qstart.
-
#score ⇒ Object
Returns the value of attribute score.
-
#send ⇒ Object
Returns the value of attribute send.
-
#sframe ⇒ Object
Returns the value of attribute sframe.
-
#sseq ⇒ Object
Returns the value of attribute sseq.
-
#sstart ⇒ Object
Returns the value of attribute sstart.
Instance Method Summary collapse
-
#initialize(*args) ⇒ HSP
constructor
A new instance of HSP.
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(*args) ⇒ HSP
Returns a new instance of HSP.
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/sequenceserver/blast/hsp.rb', line 11 def initialize(*args) INTEGER_ARGS.each do |i| args[i] = args[i].to_i end FLOAT_ARGS.each do |i| args[i] = args[i].to_f end super end |
Instance Attribute Details
#bit_score ⇒ Object
Returns the value of attribute bit_score
5 6 7 |
# File 'lib/sequenceserver/blast/hsp.rb', line 5 def bit_score @bit_score end |
#evalue ⇒ Object
Returns the value of attribute evalue
5 6 7 |
# File 'lib/sequenceserver/blast/hsp.rb', line 5 def evalue @evalue end |
#gaps ⇒ Object
Returns the value of attribute gaps
5 6 7 |
# File 'lib/sequenceserver/blast/hsp.rb', line 5 def gaps @gaps end |
#hit ⇒ Object
Returns the value of attribute hit
5 6 7 |
# File 'lib/sequenceserver/blast/hsp.rb', line 5 def hit @hit end |
#identity ⇒ Object
Returns the value of attribute identity
5 6 7 |
# File 'lib/sequenceserver/blast/hsp.rb', line 5 def identity @identity end |
#length ⇒ Object
Returns the value of attribute length
5 6 7 |
# File 'lib/sequenceserver/blast/hsp.rb', line 5 def length @length end |
#midline ⇒ Object
Returns the value of attribute midline
5 6 7 |
# File 'lib/sequenceserver/blast/hsp.rb', line 5 def midline @midline end |
#number ⇒ Object
Returns the value of attribute number
5 6 7 |
# File 'lib/sequenceserver/blast/hsp.rb', line 5 def number @number end |
#positives ⇒ Object
Returns the value of attribute positives
5 6 7 |
# File 'lib/sequenceserver/blast/hsp.rb', line 5 def positives @positives end |
#qcovhsp ⇒ Object
Returns the value of attribute qcovhsp
5 6 7 |
# File 'lib/sequenceserver/blast/hsp.rb', line 5 def qcovhsp @qcovhsp end |
#qend ⇒ Object
Returns the value of attribute qend
5 6 7 |
# File 'lib/sequenceserver/blast/hsp.rb', line 5 def qend @qend end |
#qframe ⇒ Object
Returns the value of attribute qframe
5 6 7 |
# File 'lib/sequenceserver/blast/hsp.rb', line 5 def qframe @qframe end |
#qseq ⇒ Object
Returns the value of attribute qseq
5 6 7 |
# File 'lib/sequenceserver/blast/hsp.rb', line 5 def qseq @qseq end |
#qstart ⇒ Object
Returns the value of attribute qstart
5 6 7 |
# File 'lib/sequenceserver/blast/hsp.rb', line 5 def qstart @qstart end |
#score ⇒ Object
Returns the value of attribute score
5 6 7 |
# File 'lib/sequenceserver/blast/hsp.rb', line 5 def score @score end |
#send ⇒ Object
Returns the value of attribute send
5 6 7 |
# File 'lib/sequenceserver/blast/hsp.rb', line 5 def send @send end |
#sframe ⇒ Object
Returns the value of attribute sframe
5 6 7 |
# File 'lib/sequenceserver/blast/hsp.rb', line 5 def sframe @sframe end |
#sseq ⇒ Object
Returns the value of attribute sseq
5 6 7 |
# File 'lib/sequenceserver/blast/hsp.rb', line 5 def sseq @sseq end |
#sstart ⇒ Object
Returns the value of attribute sstart
5 6 7 |
# File 'lib/sequenceserver/blast/hsp.rb', line 5 def sstart @sstart end |
Instance Method Details
#to_json(*args) ⇒ Object
23 24 25 26 27 28 29 30 |
# File 'lib/sequenceserver/blast/hsp.rb', line 23 def to_json(*args) %i[number bit_score score evalue qstart qend sstart send qframe sframe identity positives gaps length qcovhsp qseq sseq midline].inject({}) { |h, k| h[k] = self[k] h }.to_json(*args) end |