Hi @LiuZjiia ! Welcome to the forum!
There may be several reasons why some samples are failing to be demultiplexed:
- PCR failure. You can verify it by searching for your barcode from failed samples in multiplexed fastq files. If you can not find a lot of sequences there - sequences were not amplified. In such case, there is nothing to do here.
- Errors on demultiplexing step. You can try to disable or to increase allowed error rate in cutadapt to see if it will fix the issue.
- Error in metadata. Double check if you are providing the right barcodes for demultiplexing.
- Cutadapt is not handling your data well.
PS. Which sequencing platform was used to produce your fastq files?
I have a similar issue with NovaSeq data as described here. Manual search showed that I have a lot of sequences with barcodes from failed samples.
So I decided to run demultiplexing step outside of Qiime2 by Sabre and GBSX tools. I got similar results with both tools by setting allowed mismatches to 0, and this way I recovered failed with cutadapt samples. I tried it with 2 different NovaSeq runs, in both cases sabre and gbsx demultiplexed all samples, meanwhile some samples were lost with cutadapt. But it is not an official advice since I am not sure yet what went wrong with my datasets.