X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=bp_bin%2Fcalc_fixedstep;h=e98b63a9c8828337f093310573e59a08e7164c86;hb=03d0e76c98d4b02f63bb9c03430cc8ad2a6cd354;hp=cbb068a8ec42a7dc80e2bd86aa97dae7f45b3df8;hpb=b607bb9d6e4adcebd9f9e128aacc91a212010ee0;p=biopieces.git diff --git a/bp_bin/calc_fixedstep b/bp_bin/calc_fixedstep index cbb068a..e98b63a 100755 --- a/bp_bin/calc_fixedstep +++ b/bp_bin/calc_fixedstep @@ -1,6 +1,6 @@ -#!/usr/bin/env perl -w +#!/usr/bin/env perl -# Copyright (C) 2007-2009 Martin A. Hansen. +# Copyright (C) 2007-2010 Martin A. Hansen. # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -26,6 +26,7 @@ # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< +use warnings; use strict; use Maasha::Biopieces; use Maasha::Filesys; @@ -42,6 +43,7 @@ my ( $options, $in, $out, $record, $tmp_dir, $bed_file, $fh_in, $fh_out, $options = Maasha::Biopieces::parse_options( [ { long => 'check', short => 'C', type => 'flag', mandatory => 'no', default => undef, allowed => undef, disallowed => undef }, + { long => 'log10', short => 'l', type => 'flag', mandatory => 'no', default => undef, allowed => undef, disallowed => undef }, ] ); @@ -72,7 +74,7 @@ foreach $chr ( sort keys %{ $file_hash } ) { $bed_file = $file_hash->{ $chr }; - $fixedstep_file = Maasha::UCSC::Wiggle::fixedstep_calc( $bed_file, $chr, $options->{ 'use_score' }, $options->{ 'use_log10' } ); + $fixedstep_file = Maasha::UCSC::Wiggle::fixedstep_calc( $bed_file, $chr, $options->{ 'log10' } ); #$fixedstep_file = "$bed_file.fixedstep"; @@ -93,7 +95,8 @@ foreach $chr ( sort keys %{ $file_hash } ) unlink $fixedstep_file; } -Maasha::Filesys::dir_remove( $tmp_dir ); +Maasha::Biopieces::close_stream( $in ); +Maasha::Biopieces::close_stream( $out ); # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @@ -101,19 +104,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(); }