Compute module trends along mPT stratified by metabolic cluster
scMetaTraj_trend_by_cluster(
score_mat,
mPT,
cluster,
modules,
n_bins = 30,
smooth = TRUE,
span = 0.3,
min_cells = 50
)Long-format data.frame with columns: cluster, module, mPT_bin, score, score_smooth, n_cells
Matrix/data.frame (cells x modules).
Numeric vector.
Factor/character vector of cluster labels.
Character vector of module names.
Integer. Number of bins.
Logical. Whether to loess smooth.
Numeric. Loess span.
Integer. Minimum cells per cluster to compute trends.