View source: R/run_scfeatures.R
run_CCI | R Documentation |
This function calculates the ligand receptor interaction score using SingleCellSignalR. The output features are in the form of celltype a -> celltype b – ligand 1 -> receptor 2 , which indicates the interaction between ligand 1 in celltype a and receptor 2 in celltype b.
It supports scRNA-seq.
run_CCI(data, type = "scrna", ncores = 1)
data |
A list object containing |
type |
input data type, either scrna, spatial_p, or spatial_t |
ncores |
number of cores |
a matrix of samples x features The features are in the form of ligand 1 receptor 2 celltype a, ligand 1 receptor 2 celltype b ... etc, with the numbers representing cell-cell interaction probability.
utils::data("example_scrnaseq" , package = "scFeatures")
data <- example_scrnaseq[1:1000, 1:100]
celltype <- data$celltype
sample <- data$sample
data <- as.matrix(data@assays$RNA@data)
alldata <- scFeatures:::formatData(data = data, celltype = celltype, sample = sample )
feature_CCI <- run_CCI(alldata, type = "scrna" , ncores = 1 )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.