Class: Rafflesia::Region

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

Constant Summary collapse

HASH_ATTRS =
{
  chain_id: :chain_id,
  end: :end,
  length: :length,
  mean_confidence_value: :mean_confidence_value,
  mean_pae: :mean_pae,
  mean_plddt: :mean_plddt,
  object: :object,
  region_id: :region_id,
  start: :start,
  structure_id: :structure_id,
  type: :type
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ Region

Returns a new instance of Region.



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

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @chain_id = hash[:chain_id]
  @end = hash[:end]
  @length = hash[:length]
  @mean_confidence_value = hash[:mean_confidence_value]
  @mean_pae = hash[:mean_pae]
  @mean_plddt = hash[:mean_plddt]
  @object = hash[:object] ? Rafflesia::ObjectRef.new(hash[:object]) : nil
  @region_id = hash[:region_id]
  @start = hash[:start]
  @structure_id = hash[:structure_id]
  @type = hash[:type]
end

Instance Attribute Details

#chain_idObject

Returns the value of attribute chain_id.



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

def chain_id
  @chain_id
end

#endObject

Returns the value of attribute end.



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

def end
  @end
end

#lengthObject

Returns the value of attribute length.



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

def length
  @length
end

#mean_confidence_valueObject

Returns the value of attribute mean_confidence_value.



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

def mean_confidence_value
  @mean_confidence_value
end

#mean_paeObject

Returns the value of attribute mean_pae.



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

def mean_pae
  @mean_pae
end

#mean_plddtObject

Returns the value of attribute mean_plddt.



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

def mean_plddt
  @mean_plddt
end

#objectObject

Returns the value of attribute object.



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

def object
  @object
end

#region_idObject

Returns the value of attribute region_id.



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

def region_id
  @region_id
end

#startObject

Returns the value of attribute start.



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

def start
  @start
end

#structure_idObject

Returns the value of attribute structure_id.



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

def structure_id
  @structure_id
end

#typeObject

Returns the value of attribute type.



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

def type
  @type
end