def find_any_primers(seq, primer_dict):
    """ Count occurrences of primers in a query sequence
        primer_dict is of the form {name: {'seq':x, 'seq_rc':y}, ...} """
    return any(primer['seq'][0:len(seq)] in seq or \
               primer['seq_rc'][0:len(seq)] in seq \
               for primer in primer_dict.itervalues())