Reproducible Nextflow pipeline for replicating the genomic and functional analysis of cefiderocol resistance in Acinetobacter baumannii from:
Morosi et al. (2024). Distinct chromosomal mutation associated with cefiderocol resistance in Acinetobacter baumannii: a combined bioinformatics and mass spectrometry approach to unveil and validate the in vivo-acquired chemoresistance. Front. Microbiol. 15:1480322. DOI: 10.3389/fmicb.2024.1480322
This pipeline automates the complete genomic analysis workflow for detecting cefiderocol resistance mechanisms in A. baumannii, including:
- ✅ Quality control and read trimming (Trim Galore)
- ✅ Genome assembly (SPAdes)
- ✅ Contamination detection (FCS-GX)
- ✅ Genome comparison (FastANI, pyANI)
- ✅ Sequence typing (MLST)
- ✅ Genome annotation (Prokka)
- ✅ Variant calling (Snippy)
- ✅ Variant annotation and summary reporting
# Clone the repository
git clone https://github.com/yourusername/cefiderocol-resistance-pipeline.git
cd cefiderocol-resistance-pipeline
# Run the full setup (downloads genomes and prepares reads)
bash bin/setup.shnextflow run main.nf \
--reads_dir ./reads \
--reference_genome bin/test_data/reference.fasta \
--outdir ./results \
-profile dockernextflow run main.nf \
--reads_dir ./reads \
--reference_genome bin/test_data/reference.fasta \
--outdir ./results \
-profile condanextflow run main.nf -profile test,condaPlace paired-end FASTQ files in a single directory with the naming convention:
reads/
├── sample1_R1.fastq.gz
├── sample1_R2.fastq.gz
├── sample2_R1.fastq.gz
└── sample2_R2.fastq.gz
Supported naming patterns:
*_R1.fastq.gz/*_R2.fastq.gz*_1.fastq.gz/*_2.fastq.gz
Provide a reference genome FASTA file (e.g., A. baumannii reference strain)
Example: Using reference from the paper
# Available from NCBI BioProject PRJNA1126554
# Or download from ENA
wget ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/022/468/295/GCA_022468295.1_ASM2246829v1/GCA_022468295.1_ASM2246829v1_genomic.fna.gz
gunzip GCA_022468295.1_ASM2246829v1_genomic.fna.gzresults/
├── 01_trimmed_reads/ # Quality-controlled reads
├── 02_assembly/ # Assembled genomes (contigs)
├── 03_contamination_detection/ # FCS-GX contamination report
├── 04_genome_comparison/ # ANI results (FastANI, pyANI)
│ ├── fastani/ # Pairwise ANI comparisons
│ └── pyani/ # Whole-genome alignments
├── 05_sequence_typing/ # MLST results
├── 06_annotation/ # Prokka annotations (GFF, FAA)
├── 07_variant_calling/ # Snippy variants (VCF)
│ └── core/ # Core SNP alignment
├── 08_variant_annotation/ # Annotated VCF and variant summaries
├── pipeline_report.html # Execution report
├── pipeline_timeline.html # Runtime statistics
└── pipeline_dag.html # Workflow DAG
The final output of the pipeline is the annotated variant summary:
sample_id_annotated.vcf- Annotated VCF copy generated from Snippy outputsample_id_variant_summary.txt- SNP/INDEL summary with per-variant listing
These files provide the functional variant summary used for downstream interpretation.
# Assembly parameters
--spades_memory 32 # SPAdes RAM allocation (GB)
--spades_cpus 8 # SPAdes CPU threads
--spades_kmers "21,33,55,77,99,127" # k-mer sizes for assembly
# Quality filtering
--clip_r1 5 # Clip 5bp from R1
--clip_r2 5 # Clip 5bp from R2
--quality 20 # Minimum base quality
--length 75 # Minimum read length
# Variant calling
--snippy_minsnps 4 # Minimum SNPs for core alignment
--snippy_minqual 60 # Minimum variant quality
--snippy_mincov 10 # Minimum variant coverage- docker - Run with Docker containers (reproducible)
- conda - Run with Conda environments
- singularity - Run with Singularity containers (HPC-friendly)
- test - Run with minimal resources on synthetic data
Modify in nextflow.config:
process {
cpus = 2
memory = 4.GB
withName: SPADES {
cpus = 8
memory = 32.GB
}
}- Trim Galore: Quality trimming and adapter removal
- Parameters: quality ≥ 20, minimum length 75 bp
- SPAdes: De novo assembly with multiple k-mers
- Parameters: k-mer range 21-127, careful mode enabled
- FCS-GX: Detects non-target organism sequences
- FastANI: Rapid pairwise ANI calculation
- pyANI: MUMmer-based whole-genome alignment
- Snippy: Variant calling against reference
- Snippy-core: Core SNP alignment across samples
- Variant Annotation Module: Summarizes Snippy variants and copies the annotated VCF
- Functional interpretation of SNP and INDEL calls
If you use this pipeline, please cite:
@article{Morosi2024,
title={Distinct chromosomal mutation associated with cefiderocol resistance
in {A}cinetobacter baumannii: a combined bioinformatics and mass
spectrometry approach},
author={Morosi, L. and Golzato, D. and Bussini, L. and others},
journal={Frontiers in Microbiology},
volume={15},
pages={1480322},
year={2024},
doi={10.3389/fmicb.2024.1480322}
}Also cite the tools:
- Nextflow: Di Tommaso et al. (2017), Nat. Biotechnol. 35:316-320
- SPAdes: Bankevich et al. (2012), J. Comput. Biol. 19:455-477
- Snippy: Seemann (2015), https://github.com/tseemann/snippy
Solution: Ensure Docker daemon is running or switch to Conda profile
nextflow run main.nf -profile condaSolution: Increase resource allocation
--spades_memory 64 --spades_cpus 16Solution: Check file naming and path
# List files to verify naming
ls -la reads/*fastq.gz- Single isolate: ~30-45 minutes (with 8 CPU, 32 GB RAM)
- Multiple isolates: Scales linearly; supports HPC submission
- Disk space: ~20-30 GB per complete analysis
nextflow run main.nf \
--reads_dir ./reads \
--reference_genome bin/test_data/reference.fasta \
-profile singularity \
-cluster slurm \
--slurm_queue normalnextflow run main.nf -resume -profile dockernextflow run main.nf -profile test,conda -with-dag dag.pdfContributions welcome! Please:
- Fork the repository
- Create a feature branch
- Submit a pull request
MIT License - See LICENSE file
For issues, questions, or suggestions:
- Open an Issue
- Consult the Documentation
- Contact the paper authors
- Paper: Morosi et al. Front. Microbiol. 2024. DOI: 10.3389/fmicb.2024.1480322
- Related: McElheny et al. Microbiol. Spectr. 2021. DOI: 10.1128/Spectrum.01779-21
- Review: Noinaj et al. Annu. Rev. Microbiol. 2010. DOI: 10.1146/annurev.micro.112408.134247
Last Updated: April 2026
Nextflow Version: ≥ 25.10.0
Maintained by: Co-authors of Morosi et al. 2024