nf-core pipeline · bacteria, bacterial, bacterial-genome-analysis
nf-core/bactmap
A reference-mapping pipeline that calls variants and builds pseudogenome alignments from bacterial genome reads.
What nf-core/bactmap is
nf-core/bactmap is an analysis pipeline designed for bacterial whole-genome sequencing (WGS). It processes short reads from Illumina platforms as well as long reads from Oxford Nanopore Technologies (ONT) by aligning them against a provided reference sequence, identifying high-confidence variants, and assembling pseudogenomes for downstream phylogenetic study. The pipeline was originally written by Anthony Underwood, Andries van Tonder, and Thanh Le Viet.
Phylogenetic reconstruction of bacterial isolates often relies on identifying single-nucleotide polymorphisms (SNPs) across genomes relative to a reference. nf-core/bactmap automates this workflow from raw sequencing data, standardising read quality control, optional trimming, read downsampling, reference mapping, variant calling, filtering, consensus sequence creation, and extraction of variable sites.
The workflow supports both single-end and paired-end Illumina datasets alongside ONT long-read sequencing, allowing researchers to evaluate sequence quality and derive multialignment FASTA files ready for tree inference.
What the pipeline does
The workflow begins by indexing the reference FASTA using BWA, Bowtie2, or minimap2, followed by raw read assessment using FastQC or falco and fastq-scan. Optional pre-processing modules allow adapter trimming and run merging using fastp, AdapterRemoval2, Porechop, or Porechop_ABI, as well as read filtering with Filtlong or Nanoq, and depth downsampling using Rasusa. Read metrics are tracked before and after filtering.
Short reads are aligned to the reference using BWA-MEM2 or Bowtie2, whilst long reads are aligned with minimap2. Alignments are sorted, indexed, and evaluated with SAMtools. Variants are called using FreeBayes for short reads or Clair3 for long reads, then filtered using BCFtools. High-quality variant calls and reference coverage depths from BEDtools are combined with BCFtools consensus to produce pseudogenome FASTA sequences. High-quality pseudogenomes are concatenated into an alignment, variant sites are extracted using SNP-sites, and summary metrics across all steps are compiled into a MultiQC report.
Key facts
- Input formats
- FASTQ (gzipped, single-end or paired-end Illumina, or Oxford Nanopore), reference FASTA, CSV samplesheet
- Short-read aligners
- BWA-MEM2, Bowtie2
- Long-read aligner
- minimap2
- Variant callers
- FreeBayes (short reads), Clair3 (long reads)
- Key outputs
- Filtered VCF/BCF files, pseudogenome FASTA files, alignment of pseudogenomes, SNP-sites alignment, MultiQC report
- Original authors
- Anthony Underwood, Andries van Tonder, Thanh Le Viet
- Initial release date
- 18 June 2021
What you can use it for
- Bacterial phylogenetic analysis
- Construct multi-sample pseudogenome alignments and extract SNP sites from Illumina or Oxford Nanopore bacterial isolates to infer phylogenetic relationships.
- Reference-guided variant calling
- Map short or long sequencing reads against a bacterial reference genome to generate filtered variant call format (VCF) files.
- Pseudogenome generation
- Incorporate high-confidence consensus variants and depth-covered positions into a reference-based consensus FASTA for each sequenced isolate.
Run it here
The research agent runs nf-core/bactmap with Nextflow on its own machine — up to 32 cores, 256 GiB of memory and 24 hours per run, which covers the test profile and real single-sample runs. It builds the samplesheet, checks it against the pipeline's schema and reads the results back. When a run is too big for one machine, it gives you the exact command for your own cluster instead.
Strengths and limits
Good at
- Supports both Illumina short reads and Oxford Nanopore long reads within the same framework.
- Includes flexible read-processing modules for adapter removal, quality filtering, and downsampling.
- Combines consensus calling with genomic coverage checking using BEDtools and BCFtools to build pseudogenomes.
- Compiles comprehensive quality control, alignment, and variant metrics into a single MultiQC report.
Watch out for
- Oxford Nanopore variant calling requires an external pre-downloaded Clair3 model file.
- Phylogenetic tree inference software itself is not run by the pipeline, which concludes at extracting SNP sites from the pseudogenome alignment.
- Parameters must be provided via the command line or Nextflow parameter files rather than custom configuration files.
Questions
Can I run nf-core/bactmap without my own cluster?
The research agent runs nf-core/bactmap with Nextflow on its own machine — up to 32 cores, 256 GiB of memory and 24 hours per run, which covers the test profile and real single-sample runs. It builds the samplesheet, checks it against the pipeline's schema and reads the results back. When a run is too big for one machine, it gives you the exact command for your own cluster instead.
What licence is nf-core/bactmap under?
MIT, like every nf-core pipeline.
What sequencing platforms does nf-core/bactmap support?
It supports short reads from Illumina (both single-end and paired-end) and long reads from Oxford Nanopore.
Which variant callers are utilised?
FreeBayes is used for calling variants from short-read data, whereas Clair3 is used for Oxford Nanopore long-read data.
What extra input is needed for Oxford Nanopore datasets?
A trained Clair3 model appropriate for the chemistry and basecaller must be supplied using the --clair3_model argument.
Does the pipeline infer phylogenetic trees directly?
No. The pipeline generates aligned pseudogenomes and extracts variant positions using SNP-sites, which can then be passed to external phylogenetic tree software.
How to cite it
Philip Ewels, Alexander Peltzer, Sven Fillinger, Harshil Patel, Johannes Alneberg, Andreas Wilm, Maxime Ulysse Garcia, Paolo Di Tommaso & Sven Nahnsen. The nf-core framework for community-curated bioinformatics pipelines. Nat Biotechnol. 2020 Feb 13. doi: 10.1038/s41587-020-0439-x.
Written from nf-core/bactmap's own README. Statements citing a figure that does not appear there are removed before publication. Licence and running details come from our registry.