{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "## Demultiplex on i7 outer barcodes " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Outer barcodes/indicies (e.g., `i7` barcodes) can be used to label samples for demultiplexing, or, often to label different libraries. An example could be you and a friend both prepared separate libraries for different organisms but used the same set of 48 internal barcodes. You then both add a unique outer barcode to your samples so that you can pool them together for sequencing. The resulting data would look like below, where the i7 index for the library is in red and the internal barcode is in blue." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "\n", " \n", "@NB551405:60:H7T2GAFXY:1:11101:6611:1038 1:N:0:\n", "CGAACTGT+NNNNNCNA\n", " \n", "CCGAATTCCTATCGGAAACGGATCAATAGCCCAATTGAAAATCAAGATAAGTTGAGGAAGACCAAGTCTGAAGAATTATCAAAT \n", "\\+ \n", "AAAAA#EEEAEEEEE/EEEEEEEEEEEEEEEEEEEAEEEEEEEEEEEEEEEE6EEEEA/EEEAAEEEEEEEAEEEEAEEEEAEE \n", " \n", "" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### i7 indices\n", "Even if there are few samples to be demultiplexed (e.g., here we have just two, one for your library and one for your friend's) you still generally need to use multiple barcodes to create sufficient base diversity for Illumina sequencing. In this case we have 12 i7 barcodes to indicate two different libraries, so our barcodes file for i7 demultiplexing looks like the following:" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "library1 CATCATCAT\n", "library1 CCAGTGATA\n", "library2 TGGCCTAGT\n", "library2 GCCAGTATA" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "cat Amaranthus_COL_3RAD_run2_i7_barcodes.txt" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### demultiplex on i7 indices" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# demux outer i7s to plate1 and plate2\n", "outer1 = ip.Assembly(\"demux_run2_i7s\")\n", "outer1.params.project_dir = \"/moto/eaton/projects/PAG3\"\n", "outer1.params.raw_fastq_path = \"/moto/eaton/projects/RAW_DATA/Amaranthus/Amaranthus_COL_3RAD_run2_R*.gz\"\n", "outer1.params.barcodes_path = \"/moto/eaton/projects/RAW_DATA/Amaranthus/Amaranthus_COL_3RAD_run2_i7_barcodes.txt\"\n", "outer1.params.datatype = 'pairddrad'\n", "\n", "# important: set hackers params to demux on i7 \n", "outer1.hackersonly.demultiplex_on_i7_tags = True\n", "outer1.hackersonly.merge_technical_replicates = True\n", "\n", "# run step 1 to demux\n", "outer1.run(\"1\", ipyclient=ipyclient, force=True)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.6.8" } }, "nbformat": 4, "nbformat_minor": 2 }