Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
ensembl-gh-mirror
ensembl
Commits
3eacfbc0
Commit
3eacfbc0
authored
Mar 30, 2005
by
Arne Stabenau
Browse files
allow for undef returned as mapper from AssemblyMapperAdaptor
parent
df3df556
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
7 deletions
+17
-7
modules/Bio/EnsEMBL/DBSQL/AssemblyMapperAdaptor.pm
modules/Bio/EnsEMBL/DBSQL/AssemblyMapperAdaptor.pm
+3
-2
modules/Bio/EnsEMBL/DBSQL/BaseFeatureAdaptor.pm
modules/Bio/EnsEMBL/DBSQL/BaseFeatureAdaptor.pm
+2
-0
modules/Bio/EnsEMBL/Slice.pm
modules/Bio/EnsEMBL/Slice.pm
+12
-5
No files found.
modules/Bio/EnsEMBL/DBSQL/AssemblyMapperAdaptor.pm
View file @
3eacfbc0
...
...
@@ -127,7 +127,7 @@ sub new {
$mapper = $asma->fetch_by_CoordSystems($cs1,$cs2);
$mapper = $asma->fetch_by_CoordSystems($cs2,$cs1);
Returntype : Bio::EnsEMBL::AssemblyMapper
Exceptions :
none
Exceptions :
wrong argument types
Caller : general
=cut
...
...
@@ -162,9 +162,10 @@ sub fetch_by_CoordSystems {
my
@mapping_path
=
@
{
$csa
->
get_mapping_path
(
$cs1
,
$cs2
)};
if
(
!
@mapping_path
)
{
throw
("
There is no mapping defined between these coord systems:
\n
"
.
warn
("
There is no mapping defined between these coord systems:
\n
"
.
$cs1
->
name
()
.
"
"
.
$cs1
->
version
()
.
"
and
"
.
$cs2
->
name
()
.
"
"
.
$cs2
->
version
());
return
undef
;
}
my
$key
=
join
('
:
',
map
({
defined
(
$_
)?
$_
->
dbID
():"
-
"}
@mapping_path
));
...
...
modules/Bio/EnsEMBL/DBSQL/BaseFeatureAdaptor.pm
View file @
3eacfbc0
...
...
@@ -316,6 +316,8 @@ sub _slice_fetch {
}
else
{
$mapper
=
$asma
->
fetch_by_CoordSystems
(
$slice_cs
,
$feat_cs
);
next
unless
defined
$mapper
;
# Get list of coordinates and corresponding internal ids for
# regions the slice spans
@coords
=
$mapper
->
map
(
$slice_seq_region
,
$slice_start
,
$slice_end
,
...
...
modules/Bio/EnsEMBL/Slice.pm
View file @
3eacfbc0
...
...
@@ -693,11 +693,18 @@ sub project {
my
$asm_mapper
=
$asma
->
fetch_by_CoordSystems
(
$slice_cs
,
$cs
);
# perform the mapping between this slice and the requested system
my
@coords
=
$asm_mapper
->
map
(
$normal_slice
->
seq_region_name
(),
$normal_slice
->
start
(),
$normal_slice
->
end
(),
$normal_slice
->
strand
(),
$slice_cs
);
my
@coords
;
if
(
defined
$asm_mapper
)
{
@coords
=
$asm_mapper
->
map
(
$normal_slice
->
seq_region_name
(),
$normal_slice
->
start
(),
$normal_slice
->
end
(),
$normal_slice
->
strand
(),
$slice_cs
);
}
else
{
$coords
[
0
]
=
Bio::EnsEMBL::Mapper::
Gap
->
new
(
$normal_slice
->
start
(),
$normal_slice
->
end
());
}
#construct a projection from the mapping results and return it
...
...
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