Question: Using Diffbind R-studio
gravatar for dimitrischat
8 months ago by
dimitrischat60 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 • 355 views
ADD COMMENTlink modified 8 months ago by Devon Ryan90k • written 8 months ago by dimitrischat60
gravatar for Devon Ryan
8 months ago by
Devon Ryan90k
Freiburg, Germany
Devon Ryan90k 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 8 months ago by Devon Ryan90k

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 8 months ago by dimitrischat60

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 8 months ago by Devon Ryan90k

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

ADD REPLYlink written 8 months ago by ATpoint16k
Please log in to add an answer.


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