functions to manipulate sample barcodes