Class: Bio::Blast::WU::Report
- Inherits:
-
Default::Report
- Object
- Default::Report
- Bio::Blast::WU::Report
- Defined in:
- lib/bio/appl/blast/wublast.rb
Overview
Bio::Blast::WU::Report parses WU-BLAST default output and stores information in the data. It may contain a Bio::Blast::WU::Report::Iteration object. Because it inherits Bio::Blast::Default::Report, please also refer Bio::Blast::Default::Report.
Direct Known Subclasses
Defined Under Namespace
Classes: F0dbstat, HSP, Hit, Iteration
Constant Summary
Constants inherited from Default::Report
Default::Report::DELIMITER, Default::Report::DELIMITER_OVERRUN
Instance Attribute Summary
Attributes inherited from Default::Report
#db_len, #db_num, #eff_space, #entry_overrun, #gap_extend, #gap_open, #iterations, #matrix, #num_hits, #posted_date, #sc_match, #sc_mismatch
Instance Method Summary collapse
-
#db ⇒ Object
Returns the name (filename or title) of the database.
-
#exit_code ⇒ Object
(WU-BLAST) Returns exit code for the execution.
-
#exit_code_message ⇒ Object
(WU-BLAST) Returns the message bundled with the exit code output.
-
#expect ⇒ Object
Returns e-value threshold specified when BLAST was executed.
-
#fatal_errors ⇒ Object
(WU-BLAST) Returns fatal error information.
-
#notes ⇒ Object
(WU-BLAST) Returns “NOTE:” information.
-
#notice ⇒ Object
Returns notice messages.
-
#parameter_matrix ⇒ Object
Returns parameter matrix (???).
-
#parameters ⇒ Object
Returns parameters (???).
-
#query_record_number ⇒ Object
(WU-BLAST) Returns record number of the query.
-
#warnings ⇒ Object
Returns warning messages.
Methods inherited from Default::Report
#converged?, #each_hit, #each_iteration, #entropy, #gapped_entropy, #gapped_kappa, #gapped_lambda, #hits, #initialize, #kappa, #lambda, #message, open, #pattern, #pattern_positions, #program, #query_def, #query_len, #reference, #references, #to_s, #version, #version_date, #version_number
Constructor Details
This class inherits a constructor from Bio::Blast::Default::Report
Instance Method Details
#db ⇒ Object
Returns the name (filename or title) of the database.
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 |
# File 'lib/bio/appl/blast/wublast.rb', line 122 def db unless defined?(@db) if /Database *\: *(.*)/m =~ @f0database then a = $1.split(/^/) if a.size > 1 and /\ASearching\..+ done\s*\z/ =~ a[-1] then a.pop end if a.size > 1 and /\A +[\d\,]+ +sequences\; +[\d\,]+ total +letters\.?\s*\z/ =~ a[-1] then a.pop end @db = a.collect { |x| x.sub(/\s+\z/, '') }.join(' ') end end #unless @db end |
#exit_code ⇒ Object
(WU-BLAST) Returns exit code for the execution. Returns an Integer or nil.
79 80 81 82 83 84 85 |
# File 'lib/bio/appl/blast/wublast.rb', line 79 def exit_code if defined? @exit_code then @exit_code else nil end end |
#exit_code_message ⇒ Object
(WU-BLAST) Returns the message bundled with the exit code output. The message will be shown when WU-BLAST ignores a fatal error due to the command line option “-nonnegok”, “-novalidctxok”, or “-shortqueryok”.
Returns a String or nil.
93 94 95 96 97 98 99 |
# File 'lib/bio/appl/blast/wublast.rb', line 93 def if defined? @exit_code_message then @exit_code_message else nil end end |
#expect ⇒ Object
Returns e-value threshold specified when BLAST was executed.
50 |
# File 'lib/bio/appl/blast/wublast.rb', line 50 def expect; parse_parameters; @parameters['E']; end |
#fatal_errors ⇒ Object
(WU-BLAST) Returns fatal error information. Returns nil or an array containing String.
113 114 115 116 117 118 119 |
# File 'lib/bio/appl/blast/wublast.rb', line 113 def fatal_errors if defined? @fatal_errors then @fatal_errors else nil end end |
#notes ⇒ Object
(WU-BLAST) Returns “NOTE:” information. Returns nil or an array containing String.
103 104 105 106 107 108 109 |
# File 'lib/bio/appl/blast/wublast.rb', line 103 def notes if defined? @notes then @notes else nil end end |
#notice ⇒ Object
Returns notice messages.
62 63 64 65 66 67 |
# File 'lib/bio/appl/blast/wublast.rb', line 62 def notice unless defined?(@notice) @notice = @f0notice.to_s.gsub(/\s+/, ' ').strip end #unless @notice end |
#parameter_matrix ⇒ Object
Returns parameter matrix (???)
44 45 46 47 |
# File 'lib/bio/appl/blast/wublast.rb', line 44 def parameter_matrix parse_parameters @parameter_matrix end |
#parameters ⇒ Object
Returns parameters (???)
38 39 40 41 |
# File 'lib/bio/appl/blast/wublast.rb', line 38 def parameters parse_parameters @parameters end |
#query_record_number ⇒ Object
(WU-BLAST) Returns record number of the query. It may only be available for reports with multiple queries. Returns an Integer or nil.
72 73 74 75 |
# File 'lib/bio/appl/blast/wublast.rb', line 72 def query_record_number format0_parse_query @query_record_number end |
#warnings ⇒ Object
Returns warning messages.
53 54 55 56 57 58 59 |
# File 'lib/bio/appl/blast/wublast.rb', line 53 def warnings unless defined?(@warnings) @warnings = @f0warnings iterations.each { |x| @warnings.concat(x.warnings) } end @warnings end |