goseqTable: Extract functional terms enriched in the DE genes, based on...

Description Usage Arguments Details Value Examples

View source: R/goseqTable.R

Description

A wrapper for extracting functional GO terms enriched in a list of (DE) genes, based on the algorithm and the implementation in the goseq package

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
goseqTable(
  de.genes,
  assayed.genes,
  genome = "hg38",
  id = "ensGene",
  testCats = c("GO:BP", "GO:MF", "GO:CC"),
  FDR_GO_cutoff = 1,
  nTop = 200,
  orgDbPkg = "org.Hs.eg.db",
  addGeneToTerms = TRUE
)

Arguments

de.genes

A vector of (differentially expressed) genes

assayed.genes

A vector of background genes, e.g. all (expressed) genes in the assays

genome

A string identifying the genome that genes refer to, as in the goseq function

id

A string identifying the gene identifier used by genes, as in the goseq function

testCats

A vector specifying which categories to test for over representation amongst DE genes - can be any combination of "GO:CC", "GO:BP", "GO:MF" & "KEGG"

FDR_GO_cutoff

Numeric value for subsetting the results

nTop

Number of categories to extract, and optionally process for adding genes to the respective

orgDbPkg

Character string, named as the org.XX.eg.db package which should be available in Bioconductor

addGeneToTerms

Logical, whether to add a column with all genes annotated to each GO term

Details

Note: the feature length retrieval is based on the goseq function, and requires that the corresponding TxDb packages are installed and available

Value

A table containing the computed GO Terms and related enrichment scores

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
library(airway)
data(airway)
airway
dds_airway <- DESeq2::DESeqDataSetFromMatrix(assay(airway),
                                             colData = colData(airway),
                                             design=~cell+dex)
dds_airway <- DESeq2::DESeq(dds_airway)
res_airway <- DESeq2::results(dds_airway)

res_subset <- deseqresult2DEgenes(res_airway)[1:100,]
myde <- res_subset$id
myassayed <- rownames(res_airway)

## Not run: 
mygo <- goseqTable(myde,
                   myassayed,
                   testCats = "GO:BP",
                   addGeneToTerms = FALSE)
head(mygo)

## End(Not run)

ideal documentation built on Nov. 8, 2020, 5:02 p.m.