3 # BioPerl module for Bio::UpdateableSeqI
5 # Cared for by David Block <dblock@gene.pbi.nrc.ca>
7 # Copyright David Block
9 # You may distribute this module under the same terms as perl itself
11 # POD documentation - main docs before the code
15 Bio::UpdateableSeqI - Descendant of Bio::SeqI that allows updates
19 See Bio::SeqI for most of the documentation.
20 See the documentation of the methods for further details.
24 Bio::UpdateableSeqI is an interface for Sequence objects which are
25 expected to allow users to perform basic editing functions (update/delete)
26 on their component SeqFeatures.
32 User feedback is an integral part of the evolution of this and other
33 Bioperl modules. Send your comments and suggestions preferably to
34 the Bioperl mailing list. Your participation is much appreciated.
36 bioperl-l@bioperl.org - General discussion
37 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
41 Report bugs to the Bioperl bug tracking system to help us keep track
42 of the bugs and their resolution. Bug reports can be submitted via the
45 http://bugzilla.open-bio.org/
47 =head1 AUTHOR - David Block
49 Email dblock@gene.pbi.nrc.ca
53 Ewan Birney forced me to this...
57 The rest of the documentation details each of the object methods.
58 Internal methods are usually preceded with a _
63 # Let the code begin...
66 package Bio
::UpdateableSeqI
;
70 # Object preamble - inherits from Bio::Root::Root
74 use base
qw(Bio::SeqI);
79 Title : delete_feature
80 Usage : my $orphanlist=$self->delete_feature($feature,$transcript,$gene);
81 Function: deletes the specified $feature from the given transcript, if $transcript is sent and exists and $feature is a feature of $transcript,
82 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
83 of the $gene object that may be left as orphans and returns them as a listref.
84 Example : I want to delete transcript 'abc' of gene 'def', with three exons, leaving only transcript 'ghi' with two exons.
85 This will leave exons 1 and 3 part of 'ghi', but exon 2 will become an orphan.
86 my $orphanlist=$seq->delete_feature($transcript{'abc'},undef,$gene{'def'});
87 $orphanlist is a reference to a list containing $exon{'2'};
88 Returns : a listref of orphaned features after the deletion of $feature (optional)
89 Args : $feature - the feature to be deleted
90 $transcript - the transcript containing the $feature, so that a $feature can be removed from only one transcript when there are multiple
91 transcripts in a gene.
92 $gene - the gene containing the $transcript and/or the $feature
98 my ($self,$feature,$transcript,$gene) = @_;
100 $self->throw_not_implemented();