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
a2d9bbae
Commit
a2d9bbae
authored
21 years ago
by
Web Admin
Browse files
Options
Downloads
Patches
Plain Diff
changes to archive
parent
145a969d
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/ArchiveStableIdAdaptor.pm
+20
-14
20 additions, 14 deletions
modules/Bio/EnsEMBL/DBSQL/ArchiveStableIdAdaptor.pm
with
20 additions
and
14 deletions
modules/Bio/EnsEMBL/DBSQL/ArchiveStableIdAdaptor.pm
+
20
−
14
View file @
a2d9bbae
...
...
@@ -64,6 +64,11 @@ use vars qw(@ISA);
=cut
# sub prepare {
# my $self = shift;
# warn @_;
# $self->SUPER::prepare( @_ );
# }
sub
fetch_by_stable_id
{
my
$self
=
shift
;
...
...
@@ -75,7 +80,7 @@ sub fetch_by_stable_id {
-
stable_id
=>
$stable_id
);
_resolve_type
(
$arch_id
);
@
_
?
$arch_id
->
type
(
shift
)
:
_resolve_type
(
$arch_id
);
if
(
!
$self
->
_lookup_version
(
$arch_id
)
)
{
return
undef
;
...
...
@@ -112,7 +117,7 @@ sub fetch_by_stable_id_version {
-
stable_id
=>
$stable_id
);
_resolve_type
(
$arch_id
);
@
_
?
$arch_id
->
type
(
shift
)
:
_resolve_type
(
$arch_id
);
return
$arch_id
;
}
...
...
@@ -138,7 +143,7 @@ sub fetch_by_stable_id_dbname {
my
$self
=
shift
;
my
$stable_id
=
shift
;
my
$db_name
=
shift
;
my
$arch_id
=
Bio::EnsEMBL::
ArchiveStableId
->
new
(
-
adaptor
=>
$self
,
...
...
@@ -146,7 +151,7 @@ sub fetch_by_stable_id_dbname {
-
stable_id
=>
$stable_id
);
_resolve_type
(
$arch_id
);
@
_
?
$arch_id
->
type
(
shift
)
:
_resolve_type
(
$arch_id
);
if
(
!
$self
->
_lookup_version
(
$arch_id
)
)
{
return
undef
;
...
...
@@ -539,28 +544,29 @@ sub _lookup_version {
}
my
$sql
;
my
$EXTRA_SQL
=
defined
(
$arch_id
->
{'
type
'})
?
"
and sie.type = '
@{
[
lc
($
arch_id
->{'
type
'
}
)]}'
"
:
'';
if
(
!
defined
$arch_id
->
{'
db_name
'}
)
{
# latest version of this stable id
$sql
=
"
$sql
=
qq(
SELECT new_db_name, new_version
FROM stable_id_event sie, mapping_session m
WHERE sie.mapping_session_id = m.mapping_session_id
AND new_stable_id =
\"
"
.
$arch_id
->
stable_id
()
.
"
\"
AND new_stable_id =
"@{[$arch_id->stable_id]}"
$EXTRA_SQL
ORDER BY m.created DESC
LIMIT 1
"
;
LIMIT 1
)
;
}
else
{
$sql
=
"
$sql
=
qq(
SELECT old_db_name, old_version
FROM stable_id_event sie, mapping_session m
WHERE sie.mapping_session_id = m.mapping_session_id
AND old_stable_id =
\"
"
.
$arch_id
->
stable_id
()
.
"
\
"
AND m.old_db_name =
\"
"
.
$arch_id
->
db_name
()
.
"
\"
"
;
AND old_stable_id =
"@{[$arch_id->stable_id]}"
AND m.old_db_name = "@{[$arch_id->db_name]}
"
$EXTRA_SQL
)
;
}
my
$id_type
;
...
...
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