view test-data/test.py @ 2:2e993ff8e7dc draft default tip

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sarscov2formatter commit dc4d978a42ef881f602b813f9416fd37e3ea3b6a"
author iuc
date Mon, 22 Nov 2021 10:41:59 +0000
parents e3a7995dce75
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']))