在构建好 DEGContainer 对象之后,就可以开始走分析流程了。
一键检查
用到的函数是 runCheck
runCheck(data_i, dir = "out_check")
因为这一步需要输出一些pdf文件,所以给一个合适的路径是非常重要的,也就是 dir
参数。
看一下 runCheck 的帮助文档,可以发现还有两个参数。并且已经设定了默认值,一般不用更改。
?runCheck
prefix
参数主要用来为输出的文件指定一个合适的文件前缀,在RNAseqStat2 的每一步都可以自定义一个前缀,一般默认的就够用了。
palette 参数主要用来指定图中的分组颜色,也提供了默认值,或者可以换成自己喜欢的颜色。
分步检查
由于这一步的计算量较少,一般都可以很快跑完全部。所以并没有相关的参数控制检查过程中的每个步骤。
但是每一步都可以独立运行。
先准备一下需要的数据
## 从 DEGContainer 对象中提取过滤后的表达矩阵
exprSet= matrixFiltered(data_i)
## 从 DEGContainer 对象中提取分组信息
group_list = groupInfo(data_i)
## 将 count 转为 log2CPM
dat = log2(cpm(exprSet)+1)
## 设置输出文件的路径
dir = "out_check"
prefix = "1-run_check"
palette = RColorBrewer::brewer.pal(3, "Set2")[1:2]
PCA
pca_check(dat,group_list,dir = dir)
热图
corall_check(dat,group_list,dir = dir)
cor500_check(dat,group_list,dir = dir)
top1000_check(dat,group_list,dir = dir)
HKG_check(dat,group_list,dir = dir)
分布图
box_check(dat,group_list,dir = dir,prefix = prefix,palette = palette,y = "expression value")
density_check(dat,group_list,dir = dir,prefix = prefix,palette = palette,y = "log2(cpm(count)+1)")