view 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 source

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']))