]> git.donarmstrong.com Git - biopieces.git/blobdiff - bp_bin/mean_scores
upgraded mean_scores
[biopieces.git] / bp_bin / mean_scores
index ab98dec3881da6417c14f519facb48dc4820c3af..bd47e5b8223faa76793c026f6982a50a048c16b6 100755 (executable)
@@ -35,7 +35,7 @@ use Maasha::Fastq;
 # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
 
 
-my ( $options, $in, $out, $record );
+my ( $options, $in, $out, $record, $mean, $pos );
 
 $options = Maasha::Biopieces::parse_options(
     [
@@ -54,11 +54,9 @@ while ( $record = Maasha::Biopieces::get_record( $in ) )
     {
         if ( $options->{ "local" } )
         {
-            $record->{ 'SCORES_LOCAL_MEAN' } = sprintf( "%.2f", Maasha::Fastq::solexa_str_mean_window(
-                                                                    $record->{ 'SCORES' }, 
-                                                                    $options->{ 'window_size' }, 
-                                                                    $options->{ 'min' }
-                                                                ) );
+            ( $mean, $pos ) = Maasha::Fastq::solexa_str_mean_window( $record->{ 'SCORES' }, $options->{ 'window_size' }, $options->{ 'min' } );
+            $record->{ 'SCORES_LOCAL_POS' }  = $pos;
+            $record->{ 'SCORES_LOCAL_MEAN' } = sprintf( "%.2f", $mean);
         }
         else
         {