PopGen modules
From BioPerl
(Redirected from Module:Bio::PopGen)
Contents |
Goals of population genetics tools in BioPerl
The purpose of these modules is to enable automation of population genomics.
Some papers describe the use of these modules [1] [2] [3] as does the PopGen HOWTO.
Population genetic modules
- Bio::PopGen::Statistics - population genetics summary statistics
- Bio::PopGen::PopStats - population statistics (Fst)
- Bio::PopGen::IO - reading and writing datafiles
- Bio::PopGen::Simulation::Coalescent - a very vanilla Coalescent simulator.
- Bio::PopGen::Simulation::GeneticDrift - cute genetic drift simulation, does not do recombination
Some Examples
Read in prettybase data from Seattle SNPs
#!/usr/bin/perl -w use strict; use Bio::PopGen::IO; my $in = Bio::PopGen::IO->new(-format => 'prettybase', -file => 'file.prettybase'); my $pop = $in->next_population; # do something with the population ...
Run Fu and Li's D
#!/usr/bin/perl -w use strict; use Bio::PopGen::Statistics; use Bio::AlignIO; use Bio::PopGen::Utilities; # pass file on the command line my $in = Bio::AlignIO->new(-format => 'clustalw', -file => shift @ARGV); # get the 1st alignment from file if( my $aln = $in->next_aln ) { # get a population object from an alignment my $pop = Bio::PopGen::Utilities->aln_to_population(-alignment=>$aln); my (@ingroup, @outgroup); for my $ind ( $pop->get_Individuals) { if( $ind->unique_id =~ /^OUT/ ) { # outgroup starts with OUT in this example push @outgroup, $ind; } else { push @ingroup, $ind; } } my $fld = Bio::PopGen::Statistics->fu_and_li_D(\@ingroup,\@outgroup); print "$fld\n"; }
References
- Stajich JE and Hahn MW. Disentangling the effects of demography and selection in human history. Mol Biol Evol 2005 Jan; 22(1) 63-73. doi:10.1093/molbev/msh252 pmid:15356276.
- Hahn MW, Rockman MV, Soranzo N, Goldstein DB, and Wray GA. Population genetic and phylogenetic evidence for positive selection on regulatory mutations at the factor VII locus in humans. Genetics 2004 Jun; 167(2) 867-77. doi:10.1534/genetics.103.025726 pmid:15238535.
- Rockman MV, Hahn MW, Soranzo N, Goldstein DB, and Wray GA. Positive selection on a human-specific transcription factor binding site regulating IL4 expression. Curr Biol 2003 Dec 2; 13(23) 2118-23. pmid:14654003.

