Free Access Week - Data Engineering + BI
Data Engineering and BI courses are free this week!
Free Access Week - Jun 2-8

SIMplyBee (version 0.4.1)

reduceDroneHaplo: 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)

Value

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

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.

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 <- getSegSiteHaplo(drones, dronesHaploid = FALSE))
reduceDroneHaplo(haplo = tmp, pop = drones)

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

Run the code above in your browser using DataLab