Class: Bio::Blast::WU::Report

Inherits:
Default::Report show all
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

Report_TBlast

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

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

#dbObject

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_codeObject

(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_messageObject

(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 exit_code_message
  if defined? @exit_code_message then
    @exit_code_message
  else
    nil
  end
end

#expectObject

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_errorsObject

(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

#notesObject

(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

#noticeObject

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_matrixObject

Returns parameter matrix (???)



44
45
46
47
# File 'lib/bio/appl/blast/wublast.rb', line 44

def parameter_matrix
  parse_parameters
  @parameter_matrix
end

#parametersObject

Returns parameters (???)



38
39
40
41
# File 'lib/bio/appl/blast/wublast.rb', line 38

def parameters
  parse_parameters
  @parameters
end

#query_record_numberObject

(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

#warningsObject

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