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
d02e36cf
Commit
d02e36cf
authored
12 years ago
by
Kieron Taylor
Browse files
Options
Downloads
Patches
Plain Diff
Removed a bug in get_all_alt_locations for negative strand cases.
parent
4ffacb34
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/Bio/EnsEMBL/Feature.pm
+11
-4
11 additions, 4 deletions
modules/Bio/EnsEMBL/Feature.pm
with
11 additions
and
4 deletions
modules/Bio/EnsEMBL/Feature.pm
+
11
−
4
View file @
d02e36cf
...
...
@@ -1221,7 +1221,9 @@ sub seq {
=head2 get_all_alt_locations
Arg [1] : none
Arg [1] : Boolean override flag to force the method to return all
Features on the reference sequence as well.
Example : @features = @{$feature->get_all_alt_locations()};
foreach $f (@features) {
print $f->slice->seq_region_name,' ',$f->start, $f->end,"\n";
...
...
@@ -1230,7 +1232,7 @@ sub seq {
Description: Retrieves shallow copies of this feature in its alternate
locations. A feature can be considered to have multiple
locations when it sits on a alternative structural haplotype
or when it is on a
p
seudo
a
utosomal
r
egion. Most features will
or when it is on a
P
seudo
A
utosomal
R
egion. Most features will
just return a reference to an empty list though.
The features returned by this method will be on a slice which
covers the entire alternate region.
...
...
@@ -1339,8 +1341,13 @@ sub get_all_alt_locations {
my
$aslice
=
$axf
->
alternate_slice
();
# position feature on entire slice of other region
$f
->
{'
start
'}
=
$f
->
seq_region_start
()
-
$axf
->
start
()
+
$aslice
->
start
();
$f
->
{'
end
'}
=
$f
->
seq_region_end
()
-
$axf
->
start
()
+
$aslice
->
start
();
# Cache seq_region_* to prevent contamination when changing feature coordinates.
my
$seq_region_start
=
$f
->
seq_region_start
();
my
$seq_region_end
=
$f
->
seq_region_end
();
$f
->
{'
start
'}
=
$seq_region_start
-
$axf
->
start
()
+
$aslice
->
start
();
$f
->
{'
end
'}
=
$seq_region_end
-
$axf
->
start
()
+
$aslice
->
start
();
$f
->
{'
strand
'}
*=
$aslice
->
strand
();
$f
->
{'
slice
'}
=
$sa
->
fetch_by_seq_region_id
(
$aslice
->
get_seq_region_id
());
...
...
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