R/differential_tests.R
lrde_test.Rd
This function implements the test proposed by Ntranos et. al. (doi: 10.1038/s41592-018-0303-9) for SingleCellExperiment
objects.
Compared to the traditional approach of using cell labels as covariate, logistic regression is carried out to predict cell labels from
quantification of associated features. Those features can be transcripts or accessibility peaks associated with e.g. genes or regulatory regions.
lrde_test(object, response, exprs_values = "logcounts", group_by = NULL, reference = NULL, features = NULL, ...)
object | A |
---|---|
response | Character vector indicating the response (class) variable. In case of length of one, it should determines the column name of the |
exprs_values | String indicating which assay contains the data that should be used to perform grouping and testing. |
group_by | Character vector indicating the grouping variable for expression values. In case of length of one, it should determines the column name of the |
reference | The level of |
features | A character vector (of feature names), a logical vector or numeric vector (of indices) specifying the features to test. The default of NULL will use all features. |
... | Additional parameters passed to |
A tibble with the following columns:
- group - the grouping variable
- pvalue - the p-value from comparison of the two LR models
- p.adjusted - the multiple testing corrected pvalue
.