Class: Rafflesia::VariantFeatureNeighbor

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

Constant Summary collapse

HASH_ATTRS =
{
  distance_bp: :distance_bp,
  feature_id: :feature_id,
  feature_type: :feature_type,
  overlaps: :overlaps
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ VariantFeatureNeighbor

Returns a new instance of VariantFeatureNeighbor.



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

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @distance_bp = hash[:distance_bp]
  @feature_id = hash[:feature_id]
  @feature_type = hash[:feature_type]
  @overlaps = hash[:overlaps]
end

Instance Attribute Details

#distance_bpObject

Returns the value of attribute distance_bp.



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

def distance_bp
  @distance_bp
end

#feature_idObject

Returns the value of attribute feature_id.



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

def feature_id
  @feature_id
end

#feature_typeObject

Returns the value of attribute feature_type.



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

def feature_type
  @feature_type
end

#overlapsObject

Returns the value of attribute overlaps.



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

def overlaps
  @overlaps
end