Entering edit mode
kalamari
•
0
@kalamari-22562
Last seen 4.0 years ago
Given bed genomic coordinates:
cat A.bed
chr1 100 200
chr1 180 250
chr1 250 500
chr1 501 1000
bedtools cluster adds a 'category' for each element
bedtools cluster -i A.bed
chr1 100 200 1
chr1 180 250 1
chr1 250 500 1
chr1 501 1000 2
with the additional option to control how close two features must be in order to cluster (adding the parameter -d 1000)
How can you achieve this behaviour with genomic ranges?
Thank you.