How to use bedtools coverage
1
0
Entering edit mode
7.6 years ago
ariel.balter ▴ 260

Yes, I did RTFM, but I'm still not understanding. I have bed files with start and end coordinates for peaks. I've extended these by 100 on either side. I also have bam files of alignments across the whole genomes. I want the depth counts only under the extended peak regions. What would be the syntax for doing this with bedtools coverage?

As far as I can tell it would be:

bedtools coverage -a alignments.bam -b peaks.bed -d

Does that seem correct?

My goal is to have wig or bigwig tracks of the peaks to view in a genome browser such as IGV.

Note: I called the peaks with macs2, and I'm aware of the -w/--wig flag for giving results in wig format. That would be perfect except for wanting to extend my tracks on either side of the peaks.

Note2: Short of this working, I plan to take pileups from samtools depth and munge them into wig files.

I'm very open to hearing other/better ways to accomplish this.

ChIP-Seq coverage depth bedtools • 3.2k views
ADD COMMENT
0
Entering edit mode
7.6 years ago

You would want to swap the BAM and BED files, at least with recent versions of bedtools.

ADD COMMENT

Login before adding your answer.

Traffic: 2560 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