| 1 |
{ |
| 2 |
"cells": [ |
| 3 |
{ |
| 4 |
"cell_type": "markdown", |
| 5 |
"metadata": {}, |
| 6 |
"source": [ |
| 7 |
"# pycoQC CLI Usage" |
| 8 |
] |
| 9 |
}, |
| 10 |
{ |
| 11 |
"cell_type": "markdown", |
| 12 |
"metadata": { |
| 13 |
"slideshow": { |
| 14 |
"slide_type": "slide" |
| 15 |
} |
| 16 |
}, |
| 17 |
"source": [ |
| 18 |
"PycoQC CLI can generate a beautiful HTML formatted report containing interactive D3.js plots. On top of it, the CLI can also dump summary information in a JSON formated file allowing easy parsing with third party tools.\n", |
| 19 |
"\n", |
| 20 |
"The report is dynamically generated depending on the information available in the summary file." |
| 21 |
] |
| 22 |
}, |
| 23 |
{ |
| 24 |
"cell_type": "markdown", |
| 25 |
"metadata": {}, |
| 26 |
"source": [ |
| 27 |
"## CLI Usage" |
| 28 |
] |
| 29 |
}, |
| 30 |
{ |
| 31 |
"cell_type": "markdown", |
| 32 |
"metadata": {}, |
| 33 |
"source": [ |
| 34 |
"### Activate virtual environment" |
| 35 |
] |
| 36 |
}, |
| 37 |
{ |
| 38 |
"cell_type": "code", |
| 39 |
"execution_count": 2, |
| 40 |
"metadata": { |
| 41 |
"ExecuteTime": { |
| 42 |
"end_time": "2020-12-16T13:15:25.978368Z", |
| 43 |
"start_time": "2020-12-16T13:15:25.675755Z" |
| 44 |
}, |
| 45 |
"init_cell": true |
| 46 |
}, |
| 47 |
"outputs": [ |
| 48 |
{ |
| 49 |
"name": "stdout", |
| 50 |
"output_type": "stream", |
| 51 |
"text": [ |
| 52 |
"(pycoQC) (pycoQC) " |
| 53 |
] |
| 54 |
}, |
| 55 |
{ |
| 56 |
"ename": "", |
| 57 |
"evalue": "1", |
| 58 |
"output_type": "error", |
| 59 |
"traceback": [] |
| 60 |
} |
| 61 |
], |
| 62 |
"source": [ |
| 63 |
"# Using conda here but can also be done with other virtenv managers \n", |
| 64 |
"conda activate pycoQC" |
| 65 |
] |
| 66 |
}, |
| 67 |
{ |
| 68 |
"cell_type": "markdown", |
| 69 |
"metadata": {}, |
| 70 |
"source": [ |
| 71 |
"### Getting help" |
| 72 |
] |
| 73 |
}, |
| 74 |
{ |
| 75 |
"cell_type": "code", |
| 76 |
"execution_count": 3, |
| 77 |
"metadata": { |
| 78 |
"ExecuteTime": { |
| 79 |
"end_time": "2020-12-16T13:15:29.434767Z", |
| 80 |
"start_time": "2020-12-16T13:15:27.842415Z" |
| 81 |
}, |
| 82 |
"init_cell": true |
| 83 |
}, |
| 84 |
"outputs": [ |
| 85 |
{ |
| 86 |
"name": "stdout", |
| 87 |
"output_type": "stream", |
| 88 |
"text": [ |
| 89 |
"usage: pycoQC [-h] [--version]\n", |
| 90 |
" [--summary_file [SUMMARY_FILE [SUMMARY_FILE ...]]]\n", |
| 91 |
" [--barcode_file [BARCODE_FILE [BARCODE_FILE ...]]]\n", |
| 92 |
" [--bam_file [BAM_FILE [BAM_FILE ...]]]\n", |
| 93 |
" [--html_outfile HTML_OUTFILE] [--json_outfile JSON_OUTFILE]\n", |
| 94 |
" [--min_pass_qual MIN_PASS_QUAL] [--min_pass_len MIN_PASS_LEN]\n", |
| 95 |
" [--filter_calibration] [--filter_duplicated]\n", |
| 96 |
" [--min_barcode_percent MIN_BARCODE_PERCENT]\n", |
| 97 |
" [--report_title REPORT_TITLE] [--template_file TEMPLATE_FILE]\n", |
| 98 |
" [--config_file CONFIG_FILE] [--skip_coverage_plot]\n", |
| 99 |
" [--sample SAMPLE] [--default_config] [-v | -q]\n", |
| 100 |
"\n", |
| 101 |
"pycoQC computes metrics and generates interactive QC plots from the sequencing summary\n", |
| 102 |
"report generated by Oxford Nanopore technologies basecallers\n", |
| 103 |
"\n", |
| 104 |
"* Minimal usage\n", |
| 105 |
" pycoQC -f sequencing_summary.txt -o pycoQC_output.html\n", |
| 106 |
"* Including Guppy barcoding file + html output + json output\n", |
| 107 |
" pycoQC -f sequencing_summary.txt -b barcoding_sequencing.txt -o pycoQC_output.html -j pycoQC_output.json\n", |
| 108 |
"* Including Bam file + html output\n", |
| 109 |
" pycoQC -f sequencing_summary.txt -a alignment.bam -o pycoQC_output.html\n", |
| 110 |
"\n", |
| 111 |
"optional arguments:\n", |
| 112 |
" -h, --help show this help message and exit\n", |
| 113 |
" --version show program's version number and exit\n", |
| 114 |
" -v, --verbose Increase verbosity\n", |
| 115 |
" -q, --quiet Reduce verbosity\n", |
| 116 |
"\n", |
| 117 |
"Input/output options:\n", |
| 118 |
" --summary_file [SUMMARY_FILE [SUMMARY_FILE ...]], -f [SUMMARY_FILE [SUMMARY_FILE ...]]\n", |
| 119 |
" Path to a sequencing_summary generated by Albacore\n", |
| 120 |
" 1.0.0 + (read_fast5_basecaller.py) / Guppy 2.1.3+\n", |
| 121 |
" (guppy_basecaller). One can also pass multiple space\n", |
| 122 |
" separated file paths or a UNIX style regex matching\n", |
| 123 |
" multiple files (Required)\n", |
| 124 |
" --barcode_file [BARCODE_FILE [BARCODE_FILE ...]], -b [BARCODE_FILE [BARCODE_FILE ...]]\n", |
| 125 |
" Path to the barcode_file generated by Guppy 2.1.3+\n", |
| 126 |
" (guppy_barcoder) or Deepbinner 0.2.0+. This is not a\n", |
| 127 |
" required file. One can also pass multiple space\n", |
| 128 |
" separated file paths or a UNIX style regex matching\n", |
| 129 |
" multiple files (optional)\n", |
| 130 |
" --bam_file [BAM_FILE [BAM_FILE ...]], -a [BAM_FILE [BAM_FILE ...]]\n", |
| 131 |
" Path to a Bam file corresponding to reads in the\n", |
| 132 |
" summary_file. Preferably aligned with Minimap2 One can\n", |
| 133 |
" also pass multiple space separated file paths or a\n", |
| 134 |
" UNIX style regex matching multiple files (optional)\n", |
| 135 |
" --html_outfile HTML_OUTFILE, -o HTML_OUTFILE\n", |
| 136 |
" Path to an output html file report (required if\n", |
| 137 |
" json_outfile not given)\n", |
| 138 |
" --json_outfile JSON_OUTFILE, -j JSON_OUTFILE\n", |
| 139 |
" Path to an output json file report (required if\n", |
| 140 |
" html_outfile not given)\n", |
| 141 |
"\n", |
| 142 |
"Filtering options:\n", |
| 143 |
" --min_pass_qual MIN_PASS_QUAL\n", |
| 144 |
" Minimum quality to consider a read as 'pass' (default:\n", |
| 145 |
" 7)\n", |
| 146 |
" --min_pass_len MIN_PASS_LEN\n", |
| 147 |
" Minimum read length to consider a read as 'pass'\n", |
| 148 |
" (default: 0)\n", |
| 149 |
" --filter_calibration If given, reads flagged as calibration strand by the\n", |
| 150 |
" basecaller are removed (default: False)\n", |
| 151 |
" --filter_duplicated If given, duplicated read_ids are removed but the\n", |
| 152 |
" first occurence is kept (Guppy sometimes outputs the\n", |
| 153 |
" same read multiple times) (default: False)\n", |
| 154 |
" --min_barcode_percent MIN_BARCODE_PERCENT\n", |
| 155 |
" Minimal percent of total reads to retain barcode\n", |
| 156 |
" label. If below, the barcode value is set as\n", |
| 157 |
" `unclassified` (default: 0.1)\n", |
| 158 |
"\n", |
| 159 |
"HTML report options:\n", |
| 160 |
" --report_title REPORT_TITLE\n", |
| 161 |
" Title to use in the html report (default: PycoQC\n", |
| 162 |
" report)\n", |
| 163 |
" --template_file TEMPLATE_FILE\n", |
| 164 |
" Jinja2 html template for the html report (default: )\n", |
| 165 |
" --config_file CONFIG_FILE\n", |
| 166 |
" Path to a JSON configuration file for the html report.\n", |
| 167 |
" If not provided, looks for it in ~/.pycoQC and\n", |
| 168 |
" ~/.config/pycoQC/config. If it's still not found,\n", |
| 169 |
" falls back to default parameters. The first level keys\n", |
| 170 |
" are the names of the plots to be included. The second\n", |
| 171 |
" level keys are the parameters to pass to each plotting\n", |
| 172 |
" function (default: )\")\n", |
| 173 |
" --skip_coverage_plot Skip the coverage plot in HTML report. Useful when\n", |
| 174 |
" using a reference file containing many sequences, i.e.\n", |
| 175 |
" transcriptome (default: False)\n", |
| 176 |
"\n", |
| 177 |
"Other options:\n", |
| 178 |
" --sample SAMPLE If not None a n number of reads will be randomly\n", |
| 179 |
" selected instead of the entire dataset for ploting\n", |
| 180 |
" function (deterministic sampling) (default: 100000)\n", |
| 181 |
" --default_config, -d Print default configuration file. Can be used to\n", |
| 182 |
" generate a template JSON file (default: False)\n", |
| 183 |
"(pycoQC) " |
| 184 |
] |
| 185 |
}, |
| 186 |
{ |
| 187 |
"ename": "", |
| 188 |
"evalue": "1", |
| 189 |
"output_type": "error", |
| 190 |
"traceback": [] |
| 191 |
} |
| 192 |
], |
| 193 |
"source": [ |
| 194 |
"pycoQC -h" |
| 195 |
] |
| 196 |
}, |
| 197 |
{ |
| 198 |
"cell_type": "markdown", |
| 199 |
"metadata": {}, |
| 200 |
"source": [ |
| 201 |
"### Usage examples" |
| 202 |
] |
| 203 |
}, |
| 204 |
{ |
| 205 |
"cell_type": "markdown", |
| 206 |
"metadata": {}, |
| 207 |
"source": [ |
| 208 |
"#### Basic usage (quiet mode)" |
| 209 |
] |
| 210 |
}, |
| 211 |
{ |
| 212 |
"cell_type": "code", |
| 213 |
"execution_count": 4, |
| 214 |
"metadata": { |
| 215 |
"ExecuteTime": { |
| 216 |
"end_time": "2020-12-16T13:15:38.267960Z", |
| 217 |
"start_time": "2020-12-16T13:15:32.382173Z" |
| 218 |
}, |
| 219 |
"scrolled": false |
| 220 |
}, |
| 221 |
"outputs": [ |
| 222 |
{ |
| 223 |
"name": "stdout", |
| 224 |
"output_type": "stream", |
| 225 |
"text": [ |
| 226 |
"Checking arguments values\n", |
| 227 |
"Check input data files\n", |
| 228 |
"Parse data files\n", |
| 229 |
"Merge data\n", |
| 230 |
"Cleaning data\n", |
| 231 |
"Loading plotting interface\n", |
| 232 |
"(pycoQC) " |
| 233 |
] |
| 234 |
}, |
| 235 |
{ |
| 236 |
"ename": "", |
| 237 |
"evalue": "1", |
| 238 |
"output_type": "error", |
| 239 |
"traceback": [] |
| 240 |
} |
| 241 |
], |
| 242 |
"source": [ |
| 243 |
"pycoQC \\\n", |
| 244 |
" -f ./data/Albacore-1.2.1_basecall-1D-DNA_sequencing_summary.txt.gz \\\n", |
| 245 |
" -o ./results/Albacore-1.2.1_basecall-1D-DNA.html \\\n", |
| 246 |
" --quiet" |
| 247 |
] |
| 248 |
}, |
| 249 |
{ |
| 250 |
"cell_type": "markdown", |
| 251 |
"metadata": {}, |
| 252 |
"source": [ |
| 253 |
"[HTML OUTPUT](https://a-slide.github.io/pycoQC/pycoQC/results/Albacore-1.2.1_basecall-1D-DNA.html)" |
| 254 |
] |
| 255 |
}, |
| 256 |
{ |
| 257 |
"cell_type": "markdown", |
| 258 |
"metadata": {}, |
| 259 |
"source": [ |
| 260 |
"#### JSON data output on top of the html report\n", |
| 261 |
"\n", |
| 262 |
"A json report can be generated on top (or instead) of the html report\n", |
| 263 |
"\n", |
| 264 |
"It contains a summarized version of the data collected by pycoQC in a structured and easy to parse format" |
| 265 |
] |
| 266 |
}, |
| 267 |
{ |
| 268 |
"cell_type": "code", |
| 269 |
"execution_count": 5, |
| 270 |
"metadata": { |
| 271 |
"ExecuteTime": { |
| 272 |
"end_time": "2020-12-16T13:15:46.326442Z", |
| 273 |
"start_time": "2020-12-16T13:15:40.149501Z" |
| 274 |
}, |
| 275 |
"scrolled": false |
| 276 |
}, |
| 277 |
"outputs": [ |
| 278 |
{ |
| 279 |
"name": "stdout", |
| 280 |
"output_type": "stream", |
| 281 |
"text": [ |
| 282 |
"Checking arguments values\n", |
| 283 |
"Check input data files\n", |
| 284 |
"Parse data files\n", |
| 285 |
"Merge data\n", |
| 286 |
"Cleaning data\n", |
| 287 |
"Loading plotting interface\n", |
| 288 |
"(pycoQC) " |
| 289 |
] |
| 290 |
}, |
| 291 |
{ |
| 292 |
"ename": "", |
| 293 |
"evalue": "1", |
| 294 |
"output_type": "error", |
| 295 |
"traceback": [] |
| 296 |
} |
| 297 |
], |
| 298 |
"source": [ |
| 299 |
"pycoQC \\\n", |
| 300 |
" -f ./data/Guppy-2.1.3_basecall-1D-RNA_sequencing_summary.txt.gz \\\n", |
| 301 |
" -o ./results/Guppy-2.1.3_basecall-1D_RNA.html \\\n", |
| 302 |
" -j ./results/Guppy-2.1.3_basecall-1D_RNA.json \\\n", |
| 303 |
" --quiet" |
| 304 |
] |
| 305 |
}, |
| 306 |
{ |
| 307 |
"cell_type": "markdown", |
| 308 |
"metadata": {}, |
| 309 |
"source": [ |
| 310 |
"[HTML OUTPUT](https://a-slide.github.io/pycoQC/pycoQC/results/Guppy-2.1.3_basecall-1D_RNA.html)\n", |
| 311 |
"\n", |
| 312 |
"[JSON OUTPUT](https://a-slide.github.io/pycoQC/pycoQC/results/Guppy-2.1.3_basecall-1D_RNA.json)" |
| 313 |
] |
| 314 |
}, |
| 315 |
{ |
| 316 |
"cell_type": "markdown", |
| 317 |
"metadata": {}, |
| 318 |
"source": [ |
| 319 |
"#### Including guppy barcoding information" |
| 320 |
] |
| 321 |
}, |
| 322 |
{ |
| 323 |
"cell_type": "code", |
| 324 |
"execution_count": null, |
| 325 |
"metadata": { |
| 326 |
"ExecuteTime": { |
| 327 |
"end_time": "2020-12-16T13:15:46.328458Z", |
| 328 |
"start_time": "2020-12-16T13:15:43.632Z" |
| 329 |
}, |
| 330 |
"scrolled": false |
| 331 |
}, |
| 332 |
"outputs": [], |
| 333 |
"source": [ |
| 334 |
"pycoQC \\\n", |
| 335 |
" -f ./data/Guppy-2.1.3_basecall-1D-DNA_sequencing_summary.txt.gz \\\n", |
| 336 |
" -b ./data/Guppy-2.1.3_basecall-1D_DNA_barcoding_summary.txt.gz \\\n", |
| 337 |
" -o ./results/Guppy-2.1.3_basecall-1D_DNA_barcode.html \\\n", |
| 338 |
" --quiet" |
| 339 |
] |
| 340 |
}, |
| 341 |
{ |
| 342 |
"cell_type": "markdown", |
| 343 |
"metadata": {}, |
| 344 |
"source": [ |
| 345 |
"[HTML OUTPUT](https://a-slide.github.io/pycoQC/pycoQC/results/Guppy-2.1.3_basecall-1D_DNA_barcode.html)" |
| 346 |
] |
| 347 |
}, |
| 348 |
{ |
| 349 |
"cell_type": "markdown", |
| 350 |
"metadata": {}, |
| 351 |
"source": [ |
| 352 |
"#### Matching multiple files with a regex and add a title to report" |
| 353 |
] |
| 354 |
}, |
| 355 |
{ |
| 356 |
"cell_type": "code", |
| 357 |
"execution_count": null, |
| 358 |
"metadata": { |
| 359 |
"ExecuteTime": { |
| 360 |
"end_time": "2020-12-16T13:15:46.329661Z", |
| 361 |
"start_time": "2020-12-16T13:15:45.948Z" |
| 362 |
}, |
| 363 |
"scrolled": false |
| 364 |
}, |
| 365 |
"outputs": [], |
| 366 |
"source": [ |
| 367 |
"pycoQC \\\n", |
| 368 |
" -f ./data/Albacore*RNA* \\\n", |
| 369 |
" -o ./results/Albacore_all_RNA.html \\\n", |
| 370 |
" --report_title \"All RNA runs\" \\\n", |
| 371 |
" --quiet" |
| 372 |
] |
| 373 |
}, |
| 374 |
{ |
| 375 |
"cell_type": "markdown", |
| 376 |
"metadata": {}, |
| 377 |
"source": [ |
| 378 |
"[HTML OUTPUT](https://a-slide.github.io/pycoQC/pycoQC/results/Albacore_all_RNA.html)" |
| 379 |
] |
| 380 |
}, |
| 381 |
{ |
| 382 |
"cell_type": "markdown", |
| 383 |
"metadata": {}, |
| 384 |
"source": [ |
| 385 |
"#### Tweak filtering parameters" |
| 386 |
] |
| 387 |
}, |
| 388 |
{ |
| 389 |
"cell_type": "markdown", |
| 390 |
"metadata": {}, |
| 391 |
"source": [ |
| 392 |
"* Define reads with a quality higher than 8 and length higher than 200 bases as \"pass\" \n", |
| 393 |
"* Discard reads aligned on the calibration standard\n", |
| 394 |
"* Unset value of any barcode found in less than 10% of the reads" |
| 395 |
] |
| 396 |
}, |
| 397 |
{ |
| 398 |
"cell_type": "code", |
| 399 |
"execution_count": 6, |
| 400 |
"metadata": { |
| 401 |
"ExecuteTime": { |
| 402 |
"end_time": "2020-12-16T13:15:58.130952Z", |
| 403 |
"start_time": "2020-12-16T13:15:51.882778Z" |
| 404 |
}, |
| 405 |
"scrolled": false |
| 406 |
}, |
| 407 |
"outputs": [ |
| 408 |
{ |
| 409 |
"name": "stdout", |
| 410 |
"output_type": "stream", |
| 411 |
"text": [ |
| 412 |
"Checking arguments values\n", |
| 413 |
"Check input data files\n", |
| 414 |
"Parse data files\n", |
| 415 |
"Merge data\n", |
| 416 |
"Cleaning data\n", |
| 417 |
"Loading plotting interface\n", |
| 418 |
"(pycoQC) " |
| 419 |
] |
| 420 |
}, |
| 421 |
{ |
| 422 |
"ename": "", |
| 423 |
"evalue": "1", |
| 424 |
"output_type": "error", |
| 425 |
"traceback": [] |
| 426 |
} |
| 427 |
], |
| 428 |
"source": [ |
| 429 |
"pycoQC \\\n", |
| 430 |
" -f ./data/Albacore-2.1.10_basecall-1D-DNA_sequencing_summary.txt.gz\\\n", |
| 431 |
" -o ./results/Albacore-2.1.10_basecall-1D-DNA.html \\\n", |
| 432 |
" --min_pass_qual 8 \\\n", |
| 433 |
" --min_pass_len 200 \\\n", |
| 434 |
" --filter_calibration \\\n", |
| 435 |
" --min_barcode_percent 10 \\\n", |
| 436 |
" --quiet" |
| 437 |
] |
| 438 |
}, |
| 439 |
{ |
| 440 |
"cell_type": "markdown", |
| 441 |
"metadata": {}, |
| 442 |
"source": [ |
| 443 |
"[HTML OUTPUT](https://a-slide.github.io/pycoQC/pycoQC/results/Albacore-2.1.10_basecall-1D-DNA.html)" |
| 444 |
] |
| 445 |
}, |
| 446 |
{ |
| 447 |
"cell_type": "markdown", |
| 448 |
"metadata": {}, |
| 449 |
"source": [ |
| 450 |
"#### Including Alignments information for a Bam file" |
| 451 |
] |
| 452 |
}, |
| 453 |
{ |
| 454 |
"cell_type": "code", |
| 455 |
"execution_count": 7, |
| 456 |
"metadata": { |
| 457 |
"ExecuteTime": { |
| 458 |
"end_time": "2020-12-16T13:16:10.215380Z", |
| 459 |
"start_time": "2020-12-16T13:15:58.819352Z" |
| 460 |
}, |
| 461 |
"scrolled": false |
| 462 |
}, |
| 463 |
"outputs": [ |
| 464 |
{ |
| 465 |
"name": "stdout", |
| 466 |
"output_type": "stream", |
| 467 |
"text": [ |
| 468 |
"Checking arguments values\n", |
| 469 |
"Check input data files\n", |
| 470 |
"Parse data files\n", |
| 471 |
"Merge data\n", |
| 472 |
"Cleaning data\n", |
| 473 |
"Loading plotting interface\n", |
| 474 |
"(pycoQC) " |
| 475 |
] |
| 476 |
}, |
| 477 |
{ |
| 478 |
"ename": "", |
| 479 |
"evalue": "1", |
| 480 |
"output_type": "error", |
| 481 |
"traceback": [] |
| 482 |
} |
| 483 |
], |
| 484 |
"source": [ |
| 485 |
"pycoQC \\\n", |
| 486 |
" -f ./large_data/sample_1_sequencing_summary.txt \\\n", |
| 487 |
" -a ./large_data/sample_1.bam \\\n", |
| 488 |
" -o ./results/Guppy-2.3_basecall-1D_alignment-DNA.html \\\n", |
| 489 |
" -j ./results/Guppy-2.3_basecall-1D_alignment-DNA.json \\\n", |
| 490 |
" --quiet" |
| 491 |
] |
| 492 |
}, |
| 493 |
{ |
| 494 |
"cell_type": "markdown", |
| 495 |
"metadata": {}, |
| 496 |
"source": [ |
| 497 |
"[HTML OUTPUT](https://a-slide.github.io/pycoQC/pycoQC/results/Guppy-2.3_basecall-1D_alignment-DNA.html)\n", |
| 498 |
"\n", |
| 499 |
"[JSON OUTPUT](https://a-slide.github.io/pycoQC/pycoQC/results/Guppy-2.3_basecall-1D_alignment-DNA.json)" |
| 500 |
] |
| 501 |
}, |
| 502 |
{ |
| 503 |
"cell_type": "markdown", |
| 504 |
"metadata": {}, |
| 505 |
"source": [ |
| 506 |
"#### Advanced configuration with custon json file" |
| 507 |
] |
| 508 |
}, |
| 509 |
{ |
| 510 |
"cell_type": "markdown", |
| 511 |
"metadata": {}, |
| 512 |
"source": [ |
| 513 |
"Although we recommend to stick to the default parameters, a json formatted configuration file can be provided to tweak the plots. A default configuration file can be generated using:" |
| 514 |
] |
| 515 |
}, |
| 516 |
{ |
| 517 |
"cell_type": "code", |
| 518 |
"execution_count": 11, |
| 519 |
"metadata": { |
| 520 |
"ExecuteTime": { |
| 521 |
"end_time": "2020-02-10T14:12:46.443431Z", |
| 522 |
"start_time": "2020-02-10T14:12:44.120118Z" |
| 523 |
}, |
| 524 |
"scrolled": false |
| 525 |
}, |
| 526 |
"outputs": [ |
| 527 |
{ |
| 528 |
"name": "stdout", |
| 529 |
"output_type": "stream", |
| 530 |
"text": [ |
| 531 |
"{\n", |
| 532 |
" \"run_summary\": {\n", |
| 533 |
" \"plot_title\": \"General run summary\"\n", |
| 534 |
" },\n", |
| 535 |
" \"basecall_summary\": {\n", |
| 536 |
" \"plot_title\": \"Basecall summary\"\n", |
| 537 |
" },\n", |
| 538 |
" \"alignment_summary\": {\n", |
| 539 |
" \"plot_title\": \"Alignment summary\"\n", |
| 540 |
" },\n", |
| 541 |
" \"read_len_1D\": {\n", |
| 542 |
" \"plot_title\": \"Basecalled reads length\",\n", |
| 543 |
" \"color\": \"lightsteelblue\",\n", |
| 544 |
" \"nbins\": 200,\n", |
| 545 |
" \"smooth_sigma\": 2\n", |
| 546 |
" },\n", |
| 547 |
" \"align_len_1D\": {\n", |
| 548 |
" \"plot_title\": \"Aligned reads length\",\n", |
| 549 |
" \"color\": \"mediumseagreen\",\n", |
| 550 |
" \"nbins\": 200,\n", |
| 551 |
" \"smooth_sigma\": 2\n", |
| 552 |
" },\n", |
| 553 |
" \"read_qual_1D\": {\n", |
| 554 |
" \"plot_title\": \"Basecalled reads PHRED quality\",\n", |
| 555 |
" \"color\": \"salmon\",\n", |
| 556 |
" \"nbins\": 200,\n", |
| 557 |
" \"smooth_sigma\": 2\n", |
| 558 |
" },\n", |
| 559 |
" \"identity_freq_1D\": {\n", |
| 560 |
" \"plot_title\": \"Aligned reads identity\",\n", |
| 561 |
" \"color\": \"sandybrown\",\n", |
| 562 |
" \"nbins\": 200,\n", |
| 563 |
" \"smooth_sigma\": 2\n", |
| 564 |
" },\n", |
| 565 |
" \"read_len_read_qual_2D\": {\n", |
| 566 |
" \"plot_title\": \"Basecalled reads length vs reads PHRED quality\",\n", |
| 567 |
" \"x_nbins\": 200,\n", |
| 568 |
" \"y_nbins\": 100,\n", |
| 569 |
" \"smooth_sigma\": 2\n", |
| 570 |
" },\n", |
| 571 |
" \"read_len_align_len_2D\": {\n", |
| 572 |
" \"plot_title\": \"Basecalled reads length vs alignments length\",\n", |
| 573 |
" \"x_nbins\": 200,\n", |
| 574 |
" \"y_nbins\": 100,\n", |
| 575 |
" \"smooth_sigma\": 1\n", |
| 576 |
" },\n", |
| 577 |
" \"align_len_identity_freq_2D\": {\n", |
| 578 |
" \"plot_title\": \"Aligned reads length vs alignments identity\",\n", |
| 579 |
" \"x_nbins\": 200,\n", |
| 580 |
" \"y_nbins\": 100,\n", |
| 581 |
" \"smooth_sigma\": 2\n", |
| 582 |
" },\n", |
| 583 |
" \"read_qual_identity_freq_2D\": {\n", |
| 584 |
" \"plot_title\": \"Reads PHRED quality vs alignments identity\",\n", |
| 585 |
" \"x_nbins\": 200,\n", |
| 586 |
" \"y_nbins\": 100,\n", |
| 587 |
" \"smooth_sigma\": 1\n", |
| 588 |
" },\n", |
| 589 |
" \"output_over_time\": {\n", |
| 590 |
" \"plot_title\": \"Output over experiment time\",\n", |
| 591 |
" \"cumulative_color\": \"rgb(204,226,255)\",\n", |
| 592 |
" \"interval_color\": \"rgb(102,168,255)\"\n", |
| 593 |
" },\n", |
| 594 |
" \"read_len_over_time\": {\n", |
| 595 |
" \"plot_title\": \"Read length over experiment time\",\n", |
| 596 |
" \"median_color\": \"rgb(102,168,255)\",\n", |
| 597 |
" \"quartile_color\": \"rgb(153,197,255)\",\n", |
| 598 |
" \"extreme_color\": \"rgba(153,197,255,0.5)\",\n", |
| 599 |
" \"smooth_sigma\": 1\n", |
| 600 |
" },\n", |
| 601 |
" \"read_qual_over_time\": {\n", |
| 602 |
" \"plot_title\": \"Read quality over experiment time\",\n", |
| 603 |
" \"median_color\": \"rgb(250,128,114)\",\n", |
| 604 |
" \"quartile_color\": \"rgb(250,170,160)\",\n", |
| 605 |
" \"extreme_color\": \"rgba(250,170,160,0.5)\",\n", |
| 606 |
" \"smooth_sigma\": 1\n", |
| 607 |
" },\n", |
| 608 |
" \"align_len_over_time\": {\n", |
| 609 |
" \"plot_title\": \"Aligned reads length over experiment time\",\n", |
| 610 |
" \"median_color\": \"rgb(102,168,255)\",\n", |
| 611 |
" \"quartile_color\": \"rgb(153,197,255)\",\n", |
| 612 |
" \"extreme_color\": \"rgba(153,197,255,0.5)\",\n", |
| 613 |
" \"smooth_sigma\": 1\n", |
| 614 |
" },\n", |
| 615 |
" \"identity_freq_over_time\": {\n", |
| 616 |
" \"plot_title\": \"Aligned reads identity over experiment time\",\n", |
| 617 |
" \"median_color\": \"rgb(250,128,114)\",\n", |
| 618 |
" \"quartile_color\": \"rgb(250,170,160)\",\n", |
| 619 |
" \"extreme_color\": \"rgba(250,170,160,0.5)\",\n", |
| 620 |
" \"smooth_sigma\": 1\n", |
| 621 |
" },\n", |
| 622 |
" \"barcode_counts\": {\n", |
| 623 |
" \"plot_title\": \"Number of reads per barcode\",\n", |
| 624 |
" \"colors\": [\n", |
| 625 |
" \"#f8bc9c\",\n", |
| 626 |
" \"#f6e9a1\",\n", |
| 627 |
" \"#f5f8f2\",\n", |
| 628 |
" \"#92d9f5\",\n", |
| 629 |
" \"#4f97ba\"\n", |
| 630 |
" ]\n", |
| 631 |
" },\n", |
| 632 |
" \"channels_activity\": {\n", |
| 633 |
" \"plot_title\": \"Channel activity over time\",\n", |
| 634 |
" \"smooth_sigma\": 1\n", |
| 635 |
" },\n", |
| 636 |
" \"alignment_reads_status\": {\n", |
| 637 |
" \"plot_title\": \"Summary of reads alignment\",\n", |
| 638 |
" \"colors\": [\n", |
| 639 |
" \"#f8bc9c\",\n", |
| 640 |
" \"#f6e9a1\",\n", |
| 641 |
" \"#92d9f5\",\n", |
| 642 |
" \"#4f97ba\",\n", |
| 643 |
" \"#f5f8f2\"\n", |
| 644 |
" ]\n", |
| 645 |
" },\n", |
| 646 |
" \"alignment_rate\": {\n", |
| 647 |
" \"plot_title\": \"Bases alignment rate\",\n", |
| 648 |
" \"colors\": [\n", |
| 649 |
" \"#fcaf94\",\n", |
| 650 |
" \"#828282\",\n", |
| 651 |
" \"#fc8161\",\n", |
| 652 |
" \"#828282\",\n", |
| 653 |
" \"#f44f39\",\n", |
| 654 |
" \"#d52221\",\n", |
| 655 |
" \"#828282\",\n", |
| 656 |
" \"#828282\",\n", |
| 657 |
" \"#828282\",\n", |
| 658 |
" \"#828282\"\n", |
| 659 |
" ]\n", |
| 660 |
" },\n", |
| 661 |
" \"alignment_coverage\": {\n", |
| 662 |
" \"plot_title\": \"Coverage overview\",\n", |
| 663 |
" \"nbins\": 500,\n", |
| 664 |
" \"color\": \"rgba(102,168,255,0.75)\",\n", |
| 665 |
" \"smooth_sigma\": 1\n", |
| 666 |
" }\n", |
| 667 |
"}\n", |
| 668 |
"(pycoQC) " |
| 669 |
] |
| 670 |
}, |
| 671 |
{ |
| 672 |
"ename": "", |
| 673 |
"evalue": "1", |
| 674 |
"output_type": "error", |
| 675 |
"traceback": [] |
| 676 |
} |
| 677 |
], |
| 678 |
"source": [ |
| 679 |
"pycoQC --default_config" |
| 680 |
] |
| 681 |
}, |
| 682 |
{ |
| 683 |
"cell_type": "markdown", |
| 684 |
"metadata": { |
| 685 |
"ExecuteTime": { |
| 686 |
"end_time": "2019-06-24T15:52:37.096001Z", |
| 687 |
"start_time": "2019-06-24T15:52:36.888372Z" |
| 688 |
} |
| 689 |
}, |
| 690 |
"source": [ |
| 691 |
"To save and edit it redirect the std output to a file and make your changes using your favorite text editor.\n", |
| 692 |
"\n", |
| 693 |
"To remove a plot from the report, just remove it (or comment it) from the configuration file\n", |
| 694 |
"\n", |
| 695 |
"The configuration file accept all the arguments of the target plotting functions. For more information refer to the API documentation" |
| 696 |
] |
| 697 |
}, |
| 698 |
{ |
| 699 |
"cell_type": "code", |
| 700 |
"execution_count": 37, |
| 701 |
"metadata": { |
| 702 |
"ExecuteTime": { |
| 703 |
"end_time": "2019-11-07T16:01:43.427091Z", |
| 704 |
"start_time": "2019-11-07T16:01:41.355758Z" |
| 705 |
} |
| 706 |
}, |
| 707 |
"outputs": [ |
| 708 |
{ |
| 709 |
"name": "stdout", |
| 710 |
"output_type": "stream", |
| 711 |
"text": [ |
| 712 |
"(pycoQC) " |
| 713 |
] |
| 714 |
}, |
| 715 |
{ |
| 716 |
"ename": "", |
| 717 |
"evalue": "1", |
| 718 |
"output_type": "error", |
| 719 |
"traceback": [] |
| 720 |
} |
| 721 |
], |
| 722 |
"source": [ |
| 723 |
"pycoQC --default_config > data/pycoQC_config.json" |
| 724 |
] |
| 725 |
}, |
| 726 |
{ |
| 727 |
"cell_type": "markdown", |
| 728 |
"metadata": {}, |
| 729 |
"source": [ |
| 730 |
"Run pycoQC with `--config` option" |
| 731 |
] |
| 732 |
}, |
| 733 |
{ |
| 734 |
"cell_type": "code", |
| 735 |
"execution_count": 12, |
| 736 |
"metadata": { |
| 737 |
"ExecuteTime": { |
| 738 |
"end_time": "2020-02-10T14:13:01.620742Z", |
| 739 |
"start_time": "2020-02-10T14:12:54.500540Z" |
| 740 |
}, |
| 741 |
"scrolled": false |
| 742 |
}, |
| 743 |
"outputs": [ |
| 744 |
{ |
| 745 |
"name": "stdout", |
| 746 |
"output_type": "stream", |
| 747 |
"text": [ |
| 748 |
"Checking arguments values\n", |
| 749 |
"Check input data files\n", |
| 750 |
"Parse data files\n", |
| 751 |
"Merge data\n", |
| 752 |
"Cleaning data\n", |
| 753 |
"Loading plotting interface\n", |
| 754 |
"(pycoQC) " |
| 755 |
] |
| 756 |
}, |
| 757 |
{ |
| 758 |
"ename": "", |
| 759 |
"evalue": "1", |
| 760 |
"output_type": "error", |
| 761 |
"traceback": [] |
| 762 |
} |
| 763 |
], |
| 764 |
"source": [ |
| 765 |
"pycoQC \\\n", |
| 766 |
" -f ./data/Albacore-1.7.0_basecall-1D-DNA_sequencing_summary.txt.gz\\\n", |
| 767 |
" -o ./results/Albacore-1.7.0_basecall-1D-DNA.html \\\n", |
| 768 |
" --config ./data/pycoQC_config.json \\\n", |
| 769 |
" --quiet" |
| 770 |
] |
| 771 |
}, |
| 772 |
{ |
| 773 |
"cell_type": "markdown", |
| 774 |
"metadata": {}, |
| 775 |
"source": [ |
| 776 |
"[HTML OUTPUT](https://a-slide.github.io/pycoQC/pycoQC/results/Albacore-1.7.0_basecall-1D-DNA.html)" |
| 777 |
] |
| 778 |
} |
| 779 |
], |
| 780 |
"metadata": { |
| 781 |
"celltoolbar": "Initialization Cell", |
| 782 |
"hide_input": false, |
| 783 |
"kernelspec": { |
| 784 |
"display_name": "Bash", |
| 785 |
"language": "bash", |
| 786 |
"name": "bash" |
| 787 |
}, |
| 788 |
"language_info": { |
| 789 |
"codemirror_mode": "shell", |
| 790 |
"file_extension": ".sh", |
| 791 |
"mimetype": "text/x-sh", |
| 792 |
"name": "bash" |
| 793 |
}, |
| 794 |
"widgets": { |
| 795 |
"state": {}, |
| 796 |
"version": "1.1.1" |
| 797 |
} |
| 798 |
}, |
| 799 |
"nbformat": 4, |
| 800 |
"nbformat_minor": 1 |
| 801 |
} |