Learn R Programming

evola (version 1.0.7)

drift: Drift of positive allele calculation

Description

This function takes a population and the simulation parameters from a .Pop class and calculates the current frequencies of the positive alleles for each trait.

Usage

drift(pop, simParam, solution=NULL, traits=1)

Value

$res

a matrix

Arguments

pop

an object of class "Pop"

simParam

the simulation parameters stored in the evolaMod object.

solution

an alternative RRBLUP solution so the frequencies of positive alleles are calculated for a given SNP chip. If NULL the frequencies are calculated for the real QTLs.

traits

traits considered.

Details

A simple apply function to get all the QTLs, segregation sites, positive alleles and frecuency of the positive allele for each trait in a population.

References

Giovanny Covarrubias-Pazaran (2024). evola: a simple evolutionary algorithm for complex problems. To be submitted to Bioinformatics.

See Also

evolafit -- the core function of the package

Examples

Run this code


#Create founder haplotypes
founderPop = quickHaplo(nInd=10, nChr=1, segSites=30)

#Set simulation parameters
SP = SimParam$new(founderPop)

SP$addTraitA(10)
SP$setVarE(h2=0.5)
SP$addSnpChip(15)

#Create population
pop = newPop(founderPop, simParam=SP)

# drift for QTLs
drift(pop, simParam = SP ) 

# \donttest{

ans = RRBLUP(pop, simParam=SP)

# drift for average allelic effects
drift(pop, simParam = SP, solution = ans)

# }

Run the code above in your browser using DataLab