Commit efe603c7 authored by Shamika Mohanan's avatar Shamika Mohanan
Browse files

Updated documentation. Changed variable names in test module.

parent a0fa8206
......@@ -34,11 +34,30 @@ limitations under the License.
=head1 SYNOPSIS
my $stopcodonrtedit = Bio::EnsEMBL::StopCodonReadthroughEdit->new($coord);
use Bio::EnsEMBL::StopCodonReadthroughEdit;
# Get transcript
my $transcript_adaptor = $db->get_TranscriptAdaptor();
my $transcript = $transcript_adaptor->fetch_by_stable_id("ENST00000217347");
$transcript->edits_enabled(1);
print "Before modifiction: $transcript->translate->seq()\n";
# Construct a stop codon readthrough edit object
my $stop_codon_readthrough_edit = Bio::EnsEMBL::StopCodonReadthroughEdit->new(265);
# Apply post translation edit
$transcript->translation->add_Attributes($stop_codon_readthrough_edit->get_Attribute());
my $translated_sequence = $transcript->translate->seq();
print "After modifiction: $translated_sequence\n";
=head1 DESCRIPTION
A representation of a stop codon readthrough edit in a sequence.
Biologically, STOP codon readthrough is a rare phenomenon whereby translation
does not terminate at an in-frame STOP codon, but instead continues further downstream.
It is believed the STOP codon is instead read as a 'sense' codon, i.e. encodes for an amino acid.
The location of a STOP codon readthrough is indicated by an asterisk (*) in the post translation sequence.
This class edits the sequence to replace the asterisk (*) with an 'X' to make it similar to Uniprot representation.
=head1 METHODS
......@@ -54,9 +73,9 @@ use parent qw(Bio::EnsEMBL::SeqEdit);
=head2 new
Arg [-POSITION] :
int - start and end postion of the stop codon readthrough edit in the sequence
int - start and end position of the stop codon readthrough edit in the sequence
Example : $stopcodonrtedit = Bio::EnsEMBL::StopCodonReadthroughEdit->new($posiiton);
Example : $stop_codon_rt_edit = Bio::EnsEMBL::StopCodonReadthroughEdit->new($position);
Description: Creates a new stop codon readthrough edit object
Returntype : Bio::EnsEMBL::StopCodonReadthroughEdit
Exceptions : none
......@@ -69,13 +88,13 @@ sub new {
my ($self, $position) = @_;
my $class = ref($self) || $self;
my $stopcodonrtedit = $class->SUPER::new(
my $stop_codon_rt_edit = $class->SUPER::new(
-START => $position,
-END => $position,
-ALT_SEQ => 'X',
-CODE => '_stop_codon_readthrough');
return $stopcodonrtedit;
return $stop_codon_rt_edit;
}
......
......@@ -349,18 +349,18 @@ is($ta->generic_count(), @{$ta->list_dbIDs()}, "Number of features from generic_
# Handling stop codon readthrough edit
#
my $tra_scrt = $db->get_TranscriptAdaptor();
my $tr_scrt = $tra_scrt->fetch_by_stable_id("ENST00000217347");
$tr_scrt->edits_enabled(1);
my $transcript_adaptor = $db->get_TranscriptAdaptor();
$transcript = $transcript_adaptor->fetch_by_stable_id("ENST00000217347");
$transcript->edits_enabled(1);
diag 'Before X insertion: ', explain($tr_scrt->translate->seq());
diag 'Before X insertion: ', explain($transcript->translate->seq());
my $scrt = Bio::EnsEMBL::StopCodonReadthroughEdit->new(265);
$tr_scrt->translation->add_Attributes($scrt->get_Attribute());
my $tlseq_scrt = $tr_scrt->translate->seq();
my $stop_codon_rt_edit = Bio::EnsEMBL::StopCodonReadthroughEdit->new(265);
$transcript->translation->add_Attributes($stop_codon_rt_edit->get_Attribute());
my $translated_sequence = $transcript->translate->seq();
diag 'After X insertion: ', explain($tlseq_scrt);
is($tlseq_scrt =~ /QEEXEE/, 1, 'X inserted');
is(length($tr_scrt->translate->seq()), length($tlseq_scrt), 'Length of the sequence pre and post edit is equal');
diag 'After X insertion: ', explain($translated_sequence);
is($translated_sequence =~ /QEEXEE/, 1, 'X inserted');
is(length($transcript->translate->seq()), length($translated_sequence), 'Length of the sequence pre and post edit is equal');
done_testing();
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment