Class: Rafflesia::StructureChainRecord

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

Constant Summary collapse

HASH_ATTRS =
{
  atom_count: :atom_count,
  auth_chain_id: :auth_chain_id,
  chain_id: :chain_id,
  end: :end,
  entity_description: :entity_description,
  entity_id: :entity_id,
  entity_type: :entity_type,
  label_chain_id: :label_chain_id,
  residue_count: :residue_count,
  start: :start,
  uniprot_ids: :uniprot_ids
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ StructureChainRecord

Returns a new instance of StructureChainRecord.



35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/rafflesia/proteins/structure_chain_record.rb', line 35

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @atom_count = hash[:atom_count]
  @auth_chain_id = hash[:auth_chain_id]
  @chain_id = hash[:chain_id]
  @end = hash[:end]
  @entity_description = hash[:entity_description]
  @entity_id = hash[:entity_id]
  @entity_type = hash[:entity_type]
  @label_chain_id = hash[:label_chain_id]
  @residue_count = hash[:residue_count]
  @start = hash[:start]
  @uniprot_ids = (hash[:uniprot_ids] || [])
end

Instance Attribute Details

#atom_countObject

Returns the value of attribute atom_count.



22
23
24
# File 'lib/rafflesia/proteins/structure_chain_record.rb', line 22

def atom_count
  @atom_count
end

#auth_chain_idObject

Returns the value of attribute auth_chain_id.



22
23
24
# File 'lib/rafflesia/proteins/structure_chain_record.rb', line 22

def auth_chain_id
  @auth_chain_id
end

#chain_idObject

Returns the value of attribute chain_id.



22
23
24
# File 'lib/rafflesia/proteins/structure_chain_record.rb', line 22

def chain_id
  @chain_id
end

#endObject

Returns the value of attribute end.



22
23
24
# File 'lib/rafflesia/proteins/structure_chain_record.rb', line 22

def end
  @end
end

#entity_descriptionObject

Returns the value of attribute entity_description.



22
23
24
# File 'lib/rafflesia/proteins/structure_chain_record.rb', line 22

def entity_description
  @entity_description
end

#entity_idObject

Returns the value of attribute entity_id.



22
23
24
# File 'lib/rafflesia/proteins/structure_chain_record.rb', line 22

def entity_id
  @entity_id
end

#entity_typeObject

Returns the value of attribute entity_type.



22
23
24
# File 'lib/rafflesia/proteins/structure_chain_record.rb', line 22

def entity_type
  @entity_type
end

#label_chain_idObject

Returns the value of attribute label_chain_id.



22
23
24
# File 'lib/rafflesia/proteins/structure_chain_record.rb', line 22

def label_chain_id
  @label_chain_id
end

#residue_countObject

Returns the value of attribute residue_count.



22
23
24
# File 'lib/rafflesia/proteins/structure_chain_record.rb', line 22

def residue_count
  @residue_count
end

#startObject

Returns the value of attribute start.



22
23
24
# File 'lib/rafflesia/proteins/structure_chain_record.rb', line 22

def start
  @start
end

#uniprot_idsObject

Returns the value of attribute uniprot_ids.



22
23
24
# File 'lib/rafflesia/proteins/structure_chain_record.rb', line 22

def uniprot_ids
  @uniprot_ids
end