class CRB_Blast::Hit

Attributes

alnlen[RW]

Fields: query id, subject id, % identity, alignment length, mismatches, gap opens, q. start, q. end, s. start, s. end, evalue, bit score

bitscore[RW]

Fields: query id, subject id, % identity, alignment length, mismatches, gap opens, q. start, q. end, s. start, s. end, evalue, bit score

evalue[RW]

Fields: query id, subject id, % identity, alignment length, mismatches, gap opens, q. start, q. end, s. start, s. end, evalue, bit score

gaps[RW]

Fields: query id, subject id, % identity, alignment length, mismatches, gap opens, q. start, q. end, s. start, s. end, evalue, bit score

id[RW]

Fields: query id, subject id, % identity, alignment length, mismatches, gap opens, q. start, q. end, s. start, s. end, evalue, bit score

mismatches[RW]

Fields: query id, subject id, % identity, alignment length, mismatches, gap opens, q. start, q. end, s. start, s. end, evalue, bit score

qend[RW]

Fields: query id, subject id, % identity, alignment length, mismatches, gap opens, q. start, q. end, s. start, s. end, evalue, bit score

qlen[RW]

Fields: query id, subject id, % identity, alignment length, mismatches, gap opens, q. start, q. end, s. start, s. end, evalue, bit score

qprot[RW]

Fields: query id, subject id, % identity, alignment length, mismatches, gap opens, q. start, q. end, s. start, s. end, evalue, bit score

qstart[RW]

Fields: query id, subject id, % identity, alignment length, mismatches, gap opens, q. start, q. end, s. start, s. end, evalue, bit score

query[RW]

Fields: query id, subject id, % identity, alignment length, mismatches, gap opens, q. start, q. end, s. start, s. end, evalue, bit score

target[RW]

Fields: query id, subject id, % identity, alignment length, mismatches, gap opens, q. start, q. end, s. start, s. end, evalue, bit score

tend[RW]

Fields: query id, subject id, % identity, alignment length, mismatches, gap opens, q. start, q. end, s. start, s. end, evalue, bit score

tlen[RW]

Fields: query id, subject id, % identity, alignment length, mismatches, gap opens, q. start, q. end, s. start, s. end, evalue, bit score

tprot[RW]

Fields: query id, subject id, % identity, alignment length, mismatches, gap opens, q. start, q. end, s. start, s. end, evalue, bit score

tstart[RW]

Fields: query id, subject id, % identity, alignment length, mismatches, gap opens, q. start, q. end, s. start, s. end, evalue, bit score

Public Class Methods

new(list, qprot, tprot) click to toggle source
# File lib/crb-blast/hit.rb, line 9
def initialize(list, qprot, tprot)
  raise(RuntimeError, "unexpected number of columns") if list.length < 14
  @query      = Bio::FastaDefline.new(list[0]).entry_id
  @target     = Bio::FastaDefline.new(list[1]).entry_id
  @id         = list[2]
  @alnlen     = list[3].to_i
  @mismatches = list[4].to_i
  @gaps       = list[5].to_i
  @qstart     = list[6].to_i
  @qend       = list[7].to_i
  @tstart     = list[8].to_i
  @tend       = list[9].to_i
  @evalue     = list[10].to_f
  @bitscore   = list[11].to_f
  @qlen       = list[12].to_f
  @tlen       = list[13].to_f
  @qprot      = qprot # bool
  @tprot      = tprot # bool
end

Public Instance Methods

to_s() click to toggle source
# File lib/crb-blast/hit.rb, line 29
def to_s
  s = "#{@query}\t#{@target}\t#{@id}\t#{@alnlen}\t#{@evalue}\t#{@bitscore}\t"
  s << "#{@qstart}..#{@qend}\t#{@tstart}..#{@tend}\t#{@qlen}\t#{@tlen}"
  return s
end