]> git.donarmstrong.com Git - biopieces.git/commitdiff
fixed bug in table name check
authormartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Tue, 26 Aug 2008 03:49:54 +0000 (03:49 +0000)
committermartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Tue, 26 Aug 2008 03:49:54 +0000 (03:49 +0000)
git-svn-id: http://biopieces.googlecode.com/svn/trunk@226 74ccb610-7750-0410-82ae-013aeee3265d

code_perl/Maasha/Biopieces.pm
code_perl/Maasha/UCSC.pm

index 69de5bb2a6901fd2043aadec34f69bc0c43c17a2..328bc9685aa6121fb83312bcf8d7545dc8b395fb 100644 (file)
@@ -978,7 +978,7 @@ sub get_options
 
     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 )
     {
@@ -1019,9 +1019,9 @@ sub get_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)$/ )
         {
@@ -6092,7 +6092,12 @@ sub script_upload_to_ucsc
 
             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;
index 9ea87e40314fbd963065dc0ce9a5bbc7bab2a354..1521742e09c741f8a17086bbab16bf4dc08fe319 100644 (file)
@@ -1527,7 +1527,11 @@ sub wiggle_upload_to_ucsc
 
 #    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`;
+    }
 }