Computes the LMD score of each gene given an expression matrix and cell space.
LMD(
expression,
feature_space = NULL,
knn = 5,
kernel = FALSE,
max_time = 2^20,
adjust_bridge = TRUE,
self_loop = 1,
score_correction = FALSE,
largeData = TRUE,
highres = FALSE,
min_cell = 5,
kernel_used = NULL,
alpha = 10,
coef = 1,
epsilon = 0.001,
graph.affinity = NULL
)
matrix; the gene by cell expression matrix.
matrix; the cell by coordinate matrix (e.g., 20 principal components).
integer; the number of nearest neighbors for constructing the graph. Default is 5.
logical; if TRUE, uses a Gaussian kernel. Otherwise, uses a kNN binarized graph. Default is FALSE.
integer; the maximum diffusion time. The actual maximum diffusion time may be shorter if all genes converge beforehand. Default is 2^20.
logical; if TRUE, connects disconnected components of the graph using Minimum Spanning Trees. Default is TRUE.
integer; the weight for self-connections. Default is 1.
logical; if TRUE, adjusts the LMD profile by delta correction. Default is FALSE.
logical; if TRUE, uses functions optimized for large matrix multiplication. Default is TRUE.
logical; if TRUE, uses fine time scales (0, 1, 2, 3, ...). If FALSE, uses dyadic time scales (0, 2, 4, ...). Default is FALSE.
integer; removes genes expressing in fewer than this number of cells. Default is 5.
character; kernel type used when kernel = TRUE
. Options are "Gaussian"
or "SNN"
.
numeric; exponent used in the alpha-decaying Gaussian kernel
numeric; coefficient for adaptive bandwidth. Default is 1.
numeric; threshold below which edge weights are set to zero to sparsify the graph. Default is 1e-3.
matrix; user-supplied cell-cell affinity matrix. If provided, feature_space
and graph construction parameters are ignored.
A list containing:
data frame; the computed score profile for different diffusion times.
numeric vector; the LMD score for each gene.