def remove_trailing_N_characters(sequence):
    """ Strings representing the nucleotides typically start and end with
        repeating sequences of the 'N' character. This function strips them
        from the right and left side of the input sequence. """
    start_index = len(str(sequence)) - len(str(sequence).lstrip("N"))
    end_index = len(str(sequence).rstrip("N"))
    sequence = sequence[start_index:end_index]
    offset = start_index
    return (sequence, offset)