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
2e885db2
Commit
2e885db2
authored
Sep 16, 2010
by
Andreas Kusalananda Kähäri
Browse files
In fetch_by_region_unique(): Clean it up and remove deprecated call to
Slice::dbID().
parent
7f5d7a5a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
13 deletions
+22
-13
modules/Bio/EnsEMBL/DBSQL/SliceAdaptor.pm
modules/Bio/EnsEMBL/DBSQL/SliceAdaptor.pm
+22
-13
No files found.
modules/Bio/EnsEMBL/DBSQL/SliceAdaptor.pm
View file @
2e885db2
...
...
@@ -481,25 +481,34 @@ sub fetch_by_region {
sub
fetch_by_region_unique
{
my
$self
=
shift
;
my
@out
=
();
my
@out
=
();
my
$slice
=
$self
->
fetch_by_region
(
@
_
);
$self
->
_build_exception_cache
()
if
(
!
exists
$self
->
{'
asm_exc_cache
'});
if
(
exists
$self
->
{
asm_exc_cache
}
->
{
$slice
->
dbID
})
{
# Dereference symlinked assembly regions. Take out
# any regions which are symlinked because these are duplicates
my
@projection
=
@
{
$self
->
fetch_normalized_slice_projection
(
$slice
)};
foreach
my
$segment
(
@projection
)
{
if
(
$segment
->
[
2
]
->
seq_region_name
()
eq
$slice
->
seq_region_name
()
&&
$segment
->
[
2
]
->
coord_system
->
equals
(
$slice
->
coord_system
))
{
push
@out
,
$segment
->
[
2
];
if
(
!
exists
(
$self
->
{'
asm_exc_cache
'}
)
)
{
$self
->
_build_exception_cache
();
}
if
(
exists
(
$self
->
{'
asm_exc_cache
'}
->
{
$self
->
get_seq_region_id
(
$slice
)
}
)
)
{
# Dereference symlinked assembly regions. Take out any regions
# which are symlinked because these are duplicates.
my
@projection
=
@
{
$self
->
fetch_normalized_slice_projection
(
$slice
)
};
foreach
my
$segment
(
@projection
)
{
if
(
$segment
->
[
2
]
->
seq_region_name
()
eq
$slice
->
seq_region_name
()
&&
$segment
->
[
2
]
->
coord_system
->
equals
(
$slice
->
coord_system
)
)
{
push
(
@out
,
$segment
->
[
2
]
);
}
}
}
return
\
@out
;
}
}
## end sub fetch_by_region_unique
=head2 fetch_by_name
...
...
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