]> git.donarmstrong.com Git - biopieces.git/blobdiff - bp_bin/merge_records
refactoring of assemble_pairs
[biopieces.git] / bp_bin / merge_records
index cdfe46e88ce6c02f87695fb6f5d11e2c2b06785d..7294590598566fc418fbf67fdd9c11f0d219ebb5 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;
 use Maasha::Common;
@@ -35,7 +36,7 @@ use Maasha::Filesys;
 # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
 
 
-my ( $run_time_beg, $run_time_end, $options, $in, $out, $record, $tmp_dir, $file1, $file2, $fh1, $fh2,
+my ( $options, $in, $out, $record, $tmp_dir, $file1, $file2, $fh1, $fh2,
      $key1, $key2, @keys1, @keys2, @vals1, @vals2, $num1, $num2, $num, $cmp, $i );
 
 $options = Maasha::Biopieces::parse_options(
@@ -201,7 +202,8 @@ if ( $num2 > 0 and $options->{ 'merge' } =~ /^(BorA|BnotA)$/ )
     Maasha::Biopieces::put_record( $record, $out );
 }
 
-Maasha::Filesys::dir_remove( $tmp_dir );
+Maasha::Biopieces::close_stream( $in );
+Maasha::Biopieces::close_stream( $out );
 
 
 # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
@@ -209,20 +211,13 @@ Maasha::Filesys::dir_remove( $tmp_dir );
 
 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();
 }
 
 
@@ -230,4 +225,3 @@ END
 
 
 __END__
-