From: martinahansen Date: Tue, 11 Nov 2008 04:33:37 +0000 (+0000) Subject: added -t to remove_mysql_tables X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=3b2f06047b7c98cccdaf3132112e39dd10505d2c;p=biopieces.git added -t to remove_mysql_tables git-svn-id: http://biopieces.googlecode.com/svn/trunk@302 74ccb610-7750-0410-82ae-013aeee3265d --- diff --git a/code_perl/Maasha/Biopieces.pm b/code_perl/Maasha/Biopieces.pm index 8fdc6a4..fda79fb 100644 --- a/code_perl/Maasha/Biopieces.pm +++ b/code_perl/Maasha/Biopieces.pm @@ -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' } };