Bio::MapIO
mapmaker
Toolbar
Summary
Bio::MapIO::mapmaker - A Mapmaker Map reader
Package variables
No package variables defined.
Included modules
Inherit
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
Methods description
Title : next_tree Usage : my $map = $factory->next_map; Function: Get a map from the factory Returns : Bio::Map::MapI Args : none |
Title : write_tree Usage : $factory->write_map($map); Function: Write a map out through the factory Returns : none Args : Bio::Map::MapI |
Methods code
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,}/); s/ +/\t/;
my ($number,$name,$distance) = split;
$runningDistance += $distance;
$runningDistance = '0.0' if $runningDistance == 0;
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);
}
return $map; } |
sub write_map
{ my ($self,@args) = @_;
$self->throw_not_implemented();
}
1; } |
General documentation
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
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 Stajich | Top |
Additional contributors names and emails here
The rest of the documentation details each of the object methods.
Internal methods are usually preceded with a _