Description Usage Arguments Details Value References Examples
Calculate BLUPs of QTL effects in scan along one chromosome, with a single-QTL model treating the QTL effects as random, with possible allowance for covariates and for a residual polygenic effect.
1 2 3 |
genoprobs |
Genotype probabilities as calculated by
|
pheno |
A numeric vector of phenotype values (just one phenotype, not a matrix of them) |
kinship |
Optional kinship matrix, or a list of kinship matrices (one per chromosome), in order to use the LOCO (leave one chromosome out) method. |
addcovar |
An optional matrix of additive covariates. |
nullcovar |
An optional matrix of additional additive
covariates that are used under the null hypothesis (of no QTL) but
not under the alternative (with a QTL). This is needed for the X
chromosome, where we might need sex as a additive covariate under
the null hypothesis, but we wouldn't want to include it under the
alternative as it would be collinear with the QTL effects. Only
used if |
contrasts |
An optional matrix of genotype contrasts, size
genotypes x genotypes. For an intercross, you might use
|
se |
If TRUE, also calculate the standard errors. |
reml |
If |
tol |
Tolerance value for convergence of linear mixed model fit. |
cores |
Number of CPU cores to use, for parallel calculations.
(If |
quiet |
If FALSE, print message about number of cores used when multi-core. |
For each of the inputs, the row names are used as individual identifiers, to align individuals.
If kinship
is provided, the linear mixed model accounts for
a residual polygenic effect, with a the polygenic variance
estimated under the null hypothesis of no (major) QTL, and then
taken as fixed as known in the scan to estimate QTL effects.
A matrix of estimated regression coefficients, of dimension
positions x number of effects. The number of effects is
n_genotypes + n_addcovar + (n_genotypes-1)*n_intcovar
.
May also contain the following attributes:
SE
- Present if se=TRUE
: a matrix of estimated
standard errors, of same dimension as coef
.
sample_size
- Vector of sample sizes used for each
phenotype
Haley CS, Knott SA (1992) A simple regression method for mapping quantitative trait loci in line crosses using flanking markers. Heredity 69:315–324.
Kang HM, Zaitlen NA, Wade CM, Kirby A, Heckerman D, Daly MJ, Eskin E (2008) Efficient control of population structure in model organism association mapping. Genetics 178:1709–1723.
Robinson GK (1991) That BLUP is a good thing: The estimation of random effects. Statist Sci 6:15–32.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | # load qtl2geno package for data and genoprob calculation
library(qtl2geno)
# read data
iron <- read_cross2(system.file("extdata", "iron.zip", package="qtl2geno"))
# insert pseudomarkers into map
map <- insert_pseudomarkers(iron$gmap, step=1)
# calculate genotype probabilities
probs <- calc_genoprob(iron, map, error_prob=0.002)
# convert to allele probabilities
aprobs <- genoprob_to_alleleprob(probs)
# grab phenotypes and covariates; ensure that covariates have names attribute
pheno <- iron$pheno[,1]
covar <- match(iron$covar$sex, c("f", "m")) # make numeric
names(covar) <- rownames(iron$covar)
# calculate BLUPs of coefficients for chromosome 7
blup <- scan1blup(aprobs[,7], pheno, addcovar=covar)
# leave-one-chromosome-out kinship matrix for chr 7
kinship7 <- calc_kinship(probs, "loco")[[7]]
# calculate BLUPs of coefficients for chromosome 7, adjusting for residual polygenic effect
blup_pg <- scan1blup(aprobs[,7], pheno, kinship7, addcovar=covar)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.