Class: Rafflesia::VariantFeature
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::VariantFeature
- Defined in:
- lib/rafflesia/proteins/variant_feature.rb
Constant Summary collapse
- HASH_ATTRS =
{ interface_distance_angstrom: :interface_distance_angstrom, mutant_aa: :mutant_aa, mutation_type: :mutation_type, neighbor_count: :neighbor_count, plddt: :plddt, pocket_distance_angstrom: :pocket_distance_angstrom, raw: :raw, residue: :residue, sequence_position: :sequence_position, structure_chain_id: :structure_chain_id, structure_residue_number: :structure_residue_number, warnings: :warnings, wildtype_aa: :wildtype_aa }.freeze
Instance Attribute Summary collapse
-
#interface_distance_angstrom ⇒ Object
Returns the value of attribute interface_distance_angstrom.
-
#mutant_aa ⇒ Object
Returns the value of attribute mutant_aa.
-
#mutation_type ⇒ Object
Returns the value of attribute mutation_type.
-
#neighbor_count ⇒ Object
Returns the value of attribute neighbor_count.
-
#plddt ⇒ Object
Returns the value of attribute plddt.
-
#pocket_distance_angstrom ⇒ Object
Returns the value of attribute pocket_distance_angstrom.
-
#raw ⇒ Object
Returns the value of attribute raw.
-
#residue ⇒ Object
Returns the value of attribute residue.
-
#sequence_position ⇒ Object
Returns the value of attribute sequence_position.
-
#structure_chain_id ⇒ Object
Returns the value of attribute structure_chain_id.
-
#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.
Instance Method Summary collapse
-
#initialize(json) ⇒ VariantFeature
constructor
A new instance of VariantFeature.
Constructor Details
#initialize(json) ⇒ VariantFeature
Returns a new instance of VariantFeature.
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/rafflesia/proteins/variant_feature.rb', line 39 def initialize(json) super() hash = self.class.normalize(json) @interface_distance_angstrom = hash[:interface_distance_angstrom] @mutant_aa = hash[:mutant_aa] @mutation_type = hash[:mutation_type] @neighbor_count = hash[:neighbor_count] @plddt = hash[:plddt] @pocket_distance_angstrom = hash[:pocket_distance_angstrom] @raw = hash[:raw] @residue = hash[:residue] @sequence_position = hash[:sequence_position] @structure_chain_id = hash[:structure_chain_id] @structure_residue_number = hash[:structure_residue_number] @warnings = (hash[:warnings] || []).map { |item| item ? Rafflesia::SearchWarning.new(item) : nil } @wildtype_aa = hash[:wildtype_aa] end |
Instance Attribute Details
#interface_distance_angstrom ⇒ Object
Returns the value of attribute interface_distance_angstrom.
24 25 26 |
# File 'lib/rafflesia/proteins/variant_feature.rb', line 24 def interface_distance_angstrom @interface_distance_angstrom end |
#mutant_aa ⇒ Object
Returns the value of attribute mutant_aa.
24 25 26 |
# File 'lib/rafflesia/proteins/variant_feature.rb', line 24 def mutant_aa @mutant_aa end |
#mutation_type ⇒ Object
Returns the value of attribute mutation_type.
24 25 26 |
# File 'lib/rafflesia/proteins/variant_feature.rb', line 24 def mutation_type @mutation_type end |
#neighbor_count ⇒ Object
Returns the value of attribute neighbor_count.
24 25 26 |
# File 'lib/rafflesia/proteins/variant_feature.rb', line 24 def neighbor_count @neighbor_count end |
#plddt ⇒ Object
Returns the value of attribute plddt.
24 25 26 |
# File 'lib/rafflesia/proteins/variant_feature.rb', line 24 def plddt @plddt end |
#pocket_distance_angstrom ⇒ Object
Returns the value of attribute pocket_distance_angstrom.
24 25 26 |
# File 'lib/rafflesia/proteins/variant_feature.rb', line 24 def pocket_distance_angstrom @pocket_distance_angstrom end |
#raw ⇒ Object
Returns the value of attribute raw.
24 25 26 |
# File 'lib/rafflesia/proteins/variant_feature.rb', line 24 def raw @raw end |
#residue ⇒ Object
Returns the value of attribute residue.
24 25 26 |
# File 'lib/rafflesia/proteins/variant_feature.rb', line 24 def residue @residue end |
#sequence_position ⇒ Object
Returns the value of attribute sequence_position.
24 25 26 |
# File 'lib/rafflesia/proteins/variant_feature.rb', line 24 def sequence_position @sequence_position end |
#structure_chain_id ⇒ Object
Returns the value of attribute structure_chain_id.
24 25 26 |
# File 'lib/rafflesia/proteins/variant_feature.rb', line 24 def structure_chain_id @structure_chain_id end |
#structure_residue_number ⇒ Object
Returns the value of attribute structure_residue_number.
24 25 26 |
# File 'lib/rafflesia/proteins/variant_feature.rb', line 24 def structure_residue_number @structure_residue_number end |
#warnings ⇒ Object
Returns the value of attribute warnings.
24 25 26 |
# File 'lib/rafflesia/proteins/variant_feature.rb', line 24 def warnings @warnings end |
#wildtype_aa ⇒ Object
Returns the value of attribute wildtype_aa.
24 25 26 |
# File 'lib/rafflesia/proteins/variant_feature.rb', line 24 def wildtype_aa @wildtype_aa end |