bedtools flank will create two new flanking intervals for each interval in a BED/GFF/VCF file. Note that flank will restrict the created flanking intervals to the size of the chromosome (i.e. no start < 0 and no end > chromosome size).
flankBed [OPTIONS] -i
-b Increase the BED/GFF/VCF entry by the same number base pairs in each direction. Integer.
-l The number of base pairs to subtract from the start coordinate. Integer.
-r The number of base pairs to add to the end coordinate. Integer.
-s Define -l and -r based on strand. For example. if used, -l 500 for a negative-stranded feature, it will add 500 bp to the end coordinate.
-pct Define -l and -r as a fraction of the feature’s length. E.g. if used on a 1000bp feature, -l 0.50, will add 500 bp “upstreamâ€. Default = false.