Class: Rafflesia::PocketLigandDistancesData

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

Constant Summary collapse

HASH_ATTRS =
{
  distance_metric: :distance_metric,
  distance_threshold_angstrom: :distance_threshold_angstrom,
  is_ligand_filtered: :is_ligand_filtered,
  is_truncated: :is_truncated,
  ligand_count: :ligand_count,
  ligand_group_count: :ligand_group_count,
  ligand_group_measurements: :ligand_group_measurements,
  ligand_grouping: :ligand_grouping,
  ligand_measurements: :ligand_measurements,
  ligands: :ligands,
  normalized_ligand_selectors: :normalized_ligand_selectors,
  pair_count: :pair_count,
  pairs: :pairs,
  pocket_count: :pocket_count,
  pockets: :pockets,
  prediction_format: :prediction_format,
  prediction_method: :prediction_method,
  prediction_path: :prediction_path,
  prediction_sha256: :prediction_sha_256,
  relation: :relation,
  returned_pair_count: :returned_pair_count,
  structure_id: :structure_id,
  threshold_hit_ligand_count: :threshold_hit_ligand_count,
  threshold_hit_ligand_group_count: :threshold_hit_ligand_group_count,
  top_n: :top_n,
  top_n_plus_extra: :top_n_plus_extra,
  top_n_plus_extra_threshold_hit_ligand_count: :top_n_plus_extra_threshold_hit_ligand_count,
  top_n_plus_extra_threshold_hit_ligand_group_count: :top_n_plus_extra_threshold_hit_ligand_group_count,
  top_n_reference: :top_n_reference,
  top_n_threshold_hit_ligand_count: :top_n_threshold_hit_ligand_count,
  top_n_threshold_hit_ligand_group_count: :top_n_threshold_hit_ligand_group_count
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ PocketLigandDistancesData

Returns a new instance of PocketLigandDistancesData.



75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# File 'lib/rafflesia/proteins/pocket_ligand_distances_data.rb', line 75

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @distance_metric = hash[:distance_metric]
  @distance_threshold_angstrom = hash[:distance_threshold_angstrom]
  @is_ligand_filtered = hash[:is_ligand_filtered]
  @is_truncated = hash[:is_truncated]
  @ligand_count = hash[:ligand_count]
  @ligand_group_count = hash[:ligand_group_count]
  @ligand_group_measurements = (hash[:ligand_group_measurements] || []).map { |item| item ? Rafflesia::PocketLigandMeasurement.new(item) : nil }
  @ligand_grouping = hash[:ligand_grouping]
  @ligand_measurements = (hash[:ligand_measurements] || []).map { |item| item ? Rafflesia::PocketLigandMeasurement.new(item) : nil }
  @ligands = (hash[:ligands] || []).map { |item| item ? Rafflesia::Ligand.new(item) : nil }
  @normalized_ligand_selectors = (hash[:normalized_ligand_selectors] || [])
  @pair_count = hash[:pair_count]
  @pairs = (hash[:pairs] || []).map { |item| item ? Rafflesia::PocketLigandDistance.new(item) : nil }
  @pocket_count = hash[:pocket_count]
  @pockets = (hash[:pockets] || []).map { |item| item ? Rafflesia::Pocket.new(item) : nil }
  @prediction_format = hash[:prediction_format]
  @prediction_method = hash[:prediction_method]
  @prediction_path = hash[:prediction_path]
  @prediction_sha_256 = hash[:prediction_sha256]
  @relation = hash[:relation] ? Rafflesia::RelationArtifactData.new(hash[:relation]) : nil
  @returned_pair_count = hash[:returned_pair_count]
  @structure_id = hash[:structure_id]
  @threshold_hit_ligand_count = hash[:threshold_hit_ligand_count]
  @threshold_hit_ligand_group_count = hash[:threshold_hit_ligand_group_count]
  @top_n = hash[:top_n]
  @top_n_plus_extra = hash[:top_n_plus_extra]
  @top_n_plus_extra_threshold_hit_ligand_count = hash[:top_n_plus_extra_threshold_hit_ligand_count]
  @top_n_plus_extra_threshold_hit_ligand_group_count = hash[:top_n_plus_extra_threshold_hit_ligand_group_count]
  @top_n_reference = hash[:top_n_reference]
  @top_n_threshold_hit_ligand_count = hash[:top_n_threshold_hit_ligand_count]
  @top_n_threshold_hit_ligand_group_count = hash[:top_n_threshold_hit_ligand_group_count]
end

Instance Attribute Details

#distance_metricObject

Returns the value of attribute distance_metric.



42
43
44
# File 'lib/rafflesia/proteins/pocket_ligand_distances_data.rb', line 42

def distance_metric
  @distance_metric
end

#distance_threshold_angstromObject

Returns the value of attribute distance_threshold_angstrom.



42
43
44
# File 'lib/rafflesia/proteins/pocket_ligand_distances_data.rb', line 42

def distance_threshold_angstrom
  @distance_threshold_angstrom
end

#is_ligand_filteredObject

Returns the value of attribute is_ligand_filtered.



42
43
44
# File 'lib/rafflesia/proteins/pocket_ligand_distances_data.rb', line 42

def is_ligand_filtered
  @is_ligand_filtered
end

#is_truncatedObject

Returns the value of attribute is_truncated.



42
43
44
# File 'lib/rafflesia/proteins/pocket_ligand_distances_data.rb', line 42

def is_truncated
  @is_truncated
end

#ligand_countObject

Returns the value of attribute ligand_count.



42
43
44
# File 'lib/rafflesia/proteins/pocket_ligand_distances_data.rb', line 42

def ligand_count
  @ligand_count
end

#ligand_group_countObject

Returns the value of attribute ligand_group_count.



42
43
44
# File 'lib/rafflesia/proteins/pocket_ligand_distances_data.rb', line 42

def ligand_group_count
  @ligand_group_count
end

#ligand_group_measurementsObject

Returns the value of attribute ligand_group_measurements.



42
43
44
# File 'lib/rafflesia/proteins/pocket_ligand_distances_data.rb', line 42

def ligand_group_measurements
  @ligand_group_measurements
end

#ligand_groupingObject

Returns the value of attribute ligand_grouping.



42
43
44
# File 'lib/rafflesia/proteins/pocket_ligand_distances_data.rb', line 42

def ligand_grouping
  @ligand_grouping
end

#ligand_measurementsObject

Returns the value of attribute ligand_measurements.



42
43
44
# File 'lib/rafflesia/proteins/pocket_ligand_distances_data.rb', line 42

def ligand_measurements
  @ligand_measurements
end

#ligandsObject

Returns the value of attribute ligands.



42
43
44
# File 'lib/rafflesia/proteins/pocket_ligand_distances_data.rb', line 42

def ligands
  @ligands
end

#normalized_ligand_selectorsObject

Returns the value of attribute normalized_ligand_selectors.



42
43
44
# File 'lib/rafflesia/proteins/pocket_ligand_distances_data.rb', line 42

def normalized_ligand_selectors
  @normalized_ligand_selectors
end

#pair_countObject

Returns the value of attribute pair_count.



42
43
44
# File 'lib/rafflesia/proteins/pocket_ligand_distances_data.rb', line 42

def pair_count
  @pair_count
end

#pairsObject

Returns the value of attribute pairs.



42
43
44
# File 'lib/rafflesia/proteins/pocket_ligand_distances_data.rb', line 42

def pairs
  @pairs
end

#pocket_countObject

Returns the value of attribute pocket_count.



42
43
44
# File 'lib/rafflesia/proteins/pocket_ligand_distances_data.rb', line 42

def pocket_count
  @pocket_count
end

#pocketsObject

Returns the value of attribute pockets.



42
43
44
# File 'lib/rafflesia/proteins/pocket_ligand_distances_data.rb', line 42

def pockets
  @pockets
end

#prediction_formatObject

Returns the value of attribute prediction_format.



42
43
44
# File 'lib/rafflesia/proteins/pocket_ligand_distances_data.rb', line 42

def prediction_format
  @prediction_format
end

#prediction_methodObject

Returns the value of attribute prediction_method.



42
43
44
# File 'lib/rafflesia/proteins/pocket_ligand_distances_data.rb', line 42

def prediction_method
  @prediction_method
end

#prediction_pathObject

Returns the value of attribute prediction_path.



42
43
44
# File 'lib/rafflesia/proteins/pocket_ligand_distances_data.rb', line 42

def prediction_path
  @prediction_path
end

#prediction_sha_256Object

Returns the value of attribute prediction_sha_256.



42
43
44
# File 'lib/rafflesia/proteins/pocket_ligand_distances_data.rb', line 42

def prediction_sha_256
  @prediction_sha_256
end

#relationObject

Returns the value of attribute relation.



42
43
44
# File 'lib/rafflesia/proteins/pocket_ligand_distances_data.rb', line 42

def relation
  @relation
end

#returned_pair_countObject

Returns the value of attribute returned_pair_count.



42
43
44
# File 'lib/rafflesia/proteins/pocket_ligand_distances_data.rb', line 42

def returned_pair_count
  @returned_pair_count
end

#structure_idObject

Returns the value of attribute structure_id.



42
43
44
# File 'lib/rafflesia/proteins/pocket_ligand_distances_data.rb', line 42

def structure_id
  @structure_id
end

#threshold_hit_ligand_countObject

Returns the value of attribute threshold_hit_ligand_count.



42
43
44
# File 'lib/rafflesia/proteins/pocket_ligand_distances_data.rb', line 42

def threshold_hit_ligand_count
  @threshold_hit_ligand_count
end

#threshold_hit_ligand_group_countObject

Returns the value of attribute threshold_hit_ligand_group_count.



42
43
44
# File 'lib/rafflesia/proteins/pocket_ligand_distances_data.rb', line 42

def threshold_hit_ligand_group_count
  @threshold_hit_ligand_group_count
end

#top_nObject

Returns the value of attribute top_n.



42
43
44
# File 'lib/rafflesia/proteins/pocket_ligand_distances_data.rb', line 42

def top_n
  @top_n
end

#top_n_plus_extraObject

Returns the value of attribute top_n_plus_extra.



42
43
44
# File 'lib/rafflesia/proteins/pocket_ligand_distances_data.rb', line 42

def top_n_plus_extra
  @top_n_plus_extra
end

#top_n_plus_extra_threshold_hit_ligand_countObject

Returns the value of attribute top_n_plus_extra_threshold_hit_ligand_count.



42
43
44
# File 'lib/rafflesia/proteins/pocket_ligand_distances_data.rb', line 42

def top_n_plus_extra_threshold_hit_ligand_count
  @top_n_plus_extra_threshold_hit_ligand_count
end

#top_n_plus_extra_threshold_hit_ligand_group_countObject

Returns the value of attribute top_n_plus_extra_threshold_hit_ligand_group_count.



42
43
44
# File 'lib/rafflesia/proteins/pocket_ligand_distances_data.rb', line 42

def top_n_plus_extra_threshold_hit_ligand_group_count
  @top_n_plus_extra_threshold_hit_ligand_group_count
end

#top_n_referenceObject

Returns the value of attribute top_n_reference.



42
43
44
# File 'lib/rafflesia/proteins/pocket_ligand_distances_data.rb', line 42

def top_n_reference
  @top_n_reference
end

#top_n_threshold_hit_ligand_countObject

Returns the value of attribute top_n_threshold_hit_ligand_count.



42
43
44
# File 'lib/rafflesia/proteins/pocket_ligand_distances_data.rb', line 42

def top_n_threshold_hit_ligand_count
  @top_n_threshold_hit_ligand_count
end

#top_n_threshold_hit_ligand_group_countObject

Returns the value of attribute top_n_threshold_hit_ligand_group_count.



42
43
44
# File 'lib/rafflesia/proteins/pocket_ligand_distances_data.rb', line 42

def top_n_threshold_hit_ligand_group_count
  @top_n_threshold_hit_ligand_group_count
end