直到最近,我一直在使用 R 函数jsonlite::write_json
将 tsv 转换为 json。但是,刚刚得到一个 8.5 GB 的 tsv 文件,而 R 内存不足。R或python(或任何其他工具)中是否有任何替代方法可以将巨大的制表符分隔文件转换为JSON?以下是输入文件前几行的示例:
Gene_symbol Gene_Ensembl_ID Dataset Disease x_labels mean median sd MONDO RMTL EFO
Gene1 ID1 all_cohorts Cancer_type1 Cancer_type1 (N = 301) 2639.93 1953.18 2434.02 MONDO_0016685 EFO_0005543
Gene1 ID1 all_cohorts Cancer_type1 Adipose - Subcutaneous (N = 663) 36446.03 34960 10720.11 MONDO_0016685 EFO_0005543
Gene1 ID1 all_cohorts Cancer_type1 Adipose - Visceral (Omentum) (N = 541) 34988.3 33470 14004.92 MONDO_0016685 EFO_0005543
Gene1 ID1 all_cohorts Cancer_type1 Adrenal Gland (N = 258) 55132.85 53115 17482.77 MONDO_0016685 EFO_0005543
Gene1 ID1 all_cohorts Cancer_type1 Artery - Aorta (N = 432) 16500.19 16010 5243.06 MONDO_0016685 EFO_0005543
Gene1 ID1 all_cohorts Cancer_type1 Artery - Coronary (N = 240) 23875.06 22170 9880 MONDO_0016685 EFO_0005543
Gene1 ID1 all_cohorts Cancer_type1 Artery - Tibial (N = 663) 21968.8 21020 6092.39 MONDO_0016685 EFO_0005543
Gene1 ID1 all_cohorts Cancer_type1 Bladder (N = 21) 30940.9 29410 10959.92 MONDO_0016685 EFO_0005543
Gene1 ID1 all_cohorts Cancer_type1 Blood (N = 755) 4814.81 4196 2924.48 MONDO_0016685 EFO_0005543