mortazavilab / PyWGCNA

PyWGCNA is a Python package designed to do Weighted Gene Correlation Network analysis (WGCNA)
https://academic.oup.com/bioinformatics/advance-article/doi/10.1093/bioinformatics/btad415/7218311
MIT License
194 stars 47 forks source link

server error in getting gene list #50

Closed kunalkathuria closed 1 year ago

kunalkathuria commented 1 year ago

Hello!

I encountered the following error when running

geneList = PyWGCNA.getGeneList(dataset='mmusculus_gene_ensembl', attributes=['ensembl_gene_id', 'external_gene_name', 'gene_biotype'])

Traceback (most recent call last): File "/users/kkathuri/nscripts/python/runWGCNA.v2.py", line 55, in 'gene_biotype']) File "/users/kkathuri/.local/lib/python3.7/site-packages/PyWGCNA/utils.py", line 97, in getGeneList server = biomart.BiomartServer('http://uswest.ensembl.org/biomart') File "/users/kkathuri/.local/lib/python3.7/site-packages/biomart/server.py", line 27, in init self.assert_alive() File "/users/kkathuri/.local/lib/python3.7/site-packages/biomart/server.py", line 48, in assert_alive self.get_request() File "/users/kkathuri/.local/lib/python3.7/site-packages/biomart/server.py", line 104, in get_request r.raise_for_status() File "/jhpce/shared/jhpce/core/python/3.7.3/lib/python3.7/site-packages/requests/models.py", line 943, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 503 Server Error: Service Temporarily Unavailable for url: http://uswest.ensembl.org/biomart/martservice

Should I just keep trying or is there a different work-around?

Thank you!

Best,

Kunal

nargesr commented 1 year ago

Hi,

I don't think so you have the latest version of the PyWGCNA. it should be fixed in the new version.

Also, keep in mind that this function tries to get the table that map gene ensembl id to gene name using biomart website which might be down sometimes. In the new version of package, you can define which domain you want to use. please look at the API documentation for more info.

kunalkathuria commented 1 year ago

Oh okay. I cloned the repository perhaps a week or so ago and did a pip install on the directory. Has there been an update subsequently?

nargesr commented 1 year ago

which version do you have? the latest one is 1.2.4.

The main reason I believe you don't have the latest version is that the default server domain is this but the one shown in your error is this which is not available right now as well.

kunalkathuria commented 1 year ago

Thank you. I am using 1.2.4 now on Python3.8 and will reopen this if necessary. Appreciate the quick responses.