2 # BioPerl module for Bio::Map::CytoMarker
4 # Please direct questions and support issues to <bioperl-l@bioperl.org>
6 # Cared for by Sendu Bala <bix@sendu.me.uk>
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::Map::CytoMarker - An object representing a marker.
20 $o_usat = Bio::Map::CytoMarker->new(-name=>'Chad Super Marker 2',
25 This object handles markers with a positon in a cytogenetic map known.
26 This marker will have a name and a position.
32 User feedback is an integral part of the evolution of this and other
33 Bioperl modules. Send your comments and suggestions preferably to the
34 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 Please direct usage questions or support issues to the mailing list:
43 I<bioperl-l@bioperl.org>
45 rather than to the module maintainer directly. Many experienced and
46 reponsive experts will be able look at the problem and quickly
47 address it. Please include a thorough description of the problem
48 with code and data examples if at all possible.
52 Report bugs to the Bioperl bug tracking system to help us keep track
53 of the bugs and their resolution. Bug reports can be submitted via the
56 https://redmine.open-bio.org/projects/bioperl/
58 =head1 AUTHOR - Heikki Lehvaslaiho
60 Email heikki-at-bioperl-dot-org
64 Chad Matsalla bioinformatics1@dieselwurks.com
65 Lincoln Stein lstein@cshl.org
66 Jason Stajich jason@bioperl.org
67 Sendu Bala bix@sendu.me.uk
71 The rest of the documentation details each of the object methods.
72 Internal methods are usually preceded with a _
76 # Let the code begin...
78 package Bio
::Map
::CytoMarker
;
80 use Bio
::Map
::CytoPosition
;
82 use base
qw(Bio::Map::Marker);
85 =head2 Bio::Map::MarkerI methods
89 =head2 get_position_object
91 Title : get_position_class
92 Usage : my $position = $marker->get_position_object();
93 Function: To get an object of the default Position class
94 for this Marker. Subclasses should redefine this method.
95 The Position returned needs to be a L<Bio::Map::PositionI> with
97 Returns : L<Bio::Map::PositionI>
98 Args : none for an 'empty' PositionI object, optionally
99 Bio::Map::MapI and value string to set the Position's -map and -value
104 sub get_position_object
{
105 my ($self, $map, $value) = @_;
106 $map ||= $self->default_map;
108 $self->throw("Value better be scalar, not [$value]") unless ref($value) eq '';
111 my $pos = Bio
::Map
::CytoPosition
->new();
112 $pos->map($map) if $map;
113 $pos->value($value) if $value;
114 $pos->element($self);
119 =head2 Comparison methods
121 The numeric values for cutogeneic loctions go from the p tip of
122 chromosome 1, down to the q tip and similarly throgh consecutive
123 chromosomes, through X and end the the q tip of X. See
124 L<Bio::Map::CytoPosition::cytorange> for more details.
135 Usage : my $mychr = $marker->get_chr();
136 Function: Read only method for the chromosome string of the location.
137 A shortcut to $marker->position->chr().
138 Returns : chromosome value
139 Args : [optional] new chromosome value
145 return unless $self->position;
146 return $self->position->chr;