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
57d73b5a
Commit
57d73b5a
authored
Feb 25, 2010
by
Ian Longden
Browse files
check for rna_edit is within the region of interest
parent
3f19b86f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
modules/Bio/EnsEMBL/DBSQL/SequenceAdaptor.pm
modules/Bio/EnsEMBL/DBSQL/SequenceAdaptor.pm
+6
-2
No files found.
modules/Bio/EnsEMBL/DBSQL/SequenceAdaptor.pm
View file @
57d73b5a
...
...
@@ -252,11 +252,15 @@ sub _rna_edit {
my
$slice
=
shift
;
my
$seq
=
shift
;
#reference to string
my
$offset
=
$slice
->
start
;
#substr start at 0 , but seq starts at 1 (so no -1 here)
my
$s_start
=
$slice
->
start
;
#substr start at 0 , but seq starts at 1 (so no -1 here)
my
$s_end
=
$s_start
+
length
(
$$seq
);
foreach
my
$edit
(
@
{
$self
->
{
_rna_edits_cache
}
->
{
$slice
->
get_seq_region_id
}}){
my
(
$start
,
$end
,
$txt
)
=
split
(
/\s+/
,
$edit
);
substr
(
$$seq
,
$start
-
$offset
,
(
$end
-
$start
)
+
1
,
$txt
);
# check that RNA edit is not outside the requested region : happens quite often with LRG regions
next
if
(
$end
<
$s_start
);
next
if
(
$s_end
<
$start
);
substr
(
$$seq
,
$start
-
$s_start
,
(
$end
-
$start
)
+
1
,
$txt
);
}
return
;
}
...
...
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