diff options
author | Hui Lan <lanhui@zjnu.edu.cn> | 2021-02-10 14:26:09 +0800 |
---|---|---|
committer | Hui Lan <lanhui@zjnu.edu.cn> | 2021-02-10 14:26:09 +0800 |
commit | 823db708ed6b37a44a970d5f5a3e9c765aa83c16 (patch) | |
tree | 881be312feeb2b8521524ab8bee7e2dae7668fc5 /Code/test.py | |
parent | 7ef975cba6caf33dab08f3b57b2bb7f744739887 (diff) |
download_and_map.py: adpat this script to use the latest rnaseq_info_database.json file.
Diffstat (limited to 'Code/test.py')
-rw-r--r-- | Code/test.py | 16 |
1 files changed, 16 insertions, 0 deletions
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'])) + |