Scripts/How to use Demultiplexing script
When using Oxford Nanopore or Illumina, we mix (pool) many samples into a single library. After sequencing, we need to sort the reads (the sequenced DNA pieces) back to the original samples. This is called demultiplexing. To do so, we use short sample-specific 13-letter tags that we attached to the end of each sequeced piece. Hence, for demultiplexing, we need the list of all samples and sequences of their primers and sample-specific tags. This is what this script is preparing.
The script takes the following data:
- position of each sample (in which plate and where on that plate)
- forward primer used in that plate
- position of tagged reverse primers in the plate
- sequence of each primer and its unique tag
and combines all this data into the list that gives
- name of the sample
- sequence and tag of its forward primer
- sequence and tag of its reverse primer
Script and example files to download
You can download the script here.
Example file with data in a needed format: Data_for_demultiplex_EXAMPLE.xlsx
Example of the final demultiplexing file: Demultiplex_EXAMPLE.txt
Loading data and adapting the script
To load the data in, you can:
- export the data prepared in Excel to tab-delimited text file and import it using the
read.tablefunction with specified file name - select the part of the table in Excel and copy it to clipboard by Ctrl+C, and then import the clipboard using the
read.tablefunction withfile="clipboard"
Before export, modify the name of the exported file:
write.table(demultiplex, file="your_file_name.txt", quote=FALSE, sep=",", row.names=FALSE, col.names=FALSE)
Needed files
List of platesOverview of sequencing plates with their names, amplicon lengths, and assigned forward primers. |
Plate mapsLayout of samples across plates, showing which sample code occupies each well position (A1–H12). |
Reverse primer mapMap of reverse primers (HCO_13 series) assigned to each well position across the plate. |
List of primersFull primer list including tag sequences, basic primer sequences, and the combined tagged primer sequences used for demultiplexing. |