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
0caff657
Commit
0caff657
authored
May 23, 2008
by
Nathan Johnson
Browse files
fixed remove_DBAdaptor splice
parent
d554c446
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
modules/Bio/EnsEMBL/Registry.pm
modules/Bio/EnsEMBL/Registry.pm
+10
-3
No files found.
modules/Bio/EnsEMBL/Registry.pm
View file @
0caff657
...
...
@@ -598,24 +598,29 @@ sub remove_DBAdaptor{
my
(
$class
,
$species
,
$group
)
=
@_
;
$species
=
$class
->
get_alias
(
$species
);
delete
$registry_register
{
$species
}{
$group
};
#This will remove the DBAdaptor and all the other adaptors
#Now remove if from the _DBA array
my
$index
;
foreach
my
$i
(
0
..
$#
{
$registry_register
{'
_DBA
'}}){
my
$dba
=
$registry_register
{'
_DBA
'}
->
[
$i
];
if
((
$dba
->
species
eq
$species
)
&&
$dba
->
group
eq
$group
){
$index
=
$i
;
last
;
}
}
@
{
$registry_register
{'
_DBA
'}}
=
splice
(
@
{
$registry_register
{'
_DBA
'}},
$index
,
1
);
#Now remove from _DBA cache
splice
(
@
{
$registry_register
{'
_DBA
'}},
$index
,
1
);
return
;
}
...
...
@@ -665,6 +670,8 @@ sub reset_DBAdaptor{
$self
->
remove_DBAdaptor
(
$alias
,
$group
);
my
@adaptors
=
@
{
$self
->
get_all_adaptors
};
#ConfigRegistry should automatically add this to the Registry
my
$db
=
$class
->
new
(
...
...
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