geneSetEnrichment: Gene Pathway Enrichment

View source: R/geneSetEnrichment.R

geneSetEnrichmentR Documentation

Gene Pathway Enrichment

Description

Find the pathways enriched for in a set of genes.

Usage

geneSetEnrichment(genes, geneSets = defaultGeneSets(), 
		upOnly = TRUE, minEnrich = 2, maxPvalue = 0.05, wt.enrich = 1, wt.pvalue = 2,
		geneUniverse = NULL, reportGenes = FALSE, dropPathNameLinks = FALSE, verbose = TRUE)

Arguments

genes

a vector of genes (GeneIDs for most parasite species, Gene Symbols for most mammals), that represent the genes of interest, perhaps from differential expression analysis.

geneSets

a named pathway definitions object as a character vector, or a list of vectors of genes. Default is all pathway sets defined for the current species.

upOnly

logical, report only over-enriched pathways or both up and down.

minEnrich

minimum enrichment to report. Higher value reports less pathways. A value of 1.0 means not enriched at all.

maxPvalue

maximum P-value to report. Lower value reports less pathways.

wt.enrich

weight to give the enrichment component in the final sorted ordering.

wt.pvalue

weight to give the P-value component in the final sorted ordering.

geneUniverse

the universe of potentially detected genes. Defaults to all the genes in the geneMap for the current species. Useful when only a subset of genes are eligble.

reportGenes

logical, report just the pathway information, or also return a second data frame of genes.

dropPathNameLinks

logical, keep any hyperlinks present in the pathway name, or remove them.

Details

Based on the hypergeometric function. See enrichment. Evaluates every named set of genes in geneSets to see how many of the elements of genes are present, and if that number is greater or less than expected by chance. Tabulated for all and then trimmed to the subset meeting the reporting criteria.

Value

A list of two data frames, one called pathways and one called genes, when reportGenes is true. Else a single data frame of pathways. The pathway object is the enriched pathway groups, sorted by both enrichment and P-value. The most unexpected pathway groups will be at the top. The genes object is all the genes present in any enriched pathway, with all its pathways memberships, sorted by GeneID. The pathway data frame:

PathName

name of the pathway

Enrichment

the enrichment is the ratio of Pct_Given/Pct_Total

P_value

the likelihood of getting that many given genes in a pathway of that size

N_Total

total number of genes (given the geneUniverse) in that pathway

Pct_Total

percentage of all genes that are in that pathway

N_Given

number of given genes in genes that were found in that pathway

Pct_Given

percentage of given genes that were found in that pathway

Note

The default pathway objects are distributed as part of the DuffyTools data directory. Not all defined species have all types of pathway files at this time.

Author(s)

Bob Morrison

See Also

pipe.GeneSetEnrichment, for a higher level wrapper for evaluating enrichment of multiple differential expression results. pipe.GeneSetDensity and pipe.MetaGeneSets, for differential expression of pathways.

Examples

  setCurrentSpecies( "Hs_grc")
  geneSetEnrichment( c("ACVR1","BAMBI","CDK8","COL1A2","ENG","FSHB","GDF9","JUNB","LTBP1","MYC","SKI","SMAD5","TGFB1","UBB"), maxP=0.0001)

robertdouglasmorrison/DuffyTools documentation built on April 16, 2024, 6:31 a.m.