CCPLS
R package for estimating cell-cell communications from spatial transcriptome data with single-cell resolution.
Please see the paper of CCPLS for details.
Getting started
Install
dependence: R version >= 4.1.1.
# Install dependent packages
install.packages(c("cluster", "circlize", "dplyr", "pls", "purrr", "Seurat", "stringr"), dependencies = TRUE)
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("ComplexHeatmap")
# Install CCPLS
install.packages("devtools", dependencies = TRUE)
devtools::install_github("bioinfo-tsukuba/CCPLS")
Quick example
1. Prepare arguments for CCPLS
# Here is demonstraion by included dataset in CCPLS package.
# Please prepare dataset and output directory for your purpose.
load(system.file("extdata", "dataset.Rdata", package = "CCPLS"))
output_dir <- "~/CCPLS_test"
# Note that 400 cells (subcellular spots) were randomly extracted by Seq-Scope data (Cho et al., 2021), and this demonstration cannot be interpreted biologically.
exp_mat
:
A matrix object containing expression values. The rows represent cells. The columns represent genes. Row names and column names correspond to cell IDs and gene symbols, respectively.
coord_mat
:
A matrix object containing cell IDs, x and y coordinates. The rows represent cells. The first column contains cell IDs and the second and subsequent columns contain x and y coordinates.
annot_mat
:
A matrix object containing cell IDs and cell type labels. The rows represent cells. The first column contains cell IDs and the second column contains cell type labels.
output_dir
:
A string. Full path of directory for saving outputs generated by CCPLS.
HVG_extract_num
:
A number. Option for specifying extraction number of HVGs. The value is set as 2,000 in the default setting.
2. Run CCPLS
result_CCPLS <- CCPLS::cellCellReg(exp_mat, coord_mat, annot_mat, output_dir, HVG_extract_num = 2000)
3. View reports by CCPLS
The outputs are stored in the output_dir
.
Citation
If you use CCPLS please cite our paper:
Takaho Tsuchiya, Hiroki Hori, and Haruka Ozaki. 2022. “CCPLS Reveals Cell-Type-Specific Spatial Dependence of Transcriptomes in Single Cells.” Bioinformatics 38 (21): 4868–77. https://academic.oup.com/bioinformatics/article/38/21/4868/6692423
License
Copyright (c) 2022 Takaho Tsuchiya and Bioinformatics Laboratory, Faculty of Medicne, University of Tsukuba released under the Artistic License 2.0.