rld_mat<-assay(rld)rld_cor<-cor(rld_mat)# Plot heatmappheatmap(rld_cor,annotation=cluster_metadata[,c("group_id"),drop=F]) 现在,我们确定是否有任何需要删除的异常值,或者我们可能想要在设计公式中回归的额外的变异源。由于我们没有通过PCA或层次聚类检测到异常值,也没有任何额外的变异源需要回归,所以...
DESeq2有一个用于绘制PCA图的内置函数,它在底层使用ggplot2。这是非常棒的,因为它节省了我们输入代码行和摆弄不同ggplot2层的时间。此外,它直接将rlog对象作为输入,从而省去了从其中提取相关信息的麻烦。 代码语言:javascript 代码运行次数:0 运行 AI代码解释 ### PlotPCAplotPCA(rld,intgroup="sampletype") pl...
"B","C"))# 创建DESeqDataSet对象dds<-DESeqDataSetFromMatrix(countData=countData,colData=colData,design=~condition)# 标准化数据dds<-DESeq(dds)# 进行PCA分析vsd<-vst(dds,blind=FALSE)pcaData<-plotPCA(vsd,intgroup=
DESeq2有一个用于绘制PCA图的内置函数,它在底层使用ggplot2。这是非常棒的,因为它节省了我们输入代码行和摆弄不同ggplot2层的时间。此外,它直接将rlog对象作为输入,从而省去了从其中提取相关信息的麻烦。 ###PlotPCA plotPCA(rld,intgroup="sampletype") plotPCA()函数需要两个参数作为输入rlog对象和intgroup(...
DESeq2差异表达分析(二)
但是plotPCA函数不接受matrix格式输入,应用范围有点受限。 步骤汇总 library(DESeq2) # 分析前过滤 minRow <- rowMeans(exp_Count) > 1 #按平均数筛选 minNum <- rowSums(exp_Count > 0) > (0.8*ncol(exp_Count)) #按表达量不为0的样品个数筛选 exprSet <- exp_Count[minRow & minNum,] dim(exp...
>library(DESeq2)>raw_count_filt<-read.table("HTseq.QC.sort.by.n.count",header = T,row.names = 1)plotPCA(rld, intgroup=c('condition')) #DEseq2自带函数 dev.copy(png,'Deseq2_pca.png')dev.off()通过上图,可以看见组层次样本相似信息,无法精确到具体是哪一个样本?如果...
plotPCA(rld,intgroup=c("condition","type")) dev.off() 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. raw count 的结果如下 归一化之后count结果如下 VST转换之后的结果如下 rlog转换之后的结果如下 可以很明显看出,原始的count和归一化之后的count, 其PCA图是杂乱无序的,没什么明显规律...
plotPCA(rld,intgroup=c("id","sizeFactor")) 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. 35. 36. 37. 38. ...
4) heatmap (sample-to-sample 的距离矩阵的热图) 此时,可以对样本进行聚类,看样本的聚类效果和实验设计时的分组是否一致; 5)PCA 图(样本的PCA 图) 6) boxplot (观察离群值点)