你的group 样品分组变量建立有问题,建议你自己整理一个分组文件,第一列为样本ID,第二列为分组名称,然后用read.table读入:
####################手动制作分组group变量###############################################3 #从文件读取分组信息, #group.txt文件格式: # Id group # TCGA-VQ-A91N-01A-11R-A414-31 Tumor # TCGA-BR-8367-01A-11R-2343-13 Tumor # TCGA-VQ-A91Q-01A-12R-A414-31 Tumor # TCGA-VQ-AA6F-01A-31R-A414-31 Tumor # TCGA-BR-8361-01A-11R-2343-13 Tumor # TCGA-BR-6801-01A-11R-1884-13 Tumor # TCGA-BR-8289-01A-11R-2343-13 Tumor # write.table(as.data.frame(group),file = "group.txt",quote = F,sep="\t") # group.data=read.table(file = "group.txt",sep="\t",header = T) # # group<-factor(group.data$group,levels =c("Normal","Tumor") ) # names(group)<-group.data$Id ##################################################################