One-step function to run the complete metabolite-mediated cell communication analysis pipeline
runScMetaLink(
expression_data,
cell_meta,
cell_type_column = "cell_type",
method = "combined",
min_cells = 10,
min_pct = 0.1,
n_permutations = 1000,
pvalue_threshold = 0.05,
n_cores = 1,
verbose = TRUE
)A matrix or sparse matrix of normalized expression
A data.frame with cell metadata
Character. Column name for cell type annotations
Character. Expression scoring method: "mean", "proportion", "combined"
Integer. Minimum cells per cell type
Numeric. Minimum percentage of expressing cells (0-1)
Integer. Number of permutations for significance testing
Numeric. P-value threshold for significance
Integer. Number of cores for parallel computing
Logical. Print progress messages
A scMetaLink object with all analysis completed
This function runs the complete scMetaLink pipeline:
Create scMetaLink object from expression data
Infer metabolite production potential (MPP)
Infer metabolite sensing capability (MSC)
Compute cell-cell communication scores
Perform permutation-based significance testing
Filter significant interactions
Aggregate by pathway
# \donttest{
# Run complete analysis
result <- runScMetaLink(
expression_data = expr_matrix,
cell_meta = cell_metadata,
cell_type_column = "cell_type",
n_permutations = 1000
)
#> === Step 1/6: Creating scMetaLink object ===
#> Error: object 'expr_matrix' not found
# View significant interactions
sig <- getSignificantInteractions(result)
#> Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'getSignificantInteractions': object 'result' not found
head(sig)
#> Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'head': object 'sig' not found
# }