]> git.donarmstrong.com Git - biopieces.git/blobdiff - bp_bin/remove_indels
adding bzip2 support in ruby
[biopieces.git] / bp_bin / remove_indels
index f1677c5909c5881557da3af70253e680b486cc2c..9a1ad033a0fbe508f4f12891ba06885179040814 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env perl -w
+#!/usr/bin/env perl
 
 # Copyright (C) 2007-2009 Martin A. Hansen.
 
@@ -26,6 +26,7 @@
 # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
 
 
+use warnings;
 use strict;
 use Maasha::Biopieces;
 
@@ -33,7 +34,7 @@ use Maasha::Biopieces;
 # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
 
 
-my ( $run_time_beg, $run_time_end, $options, $in, $out, $record );
+my ( $options, $in, $out, $record );
 
 $options = Maasha::Biopieces::parse_options();
 
@@ -42,31 +43,28 @@ $out = Maasha::Biopieces::write_stream( $options->{ "stream_out" } );
 
 while ( $record = Maasha::Biopieces::get_record( $in ) ) 
 {
-    $record->{ 'SEQ' } =~ tr/-~.//d if $record->{ "SEQ" };
+    $record->{ 'SEQ' }     =~ tr/-~.//d if $record->{ "SEQ" };
+    $record->{ 'SEQ_LEN' } = length $record->{ "SEQ" };
 
     Maasha::Biopieces::put_record( $record, $out );
 }
 
+Maasha::Biopieces::close_stream( $in );
+Maasha::Biopieces::close_stream( $out );
+
 
 # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
 
 
 BEGIN
 {
-    $run_time_beg = Maasha::Biopieces::run_time();
-
-    Maasha::Biopieces::log_biopiece();
+    Maasha::Biopieces::status_set();
 }
 
 
 END
 {
-    Maasha::Biopieces::close_stream( $in );
-    Maasha::Biopieces::close_stream( $out );
-
-    $run_time_end = Maasha::Biopieces::run_time();
-
-    Maasha::Biopieces::run_time_print( $run_time_beg, $run_time_end, $options );
+    Maasha::Biopieces::status_log();
 }
 
 
@@ -74,4 +72,3 @@ END
 
 
 __END__
-