Class: Rafflesia::SecondaryStructureSummary

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/proteins/secondary_structure_summary.rb

Constant Summary collapse

HASH_ATTRS =
{
  coil_count: :coil_count,
  coil_fraction: :coil_fraction,
  counts: :counts,
  helix_count: :helix_count,
  helix_fraction: :helix_fraction,
  residue_count: :residue_count,
  strand_count: :strand_count,
  strand_fraction: :strand_fraction
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ SecondaryStructureSummary

Returns a new instance of SecondaryStructureSummary.



29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/rafflesia/proteins/secondary_structure_summary.rb', line 29

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @coil_count = hash[:coil_count]
  @coil_fraction = hash[:coil_fraction]
  @counts = hash[:counts] || {}
  @helix_count = hash[:helix_count]
  @helix_fraction = hash[:helix_fraction]
  @residue_count = hash[:residue_count]
  @strand_count = hash[:strand_count]
  @strand_fraction = hash[:strand_fraction]
end

Instance Attribute Details

#coil_countObject

Returns the value of attribute coil_count.



19
20
21
# File 'lib/rafflesia/proteins/secondary_structure_summary.rb', line 19

def coil_count
  @coil_count
end

#coil_fractionObject

Returns the value of attribute coil_fraction.



19
20
21
# File 'lib/rafflesia/proteins/secondary_structure_summary.rb', line 19

def coil_fraction
  @coil_fraction
end

#countsObject

Returns the value of attribute counts.



19
20
21
# File 'lib/rafflesia/proteins/secondary_structure_summary.rb', line 19

def counts
  @counts
end

#helix_countObject

Returns the value of attribute helix_count.



19
20
21
# File 'lib/rafflesia/proteins/secondary_structure_summary.rb', line 19

def helix_count
  @helix_count
end

#helix_fractionObject

Returns the value of attribute helix_fraction.



19
20
21
# File 'lib/rafflesia/proteins/secondary_structure_summary.rb', line 19

def helix_fraction
  @helix_fraction
end

#residue_countObject

Returns the value of attribute residue_count.



19
20
21
# File 'lib/rafflesia/proteins/secondary_structure_summary.rb', line 19

def residue_count
  @residue_count
end

#strand_countObject

Returns the value of attribute strand_count.



19
20
21
# File 'lib/rafflesia/proteins/secondary_structure_summary.rb', line 19

def strand_count
  @strand_count
end

#strand_fractionObject

Returns the value of attribute strand_fraction.



19
20
21
# File 'lib/rafflesia/proteins/secondary_structure_summary.rb', line 19

def strand_fraction
  @strand_fraction
end