Class: Rafflesia::StructureAxisProfileData
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::StructureAxisProfileData
- Defined in:
- lib/rafflesia/proteins/structure_axis_profile_data.rb
Constant Summary collapse
- HASH_ATTRS =
{ atom_count: :atom_count, axial_span_angstrom: :axial_span_angstrom, axis_direction: :axis_direction, axis_point: :axis_point, axis_source: :axis_source, bins: :bins, max_radius_angstrom: :max_radius_angstrom, min_radius_angstrom: :min_radius_angstrom, min_radius_axial_position_angstrom: :min_radius_axial_position_angstrom, radius_percentiles: :radius_percentiles, relation: :relation, schema_version: :schema_version, structure_id: :structure_id }.freeze
Instance Attribute Summary collapse
-
#atom_count ⇒ Object
Returns the value of attribute atom_count.
-
#axial_span_angstrom ⇒ Object
Returns the value of attribute axial_span_angstrom.
-
#axis_direction ⇒ Object
Returns the value of attribute axis_direction.
-
#axis_point ⇒ Object
Returns the value of attribute axis_point.
-
#axis_source ⇒ Object
Returns the value of attribute axis_source.
-
#bins ⇒ Object
Returns the value of attribute bins.
-
#max_radius_angstrom ⇒ Object
Returns the value of attribute max_radius_angstrom.
-
#min_radius_angstrom ⇒ Object
Returns the value of attribute min_radius_angstrom.
-
#min_radius_axial_position_angstrom ⇒ Object
Returns the value of attribute min_radius_axial_position_angstrom.
-
#radius_percentiles ⇒ Object
Returns the value of attribute radius_percentiles.
-
#relation ⇒ Object
Returns the value of attribute relation.
-
#schema_version ⇒ Object
Returns the value of attribute schema_version.
-
#structure_id ⇒ Object
Returns the value of attribute structure_id.
Instance Method Summary collapse
-
#initialize(json) ⇒ StructureAxisProfileData
constructor
A new instance of StructureAxisProfileData.
Constructor Details
#initialize(json) ⇒ StructureAxisProfileData
Returns a new instance of StructureAxisProfileData.
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/rafflesia/proteins/structure_axis_profile_data.rb', line 39 def initialize(json) super() hash = self.class.normalize(json) @atom_count = hash[:atom_count] @axial_span_angstrom = hash[:axial_span_angstrom] @axis_direction = (hash[:axis_direction] || []) @axis_point = (hash[:axis_point] || []) @axis_source = hash[:axis_source] ? Rafflesia::StructureAxisProfileAxisSource.new(hash[:axis_source]) : nil @bins = (hash[:bins] || []).map { |item| item ? Rafflesia::StructureAxisProfileBin.new(item) : nil } @max_radius_angstrom = hash[:max_radius_angstrom] @min_radius_angstrom = hash[:min_radius_angstrom] @min_radius_axial_position_angstrom = hash[:min_radius_axial_position_angstrom] @radius_percentiles = (hash[:radius_percentiles] || []) @relation = hash[:relation] ? Rafflesia::RelationArtifactData.new(hash[:relation]) : nil @schema_version = hash[:schema_version] @structure_id = hash[:structure_id] end |
Instance Attribute Details
#atom_count ⇒ Object
Returns the value of attribute atom_count.
24 25 26 |
# File 'lib/rafflesia/proteins/structure_axis_profile_data.rb', line 24 def atom_count @atom_count end |
#axial_span_angstrom ⇒ Object
Returns the value of attribute axial_span_angstrom.
24 25 26 |
# File 'lib/rafflesia/proteins/structure_axis_profile_data.rb', line 24 def axial_span_angstrom @axial_span_angstrom end |
#axis_direction ⇒ Object
Returns the value of attribute axis_direction.
24 25 26 |
# File 'lib/rafflesia/proteins/structure_axis_profile_data.rb', line 24 def axis_direction @axis_direction end |
#axis_point ⇒ Object
Returns the value of attribute axis_point.
24 25 26 |
# File 'lib/rafflesia/proteins/structure_axis_profile_data.rb', line 24 def axis_point @axis_point end |
#axis_source ⇒ Object
Returns the value of attribute axis_source.
24 25 26 |
# File 'lib/rafflesia/proteins/structure_axis_profile_data.rb', line 24 def axis_source @axis_source end |
#bins ⇒ Object
Returns the value of attribute bins.
24 25 26 |
# File 'lib/rafflesia/proteins/structure_axis_profile_data.rb', line 24 def bins @bins end |
#max_radius_angstrom ⇒ Object
Returns the value of attribute max_radius_angstrom.
24 25 26 |
# File 'lib/rafflesia/proteins/structure_axis_profile_data.rb', line 24 def max_radius_angstrom @max_radius_angstrom end |
#min_radius_angstrom ⇒ Object
Returns the value of attribute min_radius_angstrom.
24 25 26 |
# File 'lib/rafflesia/proteins/structure_axis_profile_data.rb', line 24 def min_radius_angstrom @min_radius_angstrom end |
#min_radius_axial_position_angstrom ⇒ Object
Returns the value of attribute min_radius_axial_position_angstrom.
24 25 26 |
# File 'lib/rafflesia/proteins/structure_axis_profile_data.rb', line 24 def min_radius_axial_position_angstrom @min_radius_axial_position_angstrom end |
#radius_percentiles ⇒ Object
Returns the value of attribute radius_percentiles.
24 25 26 |
# File 'lib/rafflesia/proteins/structure_axis_profile_data.rb', line 24 def radius_percentiles @radius_percentiles end |
#relation ⇒ Object
Returns the value of attribute relation.
24 25 26 |
# File 'lib/rafflesia/proteins/structure_axis_profile_data.rb', line 24 def relation @relation end |
#schema_version ⇒ Object
Returns the value of attribute schema_version.
24 25 26 |
# File 'lib/rafflesia/proteins/structure_axis_profile_data.rb', line 24 def schema_version @schema_version end |
#structure_id ⇒ Object
Returns the value of attribute structure_id.
24 25 26 |
# File 'lib/rafflesia/proteins/structure_axis_profile_data.rb', line 24 def structure_id @structure_id end |