Summarized results of the fasta execution results.
Splitter for Bio::FlatFile
Returns the trailing lines including library size, execution date, fasta function used, and fasta versions as a String.
# File lib/bio/appl/fasta/format10.rb, line 69 def initialize(data) # Split outputs containing multiple query sequences' results chunks = data.split(/^(\s*\d+\>\>\>.*)/, 3) if chunks.size >= 3 then if chunks[0].strip.empty? then qdef_line = chunks[1] data = chunks[1..2].join('') overruns = chunks[3..-1] elsif /^\>\>\>/ =~ chunks[0] then qdef_line = nil data = chunks.shift overruns = chunks else qdef_line = chunks[1] data = chunks[0..2].join('') overruns = chunks[3..-1] end @entry_overrun = overruns.join('') if qdef_line and /^ *\d+\>\>\>([^ ]+) .+ \- +(\d+) +(nt|aa)\s*$/ =~ qdef_line then @query_def = $1 @query_len = $2.to_i end end # header lines - brief list of the hits if list_start = data.index("\nThe best scores are") then data = data[(list_start + 1)..-1] data.sub!(/(.*)\n\n>>>/, '') @list = $1 else if list_start = data.index(/\n!!\s+/) then data = data[list_start..-1] data.sub!(/\n!!\s+/, '') data.sub!(/.*/) { |x| @list = x; '' } else data = data.sub(/.*/) { |x| @list = x; '' } end end # body lines - fasta execution result program, *hits = data.split(/\n>>/) # trailing lines - log messages of the execution @log = hits.pop @log.sub!(/.*<\n/, '') @log.strip! # parse results @program = Program.new(program) @hits = [] hits.each do |x| @hits.push(Hit.new(x)) end end
Iterates on each Bio::Fasta::Report::Hit object.
# File lib/bio/appl/fasta/format10.rb, line 149 def each @hits.each do |x| yield x end end
Returns an Array of Bio::Fasta::Report::Hit objects having longer overlap length than ‘length_min’.
# File lib/bio/appl/fasta/format10.rb, line 167 def lap_over(length_min = 0) list = [] @hits.each do |x| list.push(x) if x.overlap > length_min end return list end
Returns an Array of Bio::Fasta::Report::Hit objects having better evalue than ‘evalue_max’.
# File lib/bio/appl/fasta/format10.rb, line 157 def threshold(evalue_max = 0.1) list = [] @hits.each do |x| list.push(x) if x.evalue < evalue_max end return list end
Generated with the Darkfish Rdoc Generator 2.