Class: Rafflesia::BlastSearchHit

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

Constant Summary collapse

HASH_ATTRS =
{
  alignment_length: :alignment_length,
  bit_score: :bit_score,
  evalue: :evalue,
  gap_opens: :gap_opens,
  mismatches: :mismatches,
  percent_identity: :percent_identity,
  query_end: :query_end,
  query_id: :query_id,
  query_start: :query_start,
  shard_id: :shard_id,
  subject_end: :subject_end,
  subject_id: :subject_id,
  subject_start: :subject_start
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ BlastSearchHit

Returns a new instance of BlastSearchHit.



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/rafflesia/sequences/blast_search_hit.rb', line 39

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @alignment_length = hash[:alignment_length]
  @bit_score = hash[:bit_score]
  @evalue = hash[:evalue]
  @gap_opens = hash[:gap_opens]
  @mismatches = hash[:mismatches]
  @percent_identity = hash[:percent_identity]
  @query_end = hash[:query_end]
  @query_id = hash[:query_id]
  @query_start = hash[:query_start]
  @shard_id = hash[:shard_id]
  @subject_end = hash[:subject_end]
  @subject_id = hash[:subject_id]
  @subject_start = hash[:subject_start]
end

Instance Attribute Details

#alignment_lengthObject

Returns the value of attribute alignment_length.



24
25
26
# File 'lib/rafflesia/sequences/blast_search_hit.rb', line 24

def alignment_length
  @alignment_length
end

#bit_scoreObject

Returns the value of attribute bit_score.



24
25
26
# File 'lib/rafflesia/sequences/blast_search_hit.rb', line 24

def bit_score
  @bit_score
end

#evalueObject

Returns the value of attribute evalue.



24
25
26
# File 'lib/rafflesia/sequences/blast_search_hit.rb', line 24

def evalue
  @evalue
end

#gap_opensObject

Returns the value of attribute gap_opens.



24
25
26
# File 'lib/rafflesia/sequences/blast_search_hit.rb', line 24

def gap_opens
  @gap_opens
end

#mismatchesObject

Returns the value of attribute mismatches.



24
25
26
# File 'lib/rafflesia/sequences/blast_search_hit.rb', line 24

def mismatches
  @mismatches
end

#percent_identityObject

Returns the value of attribute percent_identity.



24
25
26
# File 'lib/rafflesia/sequences/blast_search_hit.rb', line 24

def percent_identity
  @percent_identity
end

#query_endObject

Returns the value of attribute query_end.



24
25
26
# File 'lib/rafflesia/sequences/blast_search_hit.rb', line 24

def query_end
  @query_end
end

#query_idObject

Returns the value of attribute query_id.



24
25
26
# File 'lib/rafflesia/sequences/blast_search_hit.rb', line 24

def query_id
  @query_id
end

#query_startObject

Returns the value of attribute query_start.



24
25
26
# File 'lib/rafflesia/sequences/blast_search_hit.rb', line 24

def query_start
  @query_start
end

#shard_idObject

Returns the value of attribute shard_id.



24
25
26
# File 'lib/rafflesia/sequences/blast_search_hit.rb', line 24

def shard_id
  @shard_id
end

#subject_endObject

Returns the value of attribute subject_end.



24
25
26
# File 'lib/rafflesia/sequences/blast_search_hit.rb', line 24

def subject_end
  @subject_end
end

#subject_idObject

Returns the value of attribute subject_id.



24
25
26
# File 'lib/rafflesia/sequences/blast_search_hit.rb', line 24

def subject_id
  @subject_id
end

#subject_startObject

Returns the value of attribute subject_start.



24
25
26
# File 'lib/rafflesia/sequences/blast_search_hit.rb', line 24

def subject_start
  @subject_start
end