I have a question about the DiffBind program. I am an immunologist and have recently started to use R for data analysis. Now, I am trying to analyze our ChIP-seq data using DiffBind to identify genomic regions that are commonly or differentially bound by one transcription factor and its mutant. I have been able to analyze the data to some extent (explained below), but I would like to obtain bed files of the peak-sets unique to either wild-type (condition A) or mutant (condition B) and of the common regions. (Eventually, I will perform motif analysis to identify transcription factor binding motifs enriched in each condition.) I used the command, writefile within the dba.peakset() function, and obtained the common peak-sets. When I tried to obtain onlyA or onlyB peak-sets by using the command, write.table after dba.overlap(), however, I have failed to do so. I would appreciate it very much if you could kindly give me any suggestions to solve the problem. Thank you very much in advance for your help.
I have a total of 4 samples, two replicates for each condition.
I used R: 3.1.3 version and DiffBind: 1.14.1 version.
>Library(DiffBind)
># set a working directory
>read.csv(“A_vs_B.csv”)
>AB=dba(sampleSheet=“A_vs_B.csv”)
A1_vs_Input_peaks A TFX resistant Full-Media 1 bed
A2_vs_Input_peaks A TFX resistant Full-Media 2 bed
B1_vs_Input_peaks B TFX responsive Full-Media 1 bed
B2_vs_Input_peaks B TFX responsive Full-Media 2 bed
>AB
> AB=dba.peakset(AB,consensus=DBA_CONDITION,minOverlap=0.66)
Add consensus: resistant
Add consensus: responsive
>AB
6 Samples, 30141 sites in matrix (47334 total):
ID Tissue Factor Condition Treatment Replicate Caller Intervals
1 A1_vs_Input_peaks A TFX resistant Full-Media 1 bed 19767
2 A2_vs_Input_peaks A TFX resistant Full-Media 2 bed 35525
3 B1_vs_Input_peaks B TFX responsive Full-Media 1 bed 14644
4 B2_vs_Input_peaks B TFX responsive Full-Media 2 bed 40924
5 resistant A TFX resistant Full-Media 1-2 bed 16492
6 responsive B TFX responsive Full-Media 1-2 bed 12288
>dba.plotVenn(AB,c(5,6))
>dba.peakset(AB,c(5,6),bRetrieve=T,writefile=”test0504.bed”)
>#I got a file with overlapped peaks between resistant and responsive.
>AB.OL = dba.overlap(AB, c(5,6))
>write.table(AB.OL, file=”150504.bed”)
#error
Ruka Setoguchi