Class: Rafflesia::ChainSummary

Inherits:
Types::BaseModel
  • Object
show all
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

Instance Method Summary collapse

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_idsObject

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_countObject

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_idsObject

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

#boundsObject

Returns the value of attribute bounds.



26
27
28
# File 'lib/rafflesia/proteins/chain_summary.rb', line 26

def bounds
  @bounds
end

#centroidObject

Returns the value of attribute centroid.



26
27
28
# File 'lib/rafflesia/proteins/chain_summary.rb', line 26

def centroid
  @centroid
end

#chain_idObject

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

#endObject

Returns the value of attribute end.



26
27
28
# File 'lib/rafflesia/proteins/chain_summary.rb', line 26

def end
  @end
end

#entity_idsObject

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_idsObject

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_idsObject

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_typeObject

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_countObject

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

#sequenceObject

Returns the value of attribute sequence.



26
27
28
# File 'lib/rafflesia/proteins/chain_summary.rb', line 26

def sequence
  @sequence
end

#sequence_sha_256Object

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

#startObject

Returns the value of attribute start.



26
27
28
# File 'lib/rafflesia/proteins/chain_summary.rb', line 26

def start
  @start
end