require 'maasha/biopieces'
require 'maasha/seq'
require 'inline'
-require 'pp'
-
# Opening class Seq to add scores_mean_local(_C) methods.
class Seq
# scores string and calculate for each window the mean score and return
# the minimum mean score.
def scores_mean_local(window_size)
- scores_mean_local_C(self.qual, self.length, SCORE_BASE, window_size)
+ scores_mean_local_C(self.qual, self.length, Seq::SCORE_BASE, window_size)
end
inline do |builder|
Biopieces.open(options[:stream_in], options[:stream_out]) do |input, output|
input.each_record do |record|
- if record[:SEQ] and record[:SCORES]
+ if record[:SEQ] and record[:SCORES] and record[:SEQ].length > 0
entry = Seq.new_bp(record)
if options[:local]