Class: Rafflesia::FoldResidueAlignment

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/proteins/fold_residue_alignment.rb

Constant Summary collapse

HASH_ATTRS =
{
  aligned_match: :aligned_match,
  aligned_query: :aligned_query,
  aligned_target: :aligned_target,
  backend: :backend,
  close_pair_count: :close_pair_count,
  pair_count: :pair_count,
  pairs: :pairs
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ FoldResidueAlignment

Returns a new instance of FoldResidueAlignment.



27
28
29
30
31
32
33
34
35
36
37
# File 'lib/rafflesia/proteins/fold_residue_alignment.rb', line 27

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @aligned_match = hash[:aligned_match]
  @aligned_query = hash[:aligned_query]
  @aligned_target = hash[:aligned_target]
  @backend = hash[:backend]
  @close_pair_count = hash[:close_pair_count]
  @pair_count = hash[:pair_count]
  @pairs = (hash[:pairs] || []).map { |item| item ? Rafflesia::FoldResiduePair.new(item) : nil }
end

Instance Attribute Details

#aligned_matchObject

Returns the value of attribute aligned_match.



18
19
20
# File 'lib/rafflesia/proteins/fold_residue_alignment.rb', line 18

def aligned_match
  @aligned_match
end

#aligned_queryObject

Returns the value of attribute aligned_query.



18
19
20
# File 'lib/rafflesia/proteins/fold_residue_alignment.rb', line 18

def aligned_query
  @aligned_query
end

#aligned_targetObject

Returns the value of attribute aligned_target.



18
19
20
# File 'lib/rafflesia/proteins/fold_residue_alignment.rb', line 18

def aligned_target
  @aligned_target
end

#backendObject

Returns the value of attribute backend.



18
19
20
# File 'lib/rafflesia/proteins/fold_residue_alignment.rb', line 18

def backend
  @backend
end

#close_pair_countObject

Returns the value of attribute close_pair_count.



18
19
20
# File 'lib/rafflesia/proteins/fold_residue_alignment.rb', line 18

def close_pair_count
  @close_pair_count
end

#pair_countObject

Returns the value of attribute pair_count.



18
19
20
# File 'lib/rafflesia/proteins/fold_residue_alignment.rb', line 18

def pair_count
  @pair_count
end

#pairsObject

Returns the value of attribute pairs.



18
19
20
# File 'lib/rafflesia/proteins/fold_residue_alignment.rb', line 18

def pairs
  @pairs
end