Class: Rafflesia::MsaInspectData
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::MsaInspectData
- Defined in:
- lib/rafflesia/cache/msa_inspect_data.rb
Constant Summary collapse
- HASH_ATTRS =
{ alignment_length: :alignment_length, alignment_object_id: :alignment_object_id, alignment_path: :alignment_path, column_count: :column_count, columns: :columns, consensus: :consensus, gap_fraction: :gap_fraction, mean_conservation: :mean_conservation, relation: :relation, sequence_count: :sequence_count, sequence_ids: :sequence_ids, total_gaps: :total_gaps, total_residues: :total_residues }.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.
-
#column_count ⇒ Object
Returns the value of attribute column_count.
-
#columns ⇒ Object
Returns the value of attribute columns.
-
#consensus ⇒ Object
Returns the value of attribute consensus.
-
#gap_fraction ⇒ Object
Returns the value of attribute gap_fraction.
-
#mean_conservation ⇒ Object
Returns the value of attribute mean_conservation.
-
#relation ⇒ Object
Returns the value of attribute relation.
-
#sequence_count ⇒ Object
Returns the value of attribute sequence_count.
-
#sequence_ids ⇒ Object
Returns the value of attribute sequence_ids.
-
#total_gaps ⇒ Object
Returns the value of attribute total_gaps.
-
#total_residues ⇒ Object
Returns the value of attribute total_residues.
Instance Method Summary collapse
-
#initialize(json) ⇒ MsaInspectData
constructor
A new instance of MsaInspectData.
Constructor Details
#initialize(json) ⇒ MsaInspectData
Returns a new instance of MsaInspectData.
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/rafflesia/cache/msa_inspect_data.rb', line 39 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] @column_count = hash[:column_count] @columns = (hash[:columns] || []).map { |item| item ? Rafflesia::MsaColumnSummary.new(item) : nil } @consensus = hash[:consensus] @gap_fraction = hash[:gap_fraction] @mean_conservation = hash[:mean_conservation] @relation = hash[:relation] ? Rafflesia::RelationArtifactData.new(hash[:relation]) : nil @sequence_count = hash[:sequence_count] @sequence_ids = (hash[:sequence_ids] || []) @total_gaps = hash[:total_gaps] @total_residues = hash[:total_residues] end |
Instance Attribute Details
#alignment_length ⇒ Object
Returns the value of attribute alignment_length.
24 25 26 |
# File 'lib/rafflesia/cache/msa_inspect_data.rb', line 24 def alignment_length @alignment_length end |
#alignment_object_id ⇒ Object
Returns the value of attribute alignment_object_id.
24 25 26 |
# File 'lib/rafflesia/cache/msa_inspect_data.rb', line 24 def alignment_object_id @alignment_object_id end |
#alignment_path ⇒ Object
Returns the value of attribute alignment_path.
24 25 26 |
# File 'lib/rafflesia/cache/msa_inspect_data.rb', line 24 def alignment_path @alignment_path end |
#column_count ⇒ Object
Returns the value of attribute column_count.
24 25 26 |
# File 'lib/rafflesia/cache/msa_inspect_data.rb', line 24 def column_count @column_count end |
#columns ⇒ Object
Returns the value of attribute columns.
24 25 26 |
# File 'lib/rafflesia/cache/msa_inspect_data.rb', line 24 def columns @columns end |
#consensus ⇒ Object
Returns the value of attribute consensus.
24 25 26 |
# File 'lib/rafflesia/cache/msa_inspect_data.rb', line 24 def consensus @consensus end |
#gap_fraction ⇒ Object
Returns the value of attribute gap_fraction.
24 25 26 |
# File 'lib/rafflesia/cache/msa_inspect_data.rb', line 24 def gap_fraction @gap_fraction end |
#mean_conservation ⇒ Object
Returns the value of attribute mean_conservation.
24 25 26 |
# File 'lib/rafflesia/cache/msa_inspect_data.rb', line 24 def mean_conservation @mean_conservation end |
#relation ⇒ Object
Returns the value of attribute relation.
24 25 26 |
# File 'lib/rafflesia/cache/msa_inspect_data.rb', line 24 def relation @relation end |
#sequence_count ⇒ Object
Returns the value of attribute sequence_count.
24 25 26 |
# File 'lib/rafflesia/cache/msa_inspect_data.rb', line 24 def sequence_count @sequence_count end |
#sequence_ids ⇒ Object
Returns the value of attribute sequence_ids.
24 25 26 |
# File 'lib/rafflesia/cache/msa_inspect_data.rb', line 24 def sequence_ids @sequence_ids end |
#total_gaps ⇒ Object
Returns the value of attribute total_gaps.
24 25 26 |
# File 'lib/rafflesia/cache/msa_inspect_data.rb', line 24 def total_gaps @total_gaps end |
#total_residues ⇒ Object
Returns the value of attribute total_residues.
24 25 26 |
# File 'lib/rafflesia/cache/msa_inspect_data.rb', line 24 def total_residues @total_residues end |