Class: Rafflesia::VariantFeature

Inherits:
Types::BaseModel
  • Object
show all
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

Instance Method Summary collapse

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_angstromObject

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_aaObject

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_typeObject

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_countObject

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

#plddtObject

Returns the value of attribute plddt.



24
25
26
# File 'lib/rafflesia/proteins/variant_feature.rb', line 24

def plddt
  @plddt
end

#pocket_distance_angstromObject

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

#rawObject

Returns the value of attribute raw.



24
25
26
# File 'lib/rafflesia/proteins/variant_feature.rb', line 24

def raw
  @raw
end

#residueObject

Returns the value of attribute residue.



24
25
26
# File 'lib/rafflesia/proteins/variant_feature.rb', line 24

def residue
  @residue
end

#sequence_positionObject

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_idObject

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_numberObject

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

#warningsObject

Returns the value of attribute warnings.



24
25
26
# File 'lib/rafflesia/proteins/variant_feature.rb', line 24

def warnings
  @warnings
end

#wildtype_aaObject

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