Mercurial > repos > iuc > sarscov2formatter
annotate 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 |
rev | line source |
---|---|
1
e3a7995dce75
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sarscov2formatter commit 1bd215457a39296c069caa6be30939f4f1bdadeb"
iuc
parents:
diff
changeset
|
1 import json |
e3a7995dce75
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sarscov2formatter commit 1bd215457a39296c069caa6be30939f4f1bdadeb"
iuc
parents:
diff
changeset
|
2 |
e3a7995dce75
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sarscov2formatter commit 1bd215457a39296c069caa6be30939f4f1bdadeb"
iuc
parents:
diff
changeset
|
3 with open("meta.json") as jh: |
e3a7995dce75
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sarscov2formatter commit 1bd215457a39296c069caa6be30939f4f1bdadeb"
iuc
parents:
diff
changeset
|
4 data = json.load(jh) |
e3a7995dce75
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sarscov2formatter commit 1bd215457a39296c069caa6be30939f4f1bdadeb"
iuc
parents:
diff
changeset
|
5 |
e3a7995dce75
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sarscov2formatter commit 1bd215457a39296c069caa6be30939f4f1bdadeb"
iuc
parents:
diff
changeset
|
6 print("ID\tcollection_date\tcountry\tstate\tlocality") |
e3a7995dce75
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sarscov2formatter commit 1bd215457a39296c069caa6be30939f4f1bdadeb"
iuc
parents:
diff
changeset
|
7 for k in data: |
e3a7995dce75
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sarscov2formatter commit 1bd215457a39296c069caa6be30939f4f1bdadeb"
iuc
parents:
diff
changeset
|
8 collection_date = data[k]['collected'] |
e3a7995dce75
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sarscov2formatter commit 1bd215457a39296c069caa6be30939f4f1bdadeb"
iuc
parents:
diff
changeset
|
9 location = data[k]['location'] |
e3a7995dce75
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sarscov2formatter commit 1bd215457a39296c069caa6be30939f4f1bdadeb"
iuc
parents:
diff
changeset
|
10 print("%s\t%s\t%s\t%s\t%s" % (k, collection_date, location['country'], location['state'], location['locality'])) |