[Bioperl-l] Bio::PopGen::IO

Marian Thieme marian.thieme at lycos.de
Tue Jan 9 19:38:42 UTC 2007


I have a problem/missing knowledge about initialising/providing markers 
in a population object

Let me illustrating what I did:

1. importing csv file with sample and marker information for some 
individuals. (including header info):

my $io = new Bio::PopGen::IO (	-format => 'csv',
				-allele_delimiter => ' ',
				-field_delimiter => '',
				-file => 'test.csv')

2.)pushing all individuals to an array

my @population;
while( my $ind = $io->next_individual ) {
	push @population, $ind;

3.) I convinced myself that this has worked, because I was able to ouput
alleles, individual_id and marker_name.

4.) Did create a population object with that individuals:

my $pop = Bio::PopGen::Population->new(	
-name => 'popname',
-description => 'description',
-individuals => @population);

5.) But when I try to access the markers via:

for my $name ( $pop->get_marker_names ) {
	my $marker = $pop->get_Marker();
	print $marker;

nothing appears on the screen, becuase the function get_marker_names 
obviously doesnt fetch some values, in my case.

Question: Do I need to provide the marker information seperatly ?


More information about the Bioperl-l mailing list