[Bioperl-l] Bio::PopGen::PopStats
Mark A. Jensen
maj at fortinbras.us
Fri Oct 23 12:27:54 UTC 2009
Hi Rob,
Don't forget to
use strict;
use warnings;
There's an omission and a typo in your script that these would have caught.
You need
my $stat = Bio::PopGen::PopStats->new()
and
> my $fst = $stats->Fst(\@pop,\@marker);
should be
my $fst = $stats->Fst(\@pop,\@markers);
cheers MAJ
----- Original Message -----
From: "Robin Runyowa" <robrunyowa at gmail.com>
To: <bioperl-l at lists.open-bio.org>
Cc: <robrunyowa at gmail.com>
Sent: Tuesday, October 20, 2009 1:20 PM
Subject: [Bioperl-l] Bio::PopGen::PopStats
> Hi, I am a newbie in bioperl and I am trying to use to
> Bio::PopGen::PopStats.
> Unfortunately, I am not sure how to create arrays of objects so I keep
> getting an error message.
> My input files are below:
> testpop3.cvs:
> SAMPLE,rs0001
> Person1,A T
> Person2,T T
> Person3,A A
> Person4,T A
> Person5,A A
>
>
> testpop4.cvs
> SAMPLE,rs0001
> Per1,A T
> Per2,T T
> Per3,A A
> Per4,T A
> Per5,A A
>
>
> My script:
> use Bio::PopGen::PopStats;
> use Bio::PopGen::Individual;
> use Bio::PopGen::Genotype;
> use Bio::PopGen::Population;
> use Bio::PopGen::IO;
>
> my $handle = new Bio::PopGen::IO (-format => 'csv',
> -file => 'testpop3.cvs');
> my $handle2 = new Bio::PopGen::IO (-format => 'csv',
> -file => 'testpop4.cvs');
>
> my $YRI = $handle ->next_population;
> my $CEU = $handle2 ->next_population;
> my @pop = ();
> push @pop, $YRI;
> push @pop, $CEU;
> @markers = $YRI->get_marker_names;
> my $fst = $stats->Fst(\@pop,\@marker);
>
> Thanks, Rob
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>
>
More information about the Bioperl-l
mailing list