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.

reduceDroneGeno(geno, pop)

Arguments

geno

matrix-class

pop

Pop-class

Value

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

Examples

founderGenomes <- quickHaplo(nInd = 3, nChr = 1, segSites = 5)
SP <- SimParamBee$new(founderGenomes, csdChr = NULL)
SP$nThreads = 1L
basePop <- createVirginQueens(founderGenomes)
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
drones <- createDrones(x = basePop[1], nInd = 2)
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found

(tmp <- getSegSiteGeno(drones))
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
reduceDroneGeno(geno = tmp, pop = drones)
#> Error in eval(expr, envir, enclos): object 'tmp' not found

(tmp <- getSegSiteGeno(c(basePop, drones)))
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
reduceDroneGeno(geno = tmp, pop = c(basePop, drones))
#> Error in eval(expr, envir, enclos): object 'tmp' not found