Class: Lederhosen::UResult

Inherits:
Object
  • Object
show all
Defined in:
lib/lederhosen/uc_parser.rb

Overview

represents a usearch result

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash) ⇒ UResult

Returns a new instance of UResult.



16
17
18
19
20
21
22
23
24
25
26
# File 'lib/lederhosen/uc_parser.rb', line 16

def initialize(hash)
  self.hit_type = hash[:hit_type]
  self.cluster_no = hash[:cluster_no]
  self.alignment = hash[:alignment]
  self.target = hash[:target]
  self.query = hash[:query]
  self.length = hash[:length]
  self.identity = hash[:identity]
  self.strand = hash[:strand]
  self.cluster_size = hash[:cluster_size]
end

Instance Attribute Details

#alignmentObject

Returns the value of attribute alignment.



6
7
8
# File 'lib/lederhosen/uc_parser.rb', line 6

def alignment
  @alignment
end

#cluster_noObject

Returns the value of attribute cluster_no.



6
7
8
# File 'lib/lederhosen/uc_parser.rb', line 6

def cluster_no
  @cluster_no
end

#cluster_sizeObject

Returns the value of attribute cluster_size.



6
7
8
# File 'lib/lederhosen/uc_parser.rb', line 6

def cluster_size
  @cluster_size
end

#hit_typeObject

Returns the value of attribute hit_type.



6
7
8
# File 'lib/lederhosen/uc_parser.rb', line 6

def hit_type
  @hit_type
end

#identityObject

Returns the value of attribute identity.



6
7
8
# File 'lib/lederhosen/uc_parser.rb', line 6

def identity
  @identity
end

#lengthObject

Returns the value of attribute length.



6
7
8
# File 'lib/lederhosen/uc_parser.rb', line 6

def length
  @length
end

#queryObject

Returns the value of attribute query.



6
7
8
# File 'lib/lederhosen/uc_parser.rb', line 6

def query
  @query
end

#strandObject

Returns the value of attribute strand.



6
7
8
# File 'lib/lederhosen/uc_parser.rb', line 6

def strand
  @strand
end

#targetObject

Returns the value of attribute target.



6
7
8
# File 'lib/lederhosen/uc_parser.rb', line 6

def target
  @target
end

Instance Method Details

#hit?Boolean

Returns:

  • (Boolean)


28
29
30
# File 'lib/lederhosen/uc_parser.rb', line 28

def hit?
  self.hit_type == 'H'
end

#miss?Boolean

Returns:

  • (Boolean)


32
33
34
# File 'lib/lederhosen/uc_parser.rb', line 32

def miss?
  self.hit_type == 'N'
end