Barcode_split API Usage
Running Jupyter notebook
If you want to run pycoQC interactively in Jupyter you need to install Jupyter manually. If you installed pycoQC in a virtual environment then install Jupyter in the same virtual environment.
pip3 install notebook
Launch the notebook in a shell terminal
jupyter notebook
If it does not auto-start, open the following URL in you favorite web browser http://localhost:8888/tree
From Jupyter homepage you can navigate to the directory you want to work in and create a new Python3 Notebook.
Imports
# Run cell with Ctrl + Enter
# Import main pycoQC module
from pycoQC.Barcode_split import Barcode_split
# Import helper functions from pycoQC
from pycoQC.common import jhelp, head, ls
Running Barcode_split
jhelp(Barcode_split)
Barcode_split (summary_file, barcode_file, output_dir, output_unclassified, min_barcode_percent, verbose, quiet)
Parse Albacore sequencing_summary.txt file and split per barcode By default, data for low frequency barcodes and unclassified reads are not written in the output directory
- summary_file (required) [str]
Path to a sequencing_summary generated by Albacore 1.0.0 + (read_fast5_basecaller.py) / Guppy 2.1.3+ (guppy_basecaller). One can also pass multiple space separated file paths or a UNIX style regex matching multiple files
- barcode_file (default: "") [str]
Path to the barcode_file generated by Guppy 2.1.3+ (guppy_barcoder) or Deepbinner 0.2.0+. This is not a required file. One can also pass multiple space separated file paths or a UNIX style regex matching multiple files
- output_dir (default: "") [str]
Folder where to output split barcode data
- output_unclassified (default: False) [bool]
If True unclassified barcodes are also written in a file. By default they are skiped
- min_barcode_percent (default: 0.1) [float]
Minimal percent of total reads to write barcode reads in file.
- verbose (default: False) [bool]
Increase verbosity
- quiet (default: False) [bool]
Reduce verbosity
Basic usage
Barcode_split (
summary_file="./data/Guppy-2.2.4-basecall-1D-DNA_sequencing_summary+barcode.txt.gz",
output_unclassified=True,
output_dir="./results/")
With externaly provided barcodes
Barcode_split (
summary_file="./data/Guppy-basecall-1D-DNA_sequencing_summary.txt.gz",
barcode_file="./data/Guppy-basecall-1D-DNA_deepbinner_barcoding_summary.txt.gz",
output_dir="./results/")
If no barcode an error is raised
Barcode_split (
summary_file="./data/Guppy-basecall-1D-DNA_sequencing_summary.txt.gz",
output_dir="./results/")