Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
ensembl-gh-mirror
ensembl-hive
Commits
e7fc1347
Commit
e7fc1347
authored
Jun 14, 2004
by
Jessica Severin
Browse files
added option to connect to hive via a url
parent
2acc426d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
19 deletions
+26
-19
scripts/runWorker.pl
scripts/runWorker.pl
+26
-19
No files found.
scripts/runWorker.pl
View file @
e7fc1347
...
...
@@ -22,9 +22,10 @@ $self->{'analysis_id'} = undef;
$self
->
{'
outdir
'}
=
undef
;
my
$conf_file
;
my
(
$help
,
$host
,
$user
,
$pass
,
$dbname
,
$port
,
$adaptor
);
my
(
$help
,
$host
,
$user
,
$pass
,
$dbname
,
$port
,
$adaptor
,
$url
);
GetOptions
('
help
'
=>
\
$help
,
'
url=s
'
=>
\
$url
,
'
conf=s
'
=>
\
$conf_file
,
'
dbhost=s
'
=>
\
$host
,
'
dbport=i
'
=>
\
$port
,
...
...
@@ -42,28 +43,33 @@ if ($help) { usage(); }
parse_conf
(
$self
,
$conf_file
);
if
(
$host
)
{
$self
->
{'
db_conf
'}
->
{'
-host
'}
=
$host
;
}
if
(
$port
)
{
$self
->
{'
db_conf
'}
->
{'
-port
'}
=
$port
;
}
if
(
$dbname
)
{
$self
->
{'
db_conf
'}
->
{'
-dbname
'}
=
$dbname
;
}
if
(
$user
)
{
$self
->
{'
db_conf
'}
->
{'
-user
'}
=
$user
;
}
if
(
$pass
)
{
$self
->
{'
db_conf
'}
->
{'
-pass
'}
=
$pass
;
}
my
$DBA
;
if
(
$url
)
{
$DBA
=
Bio::EnsEMBL::Hive::
URLFactory
->
fetch
(
$url
);
}
else
{
if
(
$host
)
{
$self
->
{'
db_conf
'}
->
{'
-host
'}
=
$host
;
}
if
(
$port
)
{
$self
->
{'
db_conf
'}
->
{'
-port
'}
=
$port
;
}
if
(
$dbname
)
{
$self
->
{'
db_conf
'}
->
{'
-dbname
'}
=
$dbname
;
}
if
(
$user
)
{
$self
->
{'
db_conf
'}
->
{'
-user
'}
=
$user
;
}
if
(
$pass
)
{
$self
->
{'
db_conf
'}
->
{'
-pass
'}
=
$pass
;
}
unless
(
defined
(
$self
->
{'
db_conf
'}
->
{'
-host
'})
and
defined
(
$self
->
{'
db_conf
'}
->
{'
-user
'})
and
defined
(
$self
->
{'
db_conf
'}
->
{'
-dbname
'}))
{
print
"
\n
ERROR : must specify host, user, and database to connect
\n\n
";
usage
();
}
unless
(
defined
(
$self
->
{'
db_conf
'}
->
{'
-host
'})
and
defined
(
$self
->
{'
db_conf
'}
->
{'
-user
'})
and
defined
(
$self
->
{'
db_conf
'}
->
{'
-dbname
'}))
{
print
"
\n
ERROR : must specify host, user, and database to connect
\n\n
";
usage
();
}
unless
(
defined
(
$self
->
{'
analysis_id
'}))
{
print
"
\n
ERROR : must specify analysis_id of worker
\n\n
";
usage
();
}
unless
(
defined
(
$self
->
{'
analysis_id
'}))
{
print
"
\n
ERROR : must specify analysis_id of worker
\n\n
";
usage
();
# connect to database specified
$DBA
=
new
Bio::EnsEMBL::Compara::DBSQL::
DBAdaptor
(
%
{
$self
->
{'
db_conf
'}});
}
# connect to database specified
my
$DBA
=
new
Bio::EnsEMBL::Compara::DBSQL::
DBAdaptor
(
%
{
$self
->
{'
db_conf
'}});
my
$queen
=
$DBA
->
get_Queen
();
...
...
@@ -93,6 +99,7 @@ if($@) {
print
("
total jobs completes :
",
$worker
->
work_done
,
"
\n
");
Bio::EnsEMBL::Hive::
URLFactory
->
cleanup
;
exit
(
0
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment