goseqTable | R Documentation |
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
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
)
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
|
id |
A string identifying the gene identifier used by genes, as in the
|
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 terms |
orgDbPkg |
Character string, named as the |
addGeneToTerms |
Logical, whether to add a column with all genes annotated to each GO term |
Note: the feature length retrieval is based on the goseq()
function,
and requires that the corresponding TxDb packages are installed and available
A table containing the computed GO Terms and related enrichment scores
library("airway")
data("airway", package = "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 <- mosdef::deresult_to_df(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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.