map { Maasha::Common::error( qq(Argument to --cols must be a whole numbers - not "$_") ) if $_ !~ /^\d+$/ } @{ $options{ "cols" } } if $options{ "cols" };
-# print STDERR Dumper( \%options );
+ # print STDERR Dumper( \%options );
foreach $opt ( keys %options )
{
{
Maasha::Common::error( qq(Bad --$opt argument "$options{ $opt }") );
}
- elsif ( $opt eq "table" and $options{ $opt } =~ /-\./ )
+ elsif ( $opt eq "table" and $options{ $opt } =~ /(-|\.)/ )
{
- Maasha::Common::error( qq(Character '$options{ $opt }' is not allowed in table names) );
+ Maasha::Common::error( qq(Character '$1' is not allowed in table name: $options{ $opt }) );
}
elsif ( $opt eq "merge" and $options{ $opt } !~ /^(AandB|AorB|BorA|AnotB|BnotA)$/ )
{
Maasha::Common::dir_create_if_not_exists( $wib_dir );
- `cd $BP_TMP && wigEncode $file $wig_file $wib_file > /dev/null 2>&1`;
+ if ( $options->{ 'verbose' } ) {
+ `cd $BP_TMP && wigEncode $file $wig_file $wib_file`;
+ } else {
+ `cd $BP_TMP && wigEncode $file $wig_file $wib_file > /dev/null 2>&1`;
+ }
+
Maasha::Common::run( "mv", "$BP_TMP/$wib_file $wib_dir" );
unlink $file;
# Maasha::Common::run( "hgLoadWiggle", "$args > /dev/null 2>&1" );
- `cd $tmp_dir && hgLoadWiggle -tmpDir=$tmp_dir -pathPrefix=$wib_dir $options->{ 'database' } $options->{ 'table' } $wig_file > /dev/null 2>&1`;
+ if ( $options->{ 'verbose' } ) {
+ `cd $tmp_dir && hgLoadWiggle -tmpDir=$tmp_dir -pathPrefix=$wib_dir $options->{ 'database' } $options->{ 'table' } $wig_file`;
+ } else {
+ `cd $tmp_dir && hgLoadWiggle -tmpDir=$tmp_dir -pathPrefix=$wib_dir $options->{ 'database' } $options->{ 'table' } $wig_file > /dev/null 2>&1`;
+ }
}