X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=bp_bin%2Flength_seq;h=586409e6ff3e98a80d2666630cc878ab4fa10885;hb=d29b699f3b7b9c75c41a09aff0d7f903fc8bfe42;hp=4e8d0e37a72efae555ab0029152e50675e031c75;hpb=981dfa658f4e7be1661ef7704a466e38e9fa799c;p=biopieces.git 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 );