Class: Rafflesia::MsaColumnSummary
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::MsaColumnSummary
- Defined in:
- lib/rafflesia/cache/msa_column_summary.rb
Constant Summary collapse
- HASH_ATTRS =
{ consensus_fraction: :consensus_fraction, consensus_residue: :consensus_residue, conservation_fraction: :conservation_fraction, gap_count: :gap_count, occupancy_fraction: :occupancy_fraction, position: :position, residue_counts: :residue_counts }.freeze
Instance Attribute Summary collapse
-
#consensus_fraction ⇒ Object
Returns the value of attribute consensus_fraction.
-
#consensus_residue ⇒ Object
Returns the value of attribute consensus_residue.
-
#conservation_fraction ⇒ Object
Returns the value of attribute conservation_fraction.
-
#gap_count ⇒ Object
Returns the value of attribute gap_count.
-
#occupancy_fraction ⇒ Object
Returns the value of attribute occupancy_fraction.
-
#position ⇒ Object
Returns the value of attribute position.
-
#residue_counts ⇒ Object
Returns the value of attribute residue_counts.
Instance Method Summary collapse
-
#initialize(json) ⇒ MsaColumnSummary
constructor
A new instance of MsaColumnSummary.
Constructor Details
#initialize(json) ⇒ MsaColumnSummary
Returns a new instance of MsaColumnSummary.
27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/rafflesia/cache/msa_column_summary.rb', line 27 def initialize(json) super() hash = self.class.normalize(json) @consensus_fraction = hash[:consensus_fraction] @consensus_residue = hash[:consensus_residue] @conservation_fraction = hash[:conservation_fraction] @gap_count = hash[:gap_count] @occupancy_fraction = hash[:occupancy_fraction] @position = hash[:position] @residue_counts = hash[:residue_counts] || {} end |
Instance Attribute Details
#consensus_fraction ⇒ Object
Returns the value of attribute consensus_fraction.
18 19 20 |
# File 'lib/rafflesia/cache/msa_column_summary.rb', line 18 def consensus_fraction @consensus_fraction end |
#consensus_residue ⇒ Object
Returns the value of attribute consensus_residue.
18 19 20 |
# File 'lib/rafflesia/cache/msa_column_summary.rb', line 18 def consensus_residue @consensus_residue end |
#conservation_fraction ⇒ Object
Returns the value of attribute conservation_fraction.
18 19 20 |
# File 'lib/rafflesia/cache/msa_column_summary.rb', line 18 def conservation_fraction @conservation_fraction end |
#gap_count ⇒ Object
Returns the value of attribute gap_count.
18 19 20 |
# File 'lib/rafflesia/cache/msa_column_summary.rb', line 18 def gap_count @gap_count end |
#occupancy_fraction ⇒ Object
Returns the value of attribute occupancy_fraction.
18 19 20 |
# File 'lib/rafflesia/cache/msa_column_summary.rb', line 18 def occupancy_fraction @occupancy_fraction end |
#position ⇒ Object
Returns the value of attribute position.
18 19 20 |
# File 'lib/rafflesia/cache/msa_column_summary.rb', line 18 def position @position end |
#residue_counts ⇒ Object
Returns the value of attribute residue_counts.
18 19 20 |
# File 'lib/rafflesia/cache/msa_column_summary.rb', line 18 def residue_counts @residue_counts end |