scan1max {qtl2} | R Documentation |
Maximum LOD score from genome scan with a single-QTL model
Description
Maximum LOD score from genome scan with a single-QTL model by Haley-Knott regression or a linear mixed model, with possible allowance for covariates.
Usage
scan1max(
genoprobs,
pheno,
kinship = NULL,
addcovar = NULL,
Xcovar = NULL,
intcovar = NULL,
weights = NULL,
reml = TRUE,
model = c("normal", "binary"),
hsq = NULL,
by_chr = FALSE,
cores = 1,
...
)
Arguments
genoprobs |
Genotype probabilities as calculated by
|
pheno |
A numeric matrix of phenotypes, individuals x phenotypes. |
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 numeric matrix of additive covariates. |
Xcovar |
An optional numeric matrix with additional additive covariates used for null hypothesis when scanning the X chromosome. |
intcovar |
An numeric optional matrix of interactive covariates. |
weights |
An optional numeric vector of positive weights for the
individuals. As with the other inputs, it must have |
reml |
If |
model |
Indicates whether to use a normal model (least
squares) or binary model (logistic regression) for the phenotype.
If |
hsq |
Considered only if |
by_chr |
If TRUE, save the individual chromosome maxima. |
cores |
Number of CPU cores to use, for parallel calculations.
(If |
... |
Additional control parameters; see Details. |
Details
Equivalent to running scan1()
and then saving the column
maxima, with some savings in memory usage.
Value
Either a vector of genome-wide maximum LOD scores, or if
by_chr
is TRUE, a matrix with the chromosome-specific maxima,
with the rows being the chromosomes and the columns being the
phenotypes.
See Also
Examples
# read data
iron <- read_cross2(system.file("extdata", "iron.zip", package="qtl2"))
# insert pseudomarkers into map
map <- insert_pseudomarkers(iron$gmap, step=1)
# calculate genotype probabilities
probs <- calc_genoprob(iron, map, error_prob=0.002)
# grab phenotypes and covariates; ensure that covariates have names attribute
pheno <- iron$pheno
covar <- match(iron$covar$sex, c("f", "m")) # make numeric
names(covar) <- rownames(iron$covar)
Xcovar <- get_x_covar(iron)
# perform genome scan
out <- scan1max(probs, pheno, addcovar=covar, Xcovar=Xcovar)