Mercurial > repos > proteore > proteore_data_manager
comparison data_manager/resource_building.py @ 64:570519e1d968 draft
"planemo upload commit 503b62802cab9c4a1e7d71643378b117842146eb-dirty"
| author | proteore |
|---|---|
| date | Thu, 30 Jul 2020 13:06:57 +0000 |
| parents | 54089754ba12 |
| children | 64b2d53be08b |
comparison
equal
deleted
inserted
replaced
| 63:54089754ba12 | 64:570519e1d968 |
|---|---|
| 563 for id in ids : | 563 for id in ids : |
| 564 query="https://api.nextprot.org/entry/"+id+".json" | 564 query="https://api.nextprot.org/entry/"+id+".json" |
| 565 try: | 565 try: |
| 566 resp = requests.get(url=query) | 566 resp = requests.get(url=query) |
| 567 except : | 567 except : |
| 568 print ("waiting 10 minutes before trying again") | 568 print ("waiting 15 minutes before trying again") |
| 569 time.sleep(600) | 569 time.sleep(900) |
| 570 resp = requests.get(url=query) | 570 resp = requests.get(url=query) |
| 571 data = resp.json() | 571 data = resp.json() |
| 572 | 572 |
| 573 #get info from json dictionary | 573 #get info from json dictionary |
| 574 mass_mol = data["entry"]["isoforms"][0]["massAsString"] | 574 mass_mol = data["entry"]["isoforms"][0]["massAsString"] |
