xCell2Analysis: xCell2Analysis function

View source: R/xCell2Analysis.R

xCell2AnalysisR Documentation

xCell2Analysis function

Description

This function performs cell type enrichment analysis to identify proportions of cell types in a bulk gene expression mixture.

Usage

xCell2Analysis(
  mix,
  xcell2object,
  minSharedGenes = 0.9,
  rawScores = FALSE,
  spillover = TRUE,
  spilloverAlpha = 0.5,
  numThreads = 1
)

Arguments

mix

A bulk mixture of gene expression data (genes in rows, samples in columns).

xcell2object

An S4 object of class 'xCell2Object'.

minSharedGenes

Minimum fraction of shared genes required between the mix and the reference (default: 0.9).

rawScores

Boolean to indicate whether to return raw enrichment scores (default: FALSE).

spillover

Boolean - use spillover correction on the transformed enrichment scores? (default: TRUE).

spilloverAlpha

A numeric for spillover alpha value (default: 0.5).

numThreads

Number of threads for parallel processing (default: 1).

Value

A data frame containing the cell type enrichment for each sample in the input matrix, as estimated by xCell2.

Examples

# For detailed example read xCell2 vignette.

# Load "ready to use" xCell2 reference object or generate a new one using `xCell2Train`
data(DICE_demo.xCell2Ref, package = "xCell2")

# Load bulk RNA-Seq gene expression mixture
data(mix_demo, package = "xCell2")

# Run xCell2 cell type enrichment analysis
xcell2_res <- xCell2::xCell2Analysis(mix = mix_demo, xcell2object = DICE_demo.xCell2Ref)


AlmogAngel/xCell2 documentation built on Oct. 14, 2024, 4:51 a.m.