summaryrefslogtreecommitdiff
path: root/Code
diff options
context:
space:
mode:
authorLan Hui <lanhui@zjnu.edu.cn>2025-05-15 10:14:34 +0800
committerLan Hui <lanhui@zjnu.edu.cn>2025-05-15 10:14:34 +0800
commit22378c84da1283c10d1dd144002392b713d06028 (patch)
treee6e50c3082e18342128be4ec69c661aaf4645e26 /Code
parent4d3c37c1c56aa645cb9602d83af6817e237b284c (diff)
Show NA as string 'NA', do not silently omit it
Diffstat (limited to 'Code')
-rw-r--r--Code/slice_TPM_to_JSON.py2
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)
}