Correlates a gene of interest against all (sufficiently expressed) genes in a normalised expression matrix, returning correlation, p-value and FDR.
Usage
sc_correlation(
data.slot,
goi = "NKG7",
remove.quantile = 0.3,
output.tables = "results/tables/Correlation_analysis/",
debug.mode = FALSE,
method = c("pearson", "spearman", "kendall")
)Arguments
- data.slot
Numeric expression matrix (genes x cells), e.g. a downsampled Seurat
datalayer as a matrix.- goi
Gene of interest (a rowname of
data.slot).- remove.quantile
Drop genes whose mean expression is in the lowest fraction before testing.
- output.tables
Directory to write the results CSV into (created if needed). Use
NULLto skip writing.- debug.mode
Deprecated and ignored.
- method
Correlation method: "pearson" (default), "spearman" or "kendall".