Level 1 function that creates a population of drones from a Colony or MultiColony. Such a population is often referred to as a drone congregation area (DCA).

createDCA(x, nInd = NULL, removeFathers = TRUE, simParamBee = NULL)

Arguments

x

Colony-class or MultiColony-class

nInd

numeric, number of random drones to pull from each colony, if NULL all drones in a colony are pulled

removeFathers

logical, removes drones that have already mated; set to FALSE if you would like to get drones for mating with multiple virgin queens, say via insemination

simParamBee

SimParamBee, global simulation parameters

Value

Pop-class

Details

In reality, drones leave the colony to mate. They die after that. In this function we only get a copy of drones from x, for computational efficiency and ease of use. However, any mating will change the caste of drones to fathers, and they won't be available for future matings (see cross). Not unless removeFathers = FALSE.

Examples

founderGenomes <- quickHaplo(nInd = 8, nChr = 1, segSites = 100)
SP <- SimParamBee$new(founderGenomes)
SP$nThreads = 1L
basePop <- createVirginQueens(founderGenomes)
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found

drones <- createDrones(x = basePop[1], nInd = 1000)
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
droneGroups <- pullDroneGroupsFromDCA(drones, n = 10, nDrones = nFathersPoisson)
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found

# Create a Colony and a MultiColony class
colony <- createColony(x = basePop[2])
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
colony <- cross(colony, drones = droneGroups[[1]])
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
apiary <- createMultiColony(basePop[3:4], n = 2)
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
apiary <- cross(apiary, drones = droneGroups[c(2, 3)])
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found

colony <- addDrones(colony, nInd = 10)
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
createDCA(colony)
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
createDCA(colony, nInd = 10)@id
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found

apiary <- addDrones(apiary)
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
createDCA(apiary)
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
createDCA(apiary, nInd = 10)
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found