gene_set_enrichment_analysis_scExp {ChromSCape} | R Documentation

## Runs Gene Set Enrichment Analysis on genes associated with differential features

### Description

This function takes previously calculated differential features and runs hypergeometric test to look for enriched gene sets in the genes associated with differential features, for each cell cluster. This functions takes as input a SingleCellExperiment object with consclust, the type of comparison, either 'one_vs_rest' or 'pairwise', the adjusted p-value threshold (qval.th) and the fold-change threshold (cdiff.th). It outputs a SingleCellExperiment object containing a differential list.

### Usage

    gene_set_enrichment_analysis_scExp(
      scExp,
      enrichment_qval = 0.1,
      ref = "hg38",
      GeneSets = NULL,
      GeneSetsDf = NULL,
      GenePool = NULL,
      qval.th = 0.01,
      cdiff.th = 1,
      peak_distance = 1000,
      use_peaks = FALSE,
      GeneSetClasses = c("c1_positional", "c2_curated", "c3_motif", "c4_computational",
        "c5_GO", "c6_oncogenic", "c7_immunologic", "hallmark"),
      progress = NULL
    )

### Arguments

`scExp` | A SingleCellExperiment object containing list of differential features.
`enrichment_qval` | Adjusted p-value threshold for gene set enrichment. (0.1)
`ref` | A reference annotation, either 'hg38' or 'mm10'. ('hg38')
`GeneSets` | A named list of gene sets. If NULL will automatically load MSigDB list of gene sets for specified reference genome. (NULL)
`GeneSetsDf` | A dataframe containing gene sets & class of gene sets. If NULL will automatically load MSigDB dataframe of gene sets for specified reference genome. (NULL)
`GenePool` | The pool of genes to run enrichment in. If NULL will automatically load Gencode list of genes fro specified reference genome. (NULL)
`qval.th` | Adjusted p-value threshold to define differential features. (0.01)
`cdiff.th` | Fold change threshold to define differential features. (1)
`peak_distance` | Maximum distanceToTSS of feature to gene TSS to consider associated, in bp. (1000)
`use_peaks` | Use peak calling method (must be calculated beforehand). (FALSE)
`GeneSetClasses` | Which classes of MSIGdb to look for.
`progress` | A shiny Progress instance to display progress bar.

### Value

Returns a SingleCellExperiment object containing list of enriched Gene Sets for each cluster, either in depleted features, enriched features or simply differential features (both).

### Examples

    data("scExp")

    #Usually recommanding qval.th = 0.01 & cdiff.th = 1 or 2
    ## Not run: scExp_cf = gene_set_enrichment_analysis_scExp(scExp,
     qval.th = 0.4, cdiff.th = 0.3)
    ## End(Not run)

[Package ChromSCape version 1.2.62 Index]