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 =head1 NAME
|
|
22
|
|
23 Bio::EnsEMBL::Variation::TranscriptStructuralVariation
|
|
24
|
|
25 =head1 SYNOPSIS
|
|
26
|
|
27 use Bio::EnsEMBL::Variation::TranscriptStructuralVariation;
|
|
28
|
|
29 my $tv = Bio::EnsEMBL::Variation::TranscriptVariation->new(
|
|
30 -transcript => $transcript,
|
|
31 -structural_variation_feature => $svf
|
|
32 );
|
|
33
|
|
34 =head1 DESCRIPTION
|
|
35
|
|
36 A TranscriptStructuralVariation object represents a structural variation feature
|
|
37 which is in close proximity to an Ensembl transcript. A
|
|
38 TranscriptStructuralVariation object has several attributes which define the
|
|
39 relationship of the variation to the transcript.
|
|
40
|
|
41 =cut
|
|
42
|
|
43 package Bio::EnsEMBL::Variation::TranscriptStructuralVariation;
|
|
44
|
|
45 use strict;
|
|
46 use warnings;
|
|
47
|
|
48 use Bio::EnsEMBL::Variation::TranscriptStructuralVariationAllele;
|
|
49
|
|
50 use base qw(Bio::EnsEMBL::Variation::StructuralVariationOverlap Bio::EnsEMBL::Variation::BaseTranscriptVariation);
|
|
51
|
|
52 sub new {
|
|
53
|
|
54 my $class = shift;
|
|
55
|
|
56 my %args = @_;
|
|
57
|
|
58 # swap a '-transcript' argument for a '-feature' one for the superclass
|
|
59
|
|
60 for my $arg (keys %args) {
|
|
61 if (lc($arg) eq '-transcript') {
|
|
62 $args{'-feature'} = delete $args{$arg};
|
|
63 }
|
|
64 }
|
|
65
|
|
66 # call the superclass constructor
|
|
67 my $self = $class->SUPER::new(%args) || return undef;
|
|
68
|
|
69 # rebless the alleles from vfoas to tvas
|
|
70 map { bless $_, 'Bio::EnsEMBL::Variation::TranscriptStructuralVariationAllele' }
|
|
71 @{ $self->get_all_TranscriptStructuralVariationAlleles };
|
|
72
|
|
73 return $self;
|
|
74 }
|
|
75
|
|
76 =head2 add_TranscriptStructuralVariationAllele
|
|
77
|
|
78 Arg [1] : A Bio::EnsEMBL::Variation::TranscriptStructuralVariationAllele instance
|
|
79 Description: Add an allele to this TranscriptStructuralVariation
|
|
80 Returntype : none
|
|
81 Exceptions : throws if the argument is not the expected type
|
|
82 Status : At Risk
|
|
83
|
|
84 =cut
|
|
85
|
|
86 sub add_TranscriptStructuralVariationAllele {
|
|
87 my ($self, $svoa) = @_;
|
|
88 assert_ref($svoa, 'Bio::EnsEMBL::Variation::TranscriptStructuralVariationAllele');
|
|
89 return $self->SUPER::add_BaseVariationFeatureOverlapAllele($svoa);
|
|
90 }
|
|
91
|
|
92 =head2 get_reference_TranscriptStructuralVariationAllele
|
|
93
|
|
94 Description: Get the object representing the reference allele of this TranscriptStructuralVariation
|
|
95 Returntype : Bio::EnsEMBL::Variation::TranscriptStructuralVariationAllele instance
|
|
96 Exceptions : none
|
|
97 Status : At Risk
|
|
98
|
|
99 =cut
|
|
100
|
|
101 sub get_reference_TranscriptStructuralVariationAllele {
|
|
102 my $self = shift;
|
|
103 return $self->SUPER::get_reference_BaseVariationFeatureOverlapAllele(@_);
|
|
104 }
|
|
105
|
|
106 =head2 get_all_alternate_TranscriptStructuralVariationAlleles
|
|
107
|
|
108 Description: Get a list of the alternate alleles of this TranscriptStructuralVariation
|
|
109 Returntype : listref of Bio::EnsEMBL::Variation::TranscriptStructuralVariationAllele objects
|
|
110 Exceptions : none
|
|
111 Status : At Risk
|
|
112
|
|
113 =cut
|
|
114
|
|
115 sub get_all_alternate_TranscriptStructuralVariationAlleles {
|
|
116 my $self = shift;
|
|
117 return $self->SUPER::get_all_alternate_BaseVariationFeatureOverlapAlleles(@_);
|
|
118 }
|
|
119
|
|
120 =head2 get_all_TranscriptStructuralVariationAlleles
|
|
121
|
|
122 Description: Get a list of the all the alleles, both reference and alternate, of
|
|
123 this TranscriptStructuralVariation
|
|
124 Returntype : listref of Bio::EnsEMBL::Variation::TranscriptStructuralVariationAllele objects
|
|
125 Exceptions : none
|
|
126 Status : At Risk
|
|
127
|
|
128 =cut
|
|
129
|
|
130 sub get_all_TranscriptStructuralVariationAlleles {
|
|
131 my $self = shift;
|
|
132 return $self->SUPER::get_all_BaseVariationFeatureOverlapAlleles(@_);
|
|
133 }
|
|
134
|
|
135 1;
|
|
136
|