]> git.donarmstrong.com Git - biopieces.git/blobdiff - bp_bin/uniq_vals
refactoring of assemble_pairs
[biopieces.git] / bp_bin / uniq_vals
index 93fd3be92fc3737e5e6a5dc119b1978a12109ce8..c9af962ad6b5a58ec21e1cac6c2132eb31734316 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;
 
@@ -47,7 +48,7 @@ $out = Maasha::Biopieces::write_stream( $options->{ "stream_out" } );
 
 while ( $record = Maasha::Biopieces::get_record( $in ) ) 
 {
-    if ( $record->{ $options->{ "key" } } )
+    if ( exists $record->{ $options->{ "key" } } )
     {
         if ( not $hash{ $record->{ $options->{ "key" } } } and not $options->{ "invert" } )
         {
@@ -70,26 +71,22 @@ while ( $record = Maasha::Biopieces::get_record( $in ) )
     }
 }
 
+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();
 }
 
 
@@ -97,4 +94,3 @@ END
 
 
 __END__
-