def _get_subexon_seq(exon_row, interval):
    """Return the interval sequence of the subexon."""
    seq = exon_row['ExonSequence']
    if exon_row['Strand'] == 1:
        exon_start = exon_row['ExonRegionStart']
        interval_start = interval.start - exon_start
        interval_end = interval.end - exon_start + 1
    else:
        exon_start = exon_row['ExonRegionEnd']
        interval_start = exon_start - interval.end
        interval_end = exon_start - interval.start + 1
    assert interval_start < interval_end, 'Interval end should not be lower than its start'
    return seq[interval_start:interval_end]
