]> git.donarmstrong.com Git - biopieces.git/blobdiff - bp_bin/add_ident
removed debug message
[biopieces.git] / bp_bin / add_ident
index 26497ef0c57afaf781a40cf210473f5fac5671fc..b15a86dbf7d6aa63f117574b36f756ca2a8c1e38 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,12 +34,13 @@ use Maasha::Biopieces;
 # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
 
 
-my ( $run_time_beg, $run_time_end, $options, $in, $out, $record, $key, $prefix, $i );
+my ( $options, $in, $out, $record, $key, $prefix, $i );
 
 $options = Maasha::Biopieces::parse_options(
     [
         { long => 'key',    short => 'k', type => 'string', mandatory => 'no', default => 'ID', allowed => undef, disallowed => undef },
         { long => 'prefix', short => 'p', type => 'string', mandatory => 'no', default => 'ID', allowed => undef, disallowed => undef },
+        { long => 'offset', short => 'o', type => 'uint',   mandatory => 'no', default => '0',  allowed => undef, disallowed => undef },
     ]   
 );
 
@@ -48,7 +50,7 @@ $out = Maasha::Biopieces::write_stream( $options->{ "stream_out" } );
 $key    = $options->{ "key" };
 $prefix = $options->{ "prefix" };
 
-$i = 0;
+$i = $options->{ "offset" };
 
 while ( $record = Maasha::Biopieces::get_record( $in ) ) 
 {
@@ -59,26 +61,22 @@ while ( $record = Maasha::Biopieces::get_record( $in ) )
     $i++;
 }
 
+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();
 }
 
 
@@ -86,4 +84,3 @@ END
 
 
 __END__
-