Class: Rafflesia::SequenceCandidateHit

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/sequences/sequence_candidate_hit.rb

Constant Summary collapse

HASH_ATTRS =
{
  candidate_source: :candidate_source,
  identity: :identity,
  score: :score,
  scoring_method: :scoring_method,
  seq_id: :seq_id,
  sequence_id: :sequence_id,
  sequence_length: :sequence_length,
  shared_tokens: :shared_tokens,
  source: :source
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ SequenceCandidateHit

Returns a new instance of SequenceCandidateHit.



31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/rafflesia/sequences/sequence_candidate_hit.rb', line 31

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @candidate_source = hash[:candidate_source]
  @identity = hash[:identity]
  @score = hash[:score]
  @scoring_method = hash[:scoring_method]
  @seq_id = hash[:seq_id]
  @sequence_id = hash[:sequence_id]
  @sequence_length = hash[:sequence_length]
  @shared_tokens = hash[:shared_tokens]
  @source = hash[:source]
end

Instance Attribute Details

#candidate_sourceObject

Returns the value of attribute candidate_source.



20
21
22
# File 'lib/rafflesia/sequences/sequence_candidate_hit.rb', line 20

def candidate_source
  @candidate_source
end

#identityObject

Returns the value of attribute identity.



20
21
22
# File 'lib/rafflesia/sequences/sequence_candidate_hit.rb', line 20

def identity
  @identity
end

#scoreObject

Returns the value of attribute score.



20
21
22
# File 'lib/rafflesia/sequences/sequence_candidate_hit.rb', line 20

def score
  @score
end

#scoring_methodObject

Returns the value of attribute scoring_method.



20
21
22
# File 'lib/rafflesia/sequences/sequence_candidate_hit.rb', line 20

def scoring_method
  @scoring_method
end

#seq_idObject

Returns the value of attribute seq_id.



20
21
22
# File 'lib/rafflesia/sequences/sequence_candidate_hit.rb', line 20

def seq_id
  @seq_id
end

#sequence_idObject

Returns the value of attribute sequence_id.



20
21
22
# File 'lib/rafflesia/sequences/sequence_candidate_hit.rb', line 20

def sequence_id
  @sequence_id
end

#sequence_lengthObject

Returns the value of attribute sequence_length.



20
21
22
# File 'lib/rafflesia/sequences/sequence_candidate_hit.rb', line 20

def sequence_length
  @sequence_length
end

#shared_tokensObject

Returns the value of attribute shared_tokens.



20
21
22
# File 'lib/rafflesia/sequences/sequence_candidate_hit.rb', line 20

def shared_tokens
  @shared_tokens
end

#sourceObject

Returns the value of attribute source.



20
21
22
# File 'lib/rafflesia/sequences/sequence_candidate_hit.rb', line 20

def source
  @source
end