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).
- 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
) - Visualize Bracken reports with (
Krona
) - Extract reads using Taxon ID (
KrakenTools
) (OPTIONAL) - Present QC and visualisation for raw read, trimmed read and Kraken2/Bracken results (
MultiQC
)
Note
If you are new to Nextflow and nf-core, please refer to this page on how to set-up Nextflow. Make sure to test your setup with -profile test
before running the workflow on actual data.
You will need to download a taxonomic database 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
You will also need to download the taxonomy file for Krona (this requires Krona to be installed e.g. with Conda):
ktUpdateTaxonomy.sh .
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.
An executable Python script called fastq_dir_to_samplesheet.py
has been provided 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>
sample,fastq_1,fastq_2
SAMPLE_PAIRED_END,/path/to/fastq/files/sample1_1.fastq.gz,/path/to/fastq/files/sample1_2.fastq.gz
SAMPLE_SINGLE_END,/path/to/fastq/files/sample2.fastq.gz,
Alternatively the samplesheet.csv file created by nf-core/fetchngs
can also be used.
Now you can run the pipeline using:
nextflow run avantonder/bacQC \
-profile <docker/singularity/podman/conda/institute> \
--input samplesheet.csv \
--kraken2db path/to/minikraken2_v1_8GB \
--kronadb path/to/taxonomy.tab \
--genome_size 4300000 \
--outdir <OUTDIR>
The 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 path/to/minikraken2_v1_8GB \
--kronadb path/to/taxonomy.tab \
--genome_size 4300000 \
--kraken_extract \
--tax_id <TAXON_ID> \
--outdir <OUTDIR>
See usage docs for all of the available options when running the pipeline.
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 (<INSTITUTION>.config
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 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.
If you use the avantonder/bacQC pipeline, please cite it using the following doi: 10.5281/zenodo.15046661
An extensive list of references for the tools used by the pipeline can be found in the CITATIONS.md
file.