RunCellHGT {CelliD} | R Documentation

## Run HyperGeometric Test on cells

### Description

RunCellHGT calculates the gene signatures for each cells and performs hypergeometric test against a user defined gene signatures/pathways (named list of genes). It returns a score of enrichment in the form of -log10 pvalue(see log.trans argument). The obtained matrix can then be integrated in Seurat or SingleCellExperiment object. It can notably be used with cell type signatures to predict cell types or with functionnal pathways

### Usage

    RunCellHGT(
      X,
      pathways,
      reduction,
      n.features,
      features,
      dims,
      minSize,
      log.trans,
      p.adjust
    )

    ## S3 method for class 'SingleCellExperiment'
    RunCellHGT(
      X,
      pathways,
      reduction = "MCA",
      n.features = 200,
      features = NULL,
      dims = seq(50),
      minSize = 10,
      log.trans = TRUE,
      p.adjust = TRUE
    )

    ## S3 method for class 'Seurat'
    RunCellHGT(
      X,
      pathways,
      reduction = "mca",
      n.features = 200,
      features = NULL,
      dims = seq(50),
      minSize = 10,
      log.trans = TRUE,
      p.adjust = TRUE
    )

### Arguments

`X` | Seurat or SingleCellExperiment object with mca performed
`pathways` | geneset to perform hypergeometric test on (named list of genes)
`reduction` | name of the MCA reduction
`n.features` | integer of top n features to consider for hypergeometric test
`features` | vector of features to calculate the gene ranking by default will take everything in the selected mca reduction.
`dims` | MCA dimensions to use to compute n.features top genes.
`minSize` | minimum number of overlapping genes in geneset and
`log.trans` | if TRUE tranform the pvalue matrix with -log10 and convert it to sparse matrix
`p.adjust` | if TRUE apply Benjamini Hochberg correction to p-value

### Value

a matrix of benjamini hochberg adjusted pvalue pvalue or a sparse matrix of (-log10) benjamini hochberg adjusted pvalue

### Examples

    seuratPbmc <- RunMCA(seuratPbmc, nmcs = 5)
    Enrichment <- RunCellHGT(X = seuratPbmc, pathways = Hallmark, dims = 1:5)

[Package CelliD version 1.2.1 Index]