pathwayEnrichment: Pathway enrichment testing.

Description Usage Arguments Value Examples

View source: R/pathway_over_representation.R

Description

This is a wrapper around goana function from limma package for testing over-representation of gene ontology (GO) terms or KEGG pathways in sets of genes.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
pathwayEnrichment(
  object,
  features,
  species,
  feature_column = "feature",
  universe = NULL,
  clustered = TRUE,
  kegg = FALSE,
  ontology = c("BP", "CC", "MF"),
  fltr_DE = 0.1,
  fltr_N = 500,
  fltr_P.DE = 0.05,
  ...
)

Arguments

object

A TimeSeriesExperiment object.

features

A vector of ENTREZID for enrichment testing.

species

A character string specifying the species. See goana for details.

feature_column

the feature column in 'feature.data' slot holding ENTREZIDs, by deafult the 'feature' column.

universe

A vector of genes in the universe. By default all the genes in the 'raw.data' slot.

clustered

Whether features should be grouped based on cluster assignment (stored in object@cluster.features$cluster_map) and tested as separate sets.

kegg

Whether KEGG pathways should be used instead of gene ontology (GO)

ontology

character vector of ontologies to be included in output. Elements should be one or more of "BP", "CC" or "MF".

fltr_DE

A scalar fraction of the number of genes in tested set to use as a threshold for filtering genes based on "DE" column (the number of genes in the DE set). Default is 0.1, i.e. at least 0.1 genes in the set must be present in the pathway.

fltr_N

A number of genes used as a threshold to filter out all pathway terms of size greater than the threshold. Default is 500.

fltr_P.DE

A p-value threshold to filter out terms in the enrichment results. Default is 0.05.

...

other parameters for goana or limma::kegga().

Value

a data.frame or list of data.frames with enrichment results.

Examples

1
2
3
4
5
6
7
8
9
data("endoderm_small")
selected_genes <- c('114299', '2825', '3855', '221400', '7941',
                    '6164', '1292', '6161', '6144', '23521')
enrich_res <- pathwayEnrichment(
  object = endoderm_small, clustered = FALSE,
  features = selected_genes,
  species = "Hs", ontology = "BP", fltr_DE = 0,
  fltr_N = Inf, fltr_P.DE = 0.05)
head(enrich_res)

nlhuong/vistimeseq documentation built on Sept. 4, 2021, 2:41 a.m.