aboutsummaryrefslogtreecommitdiff
path: root/workflows/tools
diff options
context:
space:
mode:
Diffstat (limited to 'workflows/tools')
-rwxr-xr-xworkflows/tools/pubseq-fetch-data.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/workflows/tools/pubseq-fetch-data.py b/workflows/tools/pubseq-fetch-data.py
index c22d754..3f5e6cf 100755
--- a/workflows/tools/pubseq-fetch-data.py
+++ b/workflows/tools/pubseq-fetch-data.py
@@ -28,14 +28,13 @@ if (len(ids)==0):
with open(args.ids) as f:
ids = [ l.strip() for l in f.readlines() ]
-for id in ids[0:2]:
+for id in ids:
print(id)
r = requests.get(f"http://covid19.genenetwork.org/api/sample/{id}.json")
if r:
m_url = r.json()[0]['metadata']
mr = requests.get(m_url)
- meta = mr.json()
with open(dir+"/"+id+".json","w") as outf:
- json.dump(meta, outf, indent=4)
+ outf.write(mr.text)
else:
raise Exception(f"Can not find record for {id}")