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
a959ef85
Commit
a959ef85
authored
17 years ago
by
Daniel Rios
Browse files
Options
Downloads
Patches
Plain Diff
added argument in seq method to return sequence with coverage information if set to 1
parent
f8f6451e
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/StrainSlice.pm
+8
-4
8 additions, 4 deletions
modules/Bio/EnsEMBL/StrainSlice.pm
with
8 additions
and
4 deletions
modules/Bio/EnsEMBL/StrainSlice.pm
+
8
−
4
View file @
a959ef85
...
...
@@ -217,10 +217,11 @@ sub display_Slice_name{
=head2 seq
Arg [1] :
none
Arg [1] :
int $with_coverage (optional)
Example : print "SEQUENCE = ", $strainSlice->seq();
Description: Returns the sequence of the region represented by this
slice formatted as a string in the strain.
slice formatted as a string in the strain. If flag with_coverage
is set to 1, returns sequence if there is coverage in the region
Returntype : string
Exceptions : none
Caller : general
...
...
@@ -229,6 +230,9 @@ sub display_Slice_name{
sub
seq
{
my
$self
=
shift
;
my
$with_coverage
=
shift
;
$with_coverage
||=
0
;
# special case for in-between (insert) coordinates
return
''
if
(
$self
->
start
()
==
$self
->
end
()
+
1
);
...
...
@@ -250,7 +254,7 @@ sub seq {
#need to find coverage information if different from reference
my
$indAdaptor
=
$self
->
adaptor
->
db
->
get_db_adaptor
('
variation
')
->
get_IndividualAdaptor
;
my
$ref_strain
=
$indAdaptor
->
get_reference_strain_name
;
$self
->
_add_coverage_information
(
$reference_sequence
)
if
(
$self
->
strain_name
ne
$ref_strain
);
$self
->
_add_coverage_information
(
$reference_sequence
)
if
(
$with_coverage
==
1
&&
$self
->
strain_name
ne
$ref_strain
);
return
substr
(
$
{
$reference_sequence
},
0
,
1
)
if
(
$self
->
length
==
1
);
return
$
{
$reference_sequence
};
#returns the reference sequence, applying the variationFeatures
}
...
...
@@ -290,7 +294,7 @@ sub _add_coverage_information{
=head2 get_all_AlleleFeatures_Slice
Args : non
r
e
Args : none
Example : my $af = $strainSlice->get_all_AlleleFeatures_Slice()
Description : Gets all AlleleFeatures between the StrainSlice object and the Slice is defined
ReturnType : listref of Bio::EnsEMBL::Variation::AlleleFeature
...
...
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