Class: Rafflesia::SequenceSearchHit

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

Constant Summary collapse

HASH_ATTRS =
{
  alignment_length: :alignment_length,
  identity_count: :identity_count,
  identity_fraction: :identity_fraction,
  kmer_identity_fraction: :kmer_identity_fraction,
  kmer_match_count: :kmer_match_count,
  length: :length,
  nw_score: :nw_score,
  order_by: :order_by,
  query_coverage: :query_coverage,
  sequence_id: :sequence_id
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ SequenceSearchHit

Returns a new instance of SequenceSearchHit.



33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/rafflesia/sequences/sequence_search_hit.rb', line 33

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @alignment_length = hash[:alignment_length]
  @identity_count = hash[:identity_count]
  @identity_fraction = hash[:identity_fraction]
  @kmer_identity_fraction = hash[:kmer_identity_fraction]
  @kmer_match_count = hash[:kmer_match_count]
  @length = hash[:length]
  @nw_score = hash[:nw_score]
  @order_by = hash[:order_by]
  @query_coverage = hash[:query_coverage]
  @sequence_id = hash[:sequence_id]
end

Instance Attribute Details

#alignment_lengthObject

Returns the value of attribute alignment_length.



21
22
23
# File 'lib/rafflesia/sequences/sequence_search_hit.rb', line 21

def alignment_length
  @alignment_length
end

#identity_countObject

Returns the value of attribute identity_count.



21
22
23
# File 'lib/rafflesia/sequences/sequence_search_hit.rb', line 21

def identity_count
  @identity_count
end

#identity_fractionObject

Returns the value of attribute identity_fraction.



21
22
23
# File 'lib/rafflesia/sequences/sequence_search_hit.rb', line 21

def identity_fraction
  @identity_fraction
end

#kmer_identity_fractionObject

Returns the value of attribute kmer_identity_fraction.



21
22
23
# File 'lib/rafflesia/sequences/sequence_search_hit.rb', line 21

def kmer_identity_fraction
  @kmer_identity_fraction
end

#kmer_match_countObject

Returns the value of attribute kmer_match_count.



21
22
23
# File 'lib/rafflesia/sequences/sequence_search_hit.rb', line 21

def kmer_match_count
  @kmer_match_count
end

#lengthObject

Returns the value of attribute length.



21
22
23
# File 'lib/rafflesia/sequences/sequence_search_hit.rb', line 21

def length
  @length
end

#nw_scoreObject

Returns the value of attribute nw_score.



21
22
23
# File 'lib/rafflesia/sequences/sequence_search_hit.rb', line 21

def nw_score
  @nw_score
end

#order_byObject

Returns the value of attribute order_by.



21
22
23
# File 'lib/rafflesia/sequences/sequence_search_hit.rb', line 21

def order_by
  @order_by
end

#query_coverageObject

Returns the value of attribute query_coverage.



21
22
23
# File 'lib/rafflesia/sequences/sequence_search_hit.rb', line 21

def query_coverage
  @query_coverage
end

#sequence_idObject

Returns the value of attribute sequence_id.



21
22
23
# File 'lib/rafflesia/sequences/sequence_search_hit.rb', line 21

def sequence_id
  @sequence_id
end