def transform_locus(region, window_center, window_size):
if window_center == CENTRE:<EOL><INDENT>region.transform_center(window_size)<EOL><DEDENT>else:<EOL><INDENT>raise ValueError("<STR_LIT>" +<EOL>window_center)<EOL><DEDENT>
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.