diffbind

如何使用DiffBind进行peaks的差异分析?
https://mp.weixin.qq.com/mp/appmsgalbum?__biz=MzU4NjU4ODQ2MQ==&action=getalbum&album_id=1390689993647161345&scene=173&from_msgid=2247489672&from_itemidx=2&count=3#wechat_redirect

diffbind

第三种pdf格式
pdf(file=“myplot.pdf”)


dev.off()

dbObj <- dba.contrast(dbObj, categories=DBA_FACTOR,minMembers = 2)
Warning message:
No contrasts added. Perhaps try more categories, or lower value for minMembers.
dbObj <- dba.analyze(dbObj, method=DBA_ALL_METHODS)
Error in pv.DBA(DBA, method, bSubControl, bFullLibrarySize, bTagwise = bTagwise, :
Unable to perform analysis: no contrasts specified.
In addition: Warning message:
No contrasts added. Perhaps try more categories, or lower value for minMembers.

dbObj
4 Samples, 28004 sites in matrix:
ID Tissue Factor Condition Treatment Replicate Caller Intervals FRiP
1 HD1 HD HD1 HD HD 1 counts 28004 0.13
2 HD2 HD HD2 HD HD 2 counts 28004 0.11
3 NC1 NC NC1 NC NC 1 counts 28004 0.09
4 NC2 NC NC2 NC NC 2 counts 28004 0.09

dbObj <- dba(sampleSheet=“SampleSheet.csv”)
dbObj <- dba.contrast(dbObj, categories=DBA_FACTOR,minMembers = 1)
dbObj <- dba.contrast(dbObj, categories=DBA_FACTOR,minMembers = 2)
dbObj <- dba.analyze(dbObj)
dbObj <- dba.contrast(dbObj, categories=DBA_CONDITION)
dbObj <- dba.contrast(dbObj, categories=DBA_CONDITION, minMembers = 1)

NCHD

cd /data/zhangyong/yyp/yypold/chips/lh11_3/data/X101SC20070420-Z01-J003/allcleandata/diffbind

library(DiffBind)
dbObj <- dba(sampleSheet=“NCHD.csv”)

#使用函数dba.count(),参数bUseSummarizeOverlaps可以得到更加标准的计算流程。

dbObj <- dba.count(dbObj, bUseSummarizeOverlaps=TRUE)
#save(dbObj,file=’./dbObj.Rdata’)

pdf(file=“pca.pdf”)
dba.plotPCA(dbObj, attributes=DBA_FACTOR, label=DBA_ID)
dev.off()

pdf(file=“myplot.pdf”)
plot(dbObj)
dev.off()

#差异分析

Establishing a contrast

dbObj <- dba.contrast(dbObj, categories=DBA_CONDITION,minMembers = 2) ###minMembers?最少2个样本?

dbObj <- dba.analyze(dbObj, method=DBA_ALL_METHODS)

summary of results

pdf(file=“show.pdf”)
dba.show(dbObj, bContrasts=T)
dev.off()

pdf(file=“venn.pdf”)

overlapping peaks identified by the two different tools (DESeq2 and edgeR)

dba.plotVenn(dbObj,contrast=1,method=DBA_ALL_METHODS)
dev.off()

#提取结果
comp1.edgeR <- dba.report(dbObj, method=DBA_EDGER, contrast = 1, th=1)
comp1.deseq <- dba.report(dbObj, method=DBA_DESEQ2, contrast = 1, th=1)

#保存文件

EdgeR

out <- as.data.frame(comp1.edgeR)
write.table(out, file="./1_edgeR.txt", sep="\t", quote=F, col.names = NA)

DESeq2

out <- as.data.frame(comp1.deseq)
write.table(out, file="./f1_deseq2.txt", sep="\t", quote=F, col.names = NA)

#以bed格式保存显著性的差异结果

Create bed files for each keeping only significant peaks (p < 0.05)

EdgeR

out <- as.data.frame(comp1.edgeR)
edge.bed <- out[ which(out$FDR < 0.05),
c(“seqnames”, “start”, “end”, “strand”, “Fold”)]
write.table(edge.bed, file=“edgeR_sig.bed”, sep="\t", quote=F, row.names=F, col.names=F)

DESeq2

out <- as.data.frame(comp1.deseq)
deseq.bed <- out[ which(out$FDR < 0.05),
c(“seqnames”, “start”, “end”, “strand”, “Fold”)]
write.table(deseq.bed, file=“deseq2_sig.bed”, sep="\t", quote=F, row.names=F, col.names=F)

dbObj
4 Samples, 28004 sites in matrix:
ID Tissue Factor Condition Treatment Replicate Caller Intervals FRiP
1 HD1 HD HD1 HD HD 1 counts 28004 0.13
2 HD2 HD HD2 HD HD 2 counts 28004 0.11
3 NC1 NC NC1 NC NC 1 counts 28004 0.09
4 NC2 NC NC2 NC NC 2 counts 28004 0.09
dbObj <- dba.contrast(dbObj, categories=DBA_CONDITION,minMembers = 2)
dbObj <- dba.analyze(dbObj, method=DBA_ALL_METHODS)

https://www.jianshu.com/p/f849bd55ac27

https://mp.weixin.qq.com/s?__biz=MzAxMDkxODM1Ng==&mid=2247487545&idx=1&sn=6dea2112d5a1c14555a4263d5dcfe42c&chksm=9b485082ac3fd994df4665359d5e71feb39c4188e9aabebe3996ca0744a54cc711df368068a7&scene=21#wechat_redirect

https://www.jianshu.com/p/5bda28d3d6fb

https://support.bioconductor.org/p/125809/#125840

https://www.jianshu.com/p/a11147808d14

https://www.jianshu.com/p/d81b9c76f841

https://www.jianshu.com/p/62fd87d0cdd6

https://www.rdocumentation.org/packages/DiffBind/versions/2.0.2

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值