def check_data_fields(header, mapping_data, errors, warnings, disable_primer_check=False, has_barcodes=True, char_replace='_', variable_len_barcodes=False, added_demultiplex_field=None):
 errors = check_dna_chars_primers(header, mapping_data, errors, disable_primer_check)
 if has_barcodes:
  errors = check_dna_chars_bcs(header, mapping_data, errors, has_barcodes)
 if ((not variable_len_barcodes) and has_barcodes):
  warnings = check_bcs_lengths(header, mapping_data, warnings)
 errors = check_bc_duplicates(header, mapping_data, errors, has_barcodes, variable_len_barcodes, added_demultiplex_field)
 errors = check_sampleid_duplicates(header, mapping_data, errors)
 warnings = check_chars_data_fields(header, mapping_data, warnings)
 warnings = check_fields_past_bounds(header, mapping_data, warnings)
 warnings = check_empty_fields_before_bounds(header, mapping_data, warnings)
 return (errors, warnings)

def check_data_fields ( header , mapping_data , errors , warnings , disable_primer_check = False , has_barcodes = True , char_replace = '_' , variable_len_barcodes = False , added_demultiplex_field = None ) : errors = check_dna_chars_primers ( header , mapping_data , errors , disable_primer_check ) if has_barcodes : errors = check_dna_chars_bcs ( header , mapping_data , errors , has_barcodes ) if ( ( not variable_len_barcodes ) and has_barcodes ) : warnings = check_bcs_lengths ( header , mapping_data , warnings ) errors = check_bc_duplicates ( header , mapping_data , errors , has_barcodes , variable_len_barcodes , added_demultiplex_field ) errors = check_sampleid_duplicates ( header , mapping_data , errors ) warnings = check_chars_data_fields ( header , mapping_data , warnings ) warnings = check_fields_past_bounds ( header , mapping_data , warnings ) warnings = check_empty_fields_before_bounds ( header , mapping_data , warnings ) return ( errors , warnings )
handles all functions for valid data fields header: list of header strings mapping_data: list of lists of raw metadata mapping file data errors: list of errors warnings: list of warnings has_barcodes: if true .