founderGenomes <- quickHaplo(nInd = 4, nChr = 1, segSites = 50)
SP <- SimParamBee$new(founderGenomes)
SP$nThreads = 1L
SP$addTraitA(nQtlPerChr = 10)
basePop <- createVirginQueens(founderGenomes)
drones <- createDrones(x = basePop[1], nInd = 200)
droneGroups <- pullDroneGroupsFromDCA(drones, n = 10, nDrones = nFathersPoisson)
# Create a Colony and a MultiColony class
colony <- createColony(x = basePop[2])
colony <- cross(colony, drones = droneGroups[[1]])
colony <- buildUp(x = colony, nWorkers = 6, nDrones = 3)
colony <- addVirginQueens(x = colony, nInd = 5)
apiary <- createMultiColony(basePop[3:4], n = 2)
apiary <- cross(apiary, drones = droneGroups[c(2, 3)])
apiary <- buildUp(x = apiary, nWorkers = 6, nDrones = 3)
apiary <- addVirginQueens(x = apiary, nInd = 5)
# Input is a population
getQtlGeno(x = getQueen(colony))
queens <- getQueen(apiary, collapse = TRUE)
getQtlGeno(queens)
# Input is a colony
getQtlGeno(colony, caste = "queen")
getQueenQtlGeno(colony)
getQtlGeno(colony, caste = "workers", nInd = 3)
getWorkersQtlGeno(colony)
# Same aliases exist for all the castes!
# Get genotypes for all individuals
getQtlGeno(colony, caste = "all")
# Get all haplotypes in a single matrix
getQtlGeno(colony, caste = "all", collapse = TRUE)
# Input is a MultiColony - same behaviour as for the Colony!
getQtlGeno(apiary, caste = "queen")
getQueenQtlGeno(apiary)
# Get the genotypes of all individuals either by colony or in a single matrix
getQtlGeno(apiary, caste = "all")
getQtlGeno(apiary, caste = "all", collapse = TRUE)
Run the code above in your browser using DataLab