This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Given a bed file with range of peaks, is it possible to identify the summit of the peak

Hello,

Given a bed file with ranges of peaks and corresponding BAM file, can we identify the apex of each peak.

Example:

bed file:

chr1 100 175

chr1 220 235

For first peak 'chr1 100-175' the apex of the peak could be at chr 1 140.

Given the BAM file and bed file, can I get the position of summit for each peak.

Would anyone suggest some trick.

Thanks Adrian.

rna-seq

Hi Adrian, did you find a solution to your problem? I am looking for a code to solve the same scenario you mentioned.

Thanks.

3 answers

MACS2 has a refinepeak command that can do this in a more intelligent way than just grabbing the max.

Thanks Jared.

I just found another solution by Pierre. However, that just gives the coverage at the summit but not the position of that summit on chromosome.

Identifying The 'Summit' Coordinate Within Many Coordinates In A Wig File?

Maybe the DNase I hotspot calling algorithm here would be of use:

https://github.com/Altius/hotspot2

Hotspot2 counts reads in a BAM file with a sliding window over the genome and identifies "hot" regions of interest, i.e. peaks of fixed or variable widths, with statistical scores that can be used for ranking or other testing.

Log in to answer this question.