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脚本快

Logo

DAMO开发者矩阵,由阿里巴巴达摩院和中国互联网协会联合发起,致力于探讨最前沿的技术趋势与应用成果,搭建高质量的交流与分享平台,推动技术创新与产业应用链接,围绕“人工智能与新型计算”构建开放共享的开发者生态。

更多推荐