]> git.donarmstrong.com Git - biopieces.git/blobdiff - bp_bin/length_seq
fixing length_seq
[biopieces.git] / bp_bin / length_seq
index 4e8d0e37a72efae555ab0029152e50675e031c75..586409e6ff3e98a80d2666630cc878ab4fa10885 100755 (executable)
@@ -46,19 +46,10 @@ $options = Maasha::Biopieces::parse_options(
 $in  = Maasha::Biopieces::read_stream( $options->{ "stream_in" } );
 $out = Maasha::Biopieces::write_stream( $options->{ "stream_out" } );
 
-while ( $record = Maasha::Biopieces::get_record( $in ) ) 
-{
-    if ( $record->{ "SEQ" } )
-    {
-        $record->{ "SEQ_LEN" } = length $record->{ "SEQ" };
-        $total += $record->{ "SEQ_LEN" };
-    }
-
-    Maasha::Biopieces::put_record( $record, $out ) if not $options->{ "no_stream" };
+while ( $record = Maasha::Biopieces::get_record( $in ) ) {
+    $record->{ "SEQ_LEN" } = length $record->{ "SEQ" } if $record->{ "SEQ" }
 }
 
-Maasha::Biopieces::put_record( { TOTAL_SEQ_LEN => $total }, $out );
-
 Maasha::Biopieces::close_stream( $in );
 Maasha::Biopieces::close_stream( $out );