demux multiple lanes with one metadata file


I'm trying to demultiplex several fastq files, each representing a MiSeq lane. I have one metadata file which includes a 'barcodes' column and a 'lane' column.

If I try to demultiplex either lane using q2 demux and the metadata file, it errors out because some barcodes are shared across lanes. I've managed to make it work by creating mapping files for each lane so that barcodes are unique within each file. Is there a more elegant way to accomplish this, ideally within qiime2?


You already found an optimal solution since in the next step (Dada2) it is recommended to denoise samples from different runs / lanes separately with the same (!) parameters and only them merge the outputs.

You can use bash or Python to write a script that will handle these steps automatically but for it you need to be familiar with those scripting languages.

My plan was to to automate the separation of the mapping file, but before I did that I wanted to make sure I wasn't missing some parameter that would allow me to demux each lane (separately, as you said), but without having to split the mapping file.

Unfortunately, there is no way to automate it in Qiime2.
I used Jupyter notebooks to combine python scripting and bash commands to automate separation of lanes and runs. As in your case, I had one metadata, but I ended up writing a script that subdivide metadata file according to run/lane columns to run cutadapt and dada2 with the same parameters.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.