Question: Using Diffbind R-studio
1
gravatar for dimitrischat
13 months ago by
dimitrischat90
dimitrischat90 wrote:

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 • 571 views
ADD COMMENTlink modified 13 months ago by Devon Ryan92k • written 13 months ago by dimitrischat90
1
gravatar for Devon Ryan
13 months ago by
Devon Ryan92k
Freiburg, Germany
Devon Ryan92k wrote:

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 COMMENTlink written 13 months ago by Devon Ryan92k

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 REPLYlink written 13 months ago by dimitrischat90
1

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 REPLYlink written 13 months ago by Devon Ryan92k
1

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

ADD REPLYlink written 13 months ago by ATpoint24k

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

ADD REPLYlink written 9 weeks ago by Jingyue30
1

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 REPLYlink written 9 weeks ago by Devon Ryan92k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1721 users visited in the last hour