This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Convert DiffBind output to standard BED or NarrowPeak format

Trying to figure out how to convert a differentially called list from DiffBind into one of these standard formats?

diffbind chip-seq bed narrowpeak

2 answers

You can generate bed files from a GRanges object (as returned by dba.report) using export.bed() from the rtracklayer package.

> library(rtracklayer)
> dbsites <- dba.report(myDBA, contrast=1, th=0.05)
> export.bed(dbsites,"dbsites.bed")

I've a slightly more complicated version of this issue. I want to export a list of peaks that do not overlap within 4 groups (e.g. myDBA$onlyA or myDBA$AandC).

From dba.analyze I have 6 contrasts. Which options do I use for dba.report to generate a contrast resembling:

myDBA.OL <- dba.overlap(myDBA, myDBA$masks$Consensus)

myDBA.OL$onlyA

or

myDBA.OL$AandC

so I can export these subsets as .bed?

Log in to answer this question.