This is a general method how to find features in a given region.
In this example, we have gene annotation bed file
In this example, we have TAD.bed
code @ github.