Gregor-Mendel-Institute / GWA-Portal

Web-app to store an display GWAS studies
gwas.gmi.oeaw.ac.at
5 stars 5 forks source link

Fix LD backend #176

Closed timeu closed 8 years ago

timeu commented 8 years ago

LD triangle plots not working because of backenderror:

[2016-09-04 13:48:23 +0000] [64] [ERROR] Error handling request /ld/1/1/19004437
Traceback (most recent call last):
  File "/env/local/lib/python2.7/site-packages/gunicorn/workers/sync.py", line 135, in handle
    self.handle_request(listener, req, client, addr)
  File "/env/local/lib/python2.7/site-packages/gunicorn/workers/sync.py", line 176, in handle_request
    respiter = self.wsgi(environ, resp.start_response)
  File "/env/local/lib/python2.7/site-packages/falcon/api.py", line 189, in __call__
    responder(req, resp, **params)
  File "/env/local/lib/python2.7/site-packages/gwasrv.py", line 104, in on_post
    ld_data = ld.calculate_ld_for_region(genotypeData,accessions,chr,position,num_snps=num_snps)
  File "/env/local/lib/python2.7/site-packages/pygwas/core/ld.py", line 65, in calculate_ld_for_region
    chr_region = genotypeData.chr_regions[genotypeData.get_chr_region_ix(chromosome)]
  File "/env/local/lib/python2.7/site-packages/pygwas/core/genotype.py", line 91, in get_chr_region_ix
    return numpy.where(self.chrs == str(chr))[0][0]
IndexError: index 0 is out of bounds for axis 0 with size 
timeu commented 8 years ago

Fixed by https://github.com/timeu/gwaportal-gwas-server/commit/538ad4d2f61c2ac3b19b093a0f87ad9d0950b6a2