profileSim | R Documentation |
Simulation of DNA profiles for specified pedigree members. Some pedigree
members may already be genotyped; in that case the simulation is conditional
on these. The main work of this function is done by markerSim()
.
profileSim( x, N = 1, ids = NULL, markers = NULL, seed = NULL, numCores = 1, verbose = TRUE, ... )
x |
A |
N |
The number of complete simulations to be performed. |
ids |
A character (or coercible to character) with ID labels indicating whose genotypes should be simulated. |
markers |
A list of marker objects, or a vector containing names or
indices referring to markers attached to |
seed |
An integer seed for the random number generator (optional). |
numCores |
The number of cores used for parallelisation, by default 1. |
verbose |
A logical, by default TRUE. |
... |
Further arguments passed on to |
A list of N
objects similar to x
, but with simulated genotypes.
Any previously attached markers are replaced by the simulated profiles. If
the indicated markers contained genotypes for some pedigree members, these
are still present in the simulated profiles.
# Example with two brothers x = nuclearPed(children = c("B1", "B2")) # Attach two markers; one brother is already genotyped x = addMarker(x, B1 = "1/2", alleles = 1:3) x = addMarker(x, B1 = "1", alleles = 1:4, afreq = (1:4)/10, chrom = "X") # Simulate 3 profiles of B2 conditional on the above profileSim(x, N = 3, ids = "B2")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.