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
de5f9f65
Commit
de5f9f65
authored
18 years ago
by
Daniel Rios
Browse files
Options
Downloads
Patches
Plain Diff
added new method get_all_underlying_Slices for compatibility with Compara AlignSlice
parent
937d412a
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/AlignStrainSlice.pm
+59
-1
59 additions, 1 deletion
modules/Bio/EnsEMBL/AlignStrainSlice.pm
with
59 additions
and
1 deletion
modules/Bio/EnsEMBL/AlignStrainSlice.pm
+
59
−
1
View file @
de5f9f65
...
...
@@ -201,12 +201,38 @@ sub length{
return
$length
;
}
#getter for the strains
=head2 strains
Args : None
Description: Returns list with all strains used to
define this AlignStrainSlice object
Returntype : listref of Bio::EnsEMBL::StrainSlice objects
Exceptions : none
Caller : general
=cut
sub
strains
{
my
$self
=
shift
;
return
$self
->
{'
strains
'};
}
=head2 Slice
Args : None
Description: Returns slice where the AlignStrainSlice
is defined
Returntype : Bio::EnsEMBL::Slice object
Exceptions : none
Caller : general
=cut
sub
Slice
{
my
$self
=
shift
;
return
$self
->
{'
slice
'};
}
#method to retrieve, in order, a list with all the indels in the different strains
sub
_get_indels
{
my
$self
=
shift
;
...
...
@@ -236,4 +262,36 @@ sub _get_indels{
return
$range_registry
->
get_ranges
(
1
);
}
=head2 get_all_underlying_Slices
Arg [1] : int $startBasePair
relative to start of slice, which is 1.
Arg [2] : int $endBasePair
relative to start of slice.
Arg [3] : (optional) int $strand
The strand of the slice to obtain sequence from. Default
value is 1.
Description: This Slice is made of several Bio::EnsEMBL::StrainSlices
sequence. This method returns these StrainSlices (or part of
them) with the original coordinates
Returntype : listref of Bio::EnsEMBL::StrainSlice objects
Exceptions : end should be at least as big as start
Caller : general
=cut
sub
get_all_underlying_Slices
{
my
(
$self
,
$start
,
$end
,
$strand
)
=
@_
;
my
$underlying_slices
=
[]
;
$start
=
1
if
(
!
defined
(
$start
));
$end
||=
$self
->
Slice
->
length
;
$strand
||=
1
;
foreach
my
$strainSlice
(
@
{
$self
->
strains
}){
push
@
{
$underlying_slices
},
$strainSlice
->
sub_Slice
(
$start
,
$end
,
$strand
);
}
return
$underlying_slices
;
}
1
;
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