Class: Rafflesia::StructureMetadataData

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

Constant Summary collapse

HASH_ATTRS =
{
  atom_count: :atom_count,
  chain_count: :chain_count,
  chains: :chains,
  confidence_metric: :confidence_metric,
  confidence_value_sources: :confidence_value_sources,
  format: :format,
  has_plddt_like_b_factor: :has_plddt_like_b_factor,
  low_confidence_residue_count: :low_confidence_residue_count,
  mean_b_factor: :mean_b_factor,
  mean_confidence_value: :mean_confidence_value,
  mean_plddt: :mean_plddt,
  model_version: :model_version,
  object: :object,
  pae_object: :pae_object,
  parser: :parser,
  residue_count: :residue_count,
  residue_ranges: :residue_ranges,
  source: :source,
  source_metadata: :source_metadata,
  source_url: :source_url,
  structure_id: :structure_id,
  target_id: :target_id
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ StructureMetadataData

Returns a new instance of StructureMetadataData.



57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# File 'lib/rafflesia/proteins/structure_metadata_data.rb', line 57

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @atom_count = hash[:atom_count]
  @chain_count = hash[:chain_count]
  @chains = (hash[:chains] || []).map { |item| item ? Rafflesia::ChainSummary.new(item) : nil }
  @confidence_metric = hash[:confidence_metric]
  @confidence_value_sources = (hash[:confidence_value_sources] || [])
  @format = hash[:format]
  @has_plddt_like_b_factor = hash[:has_plddt_like_b_factor]
  @low_confidence_residue_count = hash[:low_confidence_residue_count]
  @mean_b_factor = hash[:mean_b_factor]
  @mean_confidence_value = hash[:mean_confidence_value]
  @mean_plddt = hash[:mean_plddt]
  @model_version = hash[:model_version]
  @object = hash[:object] ? Rafflesia::ObjectRef.new(hash[:object]) : nil
  @pae_object = hash[:pae_object] ? Rafflesia::ObjectRef.new(hash[:pae_object]) : nil
  @parser = hash[:parser] ? Rafflesia::StructureParserMetadata.new(hash[:parser]) : nil
  @residue_count = hash[:residue_count]
  @residue_ranges = (hash[:residue_ranges] || []).map { |item| item ? Rafflesia::ResidueRange.new(item) : nil }
  @source = hash[:source]
  @source_metadata = hash[:source_metadata] || {}
  @source_url = hash[:source_url]
  @structure_id = hash[:structure_id]
  @target_id = hash[:target_id]
end

Instance Attribute Details

#atom_countObject

Returns the value of attribute atom_count.



33
34
35
# File 'lib/rafflesia/proteins/structure_metadata_data.rb', line 33

def atom_count
  @atom_count
end

#chain_countObject

Returns the value of attribute chain_count.



33
34
35
# File 'lib/rafflesia/proteins/structure_metadata_data.rb', line 33

def chain_count
  @chain_count
end

#chainsObject

Returns the value of attribute chains.



33
34
35
# File 'lib/rafflesia/proteins/structure_metadata_data.rb', line 33

def chains
  @chains
end

#confidence_metricObject

Returns the value of attribute confidence_metric.



33
34
35
# File 'lib/rafflesia/proteins/structure_metadata_data.rb', line 33

def confidence_metric
  @confidence_metric
end

#confidence_value_sourcesObject

Returns the value of attribute confidence_value_sources.



33
34
35
# File 'lib/rafflesia/proteins/structure_metadata_data.rb', line 33

def confidence_value_sources
  @confidence_value_sources
end

#formatObject

Returns the value of attribute format.



33
34
35
# File 'lib/rafflesia/proteins/structure_metadata_data.rb', line 33

def format
  @format
end

#has_plddt_like_b_factorObject

Returns the value of attribute has_plddt_like_b_factor.



33
34
35
# File 'lib/rafflesia/proteins/structure_metadata_data.rb', line 33

def has_plddt_like_b_factor
  @has_plddt_like_b_factor
end

#low_confidence_residue_countObject

Returns the value of attribute low_confidence_residue_count.



33
34
35
# File 'lib/rafflesia/proteins/structure_metadata_data.rb', line 33

def low_confidence_residue_count
  @low_confidence_residue_count
end

#mean_b_factorObject

Returns the value of attribute mean_b_factor.



33
34
35
# File 'lib/rafflesia/proteins/structure_metadata_data.rb', line 33

def mean_b_factor
  @mean_b_factor
end

#mean_confidence_valueObject

Returns the value of attribute mean_confidence_value.



33
34
35
# File 'lib/rafflesia/proteins/structure_metadata_data.rb', line 33

def mean_confidence_value
  @mean_confidence_value
end

#mean_plddtObject

Returns the value of attribute mean_plddt.



33
34
35
# File 'lib/rafflesia/proteins/structure_metadata_data.rb', line 33

def mean_plddt
  @mean_plddt
end

#model_versionObject

Returns the value of attribute model_version.



33
34
35
# File 'lib/rafflesia/proteins/structure_metadata_data.rb', line 33

def model_version
  @model_version
end

#objectObject

Returns the value of attribute object.



33
34
35
# File 'lib/rafflesia/proteins/structure_metadata_data.rb', line 33

def object
  @object
end

#pae_objectObject

Returns the value of attribute pae_object.



33
34
35
# File 'lib/rafflesia/proteins/structure_metadata_data.rb', line 33

def pae_object
  @pae_object
end

#parserObject

Returns the value of attribute parser.



33
34
35
# File 'lib/rafflesia/proteins/structure_metadata_data.rb', line 33

def parser
  @parser
end

#residue_countObject

Returns the value of attribute residue_count.



33
34
35
# File 'lib/rafflesia/proteins/structure_metadata_data.rb', line 33

def residue_count
  @residue_count
end

#residue_rangesObject

Returns the value of attribute residue_ranges.



33
34
35
# File 'lib/rafflesia/proteins/structure_metadata_data.rb', line 33

def residue_ranges
  @residue_ranges
end

#sourceObject

Returns the value of attribute source.



33
34
35
# File 'lib/rafflesia/proteins/structure_metadata_data.rb', line 33

def source
  @source
end

#source_metadataObject

Returns the value of attribute source_metadata.



33
34
35
# File 'lib/rafflesia/proteins/structure_metadata_data.rb', line 33

def 
  @source_metadata
end

#source_urlObject

Returns the value of attribute source_url.



33
34
35
# File 'lib/rafflesia/proteins/structure_metadata_data.rb', line 33

def source_url
  @source_url
end

#structure_idObject

Returns the value of attribute structure_id.



33
34
35
# File 'lib/rafflesia/proteins/structure_metadata_data.rb', line 33

def structure_id
  @structure_id
end

#target_idObject

Returns the value of attribute target_id.



33
34
35
# File 'lib/rafflesia/proteins/structure_metadata_data.rb', line 33

def target_id
  @target_id
end