From 66938be910a5642b50ddf28991649858b5c36580 Mon Sep 17 00:00:00 2001 From: martinahansen Date: Sat, 6 Jun 2009 16:42:00 +0000 Subject: [PATCH] implementing status solution git-svn-id: http://biopieces.googlecode.com/svn/trunk@488 74ccb610-7750-0410-82ae-013aeee3265d --- bp_bin/add_ident | 1 - bp_bin/align_pair_seq | 1 - bp_bin/align_seq | 15 +++++---------- bp_bin/analyze_bed | 15 +++++---------- bp_bin/analyze_seq | 15 +++++---------- bp_bin/analyze_tags | 15 +++++---------- bp_bin/analyze_vals | 15 ++++++--------- bp_bin/assemble_tag_contigs | 16 ++++++---------- bp_bin/blast_seq | 16 ++++++---------- bp_bin/blat_seq | 15 +++++---------- bp_bin/calc_bit_scores | 17 ++++++----------- bp_bin/calc_fixedstep | 15 ++++++--------- bp_bin/complement_seq | 18 +++++++----------- bp_bin/compute | 15 ++++++--------- bp_bin/count_records | 15 ++++++--------- bp_bin/count_vals | 15 ++++++--------- bp_bin/create_blast_db | 16 ++++++---------- bp_bin/create_vmatch_index | 17 ++++++----------- bp_bin/create_weight_matrix | 15 ++++++--------- bp_bin/extract_seq | 15 +++++---------- bp_bin/flip_tab | 15 ++++++--------- bp_bin/fold_seq | 15 ++++++--------- bp_bin/format_genome | 15 ++++++--------- bp_bin/get_genome_align | 1 - bp_bin/get_genome_phastcons | 15 +++++---------- bp_bin/get_genome_seq | 15 +++++---------- bp_bin/grab | 14 ++++---------- bp_bin/head_records | 15 +++++---------- bp_bin/invert_align | 15 +++++---------- bp_bin/length_seq | 15 +++++---------- bp_bin/length_vals | 15 +++++---------- bp_bin/list_biopieces | 11 +++-------- bp_bin/list_genomes | 11 +++-------- bp_bin/match_seq | 15 +++++---------- bp_bin/max_vals | 15 +++++---------- bp_bin/mean_vals | 15 +++++---------- bp_bin/median_vals | 15 +++++---------- bp_bin/merge_records | 15 +++++---------- bp_bin/merge_vals | 15 +++++---------- bp_bin/min_vals | 15 +++++---------- bp_bin/oligo_freq | 15 +++++---------- bp_bin/patscan_seq | 15 +++++---------- bp_bin/plot_chrdist | 15 +++++---------- bp_bin/plot_histogram | 15 +++++---------- bp_bin/plot_karyogram | 15 +++++---------- bp_bin/plot_lendist | 15 +++++---------- bp_bin/plot_matches | 15 +++++---------- bp_bin/plot_phastcons_profiles | 15 +++++---------- bp_bin/plot_seqlogo | 15 +++++---------- bp_bin/print_wiki | 10 +++------- bp_bin/random_records | 15 +++++---------- bp_bin/read_2bit | 15 ++++++--------- bp_bin/read_bed | 15 ++++++--------- bp_bin/read_blast_tab | 15 ++++++--------- bp_bin/read_embl | 15 ++++++--------- bp_bin/read_fasta | 1 - bp_bin/read_fixedstep | 15 ++++++--------- bp_bin/read_gff | 15 ++++++--------- bp_bin/read_mysql | 15 ++++++--------- bp_bin/read_psl | 15 ++++++--------- bp_bin/read_soft | 15 ++++++--------- bp_bin/read_solexa | 15 ++++++--------- bp_bin/read_solid | 15 ++++++--------- bp_bin/read_stockholm | 14 +++++--------- bp_bin/read_tab | 19 ++++++------------- bp_bin/read_ucsc_config | 15 ++++++--------- bp_bin/remove_adaptor | 15 +++++---------- bp_bin/remove_indels | 15 +++++---------- bp_bin/remove_keys | 15 +++++---------- bp_bin/remove_mysql_tables | 15 +++++---------- bp_bin/remove_ucsc_tracks | 15 +++++---------- bp_bin/rename_keys | 15 +++++---------- bp_bin/reverse_seq | 16 +++++++--------- bp_bin/shuffle_seq | 16 +++++++--------- bp_bin/soap_seq | 16 ++++++---------- bp_bin/sort_records | 15 +++++---------- bp_bin/split_bed | 15 +++++---------- bp_bin/split_seq | 15 +++++---------- bp_bin/split_vals | 1 - bp_bin/sum_vals | 15 +++++---------- bp_bin/tile_seq | 15 +++++---------- bp_bin/translate_seq | 15 +++++---------- bp_bin/transliterate_seq | 15 +++++---------- bp_bin/transliterate_vals | 15 +++++---------- bp_bin/uniq_vals | 15 +++++---------- bp_bin/upload_to_ucsc | 15 +++++---------- bp_bin/uppercase_seq | 16 +++++++--------- bp_bin/vmatch_seq | 16 ++++++---------- bp_bin/write_2bit | 15 ++++++--------- bp_bin/write_align | 15 ++++++--------- bp_bin/write_bed | 15 ++++++--------- bp_bin/write_blast | 17 +++++++---------- bp_bin/write_fasta | 15 ++++++--------- bp_bin/write_fixedstep | 15 ++++++--------- bp_bin/write_psl | 15 ++++++--------- bp_bin/write_solid | 15 ++++++--------- bp_bin/write_tab | 15 ++++++--------- bp_bin/write_ucsc_config | 15 ++++++--------- 98 files changed, 506 insertions(+), 900 deletions(-) diff --git a/bp_bin/add_ident b/bp_bin/add_ident index 16bde7a..bbf6623 100755 --- a/bp_bin/add_ident +++ b/bp_bin/add_ident @@ -82,4 +82,3 @@ END __END__ - diff --git a/bp_bin/align_pair_seq b/bp_bin/align_pair_seq index 817ac25..ebe340d 100755 --- a/bp_bin/align_pair_seq +++ b/bp_bin/align_pair_seq @@ -92,4 +92,3 @@ END __END__ - diff --git a/bp_bin/align_seq b/bp_bin/align_seq index 56a6e54..469a97a 100755 --- a/bp_bin/align_seq +++ b/bp_bin/align_seq @@ -73,26 +73,22 @@ foreach $entry ( @entries ) } } +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(); } @@ -100,4 +96,3 @@ END __END__ - diff --git a/bp_bin/analyze_bed b/bp_bin/analyze_bed index 8548fa6..544424f 100755 --- a/bp_bin/analyze_bed +++ b/bp_bin/analyze_bed @@ -48,26 +48,22 @@ while ( $record = Maasha::Biopieces::get_record( $in ) ) 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(); } @@ -75,4 +71,3 @@ END __END__ - diff --git a/bp_bin/analyze_seq b/bp_bin/analyze_seq index 6f76a94..952fc4a 100755 --- a/bp_bin/analyze_seq +++ b/bp_bin/analyze_seq @@ -54,26 +54,22 @@ while ( $record = Maasha::Biopieces::get_record( $in ) ) 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(); } @@ -81,4 +77,3 @@ END __END__ - diff --git a/bp_bin/analyze_tags b/bp_bin/analyze_tags index 68f97ac..cb24523 100755 --- a/bp_bin/analyze_tags +++ b/bp_bin/analyze_tags @@ -74,26 +74,22 @@ foreach $key ( sort { $a <=> $b } keys %len_hash ) Maasha::Biopieces::put_record( $tag_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(); } @@ -101,4 +97,3 @@ END __END__ - diff --git a/bp_bin/analyze_vals b/bp_bin/analyze_vals index 86e50e6..d246ac7 100755 --- a/bp_bin/analyze_vals +++ b/bp_bin/analyze_vals @@ -126,25 +126,22 @@ print "$maxs\n"; print "$sums\n"; print "$means\n"; +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(); } diff --git a/bp_bin/assemble_tag_contigs b/bp_bin/assemble_tag_contigs index 898837e..9236586 100755 --- a/bp_bin/assemble_tag_contigs +++ b/bp_bin/assemble_tag_contigs @@ -93,25 +93,22 @@ foreach $chr ( sort keys %{ $file_hash } ) Maasha::Filesys::dir_remove( $tmp_dir ); +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(); } @@ -119,4 +116,3 @@ END __END__ - diff --git a/bp_bin/blast_seq b/bp_bin/blast_seq index 1534c77..2d06389 100755 --- a/bp_bin/blast_seq +++ b/bp_bin/blast_seq @@ -141,6 +141,9 @@ unlink $tmp_out; Maasha::Filesys::dir_remove( $tmp_dir ); +Maasha::Biopieces::close_stream( $in ); +Maasha::Biopieces::close_stream( $out ); + # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> SUBROUTINES <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @@ -268,19 +271,13 @@ sub blast_tab2biopiece 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(); } @@ -288,4 +285,3 @@ END __END__ - diff --git a/bp_bin/blat_seq b/bp_bin/blat_seq index 9c3ffa7..4f68e0e 100755 --- a/bp_bin/blat_seq +++ b/bp_bin/blat_seq @@ -105,26 +105,22 @@ unlink $result_file; Maasha::Filesys::dir_remove( $tmp_dir ); +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(); } @@ -132,4 +128,3 @@ END __END__ - diff --git a/bp_bin/calc_bit_scores b/bp_bin/calc_bit_scores index 6bb5374..a634701 100755 --- a/bp_bin/calc_bit_scores +++ b/bp_bin/calc_bit_scores @@ -85,25 +85,22 @@ for ( $i = 0; $i < keys %freq_hash; $i++ ) 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(); } @@ -111,5 +108,3 @@ END __END__ - - diff --git a/bp_bin/calc_fixedstep b/bp_bin/calc_fixedstep index cbb068a..27cae9f 100755 --- a/bp_bin/calc_fixedstep +++ b/bp_bin/calc_fixedstep @@ -95,25 +95,22 @@ foreach $chr ( sort keys %{ $file_hash } ) Maasha::Filesys::dir_remove( $tmp_dir ); +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(); } diff --git a/bp_bin/complement_seq b/bp_bin/complement_seq index 38d1dae..6e7ba90 100755 --- a/bp_bin/complement_seq +++ b/bp_bin/complement_seq @@ -60,24 +60,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(); } @@ -85,5 +83,3 @@ END __END__ - - diff --git a/bp_bin/compute b/bp_bin/compute index 299b787..6fbcdbb 100755 --- a/bp_bin/compute +++ b/bp_bin/compute @@ -72,25 +72,22 @@ while ( $record = Maasha::Biopieces::get_record( $in ) ) 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(); } diff --git a/bp_bin/count_records b/bp_bin/count_records index 3907e4f..6f97188 100755 --- a/bp_bin/count_records +++ b/bp_bin/count_records @@ -75,25 +75,22 @@ Maasha::Biopieces::put_record( $result, $data_out ); close $data_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(); } diff --git a/bp_bin/count_vals b/bp_bin/count_vals index 449fe81..7f0fe50 100755 --- a/bp_bin/count_vals +++ b/bp_bin/count_vals @@ -107,25 +107,22 @@ unlink $tmp_file; Maasha::Filesys::dir_remove( $tmp_dir ); +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(); } diff --git a/bp_bin/create_blast_db b/bp_bin/create_blast_db index 9273af6..5882469 100755 --- a/bp_bin/create_blast_db +++ b/bp_bin/create_blast_db @@ -73,25 +73,22 @@ if ( $seq_type eq "protein" ) { unlink $path; +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(); } @@ -99,4 +96,3 @@ END __END__ - diff --git a/bp_bin/create_vmatch_index b/bp_bin/create_vmatch_index index e6dc983..0dc28c0 100755 --- a/bp_bin/create_vmatch_index +++ b/bp_bin/create_vmatch_index @@ -75,25 +75,22 @@ if ( $type eq "protein" ) { unlink $file_tmp; +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(); } @@ -101,5 +98,3 @@ END __END__ - - diff --git a/bp_bin/create_weight_matrix b/bp_bin/create_weight_matrix index 8adffcf..fa3cd77 100755 --- a/bp_bin/create_weight_matrix +++ b/bp_bin/create_weight_matrix @@ -87,25 +87,22 @@ foreach $res ( sort keys %res_hash ) 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(); } diff --git a/bp_bin/extract_seq b/bp_bin/extract_seq index c900bc7..1588042 100755 --- a/bp_bin/extract_seq +++ b/bp_bin/extract_seq @@ -93,26 +93,22 @@ while ( $record = Maasha::Biopieces::get_record( $in ) ) 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(); } @@ -120,4 +116,3 @@ END __END__ - diff --git a/bp_bin/flip_tab b/bp_bin/flip_tab index 605b277..c24cf0f 100755 --- a/bp_bin/flip_tab +++ b/bp_bin/flip_tab @@ -67,25 +67,22 @@ foreach $row ( @matrix ) 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(); } diff --git a/bp_bin/fold_seq b/bp_bin/fold_seq index 701f900..c8eba69 100755 --- a/bp_bin/fold_seq +++ b/bp_bin/fold_seq @@ -62,25 +62,22 @@ while ( $record = Maasha::Biopieces::get_record( $in ) ) 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(); } diff --git a/bp_bin/format_genome b/bp_bin/format_genome index 6ffa92d..d5058ca 100755 --- a/bp_bin/format_genome +++ b/bp_bin/format_genome @@ -114,25 +114,22 @@ foreach $format ( @{ $options->{ 'formats' } } ) close $fh_out if $fh_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(); } diff --git a/bp_bin/get_genome_align b/bp_bin/get_genome_align index 3b8bf43..b1e5c1d 100755 --- a/bp_bin/get_genome_align +++ b/bp_bin/get_genome_align @@ -181,4 +181,3 @@ END __END__ - diff --git a/bp_bin/get_genome_phastcons b/bp_bin/get_genome_phastcons index 337c019..24994ab 100755 --- a/bp_bin/get_genome_phastcons +++ b/bp_bin/get_genome_phastcons @@ -101,26 +101,22 @@ while ( $record = Maasha::Biopieces::get_record( $in ) ) close $fh_phastcons if $fh_phastcons; +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(); } @@ -128,4 +124,3 @@ END __END__ - diff --git a/bp_bin/get_genome_seq b/bp_bin/get_genome_seq index bf0f787..b5ea5a7 100755 --- a/bp_bin/get_genome_seq +++ b/bp_bin/get_genome_seq @@ -191,26 +191,22 @@ while ( $record = Maasha::Biopieces::get_record( $in ) ) 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(); } @@ -218,4 +214,3 @@ END __END__ - diff --git a/bp_bin/grab b/bp_bin/grab index 1fecf43..806ae1c 100755 --- a/bp_bin/grab +++ b/bp_bin/grab @@ -120,6 +120,8 @@ while ( $record = Maasha::Biopieces::get_record( $in ) ) } } +Maasha::Biopieces::close_stream( $in ); +Maasha::Biopieces::close_stream( $out ); # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> SUBROUTINES <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @@ -274,20 +276,13 @@ sub grab_eval 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(); } @@ -295,4 +290,3 @@ END __END__ - diff --git a/bp_bin/head_records b/bp_bin/head_records index 631973c..d537501 100755 --- a/bp_bin/head_records +++ b/bp_bin/head_records @@ -55,26 +55,22 @@ while ( $record = Maasha::Biopieces::get_record( $in ) ) last if $count == $options->{ "num" }; } +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(); } @@ -82,4 +78,3 @@ END __END__ - diff --git a/bp_bin/invert_align b/bp_bin/invert_align index f8b330a..84f17d3 100755 --- a/bp_bin/invert_align +++ b/bp_bin/invert_align @@ -66,26 +66,22 @@ Maasha::Align::align_invert( \@entries, $options->{ "soft" } ); map { Maasha::Biopieces::put_record( { SEQ_NAME => $_->[ SEQ_NAME ], SEQ => $_->[ SEQ ] }, $out ) } @entries; +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(); } @@ -93,4 +89,3 @@ END __END__ - diff --git a/bp_bin/length_seq b/bp_bin/length_seq index b00eb3e..f7c3d95 100755 --- a/bp_bin/length_seq +++ b/bp_bin/length_seq @@ -58,26 +58,22 @@ while ( $record = Maasha::Biopieces::get_record( $in ) ) Maasha::Biopieces::put_record( { TOTAL_SEQ_LEN => $total }, $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(); } @@ -85,4 +81,3 @@ END __END__ - diff --git a/bp_bin/length_vals b/bp_bin/length_vals index f9f1616..99a3c2b 100755 --- a/bp_bin/length_vals +++ b/bp_bin/length_vals @@ -56,26 +56,22 @@ while ( $record = Maasha::Biopieces::get_record( $in ) ) 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(); } @@ -83,4 +79,3 @@ END __END__ - diff --git a/bp_bin/list_biopieces b/bp_bin/list_biopieces index f58f2e8..a51a2ad 100755 --- a/bp_bin/list_biopieces +++ b/bp_bin/list_biopieces @@ -62,16 +62,13 @@ foreach $file ( sort @files ) BEGIN { - $run_time_beg = Maasha::Biopieces::run_time(); - - Maasha::Biopieces::log_biopiece(); + Maasha::Biopieces::status_set(); } + END { - $run_time_end = Maasha::Biopieces::run_time(); - - Maasha::Biopieces::run_time_print( $run_time_beg, $run_time_end, $options ); + Maasha::Biopieces::status_log(); } @@ -79,5 +76,3 @@ END __END__ - - diff --git a/bp_bin/list_genomes b/bp_bin/list_genomes index 147d5c1..7a4f457 100755 --- a/bp_bin/list_genomes +++ b/bp_bin/list_genomes @@ -85,16 +85,13 @@ foreach $genome ( sort keys %hash ) BEGIN { - $run_time_beg = Maasha::Biopieces::run_time(); - - Maasha::Biopieces::log_biopiece(); + Maasha::Biopieces::status_set(); } + END { - $run_time_end = Maasha::Biopieces::run_time(); - - Maasha::Biopieces::run_time_print( $run_time_beg, $run_time_end, $options ); + Maasha::Biopieces::status_log(); } @@ -102,5 +99,3 @@ END __END__ - - diff --git a/bp_bin/match_seq b/bp_bin/match_seq index 0ce31eb..b418f3c 100755 --- a/bp_bin/match_seq +++ b/bp_bin/match_seq @@ -73,26 +73,22 @@ elsif ( @entries == 2 ) Maasha::Filesys::dir_remove( $tmp_dir ); +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(); } @@ -100,4 +96,3 @@ END __END__ - diff --git a/bp_bin/max_vals b/bp_bin/max_vals index 7c760a5..49e6fed 100755 --- a/bp_bin/max_vals +++ b/bp_bin/max_vals @@ -74,26 +74,22 @@ Maasha::Biopieces::put_record( $max_record, $fh ); close $fh; +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(); } @@ -101,4 +97,3 @@ END __END__ - diff --git a/bp_bin/mean_vals b/bp_bin/mean_vals index fb073cd..654c4fe 100755 --- a/bp_bin/mean_vals +++ b/bp_bin/mean_vals @@ -75,26 +75,22 @@ foreach $key ( @{ $options->{ "keys" } } ) close $fh; +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(); } @@ -102,4 +98,3 @@ END __END__ - diff --git a/bp_bin/median_vals b/bp_bin/median_vals index 9428f9a..c1b8013 100755 --- a/bp_bin/median_vals +++ b/bp_bin/median_vals @@ -71,26 +71,22 @@ foreach $key ( @{ $options->{ "keys" } } ) close $fh; +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(); } @@ -98,4 +94,3 @@ END __END__ - diff --git a/bp_bin/merge_records b/bp_bin/merge_records index 39f09e2..ad0d06e 100755 --- a/bp_bin/merge_records +++ b/bp_bin/merge_records @@ -203,26 +203,22 @@ if ( $num2 > 0 and $options->{ 'merge' } =~ /^(BorA|BnotA)$/ ) Maasha::Filesys::dir_remove( $tmp_dir ); +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(); } @@ -230,4 +226,3 @@ END __END__ - diff --git a/bp_bin/merge_vals b/bp_bin/merge_vals index c751a4d..9979d07 100755 --- a/bp_bin/merge_vals +++ b/bp_bin/merge_vals @@ -61,26 +61,22 @@ while ( $record = Maasha::Biopieces::get_record( $in ) ) 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(); } @@ -88,4 +84,3 @@ END __END__ - diff --git a/bp_bin/min_vals b/bp_bin/min_vals index 34024b1..7eeb7a6 100755 --- a/bp_bin/min_vals +++ b/bp_bin/min_vals @@ -74,26 +74,22 @@ Maasha::Biopieces::put_record( $min_record, $fh ); close $fh; +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(); } @@ -101,4 +97,3 @@ END __END__ - diff --git a/bp_bin/oligo_freq b/bp_bin/oligo_freq index e179d8d..d660610 100755 --- a/bp_bin/oligo_freq +++ b/bp_bin/oligo_freq @@ -71,26 +71,22 @@ if ( defined $options->{ "all" } ) map { Maasha::Biopieces::put_record( $_, $out ) } @freq_table; } +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(); } @@ -98,4 +94,3 @@ END __END__ - diff --git a/bp_bin/patscan_seq b/bp_bin/patscan_seq index 60a5cae..d6b9c1b 100755 --- a/bp_bin/patscan_seq +++ b/bp_bin/patscan_seq @@ -139,6 +139,9 @@ unlink $seq_file if not $options->{ 'genome' }; Maasha::Filesys::dir_remove( $tmp_dir ); +Maasha::Biopieces::close_stream( $in ); +Maasha::Biopieces::close_stream( $out ); + # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> SUBROUTINES <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @@ -219,20 +222,13 @@ sub pat_write 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(); } @@ -240,4 +236,3 @@ END __END__ - diff --git a/bp_bin/plot_chrdist b/bp_bin/plot_chrdist index df4db5a..16b86a6 100755 --- a/bp_bin/plot_chrdist +++ b/bp_bin/plot_chrdist @@ -97,26 +97,22 @@ print $fh "$_\n" foreach @{ $result }; close $fh; +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(); } @@ -124,4 +120,3 @@ END __END__ - diff --git a/bp_bin/plot_histogram b/bp_bin/plot_histogram index 9eccb68..74ba748 100755 --- a/bp_bin/plot_histogram +++ b/bp_bin/plot_histogram @@ -76,26 +76,22 @@ print $fh "$_\n" foreach @{ $result }; close $fh; +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(); } @@ -103,4 +99,3 @@ END __END__ - diff --git a/bp_bin/plot_karyogram b/bp_bin/plot_karyogram index 9adf2f8..e9542ca 100755 --- a/bp_bin/plot_karyogram +++ b/bp_bin/plot_karyogram @@ -69,26 +69,22 @@ print $fh $result; close $fh; +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(); } @@ -96,4 +92,3 @@ END __END__ - diff --git a/bp_bin/plot_lendist b/bp_bin/plot_lendist index a2fb9cc..a515f5c 100755 --- a/bp_bin/plot_lendist +++ b/bp_bin/plot_lendist @@ -76,26 +76,22 @@ print $fh "$_\n" foreach @{ $result }; close $fh; +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(); } @@ -103,4 +99,3 @@ END __END__ - diff --git a/bp_bin/plot_matches b/bp_bin/plot_matches index f383da8..9bdb087 100755 --- a/bp_bin/plot_matches +++ b/bp_bin/plot_matches @@ -80,6 +80,9 @@ close $fh; Maasha::Filesys::dir_remove( $tmp_dir ); +Maasha::Biopieces::close_stream( $in ); +Maasha::Biopieces::close_stream( $out ); + # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> SUBROUTINES <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @@ -189,20 +192,13 @@ sub dotplot_matches 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(); } @@ -210,4 +206,3 @@ END __END__ - diff --git a/bp_bin/plot_phastcons_profiles b/bp_bin/plot_phastcons_profiles index caf444f..b1af87b 100755 --- a/bp_bin/plot_phastcons_profiles +++ b/bp_bin/plot_phastcons_profiles @@ -101,26 +101,22 @@ close $fh; Maasha::Filesys::dir_remove( $tmp_dir ); +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(); } @@ -128,4 +124,3 @@ END __END__ - diff --git a/bp_bin/plot_seqlogo b/bp_bin/plot_seqlogo index e9be5a6..34a533f 100755 --- a/bp_bin/plot_seqlogo +++ b/bp_bin/plot_seqlogo @@ -63,26 +63,22 @@ print $fh $logo; close $fh; +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(); } @@ -90,4 +86,3 @@ END __END__ - diff --git a/bp_bin/print_wiki b/bp_bin/print_wiki index b13d514..1c36c10 100755 --- a/bp_bin/print_wiki +++ b/bp_bin/print_wiki @@ -62,21 +62,17 @@ print STDERR "$_\n" foreach @{ $lines }; BEGIN { - $run_time_beg = Maasha::Biopieces::run_time(); - - Maasha::Biopieces::log_biopiece(); + Maasha::Biopieces::status_set(); } END { - $run_time_end = Maasha::Biopieces::run_time(); - - Maasha::Biopieces::run_time_print( $run_time_beg, $run_time_end, $options ); + Maasha::Biopieces::status_log(); } + # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< __END__ - diff --git a/bp_bin/random_records b/bp_bin/random_records index 5c4595c..83ac80d 100755 --- a/bp_bin/random_records +++ b/bp_bin/random_records @@ -98,26 +98,22 @@ close $fh_in; unlink $tmp_file; Maasha::Filesys::dir_remove( $tmp_dir ); +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(); } @@ -125,4 +121,3 @@ END __END__ - diff --git a/bp_bin/read_2bit b/bp_bin/read_2bit index 63bb7e1..ab2816a 100755 --- a/bp_bin/read_2bit +++ b/bp_bin/read_2bit @@ -82,25 +82,22 @@ NUM: close $data_in if $data_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(); } diff --git a/bp_bin/read_bed b/bp_bin/read_bed index 551d86e..177d1c7 100755 --- a/bp_bin/read_bed +++ b/bp_bin/read_bed @@ -73,25 +73,22 @@ if ( $options->{ 'data_in' } ) close $data_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(); } diff --git a/bp_bin/read_blast_tab b/bp_bin/read_blast_tab index fcf53ae..d5aaf8a 100755 --- a/bp_bin/read_blast_tab +++ b/bp_bin/read_blast_tab @@ -99,25 +99,22 @@ if ( $options->{ 'data_in' } ) close $data_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(); } diff --git a/bp_bin/read_embl b/bp_bin/read_embl index 80cc39a..7197794 100755 --- a/bp_bin/read_embl +++ b/bp_bin/read_embl @@ -106,25 +106,22 @@ if ( $options->{ 'data_in' } ) close $data_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(); } diff --git a/bp_bin/read_fasta b/bp_bin/read_fasta index 17a26df..1c35069 100755 --- a/bp_bin/read_fasta +++ b/bp_bin/read_fasta @@ -94,4 +94,3 @@ END __END__ - diff --git a/bp_bin/read_fixedstep b/bp_bin/read_fixedstep index 794599b..16ad12f 100755 --- a/bp_bin/read_fixedstep +++ b/bp_bin/read_fixedstep @@ -71,25 +71,22 @@ if ( $options->{ 'data_in' } ) close $data_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(); } diff --git a/bp_bin/read_gff b/bp_bin/read_gff index f7162a1..3901757 100755 --- a/bp_bin/read_gff +++ b/bp_bin/read_gff @@ -69,25 +69,22 @@ if ( $options->{ 'data_in' } ) close $data_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(); } diff --git a/bp_bin/read_mysql b/bp_bin/read_mysql index b79458b..f0ce4de 100755 --- a/bp_bin/read_mysql +++ b/bp_bin/read_mysql @@ -64,25 +64,22 @@ Maasha::SQL::disconnect( $dbh ); map { Maasha::Biopieces::put_record( $_ ) } @{ $results }; +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(); } diff --git a/bp_bin/read_psl b/bp_bin/read_psl index c7183ee..866b99b 100755 --- a/bp_bin/read_psl +++ b/bp_bin/read_psl @@ -69,25 +69,22 @@ if ( $options->{ 'data_in' } ) close $data_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(); } diff --git a/bp_bin/read_soft b/bp_bin/read_soft index c51ba90..dfbf9f3 100755 --- a/bp_bin/read_soft +++ b/bp_bin/read_soft @@ -103,25 +103,22 @@ NUM: close $data_in if $data_in; close $fh if $fh; +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(); } diff --git a/bp_bin/read_solexa b/bp_bin/read_solexa index b35c21c..f509aa4 100755 --- a/bp_bin/read_solexa +++ b/bp_bin/read_solexa @@ -89,25 +89,22 @@ if ( $options->{ 'data_in' } ) close $data_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(); } diff --git a/bp_bin/read_solid b/bp_bin/read_solid index b39e596..cfcd4e6 100755 --- a/bp_bin/read_solid +++ b/bp_bin/read_solid @@ -93,25 +93,22 @@ if ( $options->{ 'data_in' } ) close $data_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(); } diff --git a/bp_bin/read_stockholm b/bp_bin/read_stockholm index f883d41..177ded5 100755 --- a/bp_bin/read_stockholm +++ b/bp_bin/read_stockholm @@ -91,6 +91,8 @@ if ( $options->{ 'data_in' } ) close $data_in; } +Maasha::Biopieces::close_stream( $in ); +Maasha::Biopieces::close_stream( $out ); # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @@ -98,19 +100,13 @@ if ( $options->{ 'data_in' } ) 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(); } diff --git a/bp_bin/read_tab b/bp_bin/read_tab index 152c0d5..0fda36b 100755 --- a/bp_bin/read_tab +++ b/bp_bin/read_tab @@ -104,25 +104,22 @@ if ( $options->{ 'data_in' } ) close $data_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(); } @@ -130,7 +127,3 @@ END __END__ - - - - diff --git a/bp_bin/read_ucsc_config b/bp_bin/read_ucsc_config index a62000b..a07a99f 100755 --- a/bp_bin/read_ucsc_config +++ b/bp_bin/read_ucsc_config @@ -71,25 +71,22 @@ if ( $options->{ 'data_in' } ) close $data_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(); } diff --git a/bp_bin/remove_adaptor b/bp_bin/remove_adaptor index d989829..a07a719 100755 --- a/bp_bin/remove_adaptor +++ b/bp_bin/remove_adaptor @@ -94,26 +94,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(); } @@ -121,4 +117,3 @@ END __END__ - diff --git a/bp_bin/remove_indels b/bp_bin/remove_indels index e476694..5d350e0 100755 --- a/bp_bin/remove_indels +++ b/bp_bin/remove_indels @@ -47,26 +47,22 @@ while ( $record = Maasha::Biopieces::get_record( $in ) ) 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(); } @@ -74,4 +70,3 @@ END __END__ - diff --git a/bp_bin/remove_keys b/bp_bin/remove_keys index 0683dce..03c6bcb 100755 --- a/bp_bin/remove_keys +++ b/bp_bin/remove_keys @@ -61,26 +61,22 @@ while ( $record = Maasha::Biopieces::get_record( $in ) ) Maasha::Biopieces::put_record( $record, $out ) if keys %{ $record }; } +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(); } @@ -88,4 +84,3 @@ END __END__ - diff --git a/bp_bin/remove_mysql_tables b/bp_bin/remove_mysql_tables index 2875169..64450f4 100755 --- a/bp_bin/remove_mysql_tables +++ b/bp_bin/remove_mysql_tables @@ -84,26 +84,22 @@ foreach $table ( sort keys %table_hash ) Maasha::SQL::disconnect( $dbh ); +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(); } @@ -111,4 +107,3 @@ END __END__ - diff --git a/bp_bin/remove_ucsc_tracks b/bp_bin/remove_ucsc_tracks index ca56575..e400502 100755 --- a/bp_bin/remove_ucsc_tracks +++ b/bp_bin/remove_ucsc_tracks @@ -116,26 +116,22 @@ Maasha::SQL::disconnect( $dbh ); Maasha::Common::run( "ucscMakeTracks.pl", "-b > /dev/null 2>&1" ); +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(); } @@ -143,4 +139,3 @@ END __END__ - diff --git a/bp_bin/rename_keys b/bp_bin/rename_keys index 4a804d4..a792544 100755 --- a/bp_bin/rename_keys +++ b/bp_bin/rename_keys @@ -56,26 +56,22 @@ while ( $record = Maasha::Biopieces::get_record( $in ) ) 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(); } @@ -83,4 +79,3 @@ END __END__ - diff --git a/bp_bin/reverse_seq b/bp_bin/reverse_seq index 7d2052d..1b331c9 100755 --- a/bp_bin/reverse_seq +++ b/bp_bin/reverse_seq @@ -47,24 +47,22 @@ while ( $record = Maasha::Biopieces::get_record( $in ) ) 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(); } diff --git a/bp_bin/shuffle_seq b/bp_bin/shuffle_seq index 05932c4..e791397 100755 --- a/bp_bin/shuffle_seq +++ b/bp_bin/shuffle_seq @@ -48,24 +48,22 @@ while ( $record = Maasha::Biopieces::get_record( $in ) ) 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(); } diff --git a/bp_bin/soap_seq b/bp_bin/soap_seq index f99bbb3..7adb6a9 100755 --- a/bp_bin/soap_seq +++ b/bp_bin/soap_seq @@ -126,25 +126,22 @@ unlink $tmp_out; Maasha::Filesys::dir_remove( $tmp_dir ); +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(); } @@ -152,4 +149,3 @@ END __END__ - diff --git a/bp_bin/sort_records b/bp_bin/sort_records index 13bd4eb..c9b3085 100755 --- a/bp_bin/sort_records +++ b/bp_bin/sort_records @@ -87,26 +87,22 @@ else } } +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(); } @@ -114,4 +110,3 @@ END __END__ - diff --git a/bp_bin/split_bed b/bp_bin/split_bed index 97cbaf6..d344a3c 100755 --- a/bp_bin/split_bed +++ b/bp_bin/split_bed @@ -71,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(); } @@ -98,4 +94,3 @@ END __END__ - diff --git a/bp_bin/split_seq b/bp_bin/split_seq index 776a79b..7c4c598 100755 --- a/bp_bin/split_seq +++ b/bp_bin/split_seq @@ -77,26 +77,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(); } @@ -104,4 +100,3 @@ END __END__ - diff --git a/bp_bin/split_vals b/bp_bin/split_vals index f7249f8..77194a3 100755 --- a/bp_bin/split_vals +++ b/bp_bin/split_vals @@ -91,4 +91,3 @@ END __END__ - diff --git a/bp_bin/sum_vals b/bp_bin/sum_vals index 1da7130..b0b150a 100755 --- a/bp_bin/sum_vals +++ b/bp_bin/sum_vals @@ -66,26 +66,22 @@ foreach $key ( @{ $options->{ "keys" } } ) { close $fh; +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(); } @@ -93,4 +89,3 @@ END __END__ - diff --git a/bp_bin/tile_seq b/bp_bin/tile_seq index a90f1e4..139a6f2 100755 --- a/bp_bin/tile_seq +++ b/bp_bin/tile_seq @@ -78,26 +78,22 @@ while ( $record = Maasha::Biopieces::get_record( $in ) ) map { Maasha::Biopieces::put_record( { SEQ_NAME => $_->[ SEQ_NAME ], SEQ => $_->[ SEQ ] }, $out ) } @entries; +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(); } @@ -105,4 +101,3 @@ END __END__ - diff --git a/bp_bin/translate_seq b/bp_bin/translate_seq index 21452b9..9627c9d 100755 --- a/bp_bin/translate_seq +++ b/bp_bin/translate_seq @@ -69,26 +69,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(); } @@ -96,4 +92,3 @@ END __END__ - diff --git a/bp_bin/transliterate_seq b/bp_bin/transliterate_seq index 44c60ff..2908163 100755 --- a/bp_bin/transliterate_seq +++ b/bp_bin/transliterate_seq @@ -64,26 +64,22 @@ while ( $record = Maasha::Biopieces::get_record( $in ) ) 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 +87,3 @@ END __END__ - diff --git a/bp_bin/transliterate_vals b/bp_bin/transliterate_vals index 091aa9d..546652c 100755 --- a/bp_bin/transliterate_vals +++ b/bp_bin/transliterate_vals @@ -68,26 +68,22 @@ while ( $record = Maasha::Biopieces::get_record( $in ) ) 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(); } @@ -95,4 +91,3 @@ END __END__ - diff --git a/bp_bin/uniq_vals b/bp_bin/uniq_vals index 93fd3be..f01be81 100755 --- a/bp_bin/uniq_vals +++ b/bp_bin/uniq_vals @@ -70,26 +70,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 +93,3 @@ END __END__ - diff --git a/bp_bin/upload_to_ucsc b/bp_bin/upload_to_ucsc index 5fa6c3e..25c3103 100755 --- a/bp_bin/upload_to_ucsc +++ b/bp_bin/upload_to_ucsc @@ -228,26 +228,22 @@ Maasha::UCSC::ucsc_update_config( $options, $type ); Maasha::Filesys::dir_remove( $tmp_dir ); +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(); } @@ -255,4 +251,3 @@ END __END__ - diff --git a/bp_bin/uppercase_seq b/bp_bin/uppercase_seq index 3a9c89b..5e1ec7b 100755 --- a/bp_bin/uppercase_seq +++ b/bp_bin/uppercase_seq @@ -47,24 +47,22 @@ while ( $record = Maasha::Biopieces::get_record( $in ) ) 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(); } diff --git a/bp_bin/vmatch_seq b/bp_bin/vmatch_seq index 0cddbe0..4d54dc9 100755 --- a/bp_bin/vmatch_seq +++ b/bp_bin/vmatch_seq @@ -268,25 +268,22 @@ sub vmatch_get_entry } } +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(); } @@ -294,4 +291,3 @@ END __END__ - diff --git a/bp_bin/write_2bit b/bp_bin/write_2bit index 459f852..3929bba 100755 --- a/bp_bin/write_2bit +++ b/bp_bin/write_2bit @@ -84,25 +84,22 @@ unlink $tmp_file; Maasha::Filesys::dir_remove( $tmp_dir ); +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(); } diff --git a/bp_bin/write_align b/bp_bin/write_align index d978bd4..3963d94 100755 --- a/bp_bin/write_align +++ b/bp_bin/write_align @@ -68,25 +68,22 @@ if ( scalar( @entries ) == 2 ) { close $data_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(); } diff --git a/bp_bin/write_bed b/bp_bin/write_bed index 38b8704..34f8810 100755 --- a/bp_bin/write_bed +++ b/bp_bin/write_bed @@ -64,25 +64,22 @@ while ( $record = Maasha::Biopieces::get_record( $in ) ) close $fh; +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(); } diff --git a/bp_bin/write_blast b/bp_bin/write_blast index 27f164a..ecf0862 100755 --- a/bp_bin/write_blast +++ b/bp_bin/write_blast @@ -70,8 +70,11 @@ while ( $record = Maasha::Biopieces::get_record( $in ) ) close $data_out; +Maasha::Biopieces::close_stream( $in ); +Maasha::Biopieces::close_stream( $out ); -# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< + +# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> SUBROUTINES <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< sub biopiece2blast_tab @@ -123,19 +126,13 @@ sub biopiece2blast_tab 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(); } diff --git a/bp_bin/write_fasta b/bp_bin/write_fasta index f71aa26..a2f68c6 100755 --- a/bp_bin/write_fasta +++ b/bp_bin/write_fasta @@ -61,25 +61,22 @@ while ( $record = Maasha::Biopieces::get_record( $in ) ) close $data_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(); } diff --git a/bp_bin/write_fixedstep b/bp_bin/write_fixedstep index 5de9a6b..7fbd8f9 100755 --- a/bp_bin/write_fixedstep +++ b/bp_bin/write_fixedstep @@ -60,25 +60,22 @@ while ( $record = Maasha::Biopieces::get_record( $in ) ) close $fh; +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(); } diff --git a/bp_bin/write_psl b/bp_bin/write_psl index 43c85d4..404e21a 100755 --- a/bp_bin/write_psl +++ b/bp_bin/write_psl @@ -65,25 +65,22 @@ while ( $record = Maasha::Biopieces::get_record( $in ) ) close $fh; +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(); } diff --git a/bp_bin/write_solid b/bp_bin/write_solid index b467e55..f999c8b 100755 --- a/bp_bin/write_solid +++ b/bp_bin/write_solid @@ -65,25 +65,22 @@ while ( $record = Maasha::Biopieces::get_record( $in ) ) close $fh; +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(); } diff --git a/bp_bin/write_tab b/bp_bin/write_tab index e20794d..eab15ff 100755 --- a/bp_bin/write_tab +++ b/bp_bin/write_tab @@ -123,25 +123,22 @@ while ( $record = Maasha::Biopieces::get_record( $in ) ) close $data_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(); } diff --git a/bp_bin/write_ucsc_config b/bp_bin/write_ucsc_config index efd4dd0..c8d2df3 100755 --- a/bp_bin/write_ucsc_config +++ b/bp_bin/write_ucsc_config @@ -58,25 +58,22 @@ while ( $record = Maasha::Biopieces::get_record( $in ) ) close $fh; +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(); } -- 2.39.5