This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Enrichr : how to provide background ?

Hi All,

I am using Enrichr in "R" for my pathway analysis. On the Enrichr website, there is an option to set the list of background genes, but I couldn't find the documentation on how to define the list of backgrounds in R. Is it possible? I really appreciate your help.

Many thanks in advance!

below is the code that I used in R:

# reading the file
options(stringsAsFactors = FALSE)
genes <- read.csv("list_of_significant_genes.csv")
background <- read.csv("list_of_Background_genes.csv") #I don't know how to use my background list

genes_path <- genes$hgnc_symbol
background_genes <- background$hgnc_symbol

websiteLive <- getOption("enrichR.live")

if (websiteLive) {
  listEnrichrSites()
  setEnrichrSite("Enrichr") # Human genes   
}

#Then find the list of all available databases from Enrichr.

if (websiteLive) dbs <- listEnrichrDbs()

if (websiteLive) head(dbs)



dbs <- c("GO_Molecular_Function_2023", "GO_Cellular_Component_2023", "GO_Biological_Process_2023")


if (websiteLive) {
  enriched <- enrichr(genes_path, dbs)
}


#Now view the results table.

if (websiteLive) enriched[["GO_Biological_Process_2023"]]
 version  R version 4.4.0 (2024-04-24)
enrichr

0 answers

No answers yet.

Log in to answer this question.