reduceDroneHaplo {SIMplyBee}R Documentation

Reduce drone's double haplotypes to a single haplotype

Description

Level 0 function that returns one haplotype of drones, because we internally simulate them as diploid (doubled haploid). This is an internal utility function that you likely don't need to use.

Usage

reduceDroneHaplo(haplo, pop)

Arguments

haplo

matrix-class

pop

Pop-class

Details

While this function is meant to work on male (drone) haplotypes, we handle cases where the haplo matrix contains male and female haplotypes, which is why you need to provide pop. We only reduce haplotypes for males though.

Value

matrix with one haplotype per drone instead of two - the order of individuals stays the same, but there will be less rows!

Examples

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

(tmp <- getSegSiteHaplo(drones))
reduceDroneHaplo(haplo = tmp, pop = drones)

(tmp <- getSegSiteHaplo(c(basePop, drones)))
reduceDroneHaplo(haplo = tmp, pop = c(basePop, drones))

[Package SIMplyBee version 0.3.0 Index]