rollback Florent's changes that defaulted Bio::PrimarySeq instead of Bio::Seq creatio...
[bioperl-live.git] / Bio / UpdateableSeqI.pm
blobf6ae8c966d8cedd3a0f942b3892872696b6f8a8d
1 # $Id$
3 # BioPerl module for Bio::UpdateableSeqI
5 # Please direct questions and support issues to <bioperl-l@bioperl.org>
7 # Cared for by David Block <dblock@gene.pbi.nrc.ca>
9 # Copyright David Block
11 # You may distribute this module under the same terms as perl itself
13 # POD documentation - main docs before the code
15 =head1 NAME
17 Bio::UpdateableSeqI - Descendant of Bio::SeqI that allows updates
19 =head1 SYNOPSIS
21 See Bio::SeqI for most of the documentation.
22 See the documentation of the methods for further details.
24 =head1 DESCRIPTION
26 Bio::UpdateableSeqI is an interface for Sequence objects which are
27 expected to allow users to perform basic editing functions (update/delete)
28 on their component SeqFeatures.
30 =head1 FEEDBACK
32 =head2 Mailing Lists
34 User feedback is an integral part of the evolution of this and other
35 Bioperl modules. Send your comments and suggestions preferably to
36 the Bioperl mailing list. Your participation is much appreciated.
38 bioperl-l@bioperl.org - General discussion
39 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
41 =head2 Support
43 Please direct usage questions or support issues to the mailing list:
45 I<bioperl-l@bioperl.org>
47 rather than to the module maintainer directly. Many experienced and
48 reponsive experts will be able look at the problem and quickly
49 address it. Please include a thorough description of the problem
50 with code and data examples if at all possible.
52 =head2 Reporting Bugs
54 Report bugs to the Bioperl bug tracking system to help us keep track
55 of the bugs and their resolution. Bug reports can be submitted via the
56 web:
58 http://bugzilla.open-bio.org/
60 =head1 AUTHOR - David Block
62 Email dblock@gene.pbi.nrc.ca
64 =head1 CONTRIBUTORS
66 Ewan Birney forced me to this...
68 =head1 APPENDIX
70 The rest of the documentation details each of the object methods.
71 Internal methods are usually preceded with a _
73 =cut
76 # Let the code begin...
79 package Bio::UpdateableSeqI;
80 use strict;
81 use Carp;
83 # Object preamble - inherits from Bio::Root::Root
87 use base qw(Bio::SeqI);
90 =head2 delete_feature
92 Title : delete_feature
93 Usage : my $orphanlist=$self->delete_feature($feature,$transcript,$gene);
94 Function: deletes the specified $feature from the given transcript, if $transcript is sent and exists and $feature is a feature of $transcript,
95 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
96 of the $gene object that may be left as orphans and returns them as a listref.
97 Example : I want to delete transcript 'abc' of gene 'def', with three exons, leaving only transcript 'ghi' with two exons.
98 This will leave exons 1 and 3 part of 'ghi', but exon 2 will become an orphan.
99 my $orphanlist=$seq->delete_feature($transcript{'abc'},undef,$gene{'def'});
100 $orphanlist is a reference to a list containing $exon{'2'};
101 Returns : a listref of orphaned features after the deletion of $feature (optional)
102 Args : $feature - the feature to be deleted
103 $transcript - the transcript containing the $feature, so that a $feature can be removed from only one transcript when there are multiple
104 transcripts in a gene.
105 $gene - the gene containing the $transcript and/or the $feature
108 =cut
110 sub delete_feature{
111 my ($self,$feature,$transcript,$gene) = @_;
113 $self->throw_not_implemented();