以下のコードでsaveを行っているのですが、データがどこにsaveされているのか、教えて頂けますでしょうか?
expMatrix <- read.table("iPS_HEP_diff_F5.TPM_2.txt", header=TRUE, row.name=NULL, sep="\t", stringsAsFactors=FALSE)
expMatrix <- expMatrix[,c(1,2,3,4,14,15,16,5,6,7,8,9,10,11,12,13)]
promoterID <- expMatrix[,"prmtrID"]
gene_name <- sapply(strsplit(promoterID, "@"), function(x){x[2]})
unique.gene_name <- unique(gene_name)
gene_expMatrix <- NULL
counter <- 0
for(i in unique.gene_name){
- gene_expMatrix <- rbind(gene_expMatrix, apply(expMatrix[which(gene_name == i),-1],2,sum))
- counter <- counter + 1
- progress <- floor((counter/length(unique.gene_name))*100)
- cat(paste0(" ##### progress:",progress, "% #####\r"))
- }
setwd("/Users/shojima/Desktop/R_Practice/data")
expMatrix <- read.table("iPS_HEP_diff_F5.TPM_2.txt", header=TRUE, row.name=NULL, sep="\t", stringsAsFactors=FALSE)
expMatrix <- expMatrix[,c(1,2,3,4,14,15,16,5,6,7,8,9,10,11,12,13)]
promoterID <- expMatrix[,"prmtrID"]
gene_name <- sapply(strsplit(promoterID, "@"), function(x){x[2]})
unique.gene_name <- unique(gene_name)
gene_expMatrix <- NULL
counter <- 0
for(i in unique.gene_name){
- gene_expMatrix <- rbind(gene_expMatrix, apply(expMatrix[which(gene_name == i),-1],2,sum))
- counter <- counter + 1
- progress <- floor((counter/length(unique.gene_name))*100)
- cat(paste0(" ##### progress:",progress, "% #####\r"))
- }
rownames(gene_expMatrix) <- unique.gene_name
save(gene_expMatrix, file="gene_expMatrix.RData")
rep_group <- c(rep(1,3), rep(2,3), rep(3,3), rep(4,3), rep(5,3))
mean.gene_expMatrix <- cbind(apply(gene_expMatrix[,which(rep_group==1)], 1, mean),
+ apply(gene_expMatrix[,which(rep_group==2)], 1, mean),
+ apply(gene_expMatrix[,which(rep_group==3)], 1, mean),
+ apply(gene_expMatrix[,which(rep_group==4)], 1, mean),
+ apply(gene_expMatrix[,which(rep_group==5)], 1, mean)
+ )
colnames(mean.gene_expMatrix) <- c("iPS_HEP_D00","iPS_HEP_D07","iPS_HEP_D14","iPS_HEP_D21","iPS_HEP_D28")
sd.gene_expMatrix <- cbind(apply(gene_expMatrix[,which(rep_group==1)], 1, sd),
+ apply(gene_expMatrix[,which(rep_group==2)], 1, sd), + apply(gene_expMatrix[,which(rep_group==3)], 1, sd), + apply(gene_expMatrix[,which(rep_group==4)], 1, sd), + apply(gene_expMatrix[,which(rep_group==5)], 1, sd) + )
colnames(sd.gene_expMatrix) <- c("iPS_HEP_D00","iPS_HEP_D07","iPS_HEP_D14","iPS_HEP_D21","iPS_HEP_D28")
ls()
[1] "a" "A" "a[1]" "a1"
[5] "A1" "a2" "aa" "away_draws"
[9] "away_losses" "away_wins" "b" "B"
[13] "c" "C" "ch" "colors"
[17] "Controlcolnum" "counter" "cutoff" "D"
[21] "dat" "dec" "expMatrix" "F"
[25] "gene_expMatrix" "gene_name" "Global.res" "height"
[29] "home_draws" "home_losses" "home_wins" "i"
[33] "incomes1" "incomes2" "infile" "int"
[37] "l" "m" "max_index" "mean.gene_expMatrix"
[41] "MethylDemethyl" "mx" "my_function" "myf"
[45] "nam" "outname" "p.cutoff" "peter"
[49] "position2bed3" "progress" "promoterID" "q"
[53] "r.1" "r.2" "r.3" "r.4"
[57] "r.5" "r.6" "rep_group" "results"
[61] "sampling" "sd.gene_expMatrix" "seq_range" "spec_result"
[65] "t1" "t2" "team" "TreatmentColnum"
[69] "ts_data" "t統計量" "t分子" "t分布"
[73] "t分母" "unique.gene_name" "v" "v1"
[77] "v2" "varp" "version" "weight"
[81] "x" "X" "クラスA" "クラスB"
[85] "データ数" "テストa" "テストa平均" "プール標準偏差"
[89] "ホークス" "温度" "科目" "科目平均"
[93] "科目平均行列" "群間" "群間平方和" "群内自由度"
[97] "群平均" "群平均行列" "郡間自由度" "郡間平均平方"
[101] "郡内" "郡内自由度" "郡内平均平方" "郡内平方和"
[105] "好意度" "指導法" "指導法2" "心理学z得点"
[109] "心理学テスト" "心理学標準偏差" "心理学平均" "身長"
[113] "人" "人平均" "全データ" "全体"
[117] "全体自由度" "全体平方和" "全平均" "全平均行列"
[121] "統計1女" "統計1男" "統計テスト1" "統計テスト2"
[125] "不偏分散" "分散" "分子t" "分母t"
[129] "平均からの偏差" "平均からの偏差の二乗" "平均からの偏差の二乗和" "変化量"
[133] "味"
save(list=ls(), file="gene_expMatrix.RData")
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。