class Bio::Blast::RPSBlast::Report::Iteration

Iteration class for RPS-Blast. Though RPS-Blast does not iterate like PSI-BLAST, it aims to store a result of single query sequence.

Normally, the instance of the class is generated by Bio::Blast::RPSBlast::Report object.

Attributes

query_def[R]

definition of the query

query_len[R]

length of the query sequence

Public Class Methods

new(data, dummystr) click to toggle source

Creates a new Iteration object. It is designed to be called only internally from the Bio::Blast::RPSBlast::Report class. Users shall not use the method directly.

# File lib/bio/appl/blast/rpsblast.rb, line 245
def initialize(data, dummystr)
  if /\AQuery\=/ =~ data[0] then
    sc = StringScanner.new(data.shift)
    sc.skip(/\s*/)
    if sc.skip_until(/Query\= */) then
      q = []
      begin
        q << sc.scan(/.*/)
        sc.skip(/\s*^ ?/)
      end until !sc.rest or r = sc.skip(/ *\( *([\,\d]+) *letters *\)\s*\z/)
      @query_len = sc[1].delete(',').to_i if r
      @query_def = q.join(' ')
    end
  end
  data.unshift(dummystr)
  
  super(data)
end