Entering edit mode
7.3 years ago
EVR
▴
610
Hi,
I have a bed file like following:
PGRP-SA-PA 11561749 11561803
PGRP-SA-PA 11561806 11561873
PGRP-SA-PA 11561875 11561925
noc-PB 14490900 14490989
noc-PB 14491004 14491065
noc-PB 14491076 14491106
noc-PB 14491117 14491182
noc-PB 14491201 14491295
I would like to group intervals based on column 1 like following
PGRP-SA-PA 11561749 11561925
PB 14490900 14491295
I tried using bedtools groupBy like following
groupBy -g 1 -c 2,3 -o min,max
but I couldnt get my desired output. any suggestions? Kindly guide me.
That should work. I tried the following command with your example BED file:
Here is the output:
What output do you get?
Hi, Thanks for your reply. I tried your code, it gave the following output
You might need to compile Bedtools from the latest source code. I remember the latest current release has a groupBy bug of some kind, but the latest commit version should have it fixed.