Class: Rafflesia::VariantGenomicMapping
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::VariantGenomicMapping
- Defined in:
- lib/rafflesia/genomes/variant_genomic_mapping.rb
Constant Summary collapse
- HASH_ATTRS =
{ protein_mappings: :protein_mappings, structure_mappings: :structure_mappings, transcript_mappings: :transcript_mappings, variant: :variant, warnings: :warnings }.freeze
Instance Attribute Summary collapse
-
#protein_mappings ⇒ Object
Returns the value of attribute protein_mappings.
-
#structure_mappings ⇒ Object
Returns the value of attribute structure_mappings.
-
#transcript_mappings ⇒ Object
Returns the value of attribute transcript_mappings.
-
#variant ⇒ Object
Returns the value of attribute variant.
-
#warnings ⇒ Object
Returns the value of attribute warnings.
Instance Method Summary collapse
-
#initialize(json) ⇒ VariantGenomicMapping
constructor
A new instance of VariantGenomicMapping.
Constructor Details
#initialize(json) ⇒ VariantGenomicMapping
Returns a new instance of VariantGenomicMapping.
23 24 25 26 27 28 29 30 31 |
# File 'lib/rafflesia/genomes/variant_genomic_mapping.rb', line 23 def initialize(json) super() hash = self.class.normalize(json) @protein_mappings = (hash[:protein_mappings] || []).map { |item| item ? Rafflesia::VariantProteinMapping.new(item) : nil } @structure_mappings = (hash[:structure_mappings] || []).map { |item| item ? Rafflesia::VariantStructureMapping.new(item) : nil } @transcript_mappings = (hash[:transcript_mappings] || []).map { |item| item ? Rafflesia::VariantTranscriptMapping.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
#protein_mappings ⇒ Object
Returns the value of attribute protein_mappings.
16 17 18 |
# File 'lib/rafflesia/genomes/variant_genomic_mapping.rb', line 16 def protein_mappings @protein_mappings end |
#structure_mappings ⇒ Object
Returns the value of attribute structure_mappings.
16 17 18 |
# File 'lib/rafflesia/genomes/variant_genomic_mapping.rb', line 16 def structure_mappings @structure_mappings end |
#transcript_mappings ⇒ Object
Returns the value of attribute transcript_mappings.
16 17 18 |
# File 'lib/rafflesia/genomes/variant_genomic_mapping.rb', line 16 def transcript_mappings @transcript_mappings end |
#variant ⇒ Object
Returns the value of attribute variant.
16 17 18 |
# File 'lib/rafflesia/genomes/variant_genomic_mapping.rb', line 16 def variant @variant end |
#warnings ⇒ Object
Returns the value of attribute warnings.
16 17 18 |
# File 'lib/rafflesia/genomes/variant_genomic_mapping.rb', line 16 def warnings @warnings end |