Class: Rafflesia::VariantMapGenomicData

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/genomes/variant_map_genomic_data.rb

Constant Summary collapse

HASH_ATTRS =
{
  assembly: :assembly,
  mappings: :mappings,
  relation: :relation,
  to: :to
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ VariantMapGenomicData

Returns a new instance of VariantMapGenomicData.



21
22
23
24
25
26
27
28
# File 'lib/rafflesia/genomes/variant_map_genomic_data.rb', line 21

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @assembly = hash[:assembly]
  @mappings = (hash[:mappings] || []).map { |item| item ? Rafflesia::VariantGenomicMapping.new(item) : nil }
  @relation = hash[:relation] ? Rafflesia::RelationArtifactData.new(hash[:relation]) : nil
  @to = hash[:to]
end

Instance Attribute Details

#assemblyObject

Returns the value of attribute assembly.



15
16
17
# File 'lib/rafflesia/genomes/variant_map_genomic_data.rb', line 15

def assembly
  @assembly
end

#mappingsObject

Returns the value of attribute mappings.



15
16
17
# File 'lib/rafflesia/genomes/variant_map_genomic_data.rb', line 15

def mappings
  @mappings
end

#relationObject

Returns the value of attribute relation.



15
16
17
# File 'lib/rafflesia/genomes/variant_map_genomic_data.rb', line 15

def relation
  @relation
end

#toObject

Returns the value of attribute to.



15
16
17
# File 'lib/rafflesia/genomes/variant_map_genomic_data.rb', line 15

def to
  @to
end