code: def transform_locus(region, window_center, window_size):
    
    if window_center == CENTRE:
      region.transform_center(window_size)
    else:
      raise ValueError("Don't know how to do this transformation: " +
                       window_center)
docs: transform an input genomic region into one suitable for the profile.
  
    :param region:         input region to transform.
    :param window_center:  which part of the input region to center on.
    :param window_size:    how large the resultant region should be.
    :return: a new genomic interval on the same chromosome, centered on the
             <window_center> (e.g. 3' end) of the input region and resized to
             be window_size long.