From 823db708ed6b37a44a970d5f5a3e9c765aa83c16 Mon Sep 17 00:00:00 2001 From: Hui Lan Date: Wed, 10 Feb 2021 14:26:09 +0800 Subject: download_and_map.py: adpat this script to use the latest rnaseq_info_database.json file. --- Code/test.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 Code/test.py (limited to 'Code/test.py') diff --git a/Code/test.py b/Code/test.py new file mode 100644 index 0000000..0ddae43 --- /dev/null +++ b/Code/test.py @@ -0,0 +1,16 @@ +import json + +def read_ena_data_info_json(fname): + d = {} + with open(fname) as json_data: + json_dict = json.load(json_data) + for run_id in json_dict: + if d[run_id]['library_strategy'].lower() == 'rna-seq' and d[run_id]['library_source'].lower() == 'transcriptomic': + d[run_id] = 1 + return d + + +d = read_ena_data_info_json('../Data/information/rnaseq_info_database.json.temp') +for k in d: + print('%s\t%s' % (d[k]['library_strategy'], d[k]['library_source'])) + -- cgit v1.2.1