X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=bp_bin%2Fmean_scores;h=ed9ab8c409e82e24d1e30c5e053afebe4674a651;hb=5de6112b70b59420b245ce636a8b2e3c90acbe00;hp=adc80bc350abbba30de1d3d649ee61805d746c13;hpb=a761931fd09d82e1924dd0b3031fdcdf07f0d9a8;p=biopieces.git diff --git a/bp_bin/mean_scores b/bp_bin/mean_scores index adc80bc..ed9ab8c 100755 --- a/bp_bin/mean_scores +++ b/bp_bin/mean_scores @@ -31,8 +31,6 @@ require 'maasha/biopieces' require 'maasha/seq' require 'inline' -require 'pp' - # Opening class Seq to add scores_mean_local(_C) methods. class Seq @@ -40,7 +38,7 @@ 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| @@ -92,7 +90,7 @@ options = Biopieces.options_parse(ARGV, casts) 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]