This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Sorting .bed file by genes size

Hello!

I have a .bed file from the peak calling analysis performed with MACS2 for ChIP-seq data. I have annotated the peaks in this .bed file to nearby genes.

I am looking for a way to order the peaks based on the size of the nearby genes they have been annotated to. I need to do that in order to produce a final heatmap where all the genes are reported in descending size order.

So, in case I can do the ordering already for the .bed file, then use it as input to computeMatrix with --sortRegions keep and then plotHeatmap with --sortRegions no.

Thanks in advance!

sorting chip-seq

Add the genes size (from bed or gff file) to you annotated file then sort it.

0 answers

No answers yet.

Log in to answer this question.