FilterGOTerms.Rd
Subset gene sets based on GO/Reactome IDs.
GO/Reactome IDs, either as a character vector or matrix (with IDs in rownames). If NULL, the function will filter from the entire database.
Species, either 'human' or 'mouse'. Default: getOption("spe").
Minimum number of genes in the gene set. Default: 1.
Maximum number of genes in the gene set. Default: Inf.
Boolean indicating whether only return the end-level pathways or gene sets. Default: FALSE.
Boolean indicating whether to change the gene set names. Default: FALSE.
ID or name of the parent (top-level) gene set in the GO/Reactome database. Default: NULL.
Returns a character vector or matrix, depending on the input.
library(SeuratExtend)
options(max.print = 10, spe = "human")
# Filter GO terms. For instance, select pathways under the category GO:0002376 (immune system process).
terms <- FilterGOTerms(parent = "GO:0002376")
RenameGO(terms)
# If you want to further restrict the number of genes in a pathway to be between 10 and 1000,
# you can adjust the n.min and n.max parameters.
terms2 <- FilterGOTerms(term = terms, n.min = 10, n.max = 1000)
RenameGO(terms2)
# To only return the end-level pathways, set the only.end.terms parameter to TRUE.
terms3 <- FilterGOTerms(term = terms, only.end.terms = TRUE)
RenameGO(terms3)
# Filter Reactome terms. For example, select pathways under the category R-HSA-168256 (Immune System).
terms <- FilterReactomeTerms(parent = "R-HSA-168256")
RenameReactome(terms)