version
GenomicFeatures_1.58.0
Description
Generated promoter intervals include coordinates outside chromosome boundaries. For example, on hg38 chrM (length = 16,569 bp):
chrM -924 1076
chrM -853 1147
chrM 15523 17523
The first two have negative starts, and the last exceeds the chromosome length.
Expected
All BED intervals should satisfy:
0 <= start < end <= chromSize.
Suggestion
When extending TSS to promoters, clip intervals to chromosome sizes (e.g. with bedtools slop -g hg38.sizes or GenomicRanges::trim() in R). Add validation or warnings for out-of-bound coordinates.