Bio::MapIO mapmaker
SummaryIncluded librariesPackage variablesSynopsisDescriptionGeneral documentationMethods
Toolbar
WebCvsRaw content
Summary
Bio::MapIO::mapmaker - A Mapmaker Map reader
Package variables
No package variables defined.
Included modules
Bio::Map::LinkagePosition
Bio::Map::Marker
Bio::Map::SimpleMap
Bio::MapIO
Inherit
Bio::MapIO
Synopsis
# do not use this object directly it is accessed through the Bio::MapIO system
    use Bio::MapIO;
my $mapio = new Bio::MapIO(-format => "mapmaker",
-file => "mapfile.map");
while( my $map = $mapio->next_map ) {
# get each map
foreach my $marker ( $map->each_element ) {
# loop through the markers associated with the map
}
}
Description
This object contains code for parsing and processing Mapmaker output
and creating Bio::Map::MapI objects from it.
Methods
next_mapDescriptionCode
write_mapDescriptionCode
Methods description
next_mapcode    nextTop
 Title   : next_tree
Usage : my $map = $factory->next_map;
Function: Get a map from the factory
Returns : Bio::Map::MapI
Args : none
write_mapcodeprevnextTop
 Title   : write_tree
Usage : $factory->write_map($map);
Function: Write a map out through the factory
Returns : none
Args : Bio::Map::MapI
Methods code
next_mapdescriptionprevnextTop
sub next_map {
   my ($self) = @_;
   my ($ready,$map) = (0,new Bio::Map::SimpleMap('-name'  => '',
						 '-units' => 'cM',
						 '-type'  => 'Genetic'));
   my @markers;
   my $runningDistance = 0;
   while( defined($_ = $self->_readline()) ) {
       if ( $ready || /^\s+Markers\s+Distance/ ) { 
	   unless ( $ready ) { $ready = 1; next }
       } else { next }

       last if ( /-{5,}/); # map terminator is ------- 
s/ +/\t/; my ($number,$name,$distance) = split; $runningDistance += $distance; $runningDistance = '0.0' if $runningDistance == 0; # print "$_|$number-$name-$distance---------";
my $pos = new Bio::Map::LinkagePosition (-order => $number, -map => $map, -value => $runningDistance ); my $marker = new Bio::Map::Marker(-name=> $name, -position => $pos, ); $marker->position($pos); # use Data::Dumper; print Dumper($marker); exit;
# print $marker->position->value, "\n";
# use Data::Dumper; print Dumper($pos);
# $map->add_element(new Bio::Map::Marker('-name'=> $name,
# '-position' => $pos,
# ));
} # return undef if( ! $ready );
return $map;
}
write_mapdescriptionprevnextTop
sub write_map {
   my ($self,@args) = @_;
   $self->throw_not_implemented();
}

1;
}
General documentation
FEEDBACKTop
Mailing ListsTop
User feedback is an integral part of the evolution of this and other
Bioperl modules. Send your comments and suggestions preferably to
the Bioperl mailing list. Your participation is much appreciated.
  bioperl-l@bioperl.org              - General discussion
http://bioperl.org/MailList.shtml - About the mailing lists
Reporting BugsTop
Report bugs to the Bioperl bug tracking system to help us keep track
of the bugs and their resolution. Bug reports can be submitted via
email or the web:
  bioperl-bugs@bioperl.org
http://bugzilla.bioperl.org/
AUTHOR - Jason StajichTop
Email jason@bioperl.org
Describe contact details here
CONTRIBUTORSTop
Additional contributors names and emails here
APPENDIXTop
The rest of the documentation details each of the object methods.
Internal methods are usually preceded with a _