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

I am using enrichr to perform some enrichment analyses. In their documentation they say that you can indicate the background list, or simply a number of genes for the background:

background (int) – BioMart dataset name for retrieving background gene information. This argument only works when gene_sets input is a gmt file or python dict. You could also specify a number by yourself, e.g. total expressed genes number. In this case, you will skip retrieving background infos from biomart.

source: https://gseapy.readthedocs.io/en/latest/run.html?highlight=background#gseapy.enrichr

  1. Is it possible to provide this background as human gene symbols? If so, how?
  2. May I provide the background myself? I want to have a smaller set of genes as background.
  3. I'm unable to provide the size for the background as well, and even though I have background=700, I still get ValueError: backgroud should be set or int object

thanks in advance

gene rna-seq microarray gsea

1 answer

1. Is it possible to provide this background as human gene symbols? If so, how?

Writing background=hsapiens_gene_ensembl allows to use gene symbols, not only ensembl ids.

2. May I provide the background myself? I want to have a smaller set of genes as background.

The latest commit (version 0.9.10) seems to allow for this, but I was unable to implement it myself. See commit

3. I'm unable to provide the size for the background as well, and even though I have background=700, I still get ValueError: backgroud should be set or int object.

The latest commit (version 0.9.10) solves this issue.

Log in to answer this question.