--results directory to store results in
--database databases to search
--restart-at mode to start searching at
+ --invalidate-state state to invalidate
--debug, -d debugging level (Default 0)
--help, -h display this help
--man, -m display manual
already been completed) specify this option. Valid values are get,
parse, or combine.
+=item B<--invalidate-state>
+
+This is a more powerful version of --restart-at, which can
+specifically invalidate a certain method,database,keyword combination.
+
+For example, you can request that the keyword foo be retreived again
+from ncbi using --invalidate-state 'get,ncbi,foo'
+
=item B<--debug, -d>
Debug verbosity. (Default 0)
help => 0,
man => 0,
results => '',
+ invalidate_state => [],
);
GetOptions(\%options,'keywords=s@','databases=s@',
'restart_at|restart-at=s','results=s',
+ 'invalidate_state|invalidate-state=s@',
'debug|d+','help|h|?','man|m');
pod2usage() if $options{help};
}
}
+if (exists $options{invalidate_state}) {
+ for my $invalidate_state (@{$options{invalidate_state}}) {
+ my ($method,$database,$keyword) = split /,/, $invalidate_state;
+ if (not exists $state{done_keywords}{$method}) {
+ print STDERR "Method '$method' does not exist, and cannot be invalidated\n";
+ }
+ elsif (not exists $state{done_keywords}{$method}{$database}) {
+ print STDERR "Database '$database' does not exist for method '$method', and cannot be invalidated\n";
+ }
+ elsif (not exists $state{done_keywords}{$method}{$database}{$keyword}) {
+ print STDERR "Keyword '$keyword' does not exist for database '$database' and method '$method', and cannot be invalidated\n";
+ }
+ else {
+ delete $state{done_keywords}{$method}{$database}{$keyword};
+ }
+ }
+}
+
# now we need to figure out what has to happen
# for each keyword, we check to see if we've got results, parsed
# results, and combined it. If not, we queue up those actions.