Mercurial > repos > iuc > sarscov2formatter
diff test-data/test.py @ 1:e3a7995dce75 draft
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sarscov2formatter commit 1bd215457a39296c069caa6be30939f4f1bdadeb"
author | iuc |
---|---|
date | Fri, 20 Nov 2020 18:21:33 +0000 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/test.py Fri Nov 20 18:21:33 2020 +0000 @@ -0,0 +1,10 @@ +import json + +with open("meta.json") as jh: + data = json.load(jh) + +print("ID\tcollection_date\tcountry\tstate\tlocality") +for k in data: + collection_date = data[k]['collected'] + location = data[k]['location'] + print("%s\t%s\t%s\t%s\t%s" % (k, collection_date, location['country'], location['state'], location['locality']))