Class: Rafflesia::VariantAnnotationRecord
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::VariantAnnotationRecord
- Defined in:
- lib/rafflesia/genomes/variant_annotation_record.rb
Constant Summary collapse
- HASH_ATTRS =
{ source_annotations: :source_annotations, variant: :variant, warnings: :warnings }.freeze
Instance Attribute Summary collapse
-
#source_annotations ⇒ Object
Returns the value of attribute source_annotations.
-
#variant ⇒ Object
Returns the value of attribute variant.
-
#warnings ⇒ Object
Returns the value of attribute warnings.
Instance Method Summary collapse
-
#initialize(json) ⇒ VariantAnnotationRecord
constructor
A new instance of VariantAnnotationRecord.
Constructor Details
#initialize(json) ⇒ VariantAnnotationRecord
Returns a new instance of VariantAnnotationRecord.
19 20 21 22 23 24 25 |
# File 'lib/rafflesia/genomes/variant_annotation_record.rb', line 19 def initialize(json) super() hash = self.class.normalize(json) @source_annotations = (hash[:source_annotations] || []).map { |item| item ? Rafflesia::VariantSourceAnnotation.new(item) : nil } @variant = hash[:variant] ? Rafflesia::VariantRecord.new(hash[:variant]) : nil @warnings = (hash[:warnings] || []).map { |item| item ? Rafflesia::SearchWarning.new(item) : nil } end |
Instance Attribute Details
#source_annotations ⇒ Object
Returns the value of attribute source_annotations.
14 15 16 |
# File 'lib/rafflesia/genomes/variant_annotation_record.rb', line 14 def source_annotations @source_annotations end |
#variant ⇒ Object
Returns the value of attribute variant.
14 15 16 |
# File 'lib/rafflesia/genomes/variant_annotation_record.rb', line 14 def variant @variant end |
#warnings ⇒ Object
Returns the value of attribute warnings.
14 15 16 |
# File 'lib/rafflesia/genomes/variant_annotation_record.rb', line 14 def warnings @warnings end |