ensembl-hive  2.8.1
StopCodonReadthroughEdit.pm
Go to the documentation of this file.
1 =head1 LICENSE
2 
3 See the NOTICE file distributed with this work for additional information
4 regarding copyright ownership.
5 
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
9 
10  http://www.apache.org/licenses/LICENSE-2.0
11 
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an "AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 See the License for the specific language governing permissions and
16 limitations under the License.
17 
18 =cut
19 
20 
21 =head1 CONTACT
22 
23  Please email comments or questions to the public Ensembl
24  developers list at <http://lists.ensembl.org/mailman/listinfo/dev>.
25 
26  Questions may also be sent to the Ensembl help desk at
27  <http://www.ensembl.org/Help/Contact>.
28 
29 =cut
30 
31 =head1 NAME
32 
33  Bio::EnsEMBL::StopCodonReadthroughEdit - Object representing a stop codon readthrough edit in a sequence
34 
35 =head1 SYNOPSIS
36 
38 
39  # Get transcript
40  my $transcript_adaptor = $db->get_TranscriptAdaptor();
41  my $transcript = $transcript_adaptor->fetch_by_stable_id("ENST00000217347");
42  $transcript->edits_enabled(1);
43  print "Before modifiction: $transcript->translate->seq()\n";
44 
45  # Construct a stop codon readthrough edit object
46  my $stop_codon_readthrough_edit = Bio::EnsEMBL::StopCodonReadthroughEdit->new(265);
47 
48  # Apply post translation edit
49  $transcript->translation->add_Attributes($stop_codon_readthrough_edit->get_Attribute());
50  my $translated_sequence = $transcript->translate->seq();
51  print "After modifiction: $translated_sequence\n";
52 
53 =head1 DESCRIPTION
54 
55  Biologically, STOP codon readthrough is a rare phenomenon whereby translation
56  does not terminate at an in-frame STOP codon, but instead continues further downstream.
57  It is believed the STOP codon is instead read as a 'sense' codon, i.e. encodes for an amino acid.
58 
59  The location of a STOP codon readthrough is indicated by an asterisk (*) in the post translation sequence.
60  This class edits the sequence to replace the asterisk (*) with an 'X' to make it similar to RefSeq representation.
61 
62 =head1 METHODS
63 
64 =cut
65 
67 
68 use strict;
69 use warnings;
70 
71 use parent qw(Bio::EnsEMBL::SeqEdit);
72 
73 =head2 new
74 
75  Arg [-POSITION] :
76  int - start and end position of the stop codon readthrough edit in the sequence
77 
78  Example : $stop_codon_rt_edit = Bio::EnsEMBL::StopCodonReadthroughEdit->new($position);
79  Description: Creates a new stop codon readthrough edit object
80  Returntype : Bio::EnsEMBL::StopCodonReadthroughEdit
81  Exceptions : none
82  Caller : general
83  Status : Stable
84 
85 =cut
86 
87 sub new {
88  my ($self, $position) = @_;
89 
90  my $class = ref($self) || $self;
91  my $stop_codon_rt_edit = $class->SUPER::new(
92  -START => $position,
93  -END => $position,
94  -ALT_SEQ => 'X',
95  -CODE => '_stop_codon_rt');
96 
97  return $stop_codon_rt_edit;
98 
99 }
100 
101 1;
EnsEMBL
Definition: Filter.pm:1
Bio::EnsEMBL::StopCodonReadthroughEdit::new
public Bio::EnsEMBL::StopCodonReadthroughEdit new()
Bio::EnsEMBL::SeqEdit
Definition: SeqEdit.pm:55
Bio::EnsEMBL::StopCodonReadthroughEdit
Definition: StopCodonReadthroughEdit.pm:33
Bio
Definition: AltAlleleGroup.pm:4