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, line 391
def initialize(hit_data)
  @hsps = Array.new
  if /^(\S+)\s+(.*?)\s+(\S+)\s+(\S+)\s+(\S+)$/ =~ hit_data
    @accession, @description, @score, @evalue, @num =            [$1, $2, $3.to_f, $4.to_f, $5.to_i]
  end
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, line 419
def append_hsp(hsp)
  @hsps << hsp
end
each() { |hsp| ... } click to toggle source

Iterates on each Hsp object (Bio::HMMER::Report::Hsp).

# File lib/bio/appl/hmmer/report.rb, line 401
def each
  @hsps.each do |hsp|
    yield hsp
  end
end
Also aliased as: each_hsp
each_hsp()
Alias for: each
target_def() click to toggle source

Shows the hit description.

# File lib/bio/appl/hmmer/report.rb, line 410
def target_def
  if @hsps.size == 1
    "<#{@hsps[0].domain}> #{@description}"
  else
    "<#{@num.to_s}> #{@description}"
  end
end