X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=bp_bin%2Ftransliterate_seq;h=14dcb299f9ee0aecbd71af38fab9781119138941;hb=5de6112b70b59420b245ce636a8b2e3c90acbe00;hp=9e10b65cd783bd5e7d7349915a1631fbd8dfb690;hpb=09eb7406f23d0f835db62624d4f652954ee17f87;p=biopieces.git diff --git a/bp_bin/transliterate_seq b/bp_bin/transliterate_seq index 9e10b65..14dcb29 100755 --- a/bp_bin/transliterate_seq +++ b/bp_bin/transliterate_seq @@ -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,7 +34,7 @@ use Maasha::Biopieces; # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< -my ( $run_time_beg, $run_time_end, $options, $in, $out, $record, $search, $replace, $delete ); +my ( $options, $in, $out, $record, $search, $replace, $delete ); $options = Maasha::Biopieces::parse_options( [ @@ -58,32 +59,30 @@ while ( $record = Maasha::Biopieces::get_record( $in ) ) eval "\$record->{ 'SEQ' } =~ tr/$search/$replace/"; } elsif ( $delete ) { eval "\$record->{ 'SEQ' } =~ tr/$delete//d"; + + $record->{ "SEQ_LEN" } = length $record->{ "SEQ" }; } } Maasha::Biopieces::put_record( $record, $out ); } +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(); } @@ -91,4 +90,3 @@ END __END__ -