| Class | Bio::Blast::RPSBlast::Report::Iteration |
| In: |
lib/bio/appl/blast/rpsblast.rb
|
| Parent: | Bio::Blast::Default::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.
| query_def | [R] | definition of the query |
| query_len | [R] | length of the query sequence |
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 244
244: def initialize(data, dummystr)
245: if /\AQuery\=/ =~ data[0] then
246: sc = StringScanner.new(data.shift)
247: sc.skip(/\s*/)
248: if sc.skip_until(/Query\= */) then
249: q = []
250: begin
251: q << sc.scan(/.*/)
252: sc.skip(/\s*^ ?/)
253: end until !sc.rest or r = sc.skip(/ *\( *([\,\d]+) *letters *\)\s*\z/)
254: @query_len = sc[1].delete(',').to_i if r
255: @query_def = q.join(' ')
256: end
257: end
258: data.unshift(dummystr)
259:
260: super(data)
261: end