edgeRDESeq2分析RNAseq差异表达汇编.docxVIP

  • 123
  • 0
  • 约7.78千字
  • 约 14页
  • 2017-04-12 发布于湖北
  • 举报
edgeRDESeq2分析RNAseq差异表达汇编

edgeR 包的安装edgeR 包是基于?Bioconductor?平台发布的,所以安装不能直接用?install.packages()?命令从 CRAN 上来下载安装:# try http:// if https:// URLs are not supportedsource(/biocLite.R)biocLite(edgeR)数据导入由于 edgeR 对测序结果的下游分析是依赖 count 计数来进行基因差异表达分析的,在这里使用的是featureCounts?来进行统计 `.bam` 文件中 Map 的结果count 结果如下:library(edgeR)mydata-read.table(counts.txt,header=TRUE,quote=\t,skip=1)sampleNames-c(CA_1,CA_2,CA_3,CC_1,CC_2,CC_3)names(mydata)[7:12]-sampleNameshead(mydata)GeneidChrStartEndStrandLengthCA_1CA_2CA_3CC_1CC_2CC_31gene1314NW_139421.112571745+4890000002gene1315NW_139421.121153452ene1316NW_139421.138564680+8250000004gene1317NW_139421.148665435-5700000005gene1318NW_139421.160666836-7710000006gene1319NW_139421.172949483+2190000000在这里我们只是需要 Geneid 和后 6 列的样本的 count 信息来组成矩阵,所以要处理下countMatrix-as.matrix(mydata[7:12])rownames(countMatrix)-mydata$Geneidhead(countMatrix)CA_1CA_2CA_3CC_1CC_2CC_3gene1314000000gene1315000000gene1316000000gene1317000000gene1318000000gene1319000000*要导入的矩阵由3v3样本组成(三组生物学重复)创建 DEGlistgroup-factor(c(CA,CA,CA,CC,CC,CC))y-DGEList(counts=countMatrix,group=group)yAnobjectofclassDGEList$countsCA_1CA_2CA_3CC_1CC_2CC_3gene1314000000gene1315000000gene1316000000gene1317000000gene131800000014212morerows...$samplesgrouplib.sizenorm.factorsCA_1CA_117885371CA_2CA_218255461CA_3CA_319030171CC_1CC_118260421CC_2CC_221244681CC_3CC_320250631过滤过滤掉那些 count 结果都为0的数据,这些没有表达的基因对结果的分析没有用,过滤又两点好处:1 可以减少内存的压力 2 可以减少计算的压力keep-rowSums(cpm(y)1)=2y-y[keep,,keep.lib.sizes=FALSE]yAnobjectofclassDGEList$countsCA_1CA_2CA_3CC_1CC_2CC_3gene1321161138129218194220gene1322231133gene1323202733475146gene132460877986100132gene13253229215875563877morerows...$samplesgrouplib.sizenorm.factorsCA_1CA_117883621CA_2CA_218253081CA_3CA_319027961CC_1CC_118258891CC_2CC_221241551CC_3CC_320247861标准化处理edgeR采用的是 TMM 方法进行标准化处理,只有标准化处理后的数据才又可比性y-calcNormFactors(y)yAnobjectofclassDGEList$countsCA_1CA_2CA_3CC_1CC_2CC_3gene1321161138129218194220gene1322231133gene1323202733475146gene132460877986100132gene13253229215875563877morerows...$sam

文档评论(0)

1亿VIP精品文档

相关文档