Commit 46af344f authored by Andy Yates's avatar Andy Yates
Browse files

Support the fetching of Selenocysteine edits alone for GTF dumper

parent ebf9ff29
......@@ -63,7 +63,7 @@ use strict;
use Bio::EnsEMBL::Utils::Exception qw( deprecate throw warning );
use Bio::EnsEMBL::Utils::Argument qw( rearrange );
use Bio::EnsEMBL::Utils::Scalar qw( assert_ref );
use Bio::EnsEMBL::Utils::Scalar qw( assert_ref wrap_array );
use Scalar::Util qw(weaken);
use Bio::EnsEMBL::Storable;
......@@ -1042,7 +1042,9 @@ sub add_Attributes {
=head2 get_all_SeqEdits
Arg [1] : ArrayRef $edits. Specify the name of the edits to fetch
Example : my @seqeds = @{$transcript->get_all_SeqEdits()};
my @seqeds = @{$transcript->get_all_SeqEdits('_selenocysteine')};
Description: Retrieves all post transcriptional sequence modifications for
this transcript.
Returntype : Bio::EnsEMBL::SeqEdit
......@@ -1054,15 +1056,16 @@ sub add_Attributes {
sub get_all_SeqEdits {
my $self = shift;
my $edits = shift;
my @seqeds;
my $attribs;
my @edits = ('initial_met', '_selenocysteine', 'amino_acid_sub');
$edits ||= ['initial_met', '_selenocysteine', 'amino_acid_sub'];
foreach my $edit(@edits){
foreach my $edit(@{wrap_array($edits)}){
$attribs = $self->get_all_Attributes($edit);
# convert attributes to SeqEdit objects
......@@ -1072,6 +1075,21 @@ sub get_all_SeqEdits {
}
return \@seqeds;
}
=head2 get_all_selenocysteine_SeqEdits
Example : my @edits = @{$transcript->get_all_selenocysteine_SeqEdits()};
Description: Retrieves all post transcriptional sequence modifications related
to selenocysteine PTMs
Returntype : Bio::EnsEMBL::SeqEdit
Exceptions : none
=cut
sub get_all_selenocysteine_SeqEdits {
my ($self) = @_;
return $self->get_all_SeqEdits(['_selenocysteine']);
}
=head2 modify_translation
......
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