Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ensembl-gh-mirror
ensembl
Commits
3905af51
Commit
3905af51
authored
Aug 04, 2004
by
Ian Longden
Browse files
get_ad and ad_db changed slightly
parent
cd217e6c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
6 deletions
+16
-6
modules/Bio/EnsEMBL/Registry.pm
modules/Bio/EnsEMBL/Registry.pm
+16
-6
No files found.
modules/Bio/EnsEMBL/Registry.pm
View file @
3905af51
...
...
@@ -130,11 +130,13 @@ sub load_all{
$registry_register
{'
seen
'}
=
1
;
if
(
defined
(
$web_reg
)){
# print STDERR "Loading conf from site defs file ".$web_reg."\n";
unless
(
my
$return
=
do
$web_reg
){
throw
"
Error in Configuration
\n
$!
\n
";
if
(
-
e
$web_reg
){
unless
(
my
$return
=
do
$web_reg
){
throw
"
Error in Configuration
\n
$!
\n
";
}
# other wise it gets done again by the web initialisation stuff
delete
$INC
{
$web_reg
};
}
# other wise it gets done again by the web initialisation stuff
delete
$INC
{
$web_reg
};
}
elsif
(
defined
(
$ENV
{
ENSEMBL_REGISTRY
})
and
-
e
$ENV
{
ENSEMBL_REGISTRY
}){
# print STDERR "Loading conf from ".$ENV{ENSEMBL_REGISTRY}."\n";
...
...
@@ -213,8 +215,10 @@ sub load_all{
sub
add_db
{
my
(
$class
,
$db
,
$name
,
$adap
)
=
@_
;
$registry_register
{
$db
->
species
()}{
$db
->
group
()}{'
_special
'}{
$name
}
=
$adap
;
if
(
$db
->
species
()
ne
$adap
->
species
){
$registry_register
{
$db
->
species
()}{
$db
->
group
()}{'
_special
'}{
$name
}
=
$adap
;
}
}
=head2 remove_db
...
...
@@ -249,6 +253,11 @@ sub remove_db{
sub
get_db
{
my
(
$class
,
$db
,
$name
)
=
@_
;
my
$ret
=
Bio::EnsEMBL::
Registry
->
get_DBAdaptor
(
$db
->
species
,
$name
);
if
(
defined
(
$ret
)){
return
$ret
;
}
return
$registry_register
{
$db
->
species
()}{
$db
->
group
()}{'
_special
'}{
$name
};
}
...
...
@@ -499,7 +508,8 @@ sub get_adaptor{
my
$ret
=
$registry_register
{
$species
}{
$group
}{
$type
};
if
(
!
defined
(
$ret
)){
throw
("
COULD NOT FIND ADAPTOR species=
$species
\t
group=
$group
\t
type=
$type
\n
");
return
undef
;
# throw("COULD NOT FIND ADAPTOR species=$species\tgroup=$group\ttype=$type\n");
}
if
(
!
ref
(
$ret
)){
# not instantiated yet
my
$dba
=
$registry_register
{
$species
}{
$group
}{'
_DB
'};
...
...
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