Class: Rafflesia::ChainSummary
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::ChainSummary
- Defined in:
- lib/rafflesia/proteins/chain_summary.rb
Constant Summary collapse
- HASH_ATTRS =
{ assembly_ids: :assembly_ids, atom_count: :atom_count, auth_chain_ids: :auth_chain_ids, bounds: :bounds, centroid: :centroid, chain_id: :chain_id, end: :end, entity_ids: :entity_ids, label_chain_ids: :label_chain_ids, model_ids: :model_ids, polymer_type: :polymer_type, residue_count: :residue_count, sequence: :sequence, sequence_sha256: :sequence_sha_256, start: :start }.freeze
Instance Attribute Summary collapse
-
#assembly_ids ⇒ Object
Returns the value of attribute assembly_ids.
-
#atom_count ⇒ Object
Returns the value of attribute atom_count.
-
#auth_chain_ids ⇒ Object
Returns the value of attribute auth_chain_ids.
-
#bounds ⇒ Object
Returns the value of attribute bounds.
-
#centroid ⇒ Object
Returns the value of attribute centroid.
-
#chain_id ⇒ Object
Returns the value of attribute chain_id.
-
#end ⇒ Object
Returns the value of attribute end.
-
#entity_ids ⇒ Object
Returns the value of attribute entity_ids.
-
#label_chain_ids ⇒ Object
Returns the value of attribute label_chain_ids.
-
#model_ids ⇒ Object
Returns the value of attribute model_ids.
-
#polymer_type ⇒ Object
Returns the value of attribute polymer_type.
-
#residue_count ⇒ Object
Returns the value of attribute residue_count.
-
#sequence ⇒ Object
Returns the value of attribute sequence.
-
#sequence_sha_256 ⇒ Object
Returns the value of attribute sequence_sha_256.
-
#start ⇒ Object
Returns the value of attribute start.
Instance Method Summary collapse
-
#initialize(json) ⇒ ChainSummary
constructor
A new instance of ChainSummary.
Constructor Details
#initialize(json) ⇒ ChainSummary
Returns a new instance of ChainSummary.
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/rafflesia/proteins/chain_summary.rb', line 43 def initialize(json) super() hash = self.class.normalize(json) @assembly_ids = (hash[:assembly_ids] || []) @atom_count = hash[:atom_count] @auth_chain_ids = (hash[:auth_chain_ids] || []) @bounds = hash[:bounds] ? Rafflesia::CartesianBounds.new(hash[:bounds]) : nil @centroid = (hash[:centroid] || []) @chain_id = hash[:chain_id] @end = hash[:end] @entity_ids = (hash[:entity_ids] || []) @label_chain_ids = (hash[:label_chain_ids] || []) @model_ids = (hash[:model_ids] || []) @polymer_type = hash[:polymer_type] @residue_count = hash[:residue_count] @sequence = hash[:sequence] @sequence_sha_256 = hash[:sequence_sha256] @start = hash[:start] end |
Instance Attribute Details
#assembly_ids ⇒ Object
Returns the value of attribute assembly_ids.
26 27 28 |
# File 'lib/rafflesia/proteins/chain_summary.rb', line 26 def assembly_ids @assembly_ids end |
#atom_count ⇒ Object
Returns the value of attribute atom_count.
26 27 28 |
# File 'lib/rafflesia/proteins/chain_summary.rb', line 26 def atom_count @atom_count end |
#auth_chain_ids ⇒ Object
Returns the value of attribute auth_chain_ids.
26 27 28 |
# File 'lib/rafflesia/proteins/chain_summary.rb', line 26 def auth_chain_ids @auth_chain_ids end |
#bounds ⇒ Object
Returns the value of attribute bounds.
26 27 28 |
# File 'lib/rafflesia/proteins/chain_summary.rb', line 26 def bounds @bounds end |
#centroid ⇒ Object
Returns the value of attribute centroid.
26 27 28 |
# File 'lib/rafflesia/proteins/chain_summary.rb', line 26 def centroid @centroid end |
#chain_id ⇒ Object
Returns the value of attribute chain_id.
26 27 28 |
# File 'lib/rafflesia/proteins/chain_summary.rb', line 26 def chain_id @chain_id end |
#end ⇒ Object
Returns the value of attribute end.
26 27 28 |
# File 'lib/rafflesia/proteins/chain_summary.rb', line 26 def end @end end |
#entity_ids ⇒ Object
Returns the value of attribute entity_ids.
26 27 28 |
# File 'lib/rafflesia/proteins/chain_summary.rb', line 26 def entity_ids @entity_ids end |
#label_chain_ids ⇒ Object
Returns the value of attribute label_chain_ids.
26 27 28 |
# File 'lib/rafflesia/proteins/chain_summary.rb', line 26 def label_chain_ids @label_chain_ids end |
#model_ids ⇒ Object
Returns the value of attribute model_ids.
26 27 28 |
# File 'lib/rafflesia/proteins/chain_summary.rb', line 26 def model_ids @model_ids end |
#polymer_type ⇒ Object
Returns the value of attribute polymer_type.
26 27 28 |
# File 'lib/rafflesia/proteins/chain_summary.rb', line 26 def polymer_type @polymer_type end |
#residue_count ⇒ Object
Returns the value of attribute residue_count.
26 27 28 |
# File 'lib/rafflesia/proteins/chain_summary.rb', line 26 def residue_count @residue_count end |
#sequence ⇒ Object
Returns the value of attribute sequence.
26 27 28 |
# File 'lib/rafflesia/proteins/chain_summary.rb', line 26 def sequence @sequence end |
#sequence_sha_256 ⇒ Object
Returns the value of attribute sequence_sha_256.
26 27 28 |
# File 'lib/rafflesia/proteins/chain_summary.rb', line 26 def sequence_sha_256 @sequence_sha_256 end |
#start ⇒ Object
Returns the value of attribute start.
26 27 28 |
# File 'lib/rafflesia/proteins/chain_summary.rb', line 26 def start @start end |