Collapse two or thee bed files into one bed file using bedtools merge
1
0
Entering edit mode
4.0 years ago
mropri ▴ 160

I have a 4 bed files of peak coordinates from ChIP seq, I was wondering is there a way to collapse them into one bed file where all the peak coordinates are now in one bed file from the 4 different files using bedtools merge. And if there is a way what would the command look like. Appreciate any help.

ChIP-Seq • 1.9k views
ADD COMMENT
1
Entering edit mode
4.0 years ago
ATpoint 85k
cat bed1.bed bed2.bed bedn.bed (...) | sort -k1,1 -k2,2n | bedtools merge -i - > merged.bed
ADD COMMENT
0
Entering edit mode
ADD REPLY
0
Entering edit mode

Thank you so much. This is what I was looking for and appreciate your quick response. I did try looking at the documentation of the bedtools merge but was a little confused. Thanks again!

ADD REPLY

Login before adding your answer.

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