class Bio::HMMER::Report::Hit
Container class for HMMER
search hits.
Attributes
accession[R]
bit_score[R]
Matching scores (total of all HSPs).
definition[R]
description[R]
entry_id[R]
evalue[R]
E-value
hit_id[R]
hsps[R]
An Array of Bio::HMMER::Report::Hsp
objects.
num[R]
Number of domains
score[R]
Matching scores (total of all HSPs).
target_id[R]
Public Class Methods
new(hit_data)
click to toggle source
Sets hit data.
# File lib/bio/appl/hmmer/report.rb 391 def initialize(hit_data) 392 @hsps = Array.new 393 if /^(\S+)\s+(.*?)\s+(\S+)\s+(\S+)\s+(\S+)$/ =~ hit_data 394 @accession, @description, @score, @evalue, @num = \ 395 [$1, $2, $3.to_f, $4.to_f, $5.to_i] 396 end 397 end
Public Instance Methods
append_hsp(hsp)
click to toggle source
Appends a Bio::HMMER::Report::Hsp
object.
# File lib/bio/appl/hmmer/report.rb 419 def append_hsp(hsp) 420 @hsps << hsp 421 end
each() { |hsp| ... }
click to toggle source
Iterates on each Hsp
object (Bio::HMMER::Report::Hsp
).
# File lib/bio/appl/hmmer/report.rb 401 def each 402 @hsps.each do |hsp| 403 yield hsp 404 end 405 end
Also aliased as: each_hsp
target_def()
click to toggle source
Shows the hit description.
# File lib/bio/appl/hmmer/report.rb 410 def target_def 411 if @hsps.size == 1 412 "<#{@hsps[0].domain}> #{@description}" 413 else 414 "<#{@num.to_s}> #{@description}" 415 end 416 end