From 21cd84cffec4c5d8c012f14345c544e552e58363 Mon Sep 17 00:00:00 2001 From: Cameron Ekblad Date: Tue, 27 Jun 2017 11:20:28 +1200 Subject: [PATCH] Updated resource URL --- codes3d/codes3d.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/codes3d/codes3d.py b/codes3d/codes3d.py index 3d98eb0..014c4d7 100755 --- a/codes3d/codes3d.py +++ b/codes3d/codes3d.py @@ -308,12 +308,12 @@ def send_GTEx_query(num,num_reqLists,reqList,gtexResponses): try: while True: print "\t\tSending request %s of %s" % (num,num_reqLists) - res = requests.post("http://gtexportal.org/api/v6p/dyneqtl?v=clversion", json=reqList) + res = requests.post("http://gtexportal.org/rest/v1/association/dyneqtl?v=clversion", json=reqList) if res.status_code == 200: gtexResponses.append((reqList,res)) time.sleep(30) return - elif res.status_code == 500: + elif res.status_code == 500 or res.status_code == 400: print "\t\tThere was an error processing request %s. Writing to failed request log and continuing." % num gtexResponses.append((reqList,"Processing error")) time.sleep(30)