]> git.donarmstrong.com Git - function2gene.git/blobdiff - bin/parse_genecard_results
update search program with options for do_it_all; implement calls to subsideary scripts
[function2gene.git] / bin / parse_genecard_results
index 4c00d9b47b85b44ef07adb66042f224cd6513e45..6024d9bd27e0f9d74618070735532cb6dd051da1 100755 (executable)
@@ -70,16 +70,17 @@ BEGIN{
 use IO::File;
 use IO::Dir;
 
-# XXX parse config file
-
 my %options = (debug    => 0,
               help     => 0,
               man      => 0,
               dir      => '.',
               keyword  => undef,
+              keywords => 0,
              );
 
-GetOptions(\%options,'keyword|k=s','dir|D=s','debug|d+','help|h|?','man|m');
+GetOptions(\%options,'keyword|k=s','dir|D=s','debug|d+','help|h|?','man|m',
+          'keywords',
+         );
 
 
 pod2usage() if $options{help};
@@ -99,6 +100,13 @@ use constant {NAME        => 0,
              FILENAME    => 8,
             };
 
+if ($options{keywords}) {
+     if (@ARGV != 1) {
+         pod2usage("If the --keywords option is used, exactly one argument (the keyword) must be passed");
+     }
+     $option{dir} = "$ARGV[0]_results_genecard";
+}
+
 if (not -d $options{dir}) {
      die "$options{dir} does not exist or is not a directory";
 }