宝塔服务器面板,一键全能部署及管理,送你10850元礼包,点我领取

DESeq2:基于负二项式模型的高通量测序数据基因差异表达分析。

1. 读入基因表达谱数据 # if !requireNamespace”BiocManager”, quietly = TRUE))#   install.packages”BiocManager”)# # BiocManager::install”DESeq2″)# setwdwork_dir)# count_df <- read.csvfile,row.names = 1)count_df <- roundcount_df) # 如果有小数dimcount_df)count_df[1:3,1:4] 2.  生成DESeqDataSet 对象 libraryDESeq2)# 样本分类condition <- factorcrep”control”,50),rep”treat”,63))) # mockcolData <- data.framerow.names=colnamescount_df), condition)dds <-DESeqDataSetFromMatrixcountData = as.matrixcount_df),                             colData = colData,                             design= ~condition)headdds)

注:DESeqDataSet),DESeqDataSetFromMatrix),DESeqDataSetFromHTSeqCount)  都能生成DESeqDataSet 对象

3. 差异表达基因分析 dds <- DESeqdds)res <- resultsdds)summaryres)headres)resOdered <- res[orderres$padj),]deg <- as.data.frameresOdered)#deg <- na.omitdeg)dimdeg)write.csvdeg,file= “diff_deseq2.csv”)

DESeq函数包含三步,estimation of size factors(estimateSizeFactors), estimation of dispersion(estimateDispersons), Negative Binomial GLM fitting and Wald statistics(nbinomWaldTest) 返回DESeqResults 对象。