Unsorted positions on sequence error
I'm trying to measure the exome coverage for a bam file I've recently processed with GATK. After downloading my BED file (all hg38 RefSeq exons) from the UCSC Table Browser, I'm running the following command
```
mosdepth --by hg38.refseq.exons.bed test control.hg38.bam
```
and encountering the following error
```
[E::hts_idx_push] Unsorted positions on sequence #81: 1 followed by 0
[hts-nim] error adding to csi index
```
`hg38.refseq.exons.bed` lines `80-83` look like this
```
chr1	169048	169264	XR_002958516.1_exon_3_0_chr1_169049_r	0	-
chr1	172556	172688	XR_002958516.1_exon_4_0_chr1_172557_r	0	-
chr1	172556	172688	XR_001737578.2_exon_5_0_chr1_172557_r	0	-
chr1	172556	172688	XR_002958515.1_exon_4_0_chr1_172557_r	0	-
```
I'm not very familiar with BED files, so I'm having difficulty understanding the error message. I've already tried sorting my BED file with `bedtools sort` but that doesn't fix it. I also saw #22 and tried that solution but the same error still appears. Any idea what could be causing this error?Thanks!