Class: Rafflesia::MmseqSearchHit

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

Constant Summary collapse

HASH_ATTRS =
{
  alignment_length: :alignment_length,
  bits: :bits,
  evalue: :evalue,
  fraction_ident: :fraction_ident,
  gap_opens: :gap_opens,
  mismatches: :mismatches,
  query_end: :query_end,
  query_id: :query_id,
  query_start: :query_start,
  target_end: :target_end,
  target_id: :target_id,
  target_start: :target_start
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ MmseqSearchHit

Returns a new instance of MmseqSearchHit.



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/rafflesia/sequences/mmseq_search_hit.rb', line 37

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @alignment_length = hash[:alignment_length]
  @bits = hash[:bits]
  @evalue = hash[:evalue]
  @fraction_ident = hash[:fraction_ident]
  @gap_opens = hash[:gap_opens]
  @mismatches = hash[:mismatches]
  @query_end = hash[:query_end]
  @query_id = hash[:query_id]
  @query_start = hash[:query_start]
  @target_end = hash[:target_end]
  @target_id = hash[:target_id]
  @target_start = hash[:target_start]
end

Instance Attribute Details

#alignment_lengthObject

Returns the value of attribute alignment_length.



23
24
25
# File 'lib/rafflesia/sequences/mmseq_search_hit.rb', line 23

def alignment_length
  @alignment_length
end

#bitsObject

Returns the value of attribute bits.



23
24
25
# File 'lib/rafflesia/sequences/mmseq_search_hit.rb', line 23

def bits
  @bits
end

#evalueObject

Returns the value of attribute evalue.



23
24
25
# File 'lib/rafflesia/sequences/mmseq_search_hit.rb', line 23

def evalue
  @evalue
end

#fraction_identObject

Returns the value of attribute fraction_ident.



23
24
25
# File 'lib/rafflesia/sequences/mmseq_search_hit.rb', line 23

def fraction_ident
  @fraction_ident
end

#gap_opensObject

Returns the value of attribute gap_opens.



23
24
25
# File 'lib/rafflesia/sequences/mmseq_search_hit.rb', line 23

def gap_opens
  @gap_opens
end

#mismatchesObject

Returns the value of attribute mismatches.



23
24
25
# File 'lib/rafflesia/sequences/mmseq_search_hit.rb', line 23

def mismatches
  @mismatches
end

#query_endObject

Returns the value of attribute query_end.



23
24
25
# File 'lib/rafflesia/sequences/mmseq_search_hit.rb', line 23

def query_end
  @query_end
end

#query_idObject

Returns the value of attribute query_id.



23
24
25
# File 'lib/rafflesia/sequences/mmseq_search_hit.rb', line 23

def query_id
  @query_id
end

#query_startObject

Returns the value of attribute query_start.



23
24
25
# File 'lib/rafflesia/sequences/mmseq_search_hit.rb', line 23

def query_start
  @query_start
end

#target_endObject

Returns the value of attribute target_end.



23
24
25
# File 'lib/rafflesia/sequences/mmseq_search_hit.rb', line 23

def target_end
  @target_end
end

#target_idObject

Returns the value of attribute target_id.



23
24
25
# File 'lib/rafflesia/sequences/mmseq_search_hit.rb', line 23

def target_id
  @target_id
end

#target_startObject

Returns the value of attribute target_start.



23
24
25
# File 'lib/rafflesia/sequences/mmseq_search_hit.rb', line 23

def target_start
  @target_start
end