Method: Bio::Blast::WU::Report::Hit#initialize

Defined in:
lib/bio/appl/blast/wublast.rb

#initialize(data) ⇒ Hit

Creates a new Hit object. It is designed to be called only internally from the Bio::Blast::WU::Report::Iteration class. Users should not call the method directly.



406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
# File 'lib/bio/appl/blast/wublast.rb', line 406

def initialize(data)
  @f0hitname = data.shift
  @hsps = []
  while r = data.first
    if r =~ /^\s*(?:Plus|Minus) +Strand +HSPs\:/ then
      data.shift
      r = data.first
    end
    if /\A\s+Score/ =~ r then
      @hsps << HSP.new(data)
    else
      break
    end
  end
  @again = false
end