def _check_exon_order(data_frame, row_number, row_index, prev_row_index,
    exon_pos):
    """Check that exons are ordered by rank in the transcript."""
    if exon_pos != 0:
        assert data_frame.loc[row_index, 'ExonRank'] > data_frame.loc[
            prev_row_index, 'ExonRank'
            ], "Exons aren't sorted by rank, error with row number " + str(
            row_number) + ', index ' + str(row_index) + '.'
