diff options
author | Lan Hui <lanhui@zjnu.edu.cn> | 2025-05-15 10:14:34 +0800 |
---|---|---|
committer | Lan Hui <lanhui@zjnu.edu.cn> | 2025-05-15 10:14:34 +0800 |
commit | 22378c84da1283c10d1dd144002392b713d06028 (patch) | |
tree | e6e50c3082e18342128be4ec69c661aaf4645e26 /Code/slice_TPM_to_JSON.py | |
parent | 4d3c37c1c56aa645cb9602d83af6817e237b284c (diff) |
Show NA as string 'NA', do not silently omit it
Diffstat (limited to 'Code/slice_TPM_to_JSON.py')
-rw-r--r-- | Code/slice_TPM_to_JSON.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Code/slice_TPM_to_JSON.py b/Code/slice_TPM_to_JSON.py index 9c9aa87..c5880be 100644 --- a/Code/slice_TPM_to_JSON.py +++ b/Code/slice_TPM_to_JSON.py @@ -141,7 +141,7 @@ def make_json_file_using_r(dir_name, glb_param_dict): # use r script to make it dir.create(dir.name) } for (i in 1:dim(X)[1]) { - y <- toJSON(unbox(X[i,]), digits=I(3), pretty=TRUE) + y <- toJSON(unbox(X[i,]), digits=I(3), pretty=TRUE, na='string') file.name = paste(dir.name, paste(gene.id[i], 'json', sep='.'), sep='/') cat(y, file=file.name) } |