Demultiplexing sequences with barcodes

Hello All
I am trying to do Demultiplexing sequences for my samples which are about 300 samples with different barcodes size in my FASTQ files. I already validate my metadata file (please see attached picture) and I did qiime tools import --type MultiplexedSingleEndBarcodeInSequence but now with Demultiplexing sequences I d not have the, --m-barcodes-column barcode-sequence, in a separate file and all the barcodes are with FASTQ sequence file. Do I have to extract the barcodes (probably linker primer) or I can ignore this part “–m-barcodes-column barcode-sequence”. For sequencing, I used Ion Torent S5.

(qiime demux emp-single --i-seqs emp-single-end-sequences.qza --m-barcodes-file sample-metadata.tsv --m-barcodes-column barcode-sequence --o-per-sample-sequences demux.qza --o-error-correction-details demux-details.qza)

Hello Javad,

for IonTorrent sequences with barcodes in the sequences it is recommended to use “qiime cutadapt demux-single”. Therefore you have to modified your column BarcodeSequence. Before every barcode you have to add on ^ sign e.g ^CTAAGGTAAC otherwise cutadapt will not work properly. More information see:
(Problem with cutadapt demultiplexing of IonTorrent data)

The linker sequence will be removed anyway because the recommendation of dada2 for IonTorrent is to cut the first 15bp but you can also use “qiime cutadapt trim-single” to remove the Linker and the Primer.

Hope it helps.

1 Like

Thanks @Stratering!

I just want to add, that isn’t entirely true - it depends on the structure of the sequencing product - so what might be true for one set of reads might not be true for another - the protocol matters. The best advice I can give here is to review cutadapt.readthedocs.io to learn about the various “adapter” types that cutadapt knows of.

Just an Update and more questions!

I did the Demultiplex step according to this page (Demultiplexing and Trimming Adapters from Reads with q2-cutadapt).
As you can see in the attached picture, I demultiplex my samples based on my barcodes, but still, I have the adaptors which look fine to me, I just want to double-check it (this is my first question! Does it make sense (please see the picture).

My second question is about the next command:

Trim adapters from demultiplexed reads

If there are sequencing adapters or PCR primers in the reads which you’d like to remove, you can do that next as follows.

$ qiime cutadapt trim-single \
  --i-demultiplexed-sequences demultiplexed-seqs.qza \
  --p-front GCTACGGGGGG \
  --p-error-rate 0 \
  --o-trimmed-sequences trimmed-seqs.qza \
  --verbose

Do I have to put the adaptor sequence in P front? for me it is GATACCTGCCTGCCG. Do I also need to remove reverse adaptor?

Last concern: I am following the steps provided by @thermokarst in this page ( Demultiplexing and Trimming Adapters from Reads with q2-cutadapt). Are these steps for Ion Torrent sequence (S5). I had seq fna file with qiime one but I decieded to redo all steps with Qiime 2 and the only page (steps) that were match with Ion torrent was this page (Demultiplexing and Trimming Adapters from Reads with q2-cutadapt) (I also imported my fastq file with this command: qiime tools import --input-path sequences.fna --output-path sequences.qza --type ‘SampleData[S![qiime2|481x500](upload://fIcZAQLjN6Toq3inof6U9ihJIxg.jpeg)

equences]’)

Maybe, but it might be a better question for your sequencing center. If you’re getting good recovery post demux, then you’re probably fine.

If the adapters are present, then yes, you’ll want to remove them. If you don’t know, ask your sequencing center. Also, please review cutadapt.readthedocs.io/ for detailed instructions.

Not specifically - they are just a demonstration of how q2-cutadapt is wired to cutadapt.