summaryrefslogtreecommitdiff
path: root/Code/slice_TPM_to_JSON.R
diff options
context:
space:
mode:
Diffstat (limited to 'Code/slice_TPM_to_JSON.R')
-rw-r--r--Code/slice_TPM_to_JSON.R19
1 files changed, 0 insertions, 19 deletions
diff --git a/Code/slice_TPM_to_JSON.R b/Code/slice_TPM_to_JSON.R
deleted file mode 100644
index fb7a39d..0000000
--- a/Code/slice_TPM_to_JSON.R
+++ /dev/null
@@ -1,19 +0,0 @@
-
-library(rjson)
-dir.name <- '../Data/history/expr/json'
-tpm.file <- '../Data/history/expr/TPM.txt'
-take.log <- 'YES'
-X <- read.table(tpm.file, header=T, check.names=FALSE, sep="\t")
-gene.id <- as.vector(X[,1])
-X[,1] <- NULL # remove first column
-if (take.log == 'YES') {
- X <- log(X+1)
-}
-if (!dir.exists(dir.name)) {
- dir.create(dir.name)
-}
-for (i in 1:dim(X)[1]) {
- y <- toJSON(X[i,])
- file.name = paste(dir.name, paste(gene.id[i], 'json', sep='.'), sep='/')
- cat(y, file=file.name)
-}