Ensembl / postgap

Linking GWAS studies to genes through cis-regulatory datasets
Apache License 2.0
39 stars 21 forks source link

CRITICAL - Failed to get proper response to query #165

Open marynias opened 4 years ago

marynias commented 4 years ago

POSTGAP never finishes my run, citing problems with VEP timing out for connection. It seems to be having problems with this SNP (not in the input dataset):
CRITICAL - Failed to get proper response to query: 10/21/2020 03:09:59 PM - root - CRITICAL - Failed to get proper response to query http://rest.ensembl.org/eqtl/variant_name/homo_sapiens/rs1473281?content-type=application/json;statistic=p-value

Here is the traceback I get when cancelling the POSTGAP prematurely, perhaps it provides some clues about what is going wrong? The test job is running fine and my input is formatted according to the requirements.

Traceback (most recent call last): File "POSTGAP.py", line 690, in <module> main() File "POSTGAP.py", line 127, in main res = postgap.Integration.diseases_to_genes(options.diseases, expanded_efo_iris, options.population, options.tissues) File "/home/user/postgap/lib/postgap/Integration.py", line 68, in diseases_to_genes return gwas_snps_to_genes(diseases_to_gwas_snps(diseases, efos), population, tissues) File "/home/user/postgap/lib/postgap/Integration.py", line 163, in gwas_snps_to_genes res = concatenate(cluster_to_genes(cluster, tissue_weights, population) for cluster in clusters) File "/home/user/postgap/lib/postgap/Utils.py", line 120, in concatenate return sum(filter(lambda elem: elem is not None, list), []) File "/home/user/postgap/lib/postgap/Integration.py", line 163, in <genexpr> res = concatenate(cluster_to_genes(cluster, tissue_weights, population) for cluster in clusters) File "/home/user/postgap/lib/postgap/Integration.py", line 457, in cluster_to_genes associations = ld_snps_to_genes([snp for snp in cluster.ld_snps if snp in ld], tissues) File "/home/user/postgap/lib/postgap/Integration.py", line 579, in ld_snps_to_genes cisreg = cisregulatory_evidence(ld_snps, tissues) # Hash of hashes SNP => Gene => Cisregulatory_Evidence File "/home/user/postgap/lib/postgap/Integration.py", line 665, in cisregulatory_evidence evidence = concatenate(source().run(ld_snps, tissues) for source in postgap.Cisreg.sources) File "/home/user/postgap/lib/postgap/Utils.py", line 120, in concatenate return sum(filter(lambda elem: elem is not None, list), []) File "/home/user/postgap/lib/postgap/Integration.py", line 665, in <genexpr> evidence = concatenate(source().run(ld_snps, tissues) for source in postgap.Cisreg.sources) File "/home/user/postgap/lib/postgap/Cisreg.py", line 386, in run list = concatenate(self.get(chunk) for chunk in chunks(snps, 1)) File "/home/user/postgap/lib/postgap/Utils.py", line 120, in concatenate return sum(filter(lambda elem: elem is not None, list), []) File "/home/user/postgap/lib/postgap/Cisreg.py", line 386, in <genexpr> list = concatenate(self.get(chunk) for chunk in chunks(snps, 1)) File "/home/user/postgap/lib/postgap/Cisreg.py", line 499, in get return postgap.REST.get(server, ext, data = {"ids" : [snp.rsID for snp in chunk]}) File "/home/user/postgap/lib/postgap/REST.py", line 227, in get time.sleep(60) # Sleep 1 minute while server cools down

dzerbino commented 4 years ago

Dear @marynias ,

Thank you for this report. Could you please send me the entire log?

Thank you,

Daniel

dzerbino commented 4 years ago

PS This could obviously be due to some problem with the Ensembl servers. Have you tried re-running the script?

marynias commented 4 years ago

Hi Daniel, the test example provided works fine so for at least some queries contacting the Ensembl server works fine. I am using your VM to run the jobs, if that helps. I attach the log and my input file. postgap.log paternoster2015_open_targets_select.txt

dzerbino commented 4 years ago

Dear @marynias ,

This looks like a transient error on the Ensembl servers, have you tried rerunning the script?

Cheers,

Daniel

marynias commented 3 years ago

Hi Daniel, sorry for no reply for a while but I was busy with something else. I can now confirm that I get the same critical error after 3 independent runs (and the test dataset works fine). Could you please try to reproduce my error stack? BW, Maria

dzerbino commented 3 years ago

Hello @marynias,

Apologies for the slow response. I have now successfully run POSTGAP on your file, and alas could not reproduce your bug. It could well be that the Ensembl server were in a better mood today (weekends are generally less busy).

I used the following command line: python POSTGAP.py --database_dir databases_dir --summary_stats paternoster2015_open_targets_select.txt --disease autism --output test_autism.tsv --work_dir TOTO --bayesian

Best regards,

Daniel