bovisanalyzer is a bioinformatics best-practice analysis pipeline for nextflow pipeline for analyzing Mycobacterium bovis genomes.
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. Where possible, these processes have been submitted to and installed from nf-core/modules in order to make them available to all nf-core pipelines, and to everyone within the Nextflow community!
- Read QC (
FastQC
) - Calculate summary statistics for raw fastq files (
fastq-scan
) - Index reference fasta file (
BWA index
) - Trim reads for quality and adapter sequence (
fastp
) - Calculate summary statistics for trimmed fastq files (
fastq-scan
) - Assign taxonomic labels to sequence reads (
Kraken 2
) - Re-estimate taxonomic abundance of samples analyzed by kraken (
Bracken
) - Downsample fastq files (
Rasusa
) - Detect drug resistance and lineage (
TB-Profiler
) - Detect spoligotype (
SpoTyping
) - Assign GB WGS clade (
APHA-CSU
) - Variant calling
- Read mapping (
BWA mem
) - Sort and index alignments (
SAMtools
) - Duplicate read marking (
picard
) - Call and filter variants (
BCFtools
) - Convert filtered vcf to pseudogenome fasta (
BCFtools
) - Mask each pseudogenome with zero-coverage, low coverage and poorly mapped regions (
BCFtools
) - Calculate the percentage of the reference mapped in each pseudogenome fasta (
seqtk
)
- Read mapping (
- Create alignment from pseudogenome by concatenating fasta files having first checked that the sample sequences are high quality(
calculate_fraction_of_non_GATC_bases.py
) - Extract variant sites from alignment (
SNP-sites
) - Summarise fastq metrics, species composition, genotyping and mapping statistics
- Present QC and visualisation for raw read, alignment, assembly and variant calling results (
MultiQC
)
-
Install
Nextflow
(>=22.04.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/bovisanalyzer -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 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/bovisanalyzer/main/bin/fastq_dir_to_samplesheet.py python 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.
-
The pipeline has been designed to work with the AF2122/97 reference and it's strongly recommended that you use this this sequence. A copy of the reference file has been provided with the pipeline. Start running your own analysis:
- Typical command
nextflow run avantonder/bovisanalyzer \ -profile <docker/singularity/podman/conda/institute> \ --input samplesheet.csv \ --reference <REFERENCE FASTA> \ --kraken2db minikraken2_v1_8GB \ --outdir <OUTDIR>
The avantonder/bovisanalyzer pipeline comes with documentation about the pipeline usage, parameters and output.
avantonder/bovisanalyzer 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. In particular bovisanalyzer owes much to the excellent bactmap pipeline.
If you have any issues, questions or suggestions for improving bovisanalyzer, please submit them to the Issue Tracker.
If you use the avantonder/bovisanalyzer pipeline, please cite it using the following doi: ZENODO_DOI
An extensive list of references for the tools used by the pipeline can be found in the CITATIONS.md
file.