[Bioperl-l] Bio::MapIO::mapmaker

Daniel Lang daniel.lang at biologie.uni-freiburg.de
Wed Nov 2 08:52:59 EST 2005


Hi,
I found something odd when working with Bio::MapIO::mapmaker (1.5.1 but
also todays cvs version) ...
Is it on purpose, that the parser "forgets" the last marker of a map?
For example when parsing a map like:
Map:
  mapname=THE_NAME_OF_MAP
  Markers          Distance
  1  bnl5.62a         35.3 cM coremarker
  2  npi406           15.6 cM EST
  3  npi439a          27.2 cM
  4  dpg11            30.7 cM ssr
  5  bnl7.21a           33 cM
  6  bnl23b            8.6 cM coremarker
  7  umc58           107.9 cM
  8  npi605a          26.5 cM EST
  9  npi120             19 cM ssr
  10  npi615           19.5 cM coremarker
  11  npi407             14 cM
  12  npi241a          45.2 cM
  13  bnl6.32       ---------- RflP

marker n°13 is always left out when iterating over the map i.e. like this:
#!/usr/bin/perl
#test script to read mapmaker outputs
use strict;
use warnings;
use Bio::MapIO;

my $mapio = new Bio::MapIO(-format => "mapmaker",
                           -file   => $ARGV[0]);
while (my $map = $mapio->next_map) {
        last unless $map->length;
        print $map->type ." ". $map->length ." " . $map->unique_id ."\n";
        foreach my $marker ( $map->each_element ) {
                print $marker->name ."\t" .$marker->position->order
."\t", $marker->position->value , "\t", $marker->position->numeric ,"\n";
        }
}
Output:
./readMap.pl test.map
Genetic 382.5 1
bnl5.62a        1       35.3    35.3
npi406  2       50.9    50.9
npi439a 3       78.1    78.1
dpg11   4       108.8   108.8
bnl7.21a        5       141.8   141.8
bnl23b  6       150.4   150.4
umc58   7       258.3   258.3
npi605a 8       284.8   284.8
npi120  9       303.8   303.8
npi615  10      323.3   323.3
npi407  11      337.3   337.3
npi241a 12      382.5   382.5

Additionally, the iterator method Bio::MapIO::mapmaker::next_map doesn´t
terminate correctly (Hence my test for the length of the map in the
while loop).

Thanks in advance!
Daniel:)


-- 

Daniel Lang
University of Freiburg, Plant Biotechnology
Schaenzlestr. 1, D-79104 Freiburg
fax: +49 761 203 6945
phone: +49 761 203 6974
homepage:  http://www.plant-biotech.net/
e-mail: daniel.lang at biologie.uni-freiburg.de

#################################################
My software never has bugs.
It just develops random features.
#################################################





More information about the Bioperl-l mailing list