Class: Rafflesia::RegionSplitData
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::RegionSplitData
- Defined in:
- lib/rafflesia/proteins/region_split_data.rb
Constant Summary collapse
- HASH_ATTRS =
{ algorithm: :algorithm, confidence_metric: :confidence_metric, method: :method, regions: :regions, relation: :relation, structure_id: :structure_id, threshold: :threshold }.freeze
Instance Attribute Summary collapse
-
#algorithm ⇒ Object
Returns the value of attribute algorithm.
-
#confidence_metric ⇒ Object
Returns the value of attribute confidence_metric.
-
#method ⇒ Object
Returns the value of attribute method.
-
#regions ⇒ Object
Returns the value of attribute regions.
-
#relation ⇒ Object
Returns the value of attribute relation.
-
#structure_id ⇒ Object
Returns the value of attribute structure_id.
-
#threshold ⇒ Object
Returns the value of attribute threshold.
Instance Method Summary collapse
-
#initialize(json) ⇒ RegionSplitData
constructor
A new instance of RegionSplitData.
Constructor Details
#initialize(json) ⇒ RegionSplitData
Returns a new instance of RegionSplitData.
27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/rafflesia/proteins/region_split_data.rb', line 27 def initialize(json) super() hash = self.class.normalize(json) @algorithm = hash[:algorithm] ? Rafflesia::RegionSplitAlgorithm.new(hash[:algorithm]) : nil @confidence_metric = hash[:confidence_metric] @method = hash[:method] @regions = (hash[:regions] || []).map { |item| item ? Rafflesia::Region.new(item) : nil } @relation = hash[:relation] ? Rafflesia::RelationArtifactData.new(hash[:relation]) : nil @structure_id = hash[:structure_id] @threshold = hash[:threshold] end |
Instance Attribute Details
#algorithm ⇒ Object
Returns the value of attribute algorithm.
18 19 20 |
# File 'lib/rafflesia/proteins/region_split_data.rb', line 18 def algorithm @algorithm end |
#confidence_metric ⇒ Object
Returns the value of attribute confidence_metric.
18 19 20 |
# File 'lib/rafflesia/proteins/region_split_data.rb', line 18 def confidence_metric @confidence_metric end |
#method ⇒ Object
Returns the value of attribute method.
18 19 20 |
# File 'lib/rafflesia/proteins/region_split_data.rb', line 18 def method @method end |
#regions ⇒ Object
Returns the value of attribute regions.
18 19 20 |
# File 'lib/rafflesia/proteins/region_split_data.rb', line 18 def regions @regions end |
#relation ⇒ Object
Returns the value of attribute relation.
18 19 20 |
# File 'lib/rafflesia/proteins/region_split_data.rb', line 18 def relation @relation end |
#structure_id ⇒ Object
Returns the value of attribute structure_id.
18 19 20 |
# File 'lib/rafflesia/proteins/region_split_data.rb', line 18 def structure_id @structure_id end |
#threshold ⇒ Object
Returns the value of attribute threshold.
18 19 20 |
# File 'lib/rafflesia/proteins/region_split_data.rb', line 18 def threshold @threshold end |