def rev_seq(seq):
    """Reverse the sequence and use the complement bases.
    This is for annotation on "-" strand.
    
    example: 
        rev_seq("atgc") 
        >>> 'gcat'
        rev_seq("akgc")
        >>> "k" is not valid base in:
        >>> dict_keys(['A', 'C', 'G', 'T', 'N', 'a', 'c', 'g', 't', 'n'])
    """
    complement = {'A': 'T', 'C': 'G', 'G': 'C', 'T': 'A', 'N': 'N',
                  'a': 't', 'c': 'g', 'g': 'c', 't': 'a', 'n': 'n'}
    return_seq = ""
    for base in seq:
        try:
            return_seq = complement[base] + return_seq
        except KeyError:
            print('"%s" is not valid base in:' %(base))
            print(complement.keys())
            raise
    return return_seq