Class: Rafflesia::MappedVariant
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::MappedVariant
- Defined in:
- lib/rafflesia/proteins/mapped_variant.rb
Constant Summary collapse
- HASH_ATTRS =
{ is_valid: :is_valid, mutant_aa: :mutant_aa, mutation_type: :mutation_type, raw: :raw, sequence_position: :sequence_position, structure_chain_id: :structure_chain_id, structure_residue_aa: :structure_residue_aa, structure_residue_index: :structure_residue_index, structure_residue_number: :structure_residue_number, warnings: :warnings, wildtype_aa: :wildtype_aa, wildtype_matches: :wildtype_matches }.freeze
Instance Attribute Summary collapse
-
#is_valid ⇒ Object
Returns the value of attribute is_valid.
-
#mutant_aa ⇒ Object
Returns the value of attribute mutant_aa.
-
#mutation_type ⇒ Object
Returns the value of attribute mutation_type.
-
#raw ⇒ Object
Returns the value of attribute raw.
-
#sequence_position ⇒ Object
Returns the value of attribute sequence_position.
-
#structure_chain_id ⇒ Object
Returns the value of attribute structure_chain_id.
-
#structure_residue_aa ⇒ Object
Returns the value of attribute structure_residue_aa.
-
#structure_residue_index ⇒ Object
Returns the value of attribute structure_residue_index.
-
#structure_residue_number ⇒ Object
Returns the value of attribute structure_residue_number.
-
#warnings ⇒ Object
Returns the value of attribute warnings.
-
#wildtype_aa ⇒ Object
Returns the value of attribute wildtype_aa.
-
#wildtype_matches ⇒ Object
Returns the value of attribute wildtype_matches.
Instance Method Summary collapse
-
#initialize(json) ⇒ MappedVariant
constructor
A new instance of MappedVariant.
Constructor Details
#initialize(json) ⇒ MappedVariant
Returns a new instance of MappedVariant.
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/rafflesia/proteins/mapped_variant.rb', line 37 def initialize(json) super() hash = self.class.normalize(json) @is_valid = hash[:is_valid] @mutant_aa = hash[:mutant_aa] @mutation_type = hash[:mutation_type] @raw = hash[:raw] @sequence_position = hash[:sequence_position] @structure_chain_id = hash[:structure_chain_id] @structure_residue_aa = hash[:structure_residue_aa] @structure_residue_index = hash[:structure_residue_index] @structure_residue_number = hash[:structure_residue_number] @warnings = (hash[:warnings] || []).map { |item| item ? Rafflesia::SearchWarning.new(item) : nil } @wildtype_aa = hash[:wildtype_aa] @wildtype_matches = hash[:wildtype_matches] end |
Instance Attribute Details
#is_valid ⇒ Object
Returns the value of attribute is_valid.
23 24 25 |
# File 'lib/rafflesia/proteins/mapped_variant.rb', line 23 def is_valid @is_valid end |
#mutant_aa ⇒ Object
Returns the value of attribute mutant_aa.
23 24 25 |
# File 'lib/rafflesia/proteins/mapped_variant.rb', line 23 def mutant_aa @mutant_aa end |
#mutation_type ⇒ Object
Returns the value of attribute mutation_type.
23 24 25 |
# File 'lib/rafflesia/proteins/mapped_variant.rb', line 23 def mutation_type @mutation_type end |
#raw ⇒ Object
Returns the value of attribute raw.
23 24 25 |
# File 'lib/rafflesia/proteins/mapped_variant.rb', line 23 def raw @raw end |
#sequence_position ⇒ Object
Returns the value of attribute sequence_position.
23 24 25 |
# File 'lib/rafflesia/proteins/mapped_variant.rb', line 23 def sequence_position @sequence_position end |
#structure_chain_id ⇒ Object
Returns the value of attribute structure_chain_id.
23 24 25 |
# File 'lib/rafflesia/proteins/mapped_variant.rb', line 23 def structure_chain_id @structure_chain_id end |
#structure_residue_aa ⇒ Object
Returns the value of attribute structure_residue_aa.
23 24 25 |
# File 'lib/rafflesia/proteins/mapped_variant.rb', line 23 def structure_residue_aa @structure_residue_aa end |
#structure_residue_index ⇒ Object
Returns the value of attribute structure_residue_index.
23 24 25 |
# File 'lib/rafflesia/proteins/mapped_variant.rb', line 23 def structure_residue_index @structure_residue_index end |
#structure_residue_number ⇒ Object
Returns the value of attribute structure_residue_number.
23 24 25 |
# File 'lib/rafflesia/proteins/mapped_variant.rb', line 23 def structure_residue_number @structure_residue_number end |
#warnings ⇒ Object
Returns the value of attribute warnings.
23 24 25 |
# File 'lib/rafflesia/proteins/mapped_variant.rb', line 23 def warnings @warnings end |
#wildtype_aa ⇒ Object
Returns the value of attribute wildtype_aa.
23 24 25 |
# File 'lib/rafflesia/proteins/mapped_variant.rb', line 23 def wildtype_aa @wildtype_aa end |
#wildtype_matches ⇒ Object
Returns the value of attribute wildtype_matches.
23 24 25 |
# File 'lib/rafflesia/proteins/mapped_variant.rb', line 23 def wildtype_matches @wildtype_matches end |