Class | Bio::Blast::RPSBlast::Report
In: | lib/bio/appl/blast/rpsblast.rb
Parent: | Bio::Blast::Default::Report

NCBI RPS Blast (Reversed Position Specific Blast) default output parser.

It supports defalut (-m 0 option) output of the "rpsblast" command.

Because this class inherits Bio::Blast::Default::Report, almost all methods are eqaul to Bio::Blast::Default::Report. Only DELIMITER (and RS) and few methods are different.

By using Bio::FlatFile, (for example, Bio::FlatFile.open), rpsblast result generated from multiple query sequences is automatically splitted into multiple Bio::BLast::RPSBlast::Report objects corresponding to query sequences.

Note for multi-fasta results WITH using Bio::FlatFile: Each splitted result is concatenated with header of the result which describes RPS-BLAST version and database information, if possible.

Note for multi-fasta results WITHOUT using Bio::FlatFile: When parsing an output of rpsblast command running with multi-fasta sequences WITHOUT using Bio::FlatFile, each query‘s result is stored as an "iteration" of PSI-Blast. This behavior may be changed in the future.

Note for nucleotide results: This class is not tested with nucleotide query and/or nucleotide databases.

### Methods

new query_def query_len

### Classes and Modules

Class Bio::Blast::RPSBlast::Report::Iteration

### Constants

DELIMITER | = | RS = "\nRPS-BLAST" |  | Delimter of each entry for RPS-BLAST.
DELIMITER_OVERRUN | = | 9 |  | (Integer) excess read size included in DELIMITER.
FLATFILE_SPLITTER | = | RPSBlastSplitter |  | splitter for Bio::FlatFile support

### Public Class methods

new(str)

Creates a new Report object from a string.

Using Bio::FlatFile.open (or some other methods) is recommended instead of using this method directly. Refer Bio::Blast::RPSBlast::Report document for more information.

Note for multi-fasta results WITHOUT using Bio::FlatFile: When parsing an output of rpsblast command running with multi-fasta sequences WITHOUT using Bio::FlatFile, each query‘s result is stored as an "iteration" of PSI-Blast. This behavior may be changed in the future.

Note for nucleotide results: This class is not tested with nucleotide query and/or nucleotide databases.

[Source]

         # File lib/bio/appl/blast/rpsblast.rb, line 173
    173:       def initialize(str)
    174:         str = str.sub(/\A\s+/, '')
    175:         # remove trailing entries for sure
    176:         str.sub!(/\n(RPS\-BLAST.*)/m, "\n")
    177:         @entry_overrun = $1
    178:         @entry = str
    179:         data = str.split(/(?:^[ \t]*\n)+/)
    180:
    181:         if data[0] and /\AQuery\=/ !~ data[0] then
    182:           format0_split_headers(data)
    183:         end
    184:         @iterations = format0_split_search(data)
    185:         format0_split_stat_params(data)
    186:       end

### Public Instance methods

query_def()

Returns definition of the query. For a result of multi-fasta input, the first query‘s definition is returned (The same as `iterations.first.query_def`).

[Source]

         # File lib/bio/appl/blast/rpsblast.rb, line 191
    191:       def query_def
    192:         iterations.first.query_def
    193:       end

query_len()

Returns length of the query. For a result of multi-fasta input, the first query‘s length is returned (The same as `iterations.first.query_len`).

[Source]

         # File lib/bio/appl/blast/rpsblast.rb, line 198
    198:       def query_len
    199:         iterations.first.query_len
    200:       end

[Validate]