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
20aaa6b8
Commit
20aaa6b8
authored
Nov 01, 2010
by
Andreas Kusalananda Kähäri
Browse files
Do SECONDLOOP differently in get_species_and_object_type().
parent
dd985220
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
14 deletions
+26
-14
modules/Bio/EnsEMBL/Registry.pm
modules/Bio/EnsEMBL/Registry.pm
+26
-14
No files found.
modules/Bio/EnsEMBL/Registry.pm
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
...
...
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