Class: Rafflesia::VariantRecord
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::VariantRecord
- Defined in:
- lib/rafflesia/genomes/variant_record.rb
Constant Summary collapse
- HASH_ATTRS =
{ alt: :alt, chrom: :chrom, id: :id, pos: :pos, ref: :ref }.freeze
Instance Attribute Summary collapse
-
#alt ⇒ Object
Returns the value of attribute alt.
-
#chrom ⇒ Object
Returns the value of attribute chrom.
-
#id ⇒ Object
Returns the value of attribute id.
-
#pos ⇒ Object
Returns the value of attribute pos.
-
#ref ⇒ Object
Returns the value of attribute ref.
Instance Method Summary collapse
-
#initialize(json) ⇒ VariantRecord
constructor
A new instance of VariantRecord.
Constructor Details
#initialize(json) ⇒ VariantRecord
Returns a new instance of VariantRecord.
23 24 25 26 27 28 29 30 31 |
# File 'lib/rafflesia/genomes/variant_record.rb', line 23 def initialize(json) super() hash = self.class.normalize(json) @alt = hash[:alt] @chrom = hash[:chrom] @id = hash[:id] @pos = hash[:pos] @ref = hash[:ref] end |
Instance Attribute Details
#alt ⇒ Object
Returns the value of attribute alt.
16 17 18 |
# File 'lib/rafflesia/genomes/variant_record.rb', line 16 def alt @alt end |
#chrom ⇒ Object
Returns the value of attribute chrom.
16 17 18 |
# File 'lib/rafflesia/genomes/variant_record.rb', line 16 def chrom @chrom end |
#id ⇒ Object
Returns the value of attribute id.
16 17 18 |
# File 'lib/rafflesia/genomes/variant_record.rb', line 16 def id @id end |
#pos ⇒ Object
Returns the value of attribute pos.
16 17 18 |
# File 'lib/rafflesia/genomes/variant_record.rb', line 16 def pos @pos end |
#ref ⇒ Object
Returns the value of attribute ref.
16 17 18 |
# File 'lib/rafflesia/genomes/variant_record.rb', line 16 def ref @ref end |