summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLan Hui <lanhui@zjnu.edu.cn>2024-08-28 14:23:42 +0800
committerLan Hui <lanhui@zjnu.edu.cn>2024-08-28 14:23:42 +0800
commit837a291e6a1816920c7116410dd1e0df9fd3eaf7 (patch)
tree43c7e7288f240b71fd88e3981b1844c801daa451
parentfa719fee177152cc9f5d4632c6aa68b91336f8df (diff)
Pretty print JSON
-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 b2edfa2..7509f00 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))
+ y <- toJSON(unbox(X[i,]), digits=I(3), pretty=TRUE)
file.name = paste(dir.name, paste(gene.id[i], 'json', sep='.'), sep='/')
cat(y, file=file.name)
}