def __get_reference_coordinate(feature, referencePoint):
    """
        Returns TSS or TES of a gtf feature.
    """
    if (feature.strand == '+' and referencePoint == 'TSS') or\
       (feature.strand == '-' and referencePoint == 'TES'):
        feature.end = feature.start
    else:
        assert(feature.strand == '-' and referencePoint == 'TSS') or\
              (feature.strand == '+' and referencePoint == 'TES')
        feature.start = feature.end
    return feature