def sort_interaction_entities(row):
    """
    Sort the entities over a row in lexicographic order.

    Args:
        row (pd.Series): row containing the entities to be sorted.

    Returns:
        list: a list containing the sorted entities and the rest of the
            elements of the row unchanged.
    """
    sorted_entities = sorted([row['gene1'], row['gene2']])
    return sorted_entities + list(row[2:])