Skip to content
Snippets Groups Projects
Commit d20e7be0 authored by Shamika Mohanan's avatar Shamika Mohanan
Browse files

ENSCORESW-3110- Code to handle stop codon readthrough in 12 transcripts. The...

ENSCORESW-3110- Code to handle stop codon readthrough in 12 transcripts. The code edits the amino acid sequence to display the stop codon readthrough with an X
parent a5e85187
No related branches found
No related tags found
2 merge requests!372Feature/stop codon readthrough edit,!372Feature/stop codon readthrough edit
......@@ -1108,7 +1108,7 @@ sub get_all_SeqEdits {
my $attribs;
$edits ||= ['initial_met', '_selenocysteine', 'amino_acid_sub'];
$edits ||= ['initial_met', '_selenocysteine', 'amino_acid_sub', '_stop_codon_readthrough'];
foreach my $edit(@{wrap_array($edits)}){
......@@ -1137,6 +1137,20 @@ sub get_all_selenocysteine_SeqEdits {
return $self->get_all_SeqEdits(['_selenocysteine']);
}
=head2 get_all_stop_codon_SeqEdits
Example : my @edits = @{$translation->get_all_stop_codon_SeqEdits()};
Description: Retrieves all post transcriptional sequence modifications related
to stop codon readthrough
Returntype : Bio::EnsEMBL::SeqEdit
Exceptions : none
=cut
sub get_all_stop_codon_SeqEdits {
my ($self) = @_;
return $self->get_all_SeqEdits(['_stop_codon_readthrough']);
}
=head2 modify_translation
......
......@@ -343,4 +343,28 @@ ok(!scalar(@alt_tls));
# Test generic_count(), inherited method from BaseAdaptor
is($ta->generic_count(), @{$ta->list_dbIDs()}, "Number of features from generic_count is equal to the number of dbIDs from list_dbIDs");
#56
##
## Handling stop codon readthrough
##
my $tra_scrt = $db->get_TranscriptAdaptor();
my $tr_scrt = $tra_scrt->fetch_by_stable_id("ENST00000217347");
$tr_scrt->edits_enabled(1);
my $scrt = Bio::EnsEMBL::SeqEdit->new(
-START => 1,
-END => 2,
-ALT_SEQ => 'X',
-CODE => '_stop_codon_readthrough',
-NAME => 'Stop Codon Readthrough'
);
$tr_scrt->translation->add_Attributes($scrt->get_Attribute());
my $tlseq_scrt = $tr_scrt->translate->seq();
debug("X inserted: " . $tlseq_scrt);
is($tlseq_scrt =~ /X/, 1, 'X inserted');
done_testing();
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