This appears to work, but is there a way to make the results output as new columns rather than output in a new row for each individual region.
This is what the output looks like:
chr1 4399801 4400245 peak_12659 719 . 32.37675 -1 1.92924 222
|1|444
chr1 2495548 2495992 peak_11970 542 . 36.95443 -1 2.58372 222
|1|444
chr1 3572002 3572264 peak_901 1000 . 148.62292 -1 3.94096 145
|1|262
It makes sorting more cumbersome.
Take a look: https://bedtools.readthedocs.io/en/latest/