createDCA {SIMplyBee}R Documentation

Create a drone congregation area (DCA)

Description

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).

Usage

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

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

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.

Value

Pop-class

Examples

founderGenomes <- quickHaplo(nInd = 8, nChr = 1, segSites = 100)
SP <- SimParamBee$new(founderGenomes)
basePop <- createVirginQueens(founderGenomes)

drones <- createDrones(x = basePop[1], nInd = 1000)
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]])
apiary <- createMultiColony(basePop[3:4], n = 2)
apiary <- cross(apiary, drones = droneGroups[c(2, 3)])

colony <- addDrones(colony, nInd = 10)
createDCA(colony)
createDCA(colony, nInd = 10)@id

apiary <- addDrones(apiary)
createDCA(apiary)
createDCA(apiary, nInd = 10)

[Package SIMplyBee version 0.3.0 Index]