sync w/ main trunk
[bioperl-live.git] / Bio / Restriction / Enzyme / MultiCut.pm
blob96d644267ea4cf7f29ccb54a1c516064d30620c8
1 # $Id$
2 #------------------------------------------------------------------
4 # BioPerl module Bio::Restriction::Enzyme::MultiCut
6 # Please direct questions and support issues to <bioperl-l@bioperl.org>
8 # Cared for by Heikki Lehvaslaiho, heikki-at-bioperl-dot-org
10 # You may distribute this module under the same terms as perl itself
11 #------------------------------------------------------------------
13 ## POD Documentation:
15 =head1 NAME
17 Bio::Restriction::Enzyme::MultiCut - A single restriction endonuclease
19 =head1 SYNOPSIS
21 # set up a single restriction enzyme. This contains lots of
22 # information about the enzyme that is generally parsed from a
23 # rebase file and can then be read back
25 use Bio::Restriction::Enzyme;
28 =head1 DESCRIPTION
30 This module defines a restriction endonuclease class where one object
31 represents one of the distinct recognition sites for that enzyme. The
32 method L<others|others> stores references to other objects with
33 alternative sites.
35 In this schema each object within an EnzymeCollection can be checked
36 for matching a sequence.
39 REBASE report notation C<Bsp24I (8/13)GACNNNNNNTGG(12/7)> means:
42 Bsp24I
43 5' ^NNNNNNNNGACNNNNNNTGGNNNNNNNNNNNN^ 3'
44 3' ^NNNNNNNNNNNNNCTGNNNNNNACCNNNNNNN^ 5'
49 =head1 FEEDBACK
51 =head2 Mailing Lists
53 User feedback is an integral part of the evolution of this and other
54 Bioperl modules. Send your comments and suggestions preferably to one
55 of the Bioperl mailing lists. Your participation is much appreciated.
57 bioperl-l@bioperl.org - General discussion
58 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
60 =head2 Support
62 Please direct usage questions or support issues to the mailing list:
64 L<bioperl-l@bioperl.org>
66 rather than to the module maintainer directly. Many experienced and
67 reponsive experts will be able look at the problem and quickly
68 address it. Please include a thorough description of the problem
69 with code and data examples if at all possible.
71 =head2 Reporting Bugs
73 Report bugs to the Bioperl bug tracking system to help us keep track
74 the bugs and their resolution. Bug reports can be submitted via the
75 web:
77 http://bugzilla.open-bio.org/
79 =head1 AUTHOR
81 Heikki Lehvaslaiho, heikki-at-bioperl-dot-org
83 =head1 CONTRIBUTORS
85 Rob Edwards, redwards@utmem.edu
87 =head1 COPYRIGHT
89 Copyright (c) 2003 Rob Edwards.
91 Some of this work is Copyright (c) 1997-2002 Steve A. Chervitz. All
92 Rights Reserved. This module is free software; you can redistribute
93 it and/or modify it under the same terms as Perl itself.
95 =head1 SEE ALSO
97 L<Bio::Restriction::Enzyme>, L<Bio::Restriction::Analysis>,
98 L<Bio::Restriction::EnzymeCollection>
100 =head1 APPENDIX
102 Methods beginning with a leading underscore are considered private and
103 are intended for internal use by this module. They are not considered
104 part of the public interface and are described here for documentation
105 purposes only.
107 =cut
109 package Bio::Restriction::Enzyme::MultiCut;
110 use strict;
112 use Data::Dumper;
114 use vars qw ();
115 use base qw(Bio::Restriction::Enzyme);
118 =head2 new
120 Title : new
121 Function
122 Function : Initializes the enzyme object
123 Returns : The Restriction::Enzyme::MultiCut object
124 Argument :
126 =cut
128 sub new {
129 my($class, @args) = @_;
130 my $self = $class->SUPER::new(@args);
132 my ($others) =
133 $self->_rearrange([qw(
134 OTHERS
135 )], @args);
137 $others && $self->others($others);
138 return $self;
141 =head2 others
143 Title : others
144 Usage : $re->vendor(@list_of_companies);
145 Function : Gets/Sets the a list of companies that you can get the enzyme from.
146 Also sets the commercially_available boolean
147 Arguments : A reference to an array containing the names of companies
148 that you can get the enzyme from
149 Returns : A reference to an array containing the names of companies
150 that you can get the enzyme from
152 Added for compatibility to REBASE
154 =cut
156 sub others {
157 my $self = shift;
158 push @{$self->{_others}}, @_ if @_;
159 return @{$self->{'_others'}};
163 =head2 purge_others
165 Title : purge_others
166 Usage : $re->purge_references();
167 Function : Purges the set of references for this enzyme
168 Arguments :
169 Returns :
171 =cut
173 sub purge_others {
174 my ($self) = shift;
175 $self->{_others} = [];