Learn R Programming

SIMplyBee (version 0.4.1)

reduceDroneGeno: Reduce drones' genotype to a single haplotype

Description

Level 0 function that reduces drone's genotype to a single haplotype, because we internally simulate them as diploid (doubled haploid). This is an internal utility function that you likely don't need to use.

Usage

reduceDroneGeno(geno, pop)

Value

matrix with genotype as one haplotype per drone instead of two - the order of individuals and the number of rows stays the same!

Arguments

geno

matrix-class

pop

Pop-class

Examples

Run this code
founderGenomes <- quickHaplo(nInd = 3, nChr = 1, segSites = 5)
SP <- SimParamBee$new(founderGenomes, csdChr = NULL)
SP$nThreads = 1L
basePop <- createVirginQueens(founderGenomes)
drones <- createDrones(x = basePop[1], nInd = 2)

(tmp <- getSegSiteGeno(drones))
reduceDroneGeno(geno = tmp, pop = drones)

(tmp <- getSegSiteGeno(c(basePop, drones)))
reduceDroneGeno(geno = tmp, pop = c(basePop, drones))

Run the code above in your browser using DataLab