Class: Rafflesia::Pocket

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

Constant Summary collapse

HASH_ATTRS =
{
  center_angstrom: :center_angstrom,
  confidence_metric: :confidence_metric,
  detection_cache_key: :detection_cache_key,
  druggability_score_metric: :druggability_score_metric,
  druggability_score_value: :druggability_score_value,
  fpocket_druggability_score: :fpocket_druggability_score,
  fpocket_score: :fpocket_score,
  low_confidence_residue_count: :low_confidence_residue_count,
  mean_local_confidence_value: :mean_local_confidence_value,
  mean_local_plddt: :mean_local_plddt,
  method: :method,
  objects: :objects,
  pocket_id: :pocket_id,
  rank: :rank,
  residues: :residues,
  score_metric: :score_metric,
  score_value: :score_value,
  source_sha256: :source_sha_256,
  structure_id: :structure_id,
  volume_angstrom3: :volume_angstrom_3
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ Pocket

Returns a new instance of Pocket.



53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# File 'lib/rafflesia/proteins/pocket.rb', line 53

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @center_angstrom = (hash[:center_angstrom] || [])
  @confidence_metric = hash[:confidence_metric]
  @detection_cache_key = hash[:detection_cache_key]
  @druggability_score_metric = hash[:druggability_score_metric]
  @druggability_score_value = hash[:druggability_score_value]
  @fpocket_druggability_score = hash[:fpocket_druggability_score]
  @fpocket_score = hash[:fpocket_score]
  @low_confidence_residue_count = hash[:low_confidence_residue_count]
  @mean_local_confidence_value = hash[:mean_local_confidence_value]
  @mean_local_plddt = hash[:mean_local_plddt]
  @method = hash[:method]
  @objects = (hash[:objects] || []).map { |item| item ? Rafflesia::ObjectRef.new(item) : nil }
  @pocket_id = hash[:pocket_id]
  @rank = hash[:rank]
  @residues = (hash[:residues] || []).map { |item| item ? Rafflesia::ResiduePointer.new(item) : nil }
  @score_metric = hash[:score_metric]
  @score_value = hash[:score_value]
  @source_sha_256 = hash[:source_sha256]
  @structure_id = hash[:structure_id]
  @volume_angstrom_3 = hash[:volume_angstrom3]
end

Instance Attribute Details

#center_angstromObject

Returns the value of attribute center_angstrom.



31
32
33
# File 'lib/rafflesia/proteins/pocket.rb', line 31

def center_angstrom
  @center_angstrom
end

#confidence_metricObject

Returns the value of attribute confidence_metric.



31
32
33
# File 'lib/rafflesia/proteins/pocket.rb', line 31

def confidence_metric
  @confidence_metric
end

#detection_cache_keyObject

Returns the value of attribute detection_cache_key.



31
32
33
# File 'lib/rafflesia/proteins/pocket.rb', line 31

def detection_cache_key
  @detection_cache_key
end

#druggability_score_metricObject

Returns the value of attribute druggability_score_metric.



31
32
33
# File 'lib/rafflesia/proteins/pocket.rb', line 31

def druggability_score_metric
  @druggability_score_metric
end

#druggability_score_valueObject

Returns the value of attribute druggability_score_value.



31
32
33
# File 'lib/rafflesia/proteins/pocket.rb', line 31

def druggability_score_value
  @druggability_score_value
end

#fpocket_druggability_scoreObject

Returns the value of attribute fpocket_druggability_score.



31
32
33
# File 'lib/rafflesia/proteins/pocket.rb', line 31

def fpocket_druggability_score
  @fpocket_druggability_score
end

#fpocket_scoreObject

Returns the value of attribute fpocket_score.



31
32
33
# File 'lib/rafflesia/proteins/pocket.rb', line 31

def fpocket_score
  @fpocket_score
end

#low_confidence_residue_countObject

Returns the value of attribute low_confidence_residue_count.



31
32
33
# File 'lib/rafflesia/proteins/pocket.rb', line 31

def low_confidence_residue_count
  @low_confidence_residue_count
end

#mean_local_confidence_valueObject

Returns the value of attribute mean_local_confidence_value.



31
32
33
# File 'lib/rafflesia/proteins/pocket.rb', line 31

def mean_local_confidence_value
  @mean_local_confidence_value
end

#mean_local_plddtObject

Returns the value of attribute mean_local_plddt.



31
32
33
# File 'lib/rafflesia/proteins/pocket.rb', line 31

def mean_local_plddt
  @mean_local_plddt
end

#methodObject

Returns the value of attribute method.



31
32
33
# File 'lib/rafflesia/proteins/pocket.rb', line 31

def method
  @method
end

#objectsObject

Returns the value of attribute objects.



31
32
33
# File 'lib/rafflesia/proteins/pocket.rb', line 31

def objects
  @objects
end

#pocket_idObject

Returns the value of attribute pocket_id.



31
32
33
# File 'lib/rafflesia/proteins/pocket.rb', line 31

def pocket_id
  @pocket_id
end

#rankObject

Returns the value of attribute rank.



31
32
33
# File 'lib/rafflesia/proteins/pocket.rb', line 31

def rank
  @rank
end

#residuesObject

Returns the value of attribute residues.



31
32
33
# File 'lib/rafflesia/proteins/pocket.rb', line 31

def residues
  @residues
end

#score_metricObject

Returns the value of attribute score_metric.



31
32
33
# File 'lib/rafflesia/proteins/pocket.rb', line 31

def score_metric
  @score_metric
end

#score_valueObject

Returns the value of attribute score_value.



31
32
33
# File 'lib/rafflesia/proteins/pocket.rb', line 31

def score_value
  @score_value
end

#source_sha_256Object

Returns the value of attribute source_sha_256.



31
32
33
# File 'lib/rafflesia/proteins/pocket.rb', line 31

def source_sha_256
  @source_sha_256
end

#structure_idObject

Returns the value of attribute structure_id.



31
32
33
# File 'lib/rafflesia/proteins/pocket.rb', line 31

def structure_id
  @structure_id
end

#volume_angstrom_3Object

Returns the value of attribute volume_angstrom_3.



31
32
33
# File 'lib/rafflesia/proteins/pocket.rb', line 31

def volume_angstrom_3
  @volume_angstrom_3
end