Mercurial > repos > mahtabm > ensembl
comparison variant_effect_predictor/Bio/EnsEMBL/UnconventionalTranscriptAssociation.pm @ 0:1f6dce3d34e0
Uploaded
| author | mahtabm |
|---|---|
| date | Thu, 11 Apr 2013 02:01:53 -0400 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:1f6dce3d34e0 |
|---|---|
| 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::UnconventionalTranscriptAssociation - A class representing | |
| 24 an some sort of unconventional association between a gene and a | |
| 25 transcript. | |
| 26 | |
| 27 =head1 SYNOPSIS | |
| 28 | |
| 29 $ex = new Bio::EnsEMBL::UnconventionalTranscriptAssociation( $gene, | |
| 30 $transcript, $type ); | |
| 31 | |
| 32 =head1 METHODS | |
| 33 | |
| 34 =cut | |
| 35 | |
| 36 package Bio::EnsEMBL::UnconventionalTranscriptAssociation; | |
| 37 use vars qw(@ISA); | |
| 38 use strict; | |
| 39 | |
| 40 use Bio::EnsEMBL::Utils::Exception qw( warning throw deprecate ); | |
| 41 use Bio::EnsEMBL::Utils::Argument qw( rearrange ); | |
| 42 | |
| 43 =head2 new | |
| 44 | |
| 45 Args [1] : Bio::EnsEMBL::Gene - the gene which is associated. | |
| 46 Args [2] : Bio::EnsEMBL::Transcript - the transcript which is associated. | |
| 47 Args [3] : String type - the type of assocation, e.g. "antisense", | |
| 48 "sense_intronic","sense_overlaping_exonic","chimeric_sense_exonic". | |
| 49 Example : $uta = new Bio::EnsEMBL::UnconventionalTranscriptAssociation($gene, $transcript, "antisense") | |
| 50 Description: create an UnconventionalTranscriptAssociation object. | |
| 51 Returntype : Bio::EnsEMBL::UnconventionalTranscriptAssociation. | |
| 52 Exceptions : Wrong argument types | |
| 53 Caller : general | |
| 54 Status : At risk | |
| 55 | |
| 56 =cut | |
| 57 | |
| 58 sub new { | |
| 59 | |
| 60 my ($class, $transcript, $gene, $type) = @_; | |
| 61 | |
| 62 $class = ref $class || $class; | |
| 63 | |
| 64 my $self = {}; | |
| 65 | |
| 66 if( !ref $gene || ! $gene->isa("Bio::EnsEMBL::Gene") ) { | |
| 67 throw("$gene is not a Bio::EnsEMBL::Gene!"); | |
| 68 } | |
| 69 | |
| 70 if( !ref $transcript || ! $transcript->isa("Bio::EnsEMBL::Transcript") ) { | |
| 71 throw("$transcript is not a Bio::EnsEMBL::Transcript!"); | |
| 72 } | |
| 73 | |
| 74 $self->{'gene'} = $gene; | |
| 75 $self->{'transcript'} = $transcript; | |
| 76 $self->{'type'} = $type; | |
| 77 | |
| 78 return bless $self, $class; | |
| 79 } | |
| 80 | |
| 81 | |
| 82 =head2 gene | |
| 83 | |
| 84 Args : none | |
| 85 Example : $gene = $uta->gene() | |
| 86 Description: Getter/setter for the gene part of this association. | |
| 87 Returntype : Bio::EnsEMBL::Gene | |
| 88 Exceptions : none | |
| 89 Caller : general | |
| 90 Status : At risk | |
| 91 | |
| 92 =cut | |
| 93 | |
| 94 sub gene { | |
| 95 my ($self) = shift; | |
| 96 | |
| 97 $self->{'gene'} = shift if (@_); | |
| 98 return $self->{'gene'}; | |
| 99 | |
| 100 } | |
| 101 | |
| 102 =head2 transcript | |
| 103 | |
| 104 Args : none | |
| 105 Example : $transcript = $uta->transcript() | |
| 106 Description: Getter/setter for the transcript part of this association. | |
| 107 Returntype : Bio::EnsEMBL::Transcript | |
| 108 Exceptions : none | |
| 109 Caller : General | |
| 110 Status : At risk | |
| 111 | |
| 112 =cut | |
| 113 | |
| 114 sub transcript { | |
| 115 my ($self) = shift; | |
| 116 | |
| 117 $self->{'transcript'} = shift if (@_); | |
| 118 return $self->{'transcript'}; | |
| 119 | |
| 120 } | |
| 121 | |
| 122 =head2 interaction_type | |
| 123 | |
| 124 Args : none | |
| 125 Example : $type = $uta->interaction_type() | |
| 126 Description: Getter/setter for the interaction_type of this association. | |
| 127 Returntype : String | |
| 128 Exceptions : none | |
| 129 Caller : General | |
| 130 Status : At risk | |
| 131 | |
| 132 =cut | |
| 133 | |
| 134 sub interaction_type { | |
| 135 my ($self) = shift; | |
| 136 | |
| 137 $self->{'interaction_type'} = shift if (@_); | |
| 138 return $self->{'interaction_type'}; | |
| 139 | |
| 140 } | |
| 141 | |
| 142 1; | |
| 143 | |
| 144 |
