d2<-gsub("[^[:alnum:]///' ]", "-", colnames(tcga_expr))##将列名中所有的任意字符变成“-”
d3<-rbind(d2,tcga_expr)
colnames(d3)=d3[1,]
d3<-d3[-1,]
View(d3[1:10,])
write.table(d3,file =".d3.txt",sep="\t",quote = F)
d3 <- read.table('.d3.txt', head=T, as.is=TRUE, quote="", comment.char="#", sep="\t",colClasses=c("character",rep("numeric",423)))##指定列的类型
##比如基因原始表达值小于10,超过25%样本就把它剔除掉;Exp_miRNA0为此操作进行完后的表达谱
Exp_miRNA0=Exp_miRNA[which(apply(Exp_miRNA,1,function(x){return(sum(x>10))})>ncol(Exp_miRNA)*0.25),]
##row.names= 1,第一列变行名
##check.names=FALSE,读入后杠不会变成点
Exp_miRNA <- read.table("./Merge_miRNA_pre_RPM.txt",header = T,row.names= 1,stringsAsFactors = F,sep = "\t",check.names=FALSE)