Question: How to use bedtools coverage
gravatar for ariel.balter
3.6 years ago by
ariel.balter140 wrote:

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.

depth coverage chip-seq bedtools • 1.7k views
ADD COMMENTlink modified 3.6 years ago by Devon Ryan94k • written 3.6 years ago by ariel.balter140
gravatar for Devon Ryan
3.6 years ago by
Devon Ryan94k
Freiburg, Germany
Devon Ryan94k wrote:

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

ADD COMMENTlink written 3.6 years ago by Devon Ryan94k
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: 1887 users visited in the last hour