]> git.donarmstrong.com Git - biopieces.git/blobdiff - bp_bin/random_records
refactoring of assemble_pairs
[biopieces.git] / bp_bin / random_records
index f45f942028a7e730067999550747a05068c8733d..b700dc19a22ef646d32d262ecb255533a5f29218 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::Filesys;
@@ -34,7 +35,7 @@ use Maasha::Filesys;
 # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
 
 
-my ( $run_time_beg, $run_time_end, $options, $in, $out, $record, $tmp_dir, $tmp_file, $fh_out, $fh_in, $count, $i, %rand_hash, $rand, $max );
+my ( $options, $in, $out, $record, $tmp_dir, $tmp_file, $fh_out, $fh_in, $count, $i, %rand_hash, $rand, $max );
 
 $options = Maasha::Biopieces::parse_options(
     [
@@ -96,7 +97,9 @@ while ( $record = Maasha::Biopieces::get_record( $fh_in ) )
 close $fh_in;
 
 unlink $tmp_file;
-Maasha::Filesys::dir_remove( $tmp_dir );
+
+Maasha::Biopieces::close_stream( $in );
+Maasha::Biopieces::close_stream( $out );
 
 
 # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
@@ -104,20 +107,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();
 }
 
 
@@ -125,4 +121,3 @@ END
 
 
 __END__
-