5 # Finding out own path in order to reference own components (including own modules):
9 $ENV{
'EHIVE_ROOT_DIR'} ||= File::Basename::dirname( File::Basename::dirname( Cwd::realpath($0) ) );
10 unshift @INC, $ENV{
'EHIVE_ROOT_DIR'}.
'/modules';
13 use Getopt::Long qw(:config no_auto_abbrev);
25 my ($url, $reg_conf, $reg_type, $reg_alias, $nosqlvc, $job_id, $help);
30 # Connection parameters:
32 'reg_conf|regfile|reg_file=s' => \$reg_conf,
33 'reg_type=s' => \$reg_type,
34 'reg_alias|regname|reg_name=s' => \$reg_alias,
35 'nosqlvc' => \$nosqlvc, #
using "nosqlvc" instead of
"sqlvc!" for consistency with scripts where it is a propagated option
38 'language=s@' => \@languages,
40 ) or die "Error in command line arguments\n";
43 die
"ERROR: There are invalid arguments on the command-line: ". join(
" ", @ARGV).
"\n";
47 pod2usage({-exitvalue => 0, -verbose => 2});
50 # All the languages that are registered
53 my %requested_languages;
55 if($url or $reg_alias) {
59 -reg_conf => $reg_conf,
60 -reg_type => $reg_type,
61 -reg_alias => $reg_alias,
62 -no_sql_schema_version_check => $nosqlvc,
66 foreach my $analysis ($pipeline->collection_of(
'Analysis')->list()) {
67 if ($analysis->language) {
69 if ($wrappers->{$analysis->language}) {
70 $requested_languages{$analysis->language} = 1;
72 warn sprintf(
"Anaylsis '%s' is implemented in %s, but this wrapper is not registered.\n", $analysis->logic_name, $analysis->language);
78 warn
"All the analyses of this pipeline are implemented with the default language.\n";
81 } elsif (scalar(@languages)) {
82 foreach my $language (@languages) {
83 if ($wrappers->{$language}) {
84 $requested_languages{$language} = 1;
86 warn
"No wrapper for '$language' is registered.\n";
91 $requested_languages{$_} = 1
for keys %$wrappers;
95 foreach my $language (keys %requested_languages) {
96 print
"** $language **\n";
109 refresh_guest_languages.pl [options]
113 refresh_guest_languages.pl is an eHive component script that simplifies rebuilding the wrappers
for guest languages
115 =head1 USAGE EXAMPLES
117 # Rebuild all the wrappers needed for an existing pipeline
118 refresh_guest_languages.pl --url mysql:
120 # Rebuild one wrapper
121 refresh_guest_languages.pl --language python
123 # Rebuild all the wrappers
124 refresh_guest_languages.pl
128 =head2 Connection parameters:
132 =item --reg_conf <path>
134 path to a Registry configuration file
136 =item --reg_alias <string>
138 species/alias name
for the eHive DBAdaptor
140 =item --reg_type <string>
142 type of the registry entry (
"hive",
"core",
"compara", etc - defaults to
"hive")
144 =item --url <url string>
146 URL defining where database is located
150 "No SQL Version Check" - set
if you want to force working with a database created by a potentially schema-incompatible API
154 =head2 Task specification parameters:
158 =item --language <name>
160 The name of a language whose wrapper has to be rebuilt.
161 The option can be repeated
165 =head2 Other options:
177 See the NOTICE file distributed with
this work
for additional information
178 regarding copyright ownership.
180 Licensed under the Apache License, Version 2.0 (the
"License"); you may not use
this file except in compliance with the License.
181 You may obtain a copy of the License at
185 Unless required by applicable law or agreed to in writing, software distributed under the License
186 is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
187 See the License
for the specific language governing permissions and limitations under the License.
191 Please subscribe to the eHive mailing list: http: