Adapter trimming and barcode extraction