Learn R Programming

AlphaSimR (version 1.6.0)

doubleGenome: Double the ploidy of individuals

Description

Creates new individuals with twice the ploidy. This function was created to model the formation of tetraploid potatoes from diploid potatoes. This function will work on any population.

Usage

doubleGenome(pop, keepParents = TRUE, simParam = NULL)

Value

Returns an object of Pop-class

Arguments

pop

an object of 'Pop' superclass

keepParents

should previous parents be used for mother and father.

simParam

an object of 'SimParam' class

Examples

Run this code
#Create founder haplotypes
founderPop = quickHaplo(nInd=2, nChr=1, segSites=10)

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

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

#Create individuals with doubled ploidy
pop2 = doubleGenome(pop, simParam=SP)

Run the code above in your browser using DataLab