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
ee4735e4
Commit
ee4735e4
authored
Dec 11, 2007
by
Ian Longden
Browse files
added remove_DBAdaptor method. (Nathans code - tested)
parent
55073aa5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
0 deletions
+36
-0
modules/Bio/EnsEMBL/Registry.pm
modules/Bio/EnsEMBL/Registry.pm
+36
-0
No files found.
modules/Bio/EnsEMBL/Registry.pm
View file @
ee4735e4
...
...
@@ -584,6 +584,42 @@ sub get_all_DBAdaptors_by_connection{
return
\
@return
;
}
=head2 remove_DBAdaptor
Arg [1] : name of the species to get the adaptor for in the registry.
Arg [2] : name of the group to get the adaptor for in the registry.
Example : $dba = Bio::EnsEMBL::Registry->remove_DBAdaptor("Human", "core");
Returntype : none
Exceptions : none
Status : At risk
=cut
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
);
return
;
}
#
# DNA Adaptors
...
...
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