0
|
1 =head1 LICENSE
|
|
2
|
|
3 Copyright (c) 1999-2012 The European Bioinformatics Institute and
|
|
4 Genome Research Limited. All rights reserved.
|
|
5
|
|
6 This software is distributed under a modified Apache license.
|
|
7 For license details, please see
|
|
8
|
|
9 http://www.ensembl.org/info/about/code_licence.html
|
|
10
|
|
11 =head1 CONTACT
|
|
12
|
|
13 Please email comments or questions to the public Ensembl
|
|
14 developers list at <dev@ensembl.org>.
|
|
15
|
|
16 Questions may also be sent to the Ensembl help desk at
|
|
17 <helpdesk@ensembl.org>.
|
|
18
|
|
19 =cut
|
|
20
|
|
21 package Bio::EnsEMBL::Variation::RegulatoryFeatureVariation;
|
|
22
|
|
23 use strict;
|
|
24 use warnings;
|
|
25
|
|
26 use Bio::EnsEMBL::Variation::RegulatoryFeatureVariationAllele;
|
|
27 use Bio::EnsEMBL::Variation::Utils::VariationEffect qw(overlap);
|
|
28
|
|
29 use base qw(Bio::EnsEMBL::Variation::RegulationVariation);
|
|
30
|
|
31 sub new {
|
|
32 my $class = shift;
|
|
33
|
|
34 my %args = @_;
|
|
35
|
|
36 # swap a '-regulatory_feature' argument for a '-feature' one for the superclass
|
|
37
|
|
38 for my $arg (keys %args) {
|
|
39 if (lc($arg) eq '-regulatory_feature') {
|
|
40 $args{'-feature'} = delete $args{$arg};
|
|
41 }
|
|
42 }
|
|
43
|
|
44 # call the superclass constructor
|
|
45 my $self = $class->SUPER::new(%args) || return undef;
|
|
46
|
|
47 # rebless the alleles from vfoas to rfvas
|
|
48 map { bless $_, 'Bio::EnsEMBL::Variation::RegulatoryFeatureVariationAllele' }
|
|
49 @{ $self->get_all_RegulatoryFeatureVariationAlleles };
|
|
50
|
|
51 return $self;
|
|
52 }
|
|
53
|
|
54 sub regulatory_feature_stable_id {
|
|
55 my $self = shift;
|
|
56 return $self->SUPER::feature_stable_id(@_);
|
|
57 }
|
|
58
|
|
59 sub regulatory_feature {
|
|
60 my ($self, $rf) = @_;
|
|
61 return $self->SUPER::feature($rf, 'RegulatoryFeature');
|
|
62 }
|
|
63
|
|
64 sub add_RegulatoryFeatureVariationAllele {
|
|
65 my $self = shift;
|
|
66 return $self->SUPER::add_VariationFeatureOverlapAllele(@_);
|
|
67 }
|
|
68
|
|
69 sub get_reference_RegulatoryFeatureVariationAllele {
|
|
70 my $self = shift;
|
|
71 return $self->SUPER::get_reference_VariationFeatureOverlapAllele(@_);
|
|
72 }
|
|
73
|
|
74 sub get_all_alternate_RegulatoryFeatureVariationAlleles {
|
|
75 my $self = shift;
|
|
76 return $self->SUPER::get_all_alternate_VariationFeatureOverlapAlleles(@_);
|
|
77 }
|
|
78
|
|
79 sub get_all_RegulatoryFeatureVariationAlleles {
|
|
80 my $self = shift;
|
|
81 return $self->SUPER::get_all_VariationFeatureOverlapAlleles(@_);
|
|
82 }
|
|
83
|
|
84 1;
|