Wrote function to dynamically determine window size based on gene size