Level 0 function that returns QTL haplotypes of individuals in a caste.
getQtlHaplo(
x,
caste = NULL,
nInd = NULL,
trait = 1,
haplo = "all",
chr = NULL,
dronesHaploid = TRUE,
collapse = FALSE,
simParamBee = NULL
)
getQueenQtlHaplo(
x,
trait = 1,
haplo = "all",
chr = NULL,
collapse = FALSE,
simParamBee = NULL
)
getFathersQtlHaplo(
x,
nInd = NULL,
trait = 1,
haplo = "all",
chr = NULL,
dronesHaploid = TRUE,
collapse = FALSE,
simParamBee = NULL
)
getVirginQueensQtlHaplo(
x,
nInd = NULL,
trait = 1,
haplo = "all",
chr = NULL,
collapse = FALSE,
simParamBee = NULL
)
getWorkersQtlHaplo(
x,
nInd = NULL,
trait = 1,
haplo = "all",
chr = NULL,
collapse = FALSE,
simParamBee = NULL
)
getDronesQtlHaplo(
x,
nInd = NULL,
trait = 1,
haplo = "all",
chr = NULL,
dronesHaploid = TRUE,
collapse = FALSE,
simParamBee = NULL
)
Pop-class
, Colony-class
, or
MultiColony-class
NULL or character, NULL when x
is a Pop-class
,
and character when x
is a Colony-class
or
MultiColony-class
with the possible values of "queen", "fathers",
"workers", "drones", "virginQueens", or "all"
numeric, number of individuals to access, if NULL
all
individuals are accessed, otherwise a random sample
numeric (trait position) or character (trait name), indicates which trait's QTL haplotypes to retrieve
character, either "all" for all haplotypes or an integer for a single set of haplotypes, use a value of 1 for female haplotypes and a value of 2 for male haplotypes
numeric, chromosomes to retrieve, if NULL
, all chromosome
are retrieved
logical, return haploid result for drones?
logical, if the return value should be a single matrix with haplotypes of all the individuals
SimParamBee
, global simulation parameters
matrix with haplotypes when x
is Colony-class
and list of matrices with haplotypes when x
is
MultiColony-class
, named by colony id when x
is
getQueenQtlHaplo()
: Access QTL haplotype data of the queen
getFathersQtlHaplo()
: Access QTL haplotype data of fathers
getVirginQueensQtlHaplo()
: Access QTL haplotype data of virgin queens
getWorkersQtlHaplo()
: Access QTL haplotype of workers
getDronesQtlHaplo()
: Access QTL haplotype data of drones
getQtlHaplo
and pullQtlHaplo
as well as
vignette(topic = "QuantitativeGenetics", package = "SIMplyBee")
founderGenomes <- quickHaplo(nInd = 4, nChr = 1, segSites = 50)
SP <- SimParamBee$new(founderGenomes)
SP$nThreads = 1L
SP$addTraitA(nQtlPerChr = 10)
basePop <- createVirginQueens(founderGenomes)
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
drones <- createDrones(x = basePop[1], nInd = 200)
#> 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
colony <- buildUp(x = colony, nWorkers = 6, nDrones = 3)
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
colony <- addVirginQueens(x = colony, nInd = 5)
#> 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
apiary <- buildUp(x = apiary, nWorkers = 6, nDrones = 3)
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
apiary <- addVirginQueens(x = apiary, nInd = 5)
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
# Input is a population
getQtlHaplo(x = getQueen(colony))
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
queens <- getQueen(apiary, collapse = TRUE)
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
getQtlHaplo(queens)
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
# Input is a Colony
getQtlHaplo(colony, caste = "queen")
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
getQueenQtlHaplo(colony)
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
getQtlHaplo(colony, caste = "workers", nInd = 3)
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
getWorkersQtlHaplo(colony)
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
# Same aliases exist for all the castes!
# Get haplotypes for all individuals
getQtlHaplo(colony, caste = "all")
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
# Get all haplotypes in a single matrix
getQtlHaplo(colony, caste = "all", collapse = TRUE)
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
# Input is a MultiColony - same behaviour as for the Colony
getQtlHaplo(apiary, caste = "queen")
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
getQueenQtlHaplo(apiary)
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
# Get the haplotypes of all individuals either by colony or in a single matrix
getQtlHaplo(apiary, caste = "all")
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found
getQtlHaplo(apiary, caste = "all", collapse = TRUE)
#> Error in get(x = "SP", envir = .GlobalEnv): object 'SP' not found