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.