Get the Single-Cell RNA Sequencing TPM matrix required by CIBERSORTX
The R package can extract the counts matrix in the seurat object to calculate the TPM value and match the corresponding cell name. It supports multi-core computation to speed up computation runs, and the resulting output file can be directly input into CIBERSORTX to create a Signature Matrix.
devtools::install_github('Biocxifu/Get.CibersortxTpm')
library(SeuratData)
library(Get.CibersortxTpm)
data("pbmc3k")
pbmc3k <- pbmc3k[,1:100]
Cibersortx_Tpm <- Get.CibersortxTpm(seurat_object = pbmc3k,select_allcells =TRUE,
celltype_varname = 'seurat_annotations',cl = 1,
gsub_cellname = T,gsub_string = c(' ','_'),
write_filename = 'test.txt')
Cibersortx_Tpm <- Get.CibersortxTpm(seurat_object = pbmc3k,select_allcells = FALSE,
celltype_varname = 'seurat_annotations', cl = 1,
specified_cells = c('Naive CD4 T','Memory CD4 T','B'),
gsub_cellname = T,gsub_string = c(' ','_'),
write_filename = 'test.txt')
CIBERSORTX: Build a Signature Matrix File from Single-Cell RNA Sequencing Data