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
Commits
cd531630
Commit
cd531630
authored
Jun 23, 2009
by
Andreas Kusalananda Kähäri
Browse files
Formatting
parent
b12ebbad
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
18 deletions
+23
-18
modules/Bio/EnsEMBL/Utils/ConfigRegistry.pm
modules/Bio/EnsEMBL/Utils/ConfigRegistry.pm
+23
-18
No files found.
modules/Bio/EnsEMBL/Utils/ConfigRegistry.pm
View file @
cd531630
...
...
@@ -162,28 +162,33 @@ sub gen_load{
# return if the connection and species, group are the same
if
(
defined
(
$dba
->
species
)){
my
$db_reg
=
$reg
->
get_DBAdaptor
(
$dba
->
species
,
$dba
->
group
);
if
(
defined
(
$db_reg
)){
if
(
$dba
->
dbc
->
equals
(
$db_reg
->
dbc
)){
return
$db_reg
;
}
else
{
warn
"
WARN: Species and group same for two seperate databases
\n
Modify species name for one of these
\n
";
$dba
->
species
(
find_unique_species
(
$dba
->
species
,
$dba
->
group
));
if
(
defined
(
$dba
->
species
)
)
{
my
$db_reg
=
$reg
->
get_DBAdaptor
(
$dba
->
species
,
$dba
->
group
);
if
(
defined
(
$db_reg
)
)
{
if
(
$dba
->
dbc
->
equals
(
$db_reg
->
dbc
)
)
{
return
$db_reg
}
else
{
warn
"
WARN: Species and group same for two seperate databases
\n
"
.
"
Modify species name for one of these
\n
";
$dba
->
species
(
find_unique_species
(
$dba
->
species
,
$dba
->
group
)
);
}
}
}
else
{
# no species
my
@db_reg
=
@
{
$reg
->
get_all_DBAdaptors_by_connection
(
$dba
->
dbc
)};
foreach
my
$db_adaptor
(
@db_reg
){
if
(
$db_adaptor
->
group
eq
$dba
->
group
){
# found same db connection and group
return
$db_adaptor
;
}
else
{
# no species
my
@db_reg
=
@
{
$reg
->
get_all_DBAdaptors_by_connection
(
$dba
->
dbc
)
};
foreach
my
$db_adaptor
(
@db_reg
)
{
if
(
$db_adaptor
->
group
eq
$dba
->
group
)
{
# found same db connection and group
return
$db_adaptor
;
}
}
$dba
->
species
(
find_unique_species
("
DEFAULT
",
$dba
->
group
));
if
(
$dba
->
species
ne
"
DEFAULT
"){
warn
"
WARN: For multiple species use species attribute in DBAdaptor->new
\n
"
$dba
->
species
(
find_unique_species
(
"
DEFAULT
",
$dba
->
group
)
);
if
(
$dba
->
species
ne
"
DEFAULT
"
)
{
warn
"
WARN: For multiple species
"
.
"
use species attribute in DBAdaptor->new()
\n
";
}
}
...
...
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