View source: R/simulateGenotypes.R
This function simulates genotypes within a pedigree, based on centiMorgan map distances. Outputs genotypes as a GenABEL gwaa object.
1 2 3 4 5 6 7 8 | simulateGenos(ped, pedigree.type = "simple", cM = NULL,
cM.male = NULL, cM.female = NULL, founder.mafs = NULL,
chromosome.ids = NULL, snp.names = NULL, map.distances = NULL,
error.rate = 1e-04, missing.rate = 0.001, xover.min.cM = 0,
xover.min.cM.male = 0, xover.min.cM.female = 0,
founder.haplotypes = NULL, sample.founder.haplotypes = FALSE,
founder.haplotype.count = NULL, save.PLINK = FALSE,
PLINK.prefix = NULL)
|
ped |
data.frame of pedigree in "simple" format (Three columns for ANIMAL, MOTHER and FATHER) or in "plink" format (Five to Six columns for FAMILY, ANIMAL, FATHER, MOTHER, SEX and Phenotype, where the phenotype column is optional). Is formatted within this function using pedigree.format() |
pedigree.type |
Character. "simple" or "plink" |
cM |
Numeric vector of sex-averaged map distances in centiMorgans. Not required if sex specific map distances are defined. First position should be given as 0cM |
cM.male |
Numeric vector of Male map distances in centiMorgans |
cM.female |
Numeric vector of Female map distances in centiMorgans |
founder.mafs |
Numeric vector of Minor allele frequencies for each marker |
chromosome.ids |
Vector of chromosome or linkage group IDs for each marker |
snp.names |
Optional character vector of SNP names |
map.distances |
Optional vector of map distances in base pairs for GenABEL object. Not used in the simulation. |
error.rate |
numeric. Default is 1e-4. Future versions will allow vector. |
missing.rate |
numeric. Default is 0.001. Future versions will allow vector. |
xover.min.cM |
numeric. Minimum cM distance between two crossovers |
xover.min.cM.male |
numeric. Minimum cM distance between two crossovers in males |
xover.min.cM.female |
numeric. Minimum cM distance between two crossovers in females |
founder.haplotypes |
Optional of haplotypes from which the founder population will be sampled. Each haplotype should be a vector of 0s and 1s matching the allele for each map distance above. |
sample.founder.haplotypes |
logical. Should the haplotypes be sampled from founder.haplotypes with replacement (TRUE) or should each sample receive unique haplotypes (FALSE)? |
founder.haplotype.count |
Number of haplotypes in the founder population. |
save.PLINK |
Logical. Keep PLINK file in working directory? |
PLINK.prefix |
default is a randomly generated name. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.