import csv


def get_detected_amplicons(file):
    """
    Parse the negative control report and obtain a list of detected amplicons.
    """
    amplicons = set()
    with open(file, 'r') as ifh:
        reader = csv.DictReader(ifh, delimiter='\t')
        for record in reader:
            if len(record['amplicons_detected']) > 0:
                _amplicons = record['amplicons_detected'].split(',')
                for amplicon in _amplicons:
                    amplicons.add(amplicon)
    return amplicons