From: martinahansen Date: Thu, 9 Sep 2010 11:25:33 +0000 (+0000) Subject: fixing length_seq X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=d29b699f3b7b9c75c41a09aff0d7f903fc8bfe42;p=biopieces.git fixing length_seq git-svn-id: http://biopieces.googlecode.com/svn/trunk@1085 74ccb610-7750-0410-82ae-013aeee3265d --- diff --git a/bp_bin/length_seq b/bp_bin/length_seq index 4e8d0e3..586409e 100755 --- a/bp_bin/length_seq +++ b/bp_bin/length_seq @@ -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 );