Class: Rafflesia::Interface
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::Interface
- Defined in:
- lib/rafflesia/proteins/interface.rb
Constant Summary collapse
- HASH_ATTRS =
{ assembly_id: :assembly_id, chain_a_id: :chain_a_id, chain_b_id: :chain_b_id, contact_pair_count: :contact_pair_count, contact_pairs: :contact_pairs, interface_id: :interface_id, is_contact_pairs_truncated: :is_contact_pairs_truncated, mean_distance_angstrom: :mean_distance_angstrom, method: :method, min_distance_angstrom: :min_distance_angstrom, model_id: :model_id, radius: :radius, residue_contacts_a: :residue_contacts_a, residue_contacts_b: :residue_contacts_b, residue_count_a: :residue_count_a, residue_count_b: :residue_count_b, residues_a: :residues_a, residues_b: :residues_b, structure_id: :structure_id }.freeze
Instance Attribute Summary collapse
-
#assembly_id ⇒ Object
Returns the value of attribute assembly_id.
-
#chain_a_id ⇒ Object
Returns the value of attribute chain_a_id.
-
#chain_b_id ⇒ Object
Returns the value of attribute chain_b_id.
-
#contact_pair_count ⇒ Object
Returns the value of attribute contact_pair_count.
-
#contact_pairs ⇒ Object
Returns the value of attribute contact_pairs.
-
#interface_id ⇒ Object
Returns the value of attribute interface_id.
-
#is_contact_pairs_truncated ⇒ Object
Returns the value of attribute is_contact_pairs_truncated.
-
#mean_distance_angstrom ⇒ Object
Returns the value of attribute mean_distance_angstrom.
-
#method ⇒ Object
Returns the value of attribute method.
-
#min_distance_angstrom ⇒ Object
Returns the value of attribute min_distance_angstrom.
-
#model_id ⇒ Object
Returns the value of attribute model_id.
-
#radius ⇒ Object
Returns the value of attribute radius.
-
#residue_contacts_a ⇒ Object
Returns the value of attribute residue_contacts_a.
-
#residue_contacts_b ⇒ Object
Returns the value of attribute residue_contacts_b.
-
#residue_count_a ⇒ Object
Returns the value of attribute residue_count_a.
-
#residue_count_b ⇒ Object
Returns the value of attribute residue_count_b.
-
#residues_a ⇒ Object
Returns the value of attribute residues_a.
-
#residues_b ⇒ Object
Returns the value of attribute residues_b.
-
#structure_id ⇒ Object
Returns the value of attribute structure_id.
Instance Method Summary collapse
-
#initialize(json) ⇒ Interface
constructor
A new instance of Interface.
Constructor Details
#initialize(json) ⇒ Interface
Returns a new instance of Interface.
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/rafflesia/proteins/interface.rb', line 51 def initialize(json) super() hash = self.class.normalize(json) @assembly_id = hash[:assembly_id] @chain_a_id = hash[:chain_a_id] @chain_b_id = hash[:chain_b_id] @contact_pair_count = hash[:contact_pair_count] @contact_pairs = (hash[:contact_pairs] || []).map { |item| item ? Rafflesia::ContactPair.new(item) : nil } @interface_id = hash[:interface_id] @is_contact_pairs_truncated = hash[:is_contact_pairs_truncated] @mean_distance_angstrom = hash[:mean_distance_angstrom] @method = hash[:method] @min_distance_angstrom = hash[:min_distance_angstrom] @model_id = hash[:model_id] @radius = hash[:radius] @residue_contacts_a = (hash[:residue_contacts_a] || []).map { |item| item ? Rafflesia::InterfaceResidueContact.new(item) : nil } @residue_contacts_b = (hash[:residue_contacts_b] || []).map { |item| item ? Rafflesia::InterfaceResidueContact.new(item) : nil } @residue_count_a = hash[:residue_count_a] @residue_count_b = hash[:residue_count_b] @residues_a = (hash[:residues_a] || []).map { |item| item ? Rafflesia::ResiduePointer.new(item) : nil } @residues_b = (hash[:residues_b] || []).map { |item| item ? Rafflesia::ResiduePointer.new(item) : nil } @structure_id = hash[:structure_id] end |
Instance Attribute Details
#assembly_id ⇒ Object
Returns the value of attribute assembly_id.
30 31 32 |
# File 'lib/rafflesia/proteins/interface.rb', line 30 def assembly_id @assembly_id end |
#chain_a_id ⇒ Object
Returns the value of attribute chain_a_id.
30 31 32 |
# File 'lib/rafflesia/proteins/interface.rb', line 30 def chain_a_id @chain_a_id end |
#chain_b_id ⇒ Object
Returns the value of attribute chain_b_id.
30 31 32 |
# File 'lib/rafflesia/proteins/interface.rb', line 30 def chain_b_id @chain_b_id end |
#contact_pair_count ⇒ Object
Returns the value of attribute contact_pair_count.
30 31 32 |
# File 'lib/rafflesia/proteins/interface.rb', line 30 def contact_pair_count @contact_pair_count end |
#contact_pairs ⇒ Object
Returns the value of attribute contact_pairs.
30 31 32 |
# File 'lib/rafflesia/proteins/interface.rb', line 30 def contact_pairs @contact_pairs end |
#interface_id ⇒ Object
Returns the value of attribute interface_id.
30 31 32 |
# File 'lib/rafflesia/proteins/interface.rb', line 30 def interface_id @interface_id end |
#is_contact_pairs_truncated ⇒ Object
Returns the value of attribute is_contact_pairs_truncated.
30 31 32 |
# File 'lib/rafflesia/proteins/interface.rb', line 30 def is_contact_pairs_truncated @is_contact_pairs_truncated end |
#mean_distance_angstrom ⇒ Object
Returns the value of attribute mean_distance_angstrom.
30 31 32 |
# File 'lib/rafflesia/proteins/interface.rb', line 30 def mean_distance_angstrom @mean_distance_angstrom end |
#method ⇒ Object
Returns the value of attribute method.
30 31 32 |
# File 'lib/rafflesia/proteins/interface.rb', line 30 def method @method end |
#min_distance_angstrom ⇒ Object
Returns the value of attribute min_distance_angstrom.
30 31 32 |
# File 'lib/rafflesia/proteins/interface.rb', line 30 def min_distance_angstrom @min_distance_angstrom end |
#model_id ⇒ Object
Returns the value of attribute model_id.
30 31 32 |
# File 'lib/rafflesia/proteins/interface.rb', line 30 def model_id @model_id end |
#radius ⇒ Object
Returns the value of attribute radius.
30 31 32 |
# File 'lib/rafflesia/proteins/interface.rb', line 30 def radius @radius end |
#residue_contacts_a ⇒ Object
Returns the value of attribute residue_contacts_a.
30 31 32 |
# File 'lib/rafflesia/proteins/interface.rb', line 30 def residue_contacts_a @residue_contacts_a end |
#residue_contacts_b ⇒ Object
Returns the value of attribute residue_contacts_b.
30 31 32 |
# File 'lib/rafflesia/proteins/interface.rb', line 30 def residue_contacts_b @residue_contacts_b end |
#residue_count_a ⇒ Object
Returns the value of attribute residue_count_a.
30 31 32 |
# File 'lib/rafflesia/proteins/interface.rb', line 30 def residue_count_a @residue_count_a end |
#residue_count_b ⇒ Object
Returns the value of attribute residue_count_b.
30 31 32 |
# File 'lib/rafflesia/proteins/interface.rb', line 30 def residue_count_b @residue_count_b end |
#residues_a ⇒ Object
Returns the value of attribute residues_a.
30 31 32 |
# File 'lib/rafflesia/proteins/interface.rb', line 30 def residues_a @residues_a end |
#residues_b ⇒ Object
Returns the value of attribute residues_b.
30 31 32 |
# File 'lib/rafflesia/proteins/interface.rb', line 30 def residues_b @residues_b end |
#structure_id ⇒ Object
Returns the value of attribute structure_id.
30 31 32 |
# File 'lib/rafflesia/proteins/interface.rb', line 30 def structure_id @structure_id end |