NAME
Bio::PopGen::Simulation::GeneticDrift - A simple genetic drift simulation
SYNOPSIS
use Bio::PopGen::Simulation::GeneticDrift;my $sim = Bio::PopGen::Simulation::GeneticDrift->new(-popsize => 40,-alleles => {A => 0.2,B => 0.8});for(my $i =0 ;$i < 10; $i++ ) {my %f = $sim->next_generation; # get the freqs for each generation}for(my $i =0 ;$i < 10; $i++ ) {# get the allele freqs as part of a Bio::PopGen::Population objectmy $pop = $sim->next_generation('population');}
DESCRIPTION
A very simple 1 locus multi-allele random drift module, start with an initial set of allele frequency and simulate what happens over time.
This isn't really useful for anything in particular yet but will be built upon.
See Gillespie JH. (1998) "Population Genetics: a Concise guide." The Johns
Hopkins University Press, Baltimore, USA. pp.19-47.
FEEDBACK
Mailing Lists
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.
[email protected] - General discussionhttp://bioperl.org/wiki/Mailing_lists - About the mailing lists
Support
Please direct usage questions or support issues to the mailing list:
rather than to the module maintainer directly. Many experienced and reponsive experts will be able look at the problem and quickly address it. Please include a thorough description of the problem with code and data examples if at all possible.
Reporting Bugs
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:
https://github.com/bioperl/bioperl-live/issues
AUTHOR - Jason Stajich
Email jason-at-bioperl-dot-org
APPENDIX
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _
new
Title : newUsage : my $obj = Bio::PopGen::Simulation::GeneticDrift->new();Function: Builds a new Bio::PopGen::Simulation::GeneticDrift objectReturns : an instance of Bio::PopGen::Simulation::GeneticDriftArgs : -popsize => starting N-haploid => boolean if we should simulate haploids-alleles => arrayref of the allele namesOR-population => L<Bio::PopGen::PopulationI> object to initializefrom some previously defined Population object(or result from a previous simulation)
next_generation
Title : next_generationUsage : my %generation = $sim->next_generationFunction: Get the next generation of allele frequencies based on the currentgenerationReturns : Hash of allele frequenciesArgs : 'allelefreqs' or 'population' to get back a hash of allelefrequencies (default) OR a L<Bio::PopGen::Population> object
population_size
Title : population_sizeUsage : $obj->population_size($newval)Function:Example :Returns : value of population_size (a scalar)Args : on set, new value (a scalar or undef, optional)
set_Frequencies_Equivalent
Title : set_Frequencies_EquivalentUsage : $sim->set_Frequencies_EquivalentFunction: Reset the allele frequencies so they are all evenReturns : noneArgs : none
get_Allele_Frequencies
Title : get_Allele_FrequenciesUsage : my %allele_freqs = $marker->get_Allele_Frequencies;Function: Get the alleles and their frequency (set relative toa given population - you may want to create differentmarkers with the same name for different populationswith this current implementationReturns : Associative array where keys are the names of the allelesArgs : none
add_Allele_Frequency
Title : add_Allele_FrequencyUsage : $marker->add_Allele_Frequency($allele,$freq)Function: Adds an allele frequencyReturns : NoneArgs : $allele - allele name$freq - frequency value
reset_alleles
Title : reset_allelesUsage : $marker->reset_alleles();Function: Reset the alleles for a markerReturns : NoneArgs : None
validate_Frequencies
Title : validate_FrequenciesUsage : if( $sim->validate_Frequencies) {}Function: Sanity checker that allele frequencies sum to 1 or lessReturns : booleanArgs : -strict => 1 boolean if you want to insure that sum of freqs is 1