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.
reduceDroneHaplo(haplo, pop)
matrix with one haplotype per drone instead of two - the order of individuals stays the same, but there will be less rows!
matrix-class
Pop-class
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.
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