2 # BioPerl module for Bio::UpdateableSeqI
4 # Please direct questions and support issues to <bioperl-l@bioperl.org>
6 # Cared for by David Block <dblock@gene.pbi.nrc.ca>
8 # Copyright David Block
10 # You may distribute this module under the same terms as perl itself
12 # POD documentation - main docs before the code
16 Bio::UpdateableSeqI - Descendant of Bio::SeqI that allows updates
20 See Bio::SeqI for most of the documentation.
21 See the documentation of the methods for further details.
25 Bio::UpdateableSeqI is an interface for Sequence objects which are
26 expected to allow users to perform basic editing functions (update/delete)
27 on their component SeqFeatures.
33 User feedback is an integral part of the evolution of this and other
34 Bioperl modules. Send your comments and suggestions preferably to
35 the Bioperl mailing list. Your participation is much appreciated.
37 bioperl-l@bioperl.org - General discussion
38 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
42 Please direct usage questions or support issues to the mailing list:
44 I<bioperl-l@bioperl.org>
46 rather than to the module maintainer directly. Many experienced and
47 reponsive experts will be able look at the problem and quickly
48 address it. Please include a thorough description of the problem
49 with code and data examples if at all possible.
53 Report bugs to the Bioperl bug tracking system to help us keep track
54 of the bugs and their resolution. Bug reports can be submitted via the
57 https://github.com/bioperl/bioperl-live/issues
59 =head1 AUTHOR - David Block
61 Email dblock@gene.pbi.nrc.ca
65 Ewan Birney forced me to this...
69 The rest of the documentation details each of the object methods.
70 Internal methods are usually preceded with a _
75 # Let the code begin...
78 package Bio
::UpdateableSeqI
;
82 # Object preamble - inherits from Bio::Root::Root
86 use base
qw(Bio::SeqI);
91 Title : delete_feature
92 Usage : my $orphanlist=$self->delete_feature($feature,$transcript,$gene);
93 Function: deletes the specified $feature from the given transcript, if $transcript is sent and exists and $feature is a feature of $transcript,
94 or from $gene if the $feature is a feature of $gene, or from $self if $transcript and $gene are not sent. Keeps track of the features
95 of the $gene object that may be left as orphans and returns them as a listref.
96 Example : I want to delete transcript 'abc' of gene 'def', with three exons, leaving only transcript 'ghi' with two exons.
97 This will leave exons 1 and 3 part of 'ghi', but exon 2 will become an orphan.
98 my $orphanlist=$seq->delete_feature($transcript{'abc'},undef,$gene{'def'});
99 $orphanlist is a reference to a list containing $exon{'2'};
100 Returns : a listref of orphaned features after the deletion of $feature (optional)
101 Args : $feature - the feature to be deleted
102 $transcript - the transcript containing the $feature, so that a $feature can be removed from only one transcript when there are multiple
103 transcripts in a gene.
104 $gene - the gene containing the $transcript and/or the $feature
110 my ($self,$feature,$transcript,$gene) = @_;
112 $self->throw_not_implemented();