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
20aaa6b8
Commit
20aaa6b8
authored
14 years ago
by
Andreas Kusalananda Kähäri
Browse files
Options
Downloads
Patches
Plain Diff
Do SECONDLOOP differently in get_species_and_object_type().
parent
dd985220
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
+26
-14
26 additions, 14 deletions
modules/Bio/EnsEMBL/Registry.pm
with
26 additions
and
14 deletions
modules/Bio/EnsEMBL/Registry.pm
+
26
−
14
View file @
20aaa6b8
...
...
@@ -126,7 +126,7 @@ use Bio::EnsEMBL::Utils::Argument qw(rearrange);
use
Bio::EnsEMBL::Utils::
ConfigRegistry
;
use
Bio::EnsEMBL::
ApiVersion
;
use
DBI
;
use
DBI
qw(:sql_types)
;
use
vars
qw(%registry_register)
;
...
...
@@ -2580,27 +2580,39 @@ FIRSTLOOP:
SECONDLOOP:
foreach
my
$species
(
@nonstandard_prefix_species
)
{
if
(
defined
(
$known_type
)
)
{
my
$adaptor
=
$self
->
get_adaptor
(
$species
,
'
Core
',
$known_type
);
my
$object
=
$adaptor
->
fetch_by_stable_id
(
$stable_id
);
foreach
my
$dba
(
@
{
$self
->
get_all_DBAdaptors
('
-group
'
=>
'
core
',
'
-species
'
=>
$species
)
}
)
{
my
$dbh
=
$dba
->
dbc
()
->
db_handle
();
my
$dbhost
=
$dba
->
dbc
()
->
host
();
if
(
defined
(
$object
)
)
{
@match
=
(
$species
,
$known_type
,
'
Core
'
);
last
SECONDLOOP
;
}
}
else
{
foreach
my
$type
(
'
Gene
',
'
Transcript
',
'
Translation
',
'
Exon
'
)
{
my
$adaptor
=
$self
->
get_adaptor
(
$species
,
'
Core
',
$type
);
my
$object
=
$adaptor
->
fetch_by_stable_id
(
$stable_id
);
my
$statement
=
sprintf
(
"
SELECT COUNT(1)
"
.
"
FROM %s
"
.
"
WHERE stable_id = ?
",
$dbh
->
quote_identifier
(
undef
,
$dbhost
,
sprintf
(
"
%s_stable_id
",
lc
(
$type
)
)
)
);
my
$sth
=
$dbh
->
prepare
(
$statement
);
$sth
->
bind_param
(
1
,
$stable_id
,
SQL_VARCHAR
);
$sth
->
execute
();
if
(
defined
(
$object
)
)
{
my
$count
=
$sth
->
fetchall_arrayref
()
->
[
0
][
0
];
$sth
->
finish
();
if
(
defined
(
$count
)
&&
$count
>
0
)
{
@match
=
(
$species
,
$type
,
'
Core
'
);
last
SECONDLOOP
;
}
}
}
}
}
## end foreach my $dba ( @{ $self->get_all_DBAdaptors...})
}
## end foreach my $species (@nonstandard_prefix_species)
return
@match
;
}
## end sub get_species_and_object_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