Class: Rafflesia::SequenceAlignData
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::SequenceAlignData
- Defined in:
- lib/rafflesia/sequences/sequence_align_data.rb
Constant Summary collapse
- HASH_ATTRS =
{ algorithm: :algorithm, alignment_length: :alignment_length, gap_count: :gap_count, identity_count: :identity_count, identity_fraction: :identity_fraction, mismatch_count: :mismatch_count, nw_score: :nw_score, parameters: :parameters, position_mappings: :position_mappings, query_aligned: :query_aligned, target_aligned: :target_aligned }.freeze
Instance Attribute Summary collapse
-
#algorithm ⇒ Object
Returns the value of attribute algorithm.
-
#alignment_length ⇒ Object
Returns the value of attribute alignment_length.
-
#gap_count ⇒ Object
Returns the value of attribute gap_count.
-
#identity_count ⇒ Object
Returns the value of attribute identity_count.
-
#identity_fraction ⇒ Object
Returns the value of attribute identity_fraction.
-
#mismatch_count ⇒ Object
Returns the value of attribute mismatch_count.
-
#nw_score ⇒ Object
Returns the value of attribute nw_score.
-
#parameters ⇒ Object
Returns the value of attribute parameters.
-
#position_mappings ⇒ Object
Returns the value of attribute position_mappings.
-
#query_aligned ⇒ Object
Returns the value of attribute query_aligned.
-
#target_aligned ⇒ Object
Returns the value of attribute target_aligned.
Instance Method Summary collapse
-
#initialize(json) ⇒ SequenceAlignData
constructor
A new instance of SequenceAlignData.
Constructor Details
#initialize(json) ⇒ SequenceAlignData
Returns a new instance of SequenceAlignData.
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/rafflesia/sequences/sequence_align_data.rb', line 35 def initialize(json) super() hash = self.class.normalize(json) @algorithm = hash[:algorithm] @alignment_length = hash[:alignment_length] @gap_count = hash[:gap_count] @identity_count = hash[:identity_count] @identity_fraction = hash[:identity_fraction] @mismatch_count = hash[:mismatch_count] @nw_score = hash[:nw_score] @parameters = hash[:parameters] ? Rafflesia::SequenceAlignDataParametersStruct.new(hash[:parameters]) : nil @position_mappings = (hash[:position_mappings] || []).map { |item| item ? Rafflesia::SequencePositionMapping.new(item) : nil } @query_aligned = hash[:query_aligned] @target_aligned = hash[:target_aligned] end |
Instance Attribute Details
#algorithm ⇒ Object
Returns the value of attribute algorithm.
22 23 24 |
# File 'lib/rafflesia/sequences/sequence_align_data.rb', line 22 def algorithm @algorithm end |
#alignment_length ⇒ Object
Returns the value of attribute alignment_length.
22 23 24 |
# File 'lib/rafflesia/sequences/sequence_align_data.rb', line 22 def alignment_length @alignment_length end |
#gap_count ⇒ Object
Returns the value of attribute gap_count.
22 23 24 |
# File 'lib/rafflesia/sequences/sequence_align_data.rb', line 22 def gap_count @gap_count end |
#identity_count ⇒ Object
Returns the value of attribute identity_count.
22 23 24 |
# File 'lib/rafflesia/sequences/sequence_align_data.rb', line 22 def identity_count @identity_count end |
#identity_fraction ⇒ Object
Returns the value of attribute identity_fraction.
22 23 24 |
# File 'lib/rafflesia/sequences/sequence_align_data.rb', line 22 def identity_fraction @identity_fraction end |
#mismatch_count ⇒ Object
Returns the value of attribute mismatch_count.
22 23 24 |
# File 'lib/rafflesia/sequences/sequence_align_data.rb', line 22 def mismatch_count @mismatch_count end |
#nw_score ⇒ Object
Returns the value of attribute nw_score.
22 23 24 |
# File 'lib/rafflesia/sequences/sequence_align_data.rb', line 22 def nw_score @nw_score end |
#parameters ⇒ Object
Returns the value of attribute parameters.
22 23 24 |
# File 'lib/rafflesia/sequences/sequence_align_data.rb', line 22 def parameters @parameters end |
#position_mappings ⇒ Object
Returns the value of attribute position_mappings.
22 23 24 |
# File 'lib/rafflesia/sequences/sequence_align_data.rb', line 22 def position_mappings @position_mappings end |
#query_aligned ⇒ Object
Returns the value of attribute query_aligned.
22 23 24 |
# File 'lib/rafflesia/sequences/sequence_align_data.rb', line 22 def query_aligned @query_aligned end |
#target_aligned ⇒ Object
Returns the value of attribute target_aligned.
22 23 24 |
# File 'lib/rafflesia/sequences/sequence_align_data.rb', line 22 def target_aligned @target_aligned end |