]> git.donarmstrong.com Git - biopieces.git/commitdiff
added -t to remove_mysql_tables
authormartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Tue, 11 Nov 2008 04:33:37 +0000 (04:33 +0000)
committermartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Tue, 11 Nov 2008 04:33:37 +0000 (04:33 +0000)
git-svn-id: http://biopieces.googlecode.com/svn/trunk@302 74ccb610-7750-0410-82ae-013aeee3265d

code_perl/Maasha/Biopieces.pm

index 8fdc6a4174fe87b40eb9c5b6a483d108c3bceded..fda79fb0cebfc67e2db91ffeadd938d244fce31f 100644 (file)
@@ -773,6 +773,7 @@ sub get_options
     {
         @options = qw(
             database|d=s
+            tables|t=s
             keys|k=s
             query|q=s
             user|u=s
@@ -1010,6 +1011,7 @@ sub get_options
     $options{ "frames" }    = [ split ",", $options{ "frames" } ]    if defined $options{ "frames" };
     $options{ "formats" }   = [ split ",", $options{ "formats" } ]   if defined $options{ "formats" };
     $options{ "samples" }   = [ split ",", $options{ "samples" } ]   if defined $options{ "samples" };
+    $options{ "tables" }    = [ split ",", $options{ "tables" } ]    if defined $options{ "tables" };
     
     # ---- check arguments ----
 
@@ -5025,6 +5027,8 @@ sub script_remove_mysql_tables
     $options->{ "user" }     ||= Maasha::UCSC::ucsc_get_user();
     $options->{ "password" } ||= Maasha::UCSC::ucsc_get_password();
 
+    map { $table_hash{ $_ } = 1 } @{ $options->{ 'tables' } };
+
     while ( $record = get_record( $in ) )
     {
         map { $table_hash{ $record->{ $_ } } = 1 } @{ $options->{ 'keys' } };