X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=bp_bin%2Fmatch_seq;h=d5362fa1a8f12dbd38dcc224aa8a50901c111260;hb=48bea5c28b89dc5586d0bddb338ccd6ba23aa1f9;hp=2b852f03ed7b5b44699d959ea8bdc1ae95c2cd67;hpb=9df9d907cfee132c469c30a586778dd5fc5cf036;p=biopieces.git diff --git a/bp_bin/match_seq b/bp_bin/match_seq index 2b852f0..d5362fa 100755 --- a/bp_bin/match_seq +++ b/bp_bin/match_seq @@ -1,4 +1,4 @@ -#!/usr/bin/env perl -w +#!/usr/bin/env perl # Copyright (C) 2007-2009 Martin A. Hansen. @@ -26,16 +26,16 @@ # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< +use warnings; use strict; use Maasha::Biopieces; use Maasha::Match; -use Maasha::Filesys; # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< -my ( $run_time_beg, $run_time_end, $options, $in, $out, $record, @entries, $results, $tmp_dir ); +my ( $options, $in, $out, $record, @entries, $results, $tmp_dir ); $options = Maasha::Biopieces::parse_options( [ @@ -64,14 +64,15 @@ if ( @entries == 1 ) map { Maasha::Biopieces::put_record( $_, $out ) } @{ $results }; } -elsif ( @entries == 2 ) +else { - $results = Maasha::Match::match_mummer( [ $entries[ 0 ] ], [ $entries[ 1 ] ], $options, $tmp_dir ); + $results = Maasha::Match::match_mummer( [ shift @entries ], \@entries, $options, $tmp_dir ); map { Maasha::Biopieces::put_record( $_, $out ) } @{ $results }; } -Maasha::Filesys::dir_remove( $tmp_dir ); +Maasha::Biopieces::close_stream( $in ); +Maasha::Biopieces::close_stream( $out ); # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @@ -79,20 +80,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(); } @@ -100,4 +94,3 @@ END __END__ -