Class: Rafflesia::VariantAnnotateData
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::VariantAnnotateData
- Defined in:
- lib/rafflesia/genomes/variant_annotate_data.rb
Constant Summary collapse
- HASH_ATTRS =
{ annotations: :annotations, relation: :relation }.freeze
Instance Attribute Summary collapse
-
#annotations ⇒ Object
Returns the value of attribute annotations.
-
#relation ⇒ Object
Returns the value of attribute relation.
Instance Method Summary collapse
-
#initialize(json) ⇒ VariantAnnotateData
constructor
A new instance of VariantAnnotateData.
Constructor Details
#initialize(json) ⇒ VariantAnnotateData
Returns a new instance of VariantAnnotateData.
17 18 19 20 21 22 |
# File 'lib/rafflesia/genomes/variant_annotate_data.rb', line 17 def initialize(json) super() hash = self.class.normalize(json) @annotations = (hash[:annotations] || []).map { |item| item ? Rafflesia::VariantAnnotationRecord.new(item) : nil } @relation = hash[:relation] ? Rafflesia::RelationArtifactData.new(hash[:relation]) : nil end |
Instance Attribute Details
#annotations ⇒ Object
Returns the value of attribute annotations.
13 14 15 |
# File 'lib/rafflesia/genomes/variant_annotate_data.rb', line 13 def annotations @annotations end |
#relation ⇒ Object
Returns the value of attribute relation.
13 14 15 |
# File 'lib/rafflesia/genomes/variant_annotate_data.rb', line 13 def relation @relation end |