Skip to content
A pipeline for completing circular bacterial genomes using a sampling strategy
Python Dockerfile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


This pipeline is designed to complete circular bacterial genomes using a sampling strategy from a sinlge MinION with barcoding

To run with Docker

Since CCBGpipe implements many analytical tools, we strongly recommend you to run it with Docker. Alternatively, you can install all dependencies as listed in the Installation section.

git clone

cd CCBGpipe

docker build -t "ccbgpipe:v1" ./

docker run -h ccbgpipe --name ccbgpipe -t -i -v /:/MyData ccbgpipe:v1 /bin/bash

Inside the docker: root@ccbgpipe:/# 
To install java:
    apt-get update
    apt-get install -y software-properties-common
    add-apt-repository ppa:webupd8team/java
    apt-get update && apt-get install oracle-java8-installer

Please note: the Oracle JDK license has changed starting April 16, 2019.
You can download zulu to include Java (
    apt-key adv --keyserver hkp:// --recv-keys 0xB1998361219BD9C9
    apt-add-repository 'deb stable main'
    echo 'deb stable main' > /etc/apt/sources.list.d/zulu.list
    apt-get update
    apt-get install zulu-8


Installation from source

cd /opt

git clone

cd CCBGpipe/CCBGpipe

chmod +x *.py

export PATH="$PATH:/opt/CCBGpipe/CCBGpipe/"


Before installing these dependencies it may be required to install some prerequisite libraries, best installed by a package manager. On Ubuntu theses are:

  • cmake
  • liblzma-dev
  • libbz2-dev
  • libz-dev
  • libncurses-dev
  • libcurl4-gnutls-dev
  • libssl-dev
  • make
  • wget
  • python3-all-dev
  • parallel
  • networkx
  • pandas
  • pyfastaq

Quick usage

  • To extract fastq (joinedreads.fastq) and fast5 files using Joinedreads.fastq and fast5 files are both produced in the directory (outpath/fast5/barcodeXX/). path-to-raw_reads outpath (e.g., raw-reads albacore)

  • To create a Run folder and enter it

mkdir Run && cd Run

  • To get high-quality and long-length reads from joinedreads.fastq using path-to-fast5 (e.g., ../albacore/fast5)

  • To get miniasm assemblies using

  • To run canu with the sampling strategy by using

  • To run racon and nanopolish for consensus sequence generation using with fast5 files path-to-fast5 (e.g., ../albacore/fast5/)

  • To get circular genomes by using outpath (e.g., ../results)

Basecalling with Guppy instead of Albacore

  • To extract fastq files using guppy_bascaller

guppy_basecaller -i path-to-raw_reads -s outpath (e.g., guppy_basecaller -i Fast5 -s guppy_out)

  • To de-multiplex

guppy_barcoder -i inpath -s outpath (e.g., guppy_barcoder -i guppy_out -s barcoding)

  • To produce read_id list and joinedreads.fastq for each barcode -b path-to-barcoding_summary.txt -s path-to-sequencing_summary.txt -o outpath (e.g., -b barcoding/barcoding_summay.txt -s guppy_out/sequencing_summary.txt -o outdir)

e.g., filter_reads --recursive --multi --workers 32 Fast5/ fast5/barcode01 outdir/barcode01/barcode01_readid.tsv

  • With the data produced by the above process, you can perform CCBGpipe by beginning with creating a Run folder

mkdir Run && cd Run path-to-fast5 (e.g., ../outdir/) path-to-fast5 (e.g., ../fast5/) outpath (e.g., ../results)

You can’t perform that action at this time.