Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
ensembl
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ensembl-gh-mirror
ensembl
Commits
a3d2b0b6
Commit
a3d2b0b6
authored
15 years ago
by
Eugene Kulesha
Browse files
Options
Downloads
Patches
Plain Diff
added the check for region boundaries
parent
db93816b
No related branches found
Tags
cvs/attic/LRG
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/Bio/EnsEMBL/DBSQL/SequenceAdaptor.pm
+6
-2
6 additions, 2 deletions
modules/Bio/EnsEMBL/DBSQL/SequenceAdaptor.pm
with
6 additions
and
2 deletions
modules/Bio/EnsEMBL/DBSQL/SequenceAdaptor.pm
+
6
−
2
View file @
a3d2b0b6
...
...
@@ -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
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment