```bash
docker run --rm quay.io/biocontainers/bedtools:2.31.1--h13024bc_3 bedtools spacing -h
```

Tool:    bedtools spacing
Version: v2.31.1
Summary: Report (last col.) the gap lengths between intervals in a file.

Usage:   bedtools spacing [OPTIONS] -i <bed/gff/vcf/bam>

Notes: 
	(1)  Input must be sorted by chrom,start (sort -k1,1 -k2,2n for BED).
	(2)  The 1st element for each chrom will have NULL distance. (".").
	(3)  Distance for overlapping intervals is -1 and 0 for adjacent intervals.

Example: 
	$ cat test.bed 
	chr1    0   10 
	chr1    10  20 
	chr1    19  30 
	chr1    35  45 
	chr1    100 200 

	$ bedtools spacing -i test.bed 
	chr1    0   10  . 
	chr1    10  20  0 
	chr1    19  30  -1 
	chr1    35  45  5 
	chr1    100 200 55 

	-bed	If using BAM input, write output as BED.

	-header	Print the header from the A file prior to results.

	-nobuf	Disable buffered output. Using this option will cause each line
		of output to be printed as it is generated, rather than saved
		in a buffer. This will make printing large output files 
		noticeably slower, but can be useful in conjunction with
		other software tools and scripts that need to process one
		line of bedtools output at a time.

	-iobuf	Specify amount of memory to use for input buffer.
		Takes an integer argument. Optional suffixes K/M/G supported.
		Note: currently has no effect with compressed files.




