2 # bioperl module for Bio::Coordinate::MapperI
4 # Please direct questions and support issues to <bioperl-l@bioperl.org>
6 # Cared for by Heikki Lehvaslaiho <heikki-at-bioperl-dot-org>
8 # Copyright Heikki Lehvaslaiho
10 # You may distribute this module under the same terms as perl itself
12 # POD documentation - main docs before the code
16 Bio::Coordinate::MapperI - Interface describing coordinate mappers
20 # not to be used directly
24 MapperI defines methods for classes capable for mapping locations
25 between coordinate systems.
31 User feedback is an integral part of the evolution of this and other
32 Bioperl modules. Send your comments and suggestions preferably to the
33 Bioperl mailing lists Your participation is much appreciated.
35 bioperl-l@bioperl.org - General discussion
36 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
40 Please direct usage questions or support issues to the mailing list:
42 I<bioperl-l@bioperl.org>
44 rather than to the module maintainer directly. Many experienced and
45 reponsive experts will be able look at the problem and quickly
46 address it. Please include a thorough description of the problem
47 with code and data examples if at all possible.
51 report bugs to the Bioperl bug tracking system to help us keep track
52 the bugs and their resolution. Bug reports can be submitted via the
55 https://redmine.open-bio.org/projects/bioperl/
57 =head1 AUTHOR - Heikki Lehvaslaiho
59 Email: heikki-at-bioperl-dot-org
63 The rest of the documentation details each of the object
64 methods. Internal methods are usually preceded with a _
69 # Let the code begin...
71 package Bio
::Coordinate
::MapperI
;
74 # Object preamble - inherits from Bio::Root::RootI
76 use base
qw(Bio::Root::RootI);
83 Usage : $obj->in('peptide');
84 Function: Set and read the input coordinate system.
86 Returns : value of input system
87 Args : new value (optional), Bio::LocationI
92 my ($self,$value) = @_;
94 $self->throw_not_implemented();
102 Usage : $obj->out('peptide');
103 Function: Set and read the output coordinate system.
105 Returns : value of output system
106 Args : new value (optional), Bio::LocationI
111 my ($self,$value) = @_;
113 $self->throw_not_implemented();
120 Function: Swap the direction of mapping: input <-> output)
130 $self->throw_not_implemented();
138 Function: test that both components are of same length
140 Returns : ( 1 | undef )
148 $self->throw_not_implemented();
155 Usage : $newpos = $obj->map($loc);
156 Function: Map the location from the input coordinate system
157 to a new value in the output coordinate system.
159 Returns : new value in the output coordiante system
160 Args : Bio::LocationI
165 my ($self,$value) = @_;
167 $self->throw_not_implemented();
174 Usage : $obj->return_match(1);
175 Function: A flag to turn on the simplified mode of
176 returning only one joined Match object or undef
179 Args : boolean (optional)
184 my ($self,$value) = @_;
185 if( defined $value) {
186 $value ?
( $self->{'_return_match'} = 1 ) :
187 ( $self->{'_return_match'} = 0 );
189 return $self->{'_return_match'} || 0 ;