Enrichr server is too unstable, error sending gene list
Is that a way to work around this issue?
Exception Traceback (most recent call last) Cell In[25], line 24 22 sele_terms = ['KEGG_2021_Human','GO_Biological_Process_2025','MSigDB_Hallmark_2020','WikiPathways_2024_Mouse'] 23 # try: ---> 24 enr = gp.enrichr(gene_list=gene_list, # or "./tests/data/gene_list.txt", 25 gene_sets = sele_terms, 26 organism='Mouse', # don't forget to set organism to the one you desired! e.g. Yeast 27 outdir=None, # don't write to disk 28 # enrichr_url = 'https://maayanlab.cloud/Enrichr' 29 ) 30 sele_enr_res = enr.results[enr.results['Gene_set'].isin(sele_terms)] 31 # Remove GO numbers from 'Term' column
File ~/miniconda3/envs/c2l_cp/lib/python3.9/site-packages/gseapy/init.py:554, in enrichr(gene_list, gene_sets, organism, outdir, background, cutoff, format, figsize, top_term, no_plot, verbose) 552 # set organism 553 enr.set_organism() --> 554 enr.run() 556 return enr
File ~/miniconda3/envs/c2l_cp/lib/python3.9/site-packages/gseapy/enrichr.py:612, in Enrichr.run(self) 608 shortID, res = self.get_results_with_background( 609 genes_list, self._bg 610 ) 611 else: --> 612 shortID, res = self.get_results(genes_list) 614 # Remember gene set library used 615 res.insert(0, "Gene_set", name)
File ~/miniconda3/envs/c2l_cp/lib/python3.9/site-packages/gseapy/enrichr.py:302, in Enrichr.get_results(self, gene_list) 300 ADDLIST_URL = "%s/%s/addList" % (self.ENRICHR_URL, self._organism) 301 payload = {"list": (None, gene_list), "description": (None, self.descriptions)} --> 302 job_id = self.send_genes(payload, ADDLIST_URL) 303 user_list_id = job_id["userListId"] 305 RESULTS_URL = "%s/%s/export" % (self.ENRICHR_URL, self._organism)
File ~/miniconda3/envs/c2l_cp/lib/python3.9/site-packages/gseapy/enrichr.py:206, in Enrichr.send_genes(self, payload, url) 204 self._logger.debug(url) 205 self._logger.debug(payload) --> 206 raise Exception("Error sending gene list, try again later") 207 job_id = json.loads(response.text) 208 # response.text 209 # { 210 # "userListId": 667152768, 211 # "shortId": "27c3f180" 212 # }
Exception: Error sending gene list, try again later
I guess you have an offline version of performing enrichR, but there are no clear instructions. Could you help me to indicate where it is and how to do that? Do you have a notebook on that? That would also help others I think. Thank you!!!
I think the issue really needs to be properly fixed, out of 30 gene lists I sent, only 2 got returned.
Sorry for replying late. @ShaowenJCornell . see here for the doc
all you need to do is input a gmt file, which will use offline mode