| 1 |
{ |
| 2 |
"cells": [ |
| 3 |
{ |
| 4 |
"cell_type": "markdown", |
| 5 |
"metadata": {}, |
| 6 |
"source": [ |
| 7 |
"# Barcode_split CLI Usage" |
| 8 |
] |
| 9 |
}, |
| 10 |
{ |
| 11 |
"cell_type": "markdown", |
| 12 |
"metadata": {}, |
| 13 |
"source": [ |
| 14 |
"## Activate virtual environment" |
| 15 |
] |
| 16 |
}, |
| 17 |
{ |
| 18 |
"cell_type": "code", |
| 19 |
"execution_count": 1, |
| 20 |
"metadata": { |
| 21 |
"ExecuteTime": { |
| 22 |
"end_time": "2020-01-09T16:57:44.233061Z", |
| 23 |
"start_time": "2020-01-09T16:57:43.579592Z" |
| 24 |
} |
| 25 |
}, |
| 26 |
"outputs": [ |
| 27 |
{ |
| 28 |
"name": "stdout", |
| 29 |
"output_type": "stream", |
| 30 |
"text": [ |
| 31 |
"(pycoQC) " |
| 32 |
] |
| 33 |
}, |
| 34 |
{ |
| 35 |
"ename": "", |
| 36 |
"evalue": "1", |
| 37 |
"output_type": "error", |
| 38 |
"traceback": [] |
| 39 |
} |
| 40 |
], |
| 41 |
"source": [ |
| 42 |
"# Using virtualenvwrapper here but can also be done with Conda \n", |
| 43 |
"workon pycoQC" |
| 44 |
] |
| 45 |
}, |
| 46 |
{ |
| 47 |
"cell_type": "markdown", |
| 48 |
"metadata": {}, |
| 49 |
"source": [ |
| 50 |
"## Getting help" |
| 51 |
] |
| 52 |
}, |
| 53 |
{ |
| 54 |
"cell_type": "code", |
| 55 |
"execution_count": 2, |
| 56 |
"metadata": { |
| 57 |
"ExecuteTime": { |
| 58 |
"end_time": "2020-01-09T16:57:47.636267Z", |
| 59 |
"start_time": "2020-01-09T16:57:45.234067Z" |
| 60 |
} |
| 61 |
}, |
| 62 |
"outputs": [ |
| 63 |
{ |
| 64 |
"name": "stdout", |
| 65 |
"output_type": "stream", |
| 66 |
"text": [ |
| 67 |
"usage: Barcode_split [-h] [--version] --summary_file\n", |
| 68 |
" [SUMMARY_FILE [SUMMARY_FILE ...]]\n", |
| 69 |
" [--barcode_file [BARCODE_FILE [BARCODE_FILE ...]]]\n", |
| 70 |
" [--output_dir OUTPUT_DIR] [--output_unclassified]\n", |
| 71 |
" [--min_barcode_percent MIN_BARCODE_PERCENT] [-v | -q]\n", |
| 72 |
"\n", |
| 73 |
"Barcode_split is a simple tool to split sequencing summary report in per\n", |
| 74 |
"barcodes\n", |
| 75 |
"\n", |
| 76 |
"optional arguments:\n", |
| 77 |
" -h, --help show this help message and exit\n", |
| 78 |
" --version show program's version number and exit\n", |
| 79 |
" --summary_file [SUMMARY_FILE [SUMMARY_FILE ...]], -f [SUMMARY_FILE [SUMMARY_FILE ...]]\n", |
| 80 |
" Path to a sequencing_summary generated by Albacore\n", |
| 81 |
" 1.0.0 + (read_fast5_basecaller.py) / Guppy 2.1.3+\n", |
| 82 |
" (guppy_basecaller). One can also pass multiple space\n", |
| 83 |
" separated file paths or a UNIX style regex matching\n", |
| 84 |
" multiple files\n", |
| 85 |
" --barcode_file [BARCODE_FILE [BARCODE_FILE ...]], -b [BARCODE_FILE [BARCODE_FILE ...]]\n", |
| 86 |
" Path to the barcode_file generated by Guppy 2.1.3+\n", |
| 87 |
" (guppy_barcoder) or Deepbinner 0.2.0+. One can also\n", |
| 88 |
" pass multiple space separated file paths or a UNIX\n", |
| 89 |
" style regex matching multiple files\n", |
| 90 |
" --output_dir OUTPUT_DIR, -o OUTPUT_DIR\n", |
| 91 |
" Folder where to output split barcode data (default:\n", |
| 92 |
" current dir\n", |
| 93 |
" --output_unclassified, -u\n", |
| 94 |
" If given, unclassified barcodes are also written in a\n", |
| 95 |
" file. By default they are skiped\n", |
| 96 |
" --min_barcode_percent MIN_BARCODE_PERCENT, -p MIN_BARCODE_PERCENT\n", |
| 97 |
" Minimal percent of total reads to retain barcode\n", |
| 98 |
" label. If below, the barcode value is set as\n", |
| 99 |
" `unclassified` (default: 0.1)\n", |
| 100 |
" -v, --verbose Increase verbosity\n", |
| 101 |
" -q, --quiet Reduce verbosity\n", |
| 102 |
"(pycoQC) " |
| 103 |
] |
| 104 |
}, |
| 105 |
{ |
| 106 |
"ename": "", |
| 107 |
"evalue": "1", |
| 108 |
"output_type": "error", |
| 109 |
"traceback": [] |
| 110 |
} |
| 111 |
], |
| 112 |
"source": [ |
| 113 |
"Barcode_split -h" |
| 114 |
] |
| 115 |
}, |
| 116 |
{ |
| 117 |
"cell_type": "markdown", |
| 118 |
"metadata": {}, |
| 119 |
"source": [ |
| 120 |
"## Usage examples" |
| 121 |
] |
| 122 |
}, |
| 123 |
{ |
| 124 |
"cell_type": "markdown", |
| 125 |
"metadata": {}, |
| 126 |
"source": [ |
| 127 |
"### Basic usage " |
| 128 |
] |
| 129 |
}, |
| 130 |
{ |
| 131 |
"cell_type": "code", |
| 132 |
"execution_count": 3, |
| 133 |
"metadata": { |
| 134 |
"ExecuteTime": { |
| 135 |
"end_time": "2020-01-09T16:57:54.705532Z", |
| 136 |
"start_time": "2020-01-09T16:57:49.947849Z" |
| 137 |
}, |
| 138 |
"scrolled": false |
| 139 |
}, |
| 140 |
"outputs": [ |
| 141 |
{ |
| 142 |
"name": "stdout", |
| 143 |
"output_type": "stream", |
| 144 |
"text": [ |
| 145 |
"Import data from sequencing summary file(s) and cleanup\n", |
| 146 |
"\tRead files and import in a dataframe\n", |
| 147 |
"Check input data files\n", |
| 148 |
"Parse data files\n", |
| 149 |
"Merge data\n", |
| 150 |
"\tCleanup missing barcodes values\n", |
| 151 |
"\tCleaning up low frequency barcodes\n", |
| 152 |
"Split data per barcode\n", |
| 153 |
"\tProcessing data for Barcode barcode02\n", |
| 154 |
"\tProcessing data for Barcode barcode07\n", |
| 155 |
"\tProcessing data for Barcode barcode08\n", |
| 156 |
"\tProcessing data for Barcode barcode09\n", |
| 157 |
"\tProcessing data for Barcode barcode10\n", |
| 158 |
"\tProcessing data for Barcode barcode11\n", |
| 159 |
"\tProcessing data for Barcode barcode12\n", |
| 160 |
"\tProcessing data for Barcode unclassified\n", |
| 161 |
"Barcode Counts\n", |
| 162 |
" Counts Write\n", |
| 163 |
"barcode02 2 False\n", |
| 164 |
"barcode07 1 False\n", |
| 165 |
"barcode08 30 False\n", |
| 166 |
"barcode09 9945 True\n", |
| 167 |
"barcode10 12644 True\n", |
| 168 |
"barcode11 13594 True\n", |
| 169 |
"barcode12 9813 True\n", |
| 170 |
"unclassified 3971 False\n", |
| 171 |
"(pycoQC) " |
| 172 |
] |
| 173 |
}, |
| 174 |
{ |
| 175 |
"ename": "", |
| 176 |
"evalue": "1", |
| 177 |
"output_type": "error", |
| 178 |
"traceback": [] |
| 179 |
} |
| 180 |
], |
| 181 |
"source": [ |
| 182 |
"Barcode_split \\\n", |
| 183 |
" -f './data/Guppy-2.2.4-basecall-1D-DNA_sequencing_summary+barcode.txt.gz' \\\n", |
| 184 |
" -o \"./results/\"" |
| 185 |
] |
| 186 |
}, |
| 187 |
{ |
| 188 |
"cell_type": "markdown", |
| 189 |
"metadata": {}, |
| 190 |
"source": [ |
| 191 |
"## With externaly provided barcodes" |
| 192 |
] |
| 193 |
}, |
| 194 |
{ |
| 195 |
"cell_type": "code", |
| 196 |
"execution_count": 4, |
| 197 |
"metadata": { |
| 198 |
"ExecuteTime": { |
| 199 |
"end_time": "2020-01-09T16:57:58.143720Z", |
| 200 |
"start_time": "2020-01-09T16:57:55.331236Z" |
| 201 |
} |
| 202 |
}, |
| 203 |
"outputs": [ |
| 204 |
{ |
| 205 |
"name": "stdout", |
| 206 |
"output_type": "stream", |
| 207 |
"text": [ |
| 208 |
"General info\n", |
| 209 |
"\tpackage_name: pycoQC\n", |
| 210 |
"\tpackage_version: 2.5.0.17\n", |
| 211 |
"\ttimestamp: 2020-01-09 16:57:57.525774\n", |
| 212 |
"\n", |
| 213 |
"Runtime options\n", |
| 214 |
"\tquiet: False\n", |
| 215 |
"\tverbose: True\n", |
| 216 |
"\tmin_barcode_percent: 0.1\n", |
| 217 |
"\toutput_unclassified: False\n", |
| 218 |
"\toutput_dir: ./results/\n", |
| 219 |
"\tbarcode_file: ['./data/Guppy-basecall-1D-DNA_deepbinner_barcoding_summary.txt.gz']\n", |
| 220 |
"\tsummary_file: ['./data/Guppy-basecall-1D-DNA_sequencing_summary.txt.gz']\n", |
| 221 |
"\n", |
| 222 |
"Import data from sequencing summary file(s) and cleanup\n", |
| 223 |
"\tRead files and import in a dataframe\n", |
| 224 |
"Check input data files\n", |
| 225 |
"\t\tSequencing summary files found: ./data/Guppy-basecall-1D-DNA_sequencing_summary.txt.gz\n", |
| 226 |
"\t\tBarcode files found: ./data/Guppy-basecall-1D-DNA_deepbinner_barcoding_summary.txt.gz\n", |
| 227 |
"Parse data files\n", |
| 228 |
"\tParse summary files\n", |
| 229 |
"\t\t3,999 reads found in initial file\n", |
| 230 |
"\tParse barcode files\n", |
| 231 |
"\t\tFound valid Deepbinner barcode file\n", |
| 232 |
"\t\t3,775 reads with barcodes assigned\n", |
| 233 |
"Merge data\n", |
| 234 |
"\tCleanup missing barcodes values\n", |
| 235 |
"\tCleaning up low frequency barcodes\n", |
| 236 |
"Split data per barcode\n", |
| 237 |
"\tProcessing data for Barcode 1\n", |
| 238 |
"\tProcessing data for Barcode 2\n", |
| 239 |
"\tProcessing data for Barcode 3\n", |
| 240 |
"\tProcessing data for Barcode 4\n", |
| 241 |
"\tProcessing data for Barcode 5\n", |
| 242 |
"\tProcessing data for Barcode 6\n", |
| 243 |
"\tProcessing data for Barcode 7\n", |
| 244 |
"\tProcessing data for Barcode 8\n", |
| 245 |
"\tProcessing data for Barcode unclassified\n", |
| 246 |
"Barcode Counts\n", |
| 247 |
" Counts Write\n", |
| 248 |
"1 534 True\n", |
| 249 |
"2 206 True\n", |
| 250 |
"3 562 True\n", |
| 251 |
"4 579 True\n", |
| 252 |
"5 590 True\n", |
| 253 |
"6 655 True\n", |
| 254 |
"7 271 True\n", |
| 255 |
"8 378 True\n", |
| 256 |
"unclassified 224 False\n", |
| 257 |
"(pycoQC) " |
| 258 |
] |
| 259 |
}, |
| 260 |
{ |
| 261 |
"ename": "", |
| 262 |
"evalue": "1", |
| 263 |
"output_type": "error", |
| 264 |
"traceback": [] |
| 265 |
} |
| 266 |
], |
| 267 |
"source": [ |
| 268 |
"Barcode_split \\\n", |
| 269 |
" -f \"./data/Guppy-basecall-1D-DNA_sequencing_summary.txt.gz\" \\\n", |
| 270 |
" -b \"./data/Guppy-basecall-1D-DNA_deepbinner_barcoding_summary.txt.gz\" \\\n", |
| 271 |
" -o \"./results/\" \\\n", |
| 272 |
" -v" |
| 273 |
] |
| 274 |
} |
| 275 |
], |
| 276 |
"metadata": { |
| 277 |
"celltoolbar": "Initialization Cell", |
| 278 |
"hide_input": false, |
| 279 |
"kernelspec": { |
| 280 |
"display_name": "Bash", |
| 281 |
"language": "bash", |
| 282 |
"name": "bash" |
| 283 |
}, |
| 284 |
"language_info": { |
| 285 |
"codemirror_mode": "shell", |
| 286 |
"file_extension": ".sh", |
| 287 |
"mimetype": "text/x-sh", |
| 288 |
"name": "bash" |
| 289 |
}, |
| 290 |
"widgets": { |
| 291 |
"state": {}, |
| 292 |
"version": "1.1.1" |
| 293 |
} |
| 294 |
}, |
| 295 |
"nbformat": 4, |
| 296 |
"nbformat_minor": 1 |
| 297 |
} |