Class: Rafflesia::CoevolutionData
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::CoevolutionData
- Defined in:
- lib/rafflesia/sequences/coevolution_data.rb
Constant Summary collapse
- HASH_ATTRS =
{ alignment_length: :alignment_length, alignment_object_id: :alignment_object_id, alignment_path: :alignment_path, effective_sequences: :effective_sequences, method: :method, pair_count: :pair_count, pairs: :pairs, reference_id: :reference_id, scored_columns: :scored_columns, sequence_count: :sequence_count, used_sequences: :used_sequences }.freeze
Instance Attribute Summary collapse
-
#alignment_length ⇒ Object
Returns the value of attribute alignment_length.
-
#alignment_object_id ⇒ Object
Returns the value of attribute alignment_object_id.
-
#alignment_path ⇒ Object
Returns the value of attribute alignment_path.
-
#effective_sequences ⇒ Object
Returns the value of attribute effective_sequences.
-
#method ⇒ Object
Returns the value of attribute method.
-
#pair_count ⇒ Object
Returns the value of attribute pair_count.
-
#pairs ⇒ Object
Returns the value of attribute pairs.
-
#reference_id ⇒ Object
Returns the value of attribute reference_id.
-
#scored_columns ⇒ Object
Returns the value of attribute scored_columns.
-
#sequence_count ⇒ Object
Returns the value of attribute sequence_count.
-
#used_sequences ⇒ Object
Returns the value of attribute used_sequences.
Instance Method Summary collapse
-
#initialize(json) ⇒ CoevolutionData
constructor
A new instance of CoevolutionData.
Constructor Details
#initialize(json) ⇒ CoevolutionData
Returns a new instance of CoevolutionData.
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/rafflesia/sequences/coevolution_data.rb', line 35 def initialize(json) super() hash = self.class.normalize(json) @alignment_length = hash[:alignment_length] @alignment_object_id = hash[:alignment_object_id] @alignment_path = hash[:alignment_path] @effective_sequences = hash[:effective_sequences] @method = hash[:method] @pair_count = hash[:pair_count] @pairs = (hash[:pairs] || []).map { |item| item ? Rafflesia::CoevolutionPair.new(item) : nil } @reference_id = hash[:reference_id] @scored_columns = hash[:scored_columns] @sequence_count = hash[:sequence_count] @used_sequences = hash[:used_sequences] end |
Instance Attribute Details
#alignment_length ⇒ Object
Returns the value of attribute alignment_length.
22 23 24 |
# File 'lib/rafflesia/sequences/coevolution_data.rb', line 22 def alignment_length @alignment_length end |
#alignment_object_id ⇒ Object
Returns the value of attribute alignment_object_id.
22 23 24 |
# File 'lib/rafflesia/sequences/coevolution_data.rb', line 22 def alignment_object_id @alignment_object_id end |
#alignment_path ⇒ Object
Returns the value of attribute alignment_path.
22 23 24 |
# File 'lib/rafflesia/sequences/coevolution_data.rb', line 22 def alignment_path @alignment_path end |
#effective_sequences ⇒ Object
Returns the value of attribute effective_sequences.
22 23 24 |
# File 'lib/rafflesia/sequences/coevolution_data.rb', line 22 def effective_sequences @effective_sequences end |
#method ⇒ Object
Returns the value of attribute method.
22 23 24 |
# File 'lib/rafflesia/sequences/coevolution_data.rb', line 22 def method @method end |
#pair_count ⇒ Object
Returns the value of attribute pair_count.
22 23 24 |
# File 'lib/rafflesia/sequences/coevolution_data.rb', line 22 def pair_count @pair_count end |
#pairs ⇒ Object
Returns the value of attribute pairs.
22 23 24 |
# File 'lib/rafflesia/sequences/coevolution_data.rb', line 22 def pairs @pairs end |
#reference_id ⇒ Object
Returns the value of attribute reference_id.
22 23 24 |
# File 'lib/rafflesia/sequences/coevolution_data.rb', line 22 def reference_id @reference_id end |
#scored_columns ⇒ Object
Returns the value of attribute scored_columns.
22 23 24 |
# File 'lib/rafflesia/sequences/coevolution_data.rb', line 22 def scored_columns @scored_columns end |
#sequence_count ⇒ Object
Returns the value of attribute sequence_count.
22 23 24 |
# File 'lib/rafflesia/sequences/coevolution_data.rb', line 22 def sequence_count @sequence_count end |
#used_sequences ⇒ Object
Returns the value of attribute used_sequences.
22 23 24 |
# File 'lib/rafflesia/sequences/coevolution_data.rb', line 22 def used_sequences @used_sequences end |