Hello! I need to filter peaks which are withwin gene regions. I have .bam file from CHIP-seq experiment and .bam file from RNA-seq. I am trying to do this with this command:
bedtools intersect -a A.bam -b B.bam > AB.bam
The problem is that the output AB.bam is exactly the same as A.bam (it is visuable in IGV). Can someone give some advices?
Can you add a few lines of A.bam and B.bam? especially lines that show some of the intersections? You can modify the data if it's confidential, but if you add more details you'll get better answers. Also, check out similar questions that appears on the right section of your post.
Try adding one of these options:
https://bedtools.readthedocs.io/en/latest/content/tools/intersect.html