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
16e58a4f
Commit
16e58a4f
authored
Mar 18, 2008
by
Andreas Kusalananda Kähäri
Browse files
In cache_toplevel_seq_mappings():
Change SQL from 'code like "toplevel"' to 'code = "toplevel"'. Formatting
parent
3a0ae273
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
26 deletions
+27
-26
modules/Bio/EnsEMBL/DBSQL/SliceAdaptor.pm
modules/Bio/EnsEMBL/DBSQL/SliceAdaptor.pm
+27
-26
No files found.
modules/Bio/EnsEMBL/DBSQL/SliceAdaptor.pm
View file @
16e58a4f
...
...
@@ -1530,53 +1530,54 @@ sub _build_exception_cache {
=cut
sub
cache_toplevel_seq_mappings
{
sub
cache_toplevel_seq_mappings
{
my
(
$self
)
=
@_
;
#
g
et the sequence level to map too
#
G
et the sequence level to map too
my
$sql
=
(
<<
SSQL
);
SELECT
name
FROM
coord_system
WHERE
attrib
like
"
%sequence_level%
"
SELECT
name
FROM
coord_system
WHERE
attrib
like
"
%sequence_level%
"
SSQL
my
$sth
=
$self
->
prepare
(
$sql
);
$sth
->
execute
();
my
$sequence_level
=
$sth
->
fetchrow_array
();
$sth
->
finish
();
my
$csa
=
$self
->
db
->
get_CoordSystemAdaptor
();
my
$ama
=
$self
->
db
->
get_AssemblyMapperAdaptor
();
my
$cs1
=
$csa
->
fetch_by_name
(
$sequence_level
);
#get level to map too.
$sql
=
(
<<
LSQL
);
SELECT
DISTINCT
(
cs
.
name
)
FROM
seq_region
sr
,
seq_region_attrib
sra
,
attrib_type
at
,
coord_system
cs
WHERE
sra
.
seq_region_id
=
sr
.
seq_region_id
AND
sra
.
attrib_type_id
=
at
.
attrib_type_id
AND
at
.
code
like
"
toplevel
"
AND
cs
.
coord_system_id
=
sr
.
coord_system_id
;
LSQL
$sql
=
(
<<
LSQL
);
SELECT
DISTINCT
(
cs
.
name
)
FROM
seq_region
sr
,
seq_region_attrib
sra
,
attrib_type
at
,
coord_system
cs
WHERE
sra
.
seq_region_id
=
sr
.
seq_region_id
AND
sra
.
attrib_type_id
=
at
.
attrib_type_id
AND
at
.
code
=
"
toplevel
"
AND
cs
.
coord_system_id
=
sr
.
coord_system_id
;
LSQL
$sth
=
$self
->
prepare
(
$sql
);
$sth
->
execute
();
while
(
my
$csn
=
$sth
->
fetchrow_array
()){
if
(
$csn
eq
$sequence_level
){
next
;
}
while
(
my
$csn
=
$sth
->
fetchrow_array
()
)
{
if
(
$csn
eq
$sequence_level
)
{
next
}
my
$cs2
=
$csa
->
fetch_by_name
(
$csn
);
my
$am
=
$ama
->
fetch_by_CoordSystems
(
$cs1
,
$cs2
);
$am
->
register_all
();
};
}
my
$am
=
$ama
->
fetch_by_CoordSystems
(
$cs1
,
$cs2
);
$am
->
register_all
();
}
}
## end sub cache_toplevel_seq_mappings
...
...
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