gene_set_enrichment_analysis_scExp: Runs Gene Set Enrichment Analysis on genes associated with...

Description Usage Arguments Value Examples

View source: R/diff_analysis_gene_set_enrichment.R

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
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")
)

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. ('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.

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

1
2
3
4
5
6
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)

ChromSCape documentation built on Nov. 8, 2020, 6:57 p.m.