2020-01-03小白新手 DESeq2包的使用(counts
2020-01-03 本文已影响0人
海阔天空周
seg=colnames(unisample_merge)
group_name=substr(seg,14,15)
group=ifelse(as.numeric(group_name)<10,1,0)#将TCGA数据样本名根据01,11,更换成norma,cancer
#第一步 建立分组信息
group=factor(group,levels = c(0,1),labels = c("normal","cancer"))
table(group)
cdata=data.frame(group)
rownames(cdata)=colnames(unisample_merge)
save(unisample_merge,file = "unisample_merge.Rdata")
save(cdata,file = "cdata.Rdata")
save(group,file = "group.Rdata")
library(DESeq2)
??`DESeq2-package`
dse=DESeqDataSetFromMatrix(unisample_merge,colData = cdata,design = ~group)
res=DESeq(dse)
difresult=results(res)