bacQC is a bioinformatics analysis pipeline for trimming Illumina reads with fastp, assessing read quality with fastQC and species composition with Kraken2 and Bracken. It also allows reads to be extracted using a Taxon id (optional).
The pipeline is built using Nextflow, a workflow tool to run tasks across multiple compute infrastructures in a very portable manner. It uses Docker/Singularity containers making installation trivial and results highly reproducible. The Nextflow DSL2 implementation of this pipeline uses one container per process which makes it much easier to maintain and update software dependencies.
- Read QC (
FastQC
) - Calculate fastq summary statistics (
fastq-scan
) - Trim reads for quality and adapter sequence (
fastp
) - Assign taxonomic labels to sequence reads (
Kraken 2
) - Re-estimate taxonomic abundance of samples analyzed by kraken 2(
Bracken
) - Extract reads using Taxon ID (
KrakenTools
)) (OPTIONAL) - Present QC and visualisation for raw read, trimmed read and kraken2/Bracken results (
MultiQC
)
-
Install
Nextflow
(>=21.10.3
) -
Install any of
Docker
,Singularity
(you can follow this tutorial),Podman
,Shifter
orCharliecloud
for full pipeline reproducibility (you can useConda
both to install Nextflow itself and also to manage software within pipelines. Please only use it within pipelines as a last resort; see docs). -
Download taxonomic databases for Kraken 2 and Bracken (this is a large file and may take a while):
wget ftp://ftp.ccb.jhu.edu/pub/data/kraken2_dbs/old/minikraken2_v1_8GB_201904.tgz tar xvfz minikraken2_v1_8GB_201904.tgz
-
Download the pipeline and test it on a minimal dataset with a single command:
nextflow run avantonder/bacQC -profile test,YOURPROFILE --outdir <OUTDIR>
Note that some form of configuration will be needed so that Nextflow knows how to fetch the required software. This is usually done in the form of a config profile (
YOURPROFILE
in the example command above). You can chain multiple config profiles in a comma-separated string.- The pipeline comes with config profiles called
docker
,singularity
,podman
,shifter
,charliecloud
andconda
which instruct the pipeline to use the named tool for software management. For example,-profile test,docker
. - Please check nf-core/configs to see if a custom config file to run nf-core pipelines already exists for your Institute. If so, you can simply use
-profile <institute>
in your command. This will enable eitherdocker
orsingularity
and set the appropriate execution settings for your local compute environment. - If you are using
singularity
, please use thenf-core download
command to download images first, before running the pipeline. Setting theNXF_SINGULARITY_CACHEDIR
orsingularity.cacheDir
Nextflow options enables you to store and re-use the images from a central location for future pipeline runs. - If you are using
conda
, it is highly recommended to use theNXF_CONDA_CACHEDIR
orconda.cacheDir
settings to store the environments in a central location for future pipeline runs.
- The pipeline comes with config profiles called
-
An executable Python script called
fastq_dir_to_samplesheet.py
has been provided and would like to auto-create an input samplesheet based on a directory containing FastQ files before you run the pipeline (requires Python 3 installed locally) e.g.wget -L https://raw.githubusercontent.com/avantonder/bacQC/main/bin/fastq_dir_to_samplesheet.py ./fastq_dir_to_samplesheet.py <FASTQ_DIR> samplesheet.csv -r1 <FWD_FASTQ_SUFFIX> -r2 <REV_FASTQ_SUFFIX>
Alternatively the samplesheet.csv file created by nf-core/fetchngs can also be used.
-
Start running your own analysis!
- Typical command for QC and species composition
nextflow run avantonder/bacQC \ -profile <docker/singularity/podman/conda/institute> \ --input samplesheet.csv \ --kraken2db minikraken2_v1_8GB \ --genome_size 4300000 \ --outdir <OUTDIR>
- Typical command for QC, species composition and read extraction using a taxon ID
nextflow run avantonder/bacQC \ -profile <docker/singularity/podman/conda/institute> \ --input samplesheet.csv \ --kraken2db minikraken2_v1_8GB \ --genome_size 4300000 \ --kraken_extract \ --tax_id <TAXON_ID> \ --outdir <OUTDIR>
The avantonder/bacQC pipeline comes with documentation about the pipeline usage, parameters and output.
bacQC was originally written by Andries van Tonder.
I wouldn't have been able to write this pipeline with out the tools, documentation, pipelines and modules made available by the fantastic nf-core community.
If you have any issues, questions or suggestions for improving bovisanalyzer, please submit them to the Issue Tracker.
An extensive list of references for the tools used by the pipeline can be found in the CITATIONS.md
file.
You can cite the nf-core
publication as follows:
The nf-core framework for community-curated bioinformatics pipelines.
Philip Ewels, Alexander Peltzer, Sven Fillinger, Harshil Patel, Johannes Alneberg, Andreas Wilm, Maxime Ulysse Garcia, Paolo Di Tommaso & Sven Nahnsen.
Nat Biotechnol. 2020 Feb 13. doi: 10.1038/s41587-020-0439-x.