Mercurial > repos > mahtabm > ensembl
diff variant_effect_predictor/Bio/EnsEMBL/Variation/StructuralVariationOverlapAllele.pm @ 0:1f6dce3d34e0
Uploaded
author | mahtabm |
---|---|
date | Thu, 11 Apr 2013 02:01:53 -0400 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/variant_effect_predictor/Bio/EnsEMBL/Variation/StructuralVariationOverlapAllele.pm Thu Apr 11 02:01:53 2013 -0400 @@ -0,0 +1,56 @@ +package Bio::EnsEMBL::Variation::StructuralVariationOverlapAllele; + +use strict; +use warnings; + +use base qw(Bio::EnsEMBL::Variation::BaseVariationFeatureOverlapAllele); + +sub new_fast { + my ($class, $hashref) = @_; + + # swap a transcript_variation argument for a variation_feature_overlap one + + if ($hashref->{structural_variation_overlap}) { + $hashref->{base_variation_feature_overlap} = + delete $hashref->{structural_variation_overlap}; + } + + # and call the superclass + + return $class->SUPER::new_fast($hashref); +} + +=head2 structural_variation_overlap + + Description: Get the associated StructuralVariationOverlap + Returntype : Bio::EnsEMBL::Variation::StructuralVariationOverlap + Exceptions : none + Status : At Risk + +=cut + +sub structural_variation_overlap { + my ($self, $svo) = @_; + if ($svo) { + assert_ref($svo, 'Bio::EnsEMBL::Variation::StructuralVariationOverlap'); + } + return $self->base_variation_feature_overlap($svo); +} + + +=head2 structural_variation_feature + + Description: Get the associated StructuralVariationFeature + Returntype : Bio::EnsEMBL::Variation::StructuralVariationFeature + Exceptions : none + Status : At Risk + +=cut + +sub structural_variation_feature { + my $self = shift; + return $self->structural_variation_overlap->structural_variation_feature; +} + +1; +