{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Barcode_split CLI Usage" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Activate virtual environment" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "ExecuteTime": { "end_time": "2020-01-09T16:57:44.233061Z", "start_time": "2020-01-09T16:57:43.579592Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "(pycoQC) " ] }, { "ename": "", "evalue": "1", "output_type": "error", "traceback": [] } ], "source": [ "# Using virtualenvwrapper here but can also be done with Conda \n", "workon pycoQC" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Getting help" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "ExecuteTime": { "end_time": "2020-01-09T16:57:47.636267Z", "start_time": "2020-01-09T16:57:45.234067Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "usage: Barcode_split [-h] [--version] --summary_file\n", " [SUMMARY_FILE [SUMMARY_FILE ...]]\n", " [--barcode_file [BARCODE_FILE [BARCODE_FILE ...]]]\n", " [--output_dir OUTPUT_DIR] [--output_unclassified]\n", " [--min_barcode_percent MIN_BARCODE_PERCENT] [-v | -q]\n", "\n", "Barcode_split is a simple tool to split sequencing summary report in per\n", "barcodes\n", "\n", "optional arguments:\n", " -h, --help show this help message and exit\n", " --version show program's version number and exit\n", " --summary_file [SUMMARY_FILE [SUMMARY_FILE ...]], -f [SUMMARY_FILE [SUMMARY_FILE ...]]\n", " Path to a sequencing_summary generated by Albacore\n", " 1.0.0 + (read_fast5_basecaller.py) / Guppy 2.1.3+\n", " (guppy_basecaller). One can also pass multiple space\n", " separated file paths or a UNIX style regex matching\n", " multiple files\n", " --barcode_file [BARCODE_FILE [BARCODE_FILE ...]], -b [BARCODE_FILE [BARCODE_FILE ...]]\n", " Path to the barcode_file generated by Guppy 2.1.3+\n", " (guppy_barcoder) or Deepbinner 0.2.0+. One can also\n", " pass multiple space separated file paths or a UNIX\n", " style regex matching multiple files\n", " --output_dir OUTPUT_DIR, -o OUTPUT_DIR\n", " Folder where to output split barcode data (default:\n", " current dir\n", " --output_unclassified, -u\n", " If given, unclassified barcodes are also written in a\n", " file. By default they are skiped\n", " --min_barcode_percent MIN_BARCODE_PERCENT, -p MIN_BARCODE_PERCENT\n", " Minimal percent of total reads to retain barcode\n", " label. If below, the barcode value is set as\n", " `unclassified` (default: 0.1)\n", " -v, --verbose Increase verbosity\n", " -q, --quiet Reduce verbosity\n", "(pycoQC) " ] }, { "ename": "", "evalue": "1", "output_type": "error", "traceback": [] } ], "source": [ "Barcode_split -h" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Usage examples" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Basic usage " ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "ExecuteTime": { "end_time": "2020-01-09T16:57:54.705532Z", "start_time": "2020-01-09T16:57:49.947849Z" }, "scrolled": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Import data from sequencing summary file(s) and cleanup\n", "\tRead files and import in a dataframe\n", "Check input data files\n", "Parse data files\n", "Merge data\n", "\tCleanup missing barcodes values\n", "\tCleaning up low frequency barcodes\n", "Split data per barcode\n", "\tProcessing data for Barcode barcode02\n", "\tProcessing data for Barcode barcode07\n", "\tProcessing data for Barcode barcode08\n", "\tProcessing data for Barcode barcode09\n", "\tProcessing data for Barcode barcode10\n", "\tProcessing data for Barcode barcode11\n", "\tProcessing data for Barcode barcode12\n", "\tProcessing data for Barcode unclassified\n", "Barcode Counts\n", " Counts Write\n", "barcode02 2 False\n", "barcode07 1 False\n", "barcode08 30 False\n", "barcode09 9945 True\n", "barcode10 12644 True\n", "barcode11 13594 True\n", "barcode12 9813 True\n", "unclassified 3971 False\n", "(pycoQC) " ] }, { "ename": "", "evalue": "1", "output_type": "error", "traceback": [] } ], "source": [ "Barcode_split \\\n", " -f './data/Guppy-2.2.4-basecall-1D-DNA_sequencing_summary+barcode.txt.gz' \\\n", " -o \"./results/\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## With externaly provided barcodes" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "ExecuteTime": { "end_time": "2020-01-09T16:57:58.143720Z", "start_time": "2020-01-09T16:57:55.331236Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "General info\n", "\tpackage_name: pycoQC\n", "\tpackage_version: 2.5.0.17\n", "\ttimestamp: 2020-01-09 16:57:57.525774\n", "\n", "Runtime options\n", "\tquiet: False\n", "\tverbose: True\n", "\tmin_barcode_percent: 0.1\n", "\toutput_unclassified: False\n", "\toutput_dir: ./results/\n", "\tbarcode_file: ['./data/Guppy-basecall-1D-DNA_deepbinner_barcoding_summary.txt.gz']\n", "\tsummary_file: ['./data/Guppy-basecall-1D-DNA_sequencing_summary.txt.gz']\n", "\n", "Import data from sequencing summary file(s) and cleanup\n", "\tRead files and import in a dataframe\n", "Check input data files\n", "\t\tSequencing summary files found: ./data/Guppy-basecall-1D-DNA_sequencing_summary.txt.gz\n", "\t\tBarcode files found: ./data/Guppy-basecall-1D-DNA_deepbinner_barcoding_summary.txt.gz\n", "Parse data files\n", "\tParse summary files\n", "\t\t3,999 reads found in initial file\n", "\tParse barcode files\n", "\t\tFound valid Deepbinner barcode file\n", "\t\t3,775 reads with barcodes assigned\n", "Merge data\n", "\tCleanup missing barcodes values\n", "\tCleaning up low frequency barcodes\n", "Split data per barcode\n", "\tProcessing data for Barcode 1\n", "\tProcessing data for Barcode 2\n", "\tProcessing data for Barcode 3\n", "\tProcessing data for Barcode 4\n", "\tProcessing data for Barcode 5\n", "\tProcessing data for Barcode 6\n", "\tProcessing data for Barcode 7\n", "\tProcessing data for Barcode 8\n", "\tProcessing data for Barcode unclassified\n", "Barcode Counts\n", " Counts Write\n", "1 534 True\n", "2 206 True\n", "3 562 True\n", "4 579 True\n", "5 590 True\n", "6 655 True\n", "7 271 True\n", "8 378 True\n", "unclassified 224 False\n", "(pycoQC) " ] }, { "ename": "", "evalue": "1", "output_type": "error", "traceback": [] } ], "source": [ "Barcode_split \\\n", " -f \"./data/Guppy-basecall-1D-DNA_sequencing_summary.txt.gz\" \\\n", " -b \"./data/Guppy-basecall-1D-DNA_deepbinner_barcoding_summary.txt.gz\" \\\n", " -o \"./results/\" \\\n", " -v" ] } ], "metadata": { "celltoolbar": "Initialization Cell", "hide_input": false, "kernelspec": { "display_name": "Bash", "language": "bash", "name": "bash" }, "language_info": { "codemirror_mode": "shell", "file_extension": ".sh", "mimetype": "text/x-sh", "name": "bash" }, "widgets": { "state": {}, "version": "1.1.1" } }, "nbformat": 4, "nbformat_minor": 1 }