def dna_to_rna(seq):
    """
    Convert a DNA sequence to RNA.
    """
    seq_upper = seq.isupper()
    seq = seq.lower()
    seq = seq.replace('t', 'u')
    if seq_upper:
        return seq.upper()
    else:
        return seq
