Using Diffbind R-studio
1
1
Entering edit mode
5.6 years ago
dimitrischat ▴ 210

Total noob here. Differential Binding Analysis of ChIP-seq peaksets is my main goal, so i found Diffbind. I have 3 samples(single-end), 2 replicates each ( 0h, 3h, 6h), so in total 6 fastq files. First I used bwa mem for mappin, then samtools view to convert sam to bam, samtools sort, samtools markdup to remove duplicates and last to keep unique reads. The command was :

bwa mem -t <threads> 'reference.fa' xx.fastq | samtools view -@ <threads> -bS - | samtools sort -@ <threads> - | samtools markdup -@ <threads> -r - - | samtools view -@ <threads> -h -q 1 -F 4 -F 256 - | grep -v XA:Z | grep -v SA:Z | samtools view -@ <threads> -b - > xx.nodup.unique.bam

After that, I did macs2 predictd and then macs2 callpeak. I've read that the input for Diffbind can be .xls .csv or .bed.

So I am at a point where i got 6 xls sheets with peaks from macs2. My question is how do I continue from there into R (R studio preferably). Also should I merge the BAM files I got from above and then do macs2? Or should I continue with the 6 output files from macs2?

I cant find any example of Diffbind running into R and that is my main question/problem.

ChIP-Seq • 2.4k views
ADD COMMENT
1
Entering edit mode
5.6 years ago

Merge the peaks from all of the samples together with bedtools (just take the union of the peaks) and use that and the BAM files as input to diffbind. For what it's worth, we generally prefer CSAW over diffbind, since it's easier to use and gives good quality results.

ADD COMMENT
0
Entering edit mode

Thanks a lot for your reply/help. Merging the peaks, you mean all 6 (in my case) into 1?

If CSAW is easier i will use that. Is there any help/examples for that?

ADD REPLY
1
Entering edit mode

Merge peaks from all 6 samples together (these merged peaks are what you then end up checking for differential binding). Check our snakePipes repository for example code.

ADD REPLY
1
Entering edit mode

By the way, both DiffBind and CSAW have outstandingly extensive manuals on their Bioconductor site. Check them out.

ADD REPLY
0
Entering edit mode

Hi, Devon, I would like to know if you overlap Csaw DB regions back to MACS2 peaks in the downstream? Thank you!

ADD REPLY
1
Entering edit mode

The MACS2 peaks can serve as input regions into CSAW. The CSAW authors aren't fans of this, but it tends to work better in practice.

ADD REPLY

Login before adding your answer.

Traffic: 1659 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6