remove comment
[bioperl-live.git] / Bio / Map / CytoMarker.pm
blob828238e1eb01bff231d161d38ad01a82ae9c55de
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
14 =head1 NAME
16 Bio::Map::CytoMarker - An object representing a marker.
18 =head1 SYNOPSIS
20 $o_usat = Bio::Map::CytoMarker->new(-name=>'Chad Super Marker 2',
21 -position => $pos);
23 =head1 DESCRIPTION
25 This object handles markers with a positon in a cytogenetic map known.
26 This marker will have a name and a position.
28 =head1 FEEDBACK
30 =head2 Mailing Lists
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
39 =head2 Support
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.
50 =head2 Reporting Bugs
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
54 web:
56 https://redmine.open-bio.org/projects/bioperl/
58 =head1 AUTHOR - Heikki Lehvaslaiho
60 Email heikki-at-bioperl-dot-org
62 =head1 CONTRIBUTORS
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
69 =head1 APPENDIX
71 The rest of the documentation details each of the object methods.
72 Internal methods are usually preceded with a _
74 =cut
76 # Let the code begin...
78 package Bio::Map::CytoMarker;
79 use strict;
80 use Bio::Map::CytoPosition;
82 use base qw(Bio::Map::Marker);
85 =head2 Bio::Map::MarkerI methods
87 =cut
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
96 -element set to self.
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
100 attributes.
102 =cut
104 sub get_position_object {
105 my ($self, $map, $value) = @_;
106 $map ||= $self->default_map;
107 if ($value) {
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);
115 return $pos;
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.
126 =cut
128 =head2 New methods
130 =cut
132 =head2 get_chr
134 Title : get_chr
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
141 =cut
143 sub get_chr {
144 my ($self) = @_;
145 return unless $self->position;
146 return $self->position->chr;