Skip to contents

Estimates immune cell fractions using the xCell algorithm. xCell provides cell type enrichment scores for 64 immune and stromal cell types from gene expression data.

Usage

deconvo_xcell(eset, project = NULL, arrays = FALSE)

Arguments

eset

Gene expression matrix with HGNC gene symbols as row names and samples as columns.

project

Optional project name to add as `ProjectID` column. Default is `NULL`.

arrays

Logical indicating microarray data (`TRUE`) or RNA-seq (`FALSE`). Default is `FALSE`.

Value

Data frame with xCell enrichment scores. Cell type columns are suffixed with `_xCell`.

Author

Dongqiang Zeng

Examples

eset_stad <- load_data("eset_stad")
anno_grch38 <- load_data("anno_grch38")
eset <- anno_eset(eset = eset_stad, annotation = anno_grch38, probe = "id")
#>  Row number of original eset: 60483
#>  100% of probes in expression set were annotated
#>  Found 2293 duplicate symbols, using "mean" method
#>  Row number after filtering duplicated gene symbol: 50181
xcell_result <- deconvo_xcell(eset = eset[, 1:3], project = "TCGA-STAD")
#>  Running xCell deconvolution
#>  Number of genes: 10783
#>  GSVA version 2.4.8
#>  Searching for rows with constant values
#>  Calculating GSVA ranks
#>  kcdf='auto' (default)
#>  GSVA dense (classical) algorithm
#>  Row-wise ECDF estimation with Gaussian kernels
#>  Calculating row ECDFs
#>  Calculating column ranks
#>  GSVA dense (classical) algorithm
#>  Calculating GSVA scores
#>  Calculations finished
head(xcell_result)[, 1:5]
#>             ID ProjectID Adipocytes_xCell Astrocytes_xCell B-cells_xCell
#> 1 TCGA-BR-6455 TCGA-STAD     3.755491e-23     0.000000e+00  0.000000e+00
#> 2 TCGA-BR-7196 TCGA-STAD     1.794635e-23     3.702040e-22  1.311341e-23
#> 3 TCGA-BR-8371 TCGA-STAD     0.000000e+00     1.881182e-21  3.149663e-08