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
5cebf8d4
Commit
5cebf8d4
authored
Oct 19, 2009
by
William McLaren
Browse files
Added get_all_StructuralVariationFeatures method
parent
aa95c303
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
0 deletions
+38
-0
modules/Bio/EnsEMBL/Slice.pm
modules/Bio/EnsEMBL/Slice.pm
+38
-0
No files found.
modules/Bio/EnsEMBL/Slice.pm
View file @
5cebf8d4
...
...
@@ -1525,6 +1525,44 @@ sub get_all_VariationFeatures{
}
}
=head2 get_all_StructuralVariationFeatures
Args : $class [optional]
Description :returns all structural variation features on this slice. This function will only work
correctly if the variation database has been attached to the core database.
If $class is set, only structural variations of that class will be returned.
ReturnType : listref of Bio::EnsEMBL::Variation::StructuralVariationFeature
Exceptions : none
Caller : contigview, snpview
Status : At Risk
=cut
sub
get_all_StructuralVariationFeatures
{
my
$self
=
shift
;
my
$sv_class
=
shift
;
if
(
!
$self
->
adaptor
())
{
warning
('
Cannot get structural variation features without attached adaptor
');
return
[]
;
}
my
$svf_adaptor
=
Bio::EnsEMBL::DBSQL::
MergedAdaptor
->
new
(
-
species
=>
$self
->
adaptor
()
->
db
()
->
species
,
-
type
=>
"
StructuralVariationFeature
");
if
(
$svf_adaptor
)
{
if
(
defined
$sv_class
)
{
return
$svf_adaptor
->
fetch_all_by_Slice_constraint
(
$self
,
qq{ svf.class = '$sv_class' }
);
}
else
{
return
$svf_adaptor
->
fetch_all_by_Slice
(
$self
);
}
}
else
{
warning
("
Variation database must be attached to core database to
"
.
"
retrieve variation information
"
);
return
[]
;
}
}
=head2 get_all_IndividualSlice
...
...
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