]> git.donarmstrong.com Git - biopieces.git/commitdiff
fixing length_seq
authormartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Thu, 9 Sep 2010 11:25:33 +0000 (11:25 +0000)
committermartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Thu, 9 Sep 2010 11:25:33 +0000 (11:25 +0000)
git-svn-id: http://biopieces.googlecode.com/svn/trunk@1085 74ccb610-7750-0410-82ae-013aeee3265d

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 );