{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Working with Paired-Reads\n", "If we had paired-end read data, we would need to do things a little bit different at some of the steps.\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Running fastq-mcf on Paired Data\n", "It only takes two minor changes to run fastq-mcf on paired data, we need to tell it to also load the read 2 file, and also what to call the trimmed output from this file. \n", "\n", "1. neb_e7600_adapters.fasta\n", "2. 27_MA_P_S38_L002_R1_001.fastq.gz\n", "2. 27_MA_P_S38_L002_R2_001.fastq.gz : **NEW for paired-data**\n", "3. -q 20\n", "4. -x 0.5\n", "5. -o 27_MA_P_S38_L002_R1_001.trim.fastq.gz\n", "6. -o 27_MA_P_S38_L002_R2_001.trim.fastq.gz : **NEW for paired-data**\n", "\n", "Like this:\n", "\n", "```\n", "fastq-mcf $MYINFO/neb_e7600_adapters.fasta \\\n", " $RAW_FASTQS/27_MA_P_S38_L002_R1_001.fastq.gz \\\n", " $RAW_FASTQS/27_MA_P_S38_L002_R2_001.fastq.gz \\\n", " -q 20 -x 0.5 \\\n", " -o $TRIMMED/27_MA_P_S38_L002_R1_001.trim.fastq.gz \\\n", " -o $TRIMMED/27_MA_P_S38_L002_R2_001.trim.fastq.gz\n", "```\n", "\n", "> Note: Now that, since we are now including the reverse reads, we expect to see contamination with both adapters now" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Running STAR on Paired Data\n", "As with fastq-mcf, running STAR on Paired Data on requires a minor change: adding the R2 FASTQ file to the arguments for `--readFilesIn` and removing the \"R1\" from the `--outFileNamePrefix`, since the output will combine R1 and R2, like this:\n", "\n", "```\n", "STAR \\\n", " --runMode alignReads \\\n", " --twopassMode None \\\n", " --genomeDir $GENOME_DIR \\\n", " --readFilesIn $TRIMMED/27_MA_P_S38_L002_R1_001.trim.fastq.gz \\\n", " $TRIMMED/27_MA_P_S38_L002_R2_001.trim.fastq.gz \\\n", " --readFilesCommand gunzip -c \\\n", " --outFileNamePrefix ${STAR_OUT}/27_MA_P_S38_L002_ \\\n", " --quantMode GeneCounts \\\n", " --outSAMtype BAM Unsorted \\\n", " --outSAMunmapped Within\n", "```" ] } ], "metadata": { "kernelspec": { "display_name": "Bash", "language": "bash", "name": "bash" }, "language_info": { "codemirror_mode": "shell", "file_extension": ".sh", "mimetype": "text/x-sh", "name": "bash" } }, "nbformat": 4, "nbformat_minor": 1 }