library(R.utils)
library(hash)
library(data.table)
library(jsonlite)
setwd("C:/Users/daizao/Desktop/practise/test")
dir.create("data_in_one")
for (i in list.files("raw_data/")){
b
pathname
file.copy(pathname,"data_in_one/")
}
dz
temp_tcgaid
temp_filename
h
cishu
for (i in 1:length(dz$file_name)){
if (cishu==0){
test
test
exp
rownames(exp)
tcgaid
for (j in keys(h)){
tcgaid_temp
tcgaid
}
ttt
ttt
colnames(exp)
cishu
}
if (cishu > 0){
test
test
new_h
for (j in rownames(exp)){
file_name_new
exp[j,h[[file_name_new]]]
}
}
}
normalSample
tumorSample
for ( i in colnames(exp)){
sample
if(grepl("^1",sample)){
normalSample
}else{
tumorSample
}
}
if ("normalSample" %in% ls()){
normal_name
tumor_name
if (length(normal_name) == 1){
temp_normal
colnames(temp_normal)
normal_data
}else{
normal_data
}
tumor_data
total_sort_sample
}else{
total_sort_sample
}
zanshi
for (i in colnames(total_sort_sample)[-1]){zanshi
colnames(total_sort_sample)
write.table(total_sort_sample,file="RNAmatrix.txt",sep="\t",row.names=F,quote=F)
因为是R语言自身的原因,速度没有perl脚本快