3 # BioPerl module for Bio::Map::CytoMap
5 # Cared for by Sendu Bala <bix@sendu.me.uk>
7 # Copyright Heikki Lehvaslaiho
9 # You may distribute this module under the same terms as perl itself
11 # POD documentation - main docs before the code
15 Bio::Map::CytoMap - A Bio::MapI compliant map implementation handling cytogenic bands
19 use Bio::Map::CytoMap;
20 my $map = Bio::Map::CytoMap->new(-name => 'human1',
22 foreach my $marker ( @markers ) { # get a list of markers somewhere
23 $map->add_element($marker);
28 This is the simple implementation of cytogenetic maps based on
29 L<Bio::Map::MapI>. It handles the essential storage of name, species,
30 type, and units as well as in memory representation of the elements of
33 For CytoMaps type is hard coded to be 'cytogeneticmap' and
34 units are set to '' but can be set to something else.
40 User feedback is an integral part of the evolution of this and other
41 Bioperl modules. Send your comments and suggestions preferably to
42 the Bioperl mailing list. Your participation is much appreciated.
44 bioperl-l@bioperl.org - General discussion
45 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
49 Report bugs to the Bioperl bug tracking system to help us keep track
50 of the bugs and their resolution. Bug reports can be submitted via the
53 http://bugzilla.open-bio.org/
55 =head1 AUTHOR - Heikki Lehvaslaiho
57 Email heikki-at-bioperl-dot-org
61 Jason Stajich jason@bioperl.org
62 Lincoln Stein lstein@cshl.org
63 Sendu Bala bix@sendu.me.uk
67 The rest of the documentation details each of the object methods.
68 Internal methods are usually preceded with a _
72 package Bio
::Map
::CytoMap
;
73 use vars
qw($MAPCOUNT);
77 use base qw(Bio::Map::SimpleMap);
78 BEGIN { $MAPCOUNT = 1; }
83 Usage : my $obj = Bio::Map::CytoMap->new();
84 Function: Builds a new Bio::Map::CytoMap object
85 Returns : Bio::Map::CytoMap
86 Args : -name => name of map (string)
87 -species => species for this map (Bio::Species) [optional]
88 -elements=> elements to initialize with
89 (arrayref of Bio::Map::MappableI objects) [optional]
96 my ($class, @args) = @_;
98 my $self = $class->SUPER::new
(@args);
100 $self->{'_uid'} = $MAPCOUNT++;
101 my ($uid) = $self->_rearrange([qw(UID)], @args);
102 defined $uid && $self->unique_id($uid);
110 Usage : my $type = $map->type
111 Function: Get hard-coded Map type
112 Returns : String coding Map type (always 'cyto')
124 Usage : my $length = $map->length();
125 Function: Retrieves the length of the map,
126 Returns : 0 since length is not calculatable for cytogenetic maps