Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
ensembl
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ensembl-gh-mirror
ensembl
Commits
04d92646
Commit
04d92646
authored
14 years ago
by
Monika Komorowska
Browse files
Options
Downloads
Patches
Plain Diff
Aliases are not used when more than one db adaptor is created for the same species.
parent
12d302b0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/Bio/EnsEMBL/Registry.pm
+21
-6
21 additions, 6 deletions
modules/Bio/EnsEMBL/Registry.pm
with
21 additions
and
6 deletions
modules/Bio/EnsEMBL/Registry.pm
+
21
−
6
View file @
04d92646
...
...
@@ -1091,6 +1091,26 @@ sub add_alias{
$registry_register
{'
_ALIAS
'}{
lc
(
$key
)}
=
lc
(
$species
);
}
=head2 remove_alias
Arg [1] : name of the species to remove alias for
Arg [2] : name of the alias
Example : Bio::EnsEMBL::Registry->remove_alias("Homo Sapiens","Human");
Description: remove alternative name for the species.
Returntype : none
Exceptions : none
Status : Stable
=cut
sub
remove_alias
{
my
(
$class
,
$species
,
$key
)
=
@_
;
delete
$registry_register
{'
_ALIAS
'}{
lc
(
$key
)};
}
=head2 get_alias
Arg [1] : name of the possible alias to get species for
...
...
@@ -2056,12 +2076,7 @@ sub find_and_add_aliases {
}
elsif
(
$lc_species
ne
$class
->
get_alias
(
$alias_suffix
)
)
{
throw
(
sprintf
(
"
Trying to add alias '%s' to species '%s',
"
.
"
but it is already registrered for species '%s'
\n
",
$alias_suffix
,
$species
,
$class
->
get_alias
(
$alias_suffix
)
)
);
$class
->
remove_alias
(
$species
,
$alias_suffix
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment