I have a multiplexed fastq file that contain reads as following:
@HISEQ:55:H76W4HIWA:1:1101:3414:2138 1:N:0:BC1:BC2:BC3 TTCCCCCAGTAGCGGCGAGCGAACGGGGAGCAGCCCAGAGCCTG + FBFFFFFIIFFIIIIIIIIIIFFIFFFFFFFFFFFFBBBBB<B7 @HISEQ:55:H76W4HIWA:1:1101:6230:2144 1:N:0:BC1:BC2:BC3 TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT + FFFFFFFIIIIIIIIFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
I have a quasi paired-end sequencing but the second read only contains two barcodes (BC2 and BC3). Therefore I transferred BC2 and BC3 from read2 to the header of read1 (together with BC1, part of read1 sequence). I want to demultiplex this file by the barcodes (e.g. "BC1:BC2") in the identifier line. The barcodes are known but I need to demultiplex the fastq file by allowing one mismatch for BC1 and BC2. I tried fastq-grep, but unfortunately its not possible to allow a mismatch. Have you any suggestions?
I would be very happy about every kind of help. Thank you.
ps. I can also change the delimiters between barcodes..