Runs marginal and cell type-specific analysis using ordinary least squares.
CSeQTL_linearTest(
input,
XX,
RHO,
SNP,
YY = NULL,
MARG = FALSE,
impute_geno = FALSE,
trim = FALSE,
thres_TRIM = 10,
show_plot = TRUE,
main_plot = "",
CTs = NULL
)A R list containing lm() output for lm_out,
a R dataframe for out_df containing regression estimates,
standard errors, p-values. res_trim provides a summary of trimmed
results over a grid of cut-off values and number of samples trimmed.
cooksd is a numeric vector of median shifted and MAD scaled
Cook's distances per sample. prop_trim, a numeric value for
number of samples with outcome values trimmed for the user-specified
thres_TRIM value.
A data.frame containing columns total
(total read counts) and log_lib_size (log transformed
library size).
A numeric design matrix of baseline covariates including the intercept in the first column and centered continuous covariates.
A numeric matrix of cell type proportions. Rows correspond to subjects and columns correspond to cell types.
An integer vector of phased genotypes coded 0 (AA), 1 (AB), 2 (BA), 3 (BB), and 5 (NA).
Default is NULL. By default, the outcome
for OLS is the inverse rank quantile normalized TReC
after library size correction. Otherwise, the user can input
their own transformed outcome as a numeric vector.
Boolean value. Set to TRUE to fit the
marginal OLS model. Default is set to FALSE to fit
the cell type-specific interaction OLS model.
Boolean value. Default is set to FALSE
to only analyze subjects with non-missing genotype.
If TRUE, missing genotypes are imputed with the
mean of non-missing genotypes mimicing MatrixEQTL.
Boolean value set to FALSE by default to prevent
outcome trimming. If TRUE, the OLS model will be fitted
without covariates containing SNP genotype to calculate each
subject's Cooks' distance.
A positive numeric value to perform subject outcome trimming. Subjects with standardized Cooks' Distances greater than the threshold are trimmed.
Boolean value set to TRUE to visualize
boxplot or interactions.
Character string for the visual's main title.
Set to NULL by default. If NULL and
show_plot = TRUE, all cell type interaction plots are shown.
Otherwise a subset of cell types can be displayed using an integer vector
of columns or character vector of column names of RHO can
be provided.