def check_bc_duplicates(header, mapping_data, errors, has_barcodes=True, variable_len_barcodes=False, added_demultiplex_field=None):
 if (has_barcodes and (not variable_len_barcodes) and (not added_demultiplex_field)):
  errors = check_fixed_len_bcs_dups(header, mapping_data, errors)
 if (has_barcodes and variable_len_barcodes and (not added_demultiplex_field)):
  errors = check_variable_len_bcs_dups(header, mapping_data, errors)
 if added_demultiplex_field:
  errors = check_added_demultiplex_dups(header, mapping_data, errors, has_barcodes, added_demultiplex_field)
 if ((not has_barcodes) and (not added_demultiplex_field)):
  if (len(mapping_data) != 1):
   errors.append((('If no barcodes are present, and the ' + "added_demultiplex_field option isn't used, only a single ") + 'SampleID can be present. DCTB -1,-1'))
 return errors

def check_bc_duplicates ( header , mapping_data , errors , has_barcodes = True , variable_len_barcodes = False , added_demultiplex_field = None ) : if ( has_barcodes and ( not variable_len_barcodes ) and ( not added_demultiplex_field ) ) : errors = check_fixed_len_bcs_dups ( header , mapping_data , errors ) if ( has_barcodes and variable_len_barcodes and ( not added_demultiplex_field ) ) : errors = check_variable_len_bcs_dups ( header , mapping_data , errors ) if added_demultiplex_field : errors = check_added_demultiplex_dups ( header , mapping_data , errors , has_barcodes , added_demultiplex_field ) if ( ( not has_barcodes ) and ( not added_demultiplex_field ) ) : if ( len ( mapping_data ) != 1 ) : errors . append ( ( ( 'If no barcodes are present, and the ' + "added_demultiplex_field option isn't used, only a single " ) + 'SampleID can be present. DCTB -1,-1' ) ) return errors
checks for barcode and other demultiplexing duplicates default check is for unique barcodes .