# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> RUN SCRIPT <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
-my $t0 = gettimeofday();
-
run_script( $script );
-my $t1 = gettimeofday();
-
-print STDERR "Program: $script" . ( " " x ( 25 - length( $script ) ) ) . sprintf( "Run time: %.4f\n", ( $t1 - $t0 ) );
-
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> SUBROUTINES <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
# Returns nothing.
- my ( $options, $in, $out );
+ my ( $t0, $t1, $options, $in, $out );
+
+ $t0 = gettimeofday();
$options = get_options( $script );
close $in if defined $in;
close $out;
+
+ $t1 = gettimeofday();
+
+ print STDERR "Program: $script" . ( " " x ( 25 - length( $script ) ) ) . sprintf( "Run time: %.4f\n", ( $t1 - $t0 ) ) if $options->{ 'verbose' };
}
{
# Martin A. Hansen, Juli 2008.
- # Read fixedStep wiggle format from stream or file.
+ # Read fixedstep wiggle format from stream or file.
my ( $in, # handle to in stream
$out, # handle to out stream
$phastcons_file = Maasha::Config::genome_phastcons( $options->{ "genome" } );
$phastcons_index = Maasha::Config::genome_phastcons_index( $options->{ "genome" } );
- $index = Maasha::UCSC::phastcons_index_retrieve( $phastcons_index );
+ $index = Maasha::UCSC::fixedstep_index_retrieve( $phastcons_index );
$fh_phastcons = Maasha::Common::read_open( $phastcons_file );
if ( defined $options->{ "chr" } and defined $options->{ "beg" } and ( defined $options->{ "end" } or defined $options->{ "len" } ) )
$options->{ "end" } = $options->{ "beg" } + $options->{ "len" } - 1;
}
- $scores = Maasha::UCSC::phastcons_index_lookup( $index, $fh_phastcons, $options->{ "chr" }, $options->{ "beg" }, $options->{ "end" }, $options->{ "flank" } );
+ $scores = Maasha::UCSC::fixedstep_index_lookup( $index, $fh_phastcons, $options->{ "chr" }, $options->{ "beg" }, $options->{ "end" }, $options->{ "flank" } );
$record->{ "CHR" } = $options->{ "chr" };
$record->{ "CHR_BEG" } = $options->{ "beg" } - $options->{ "flank" };
{
# Martin A. Hansen, July 2008.
- # Cleans out any unused temporary files and direcotries in BP_TMP.
+ # Cleans out any unused temporary files and directories in BP_TMP.
# Returns nothing.
elsif ( $pid == $curr_pid )
{
# print STDERR "Removing current dir: $dir\n";
- Maasha::Common::dir_remove( $dir );
+ # Maasha::Common::dir_remove( $dir );
}
}
}