Class: Rafflesia::AlphaFoldChainCompareData

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

Constant Summary collapse

HASH_ATTRS =
{
  alphafold_structure: :alphafold_structure,
  chain: :chain,
  chain_id: :chain_id,
  comparison: :comparison,
  deposited_chain_structure: :deposited_chain_structure,
  structure_id: :structure_id,
  uniprot_id: :uniprot_id
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ AlphaFoldChainCompareData

Returns a new instance of AlphaFoldChainCompareData.



27
28
29
30
31
32
33
34
35
36
37
# File 'lib/rafflesia/proteins/alpha_fold_chain_compare_data.rb', line 27

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @alphafold_structure = hash[:alphafold_structure] ? Rafflesia::StructureData.new(hash[:alphafold_structure]) : nil
  @chain = hash[:chain] ? Rafflesia::StructureChainRecord.new(hash[:chain]) : nil
  @chain_id = hash[:chain_id]
  @comparison = hash[:comparison] ? Rafflesia::StructureCompareData.new(hash[:comparison]) : nil
  @deposited_chain_structure = hash[:deposited_chain_structure] ? Rafflesia::StructureData.new(hash[:deposited_chain_structure]) : nil
  @structure_id = hash[:structure_id]
  @uniprot_id = hash[:uniprot_id]
end

Instance Attribute Details

#alphafold_structureObject

Returns the value of attribute alphafold_structure.



18
19
20
# File 'lib/rafflesia/proteins/alpha_fold_chain_compare_data.rb', line 18

def alphafold_structure
  @alphafold_structure
end

#chainObject

Returns the value of attribute chain.



18
19
20
# File 'lib/rafflesia/proteins/alpha_fold_chain_compare_data.rb', line 18

def chain
  @chain
end

#chain_idObject

Returns the value of attribute chain_id.



18
19
20
# File 'lib/rafflesia/proteins/alpha_fold_chain_compare_data.rb', line 18

def chain_id
  @chain_id
end

#comparisonObject

Returns the value of attribute comparison.



18
19
20
# File 'lib/rafflesia/proteins/alpha_fold_chain_compare_data.rb', line 18

def comparison
  @comparison
end

#deposited_chain_structureObject

Returns the value of attribute deposited_chain_structure.



18
19
20
# File 'lib/rafflesia/proteins/alpha_fold_chain_compare_data.rb', line 18

def deposited_chain_structure
  @deposited_chain_structure
end

#structure_idObject

Returns the value of attribute structure_id.



18
19
20
# File 'lib/rafflesia/proteins/alpha_fold_chain_compare_data.rb', line 18

def structure_id
  @structure_id
end

#uniprot_idObject

Returns the value of attribute uniprot_id.



18
19
20
# File 'lib/rafflesia/proteins/alpha_fold_chain_compare_data.rb', line 18

def uniprot_id
  @uniprot_id
end