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
1c918718
Commit
1c918718
authored
11 years ago
by
Magali Ruffier
Browse files
Options
Downloads
Patches
Plain Diff
ENSCORESW-677
: added method get_all_versions
returns a listref of all unique assembly versions available
parent
f113e4c6
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/DBSQL/CoordSystemAdaptor.pm
+33
-2
33 additions, 2 deletions
modules/Bio/EnsEMBL/DBSQL/CoordSystemAdaptor.pm
with
33 additions
and
2 deletions
modules/Bio/EnsEMBL/DBSQL/CoordSystemAdaptor.pm
+
33
−
2
View file @
1c918718
...
...
@@ -618,8 +618,6 @@ sub fetch_sequence_level {
return
$self
->
{'
_dbID_cache
'}
->
{
$dbIDs
[
0
]};
}
=head2 get_default_version
Arg [1] : none
...
...
@@ -650,6 +648,39 @@ sub get_default_version {
=head2 get_all_versions
Arg [1] : none
Example : @versions = $csa->get_all_versions();
Description: Retrieves all the available versions of assemblies
Returntype : Listref of versions (strings)
Exceptions : throw if no version is defined
Caller : general
Status : Stable
=cut
sub
get_all_versions
{
my
$self
=
shift
;
my
%hash_versions
;
my
@versions
;
my
$version
;
foreach
my
$dbID
(
sort
{
$a
<=>
$b
}
keys
%
{
$self
->
{'
_rank_cache
'}})
{
if
(
$self
->
{'
_rank_cache
'}
->
{
$dbID
}
->
version
)
{
$version
=
$self
->
{'
_rank_cache
'}
->
{
$dbID
}
->
version
;
if
(
!
$hash_versions
{
$version
})
{
$hash_versions
{
$version
}
=
1
;
push
@versions
,
$version
;
}
}
}
throw
('
No versions found
')
if
(
!
scalar
(
@versions
));
return
\
@versions
;
}
=head2 get_mapping_path
...
...
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