Residualize the genotype matrix against the per-context phenotype covariates and the genotype covariates, optionally subsetting variants to those falling within a trait's cis-window or an explicit region.
Usage
getResidualizedGenotypes(x, ...)
# S4 method for class 'QtlDataset'
getResidualizedGenotypes(
x,
contexts,
traitId = NULL,
region = NULL,
cisWindow = NULL,
samples = NULL,
phenotypeCovariatesToResidualize = NULL,
genotypeCovariatesToResidualize = NULL,
residualizePhenotypeCovariates = TRUE,
residualizeGenotypeCovariates = TRUE,
residualizePhenotypeCovariatesFromGenotypes = NULL,
residualizeGenotypeCovariatesFromGenotypes = NULL,
covariateNaAction = c("impute", "drop"),
...
)