Welcome to StaphScope Docker
1.5K
StaphScope is a complete, all-in-one pipeline for Staphylococcus aureus genomics:
Everything is pre-installed. All databases (MLST scheme, AMRFinderPlus, ABRicate, mobileOG-db) and every tool (BLAST, DIAMOND, Prodigal, fastANI, agrVATE) are baked into the image. No --pull-mlst-db, no --update-amr-db, no abricate --setupdb โ pull and run.
# Pull the image
docker pull bbeckleyhub/staphscope:2.0.0
# Single genome (correct file ownership โ no padlock)
docker run --rm \
-u $(id -u):$(id -g) \
-v "$(pwd):/data" \
bbeckleyhub/staphscope:2.0.0 \
-i "/data/my_genome.fna" -o /data/results
# Batch processing
docker run --rm \
-u $(id -u):$(id -g) \
-v "$(pwd):/data" \
bbeckleyhub/staphscope:2.0.0 \
-i "/data/*.fna" -o /data/results --threads 8
Why
-u $(id -u):$(id -g)? Ensures all output files are owned by your host user โ nosudo chown, no padlock icons.
| Feature | Description |
|---|---|
| ๐ฑ MGE module | Mobile genetic element profiling via mobileOG-db โ 10 functional categories (Integrase, Transfer, Stability, Phage, Replication, IS, ICE, Plasmid, Phage-assoc., Key MGE-signatures) |
| ๐ Capsule module | cap5 / cap8 serotype determination with completeness scoring |
| ๐ก๏ธ SCCmec RPet caller | Independent second opinion from Robert A. Petit III's sccmec, side-by-side with CGE SCCmecFinder, with automatic naming-format normalization |
| ๐งฌ fastANI species check | FASTA QC confirms species identity against the 95% ANI boundary |
| ๐จ Interactive Plotly dashboard | Ten tabs โ Overview, Typing, QC, AMR, Virulence, MGE, Resistance, Alerts, Story, Compare |
| โ๏ธ Compare tab | Pairwise similarity verdict + typing diff + gene-content split, plus union-find cluster detection |
| ๐ Three reporting layers | Comprehensive + gene-centric + sample-centric (all in one folder) |
| ๐งน Share-aware orchestrator | Modules resolve from $PREFIX/share/staphscope/modules/ โ works identically in conda, Docker, and Apptainer |
๐ก๏ธ ENV HOME=/tmp | Fixes /root/.local permission errors for non-root users |
| ๐ก๏ธ Full conda env activation in the entrypoint | LD_LIBRARY_PATH is set so AMRFinderPlus and other bioconda binaries work out of the box |
Breaking changes from v1.x: module folder names changed (
sccmec_module/โsccmec_module_cge/,summary_module/โgene_centric_module/). Visualization now reads CSVs and the master TSV, not HTML.
docker run --rm \
-u $(id -u):$(id -g) \
-v "$(pwd):/data" \
bbeckleyhub/staphscope:2.0.0 \
-i "/data/SA001.fasta" -o /data/SA001_results
docker run --rm \
-u $(id -u):$(id -g) \
-v "$(pwd):/data" \
bbeckleyhub/staphscope:2.0.0 \
-i "/data/*.fna" -o /data/batch_results --threads 16
docker run --rm \
-u $(id -u):$(id -g) \
-v "$(pwd):/data" \
bbeckleyhub/staphscope:2.0.0 \
-i "/data/*.fasta" -o /data/results \
--skip-mge --skip-amr --skip-abricate --skip-visualization
docker run --rm \
-u $(id -u):$(id -g) \
-v "$(pwd):/data" \
bbeckleyhub/staphscope:2.0.0 \
-i "/data/*.fna" -o /data/results \
--skip-mge --skip-capsule --skip-sccmec-rpet
docker run --rm \
-u $(id -u):$(id -g) \
-v "$(pwd):/data" \
bbeckleyhub/staphscope:2.0.0 \
-i "/data/*.fna" -o /data/results \
--amr-min-identity 0.95 --amr-min-coverage 0.9 --skip-amr-mutations
docker run --rm \
-u $(id -u):$(id -g) \
-v "$(pwd):/data" \
bbeckleyhub/staphscope:2.0.0 \
-i "/data/*.fna" -o /data/results --clean-output
docker run --rm -it \
-u $(id -u):$(id -g) \
-v "$(pwd):/data" \
bbeckleyhub/staphscope:2.0.0 bash
On HPC clusters without Docker, use Singularity (or Apptainer โ same SIF format). Runs as your real UID automatically โ no -u, no -e HOME.
# 1. Load runtime + mksquashfs (needed only for pull)
module load containers/singularity/3.6.4 # or: module load apptainer
module load squashfs-tools/4.4 # only for the pull
# 2. Pull the image (one-time, needs internet on login node)
singularity pull staphscope_2.0.0.sif docker://bbeckleyhub/staphscope:2.0.0
# 3. Run โ always use `run`, not `exec`
singularity run --bind $(pwd):/data \
staphscope_2.0.0.sif \
-i "/data/*.fna" -o /data/output -t 16
Use
singularity run, notsingularity exec. The image's entrypoint sets upPATHandLD_LIBRARY_PATHfor the conda environment.runinvokes it;execskips it and will break AMRFinderPlus.
#!/bin/bash
#SBATCH --job-name=staphscope
#SBATCH --cpus-per-task=16
#SBATCH --mem=32G
#SBATCH --time=04:00:00
module load containers/singularity/3.6.4
cd $SLURM_SUBMIT_DIR
singularity run --bind $(pwd):/data \
/path/to/staphscope_2.0.0.sif \
-i "/data/*.fna" -o /data/output -t ${SLURM_CPUS_PER_TASK}
mksquashfsis only needed for the pull. Compute nodes only need Singularity.
results/
โโโ Staphscope_final_report/ # ๐ The folder you need
โ โโโ staphscope_comprehensive_report.html
โ โโโ staphscope_comprehensive_report.json
โ โโโ staphscope_comprehensive_report.tsv # Master typing TSV
โ โโโ STAPHSCOPE_ULTIMATE_GENE_CENTRIC_REPORTS/
โ โ โโโ staphscope_ultimate_gene_centric_report.html
โ โ โโโ amr_genes.csv
โ โ โโโ virulence_genes.csv
โ โ โโโ bacmet_genes.csv
โ โ โโโ plasmid_replicons.csv
โ โ โโโ mutations.csv
โ โ โโโ mge_profile.csv
โ โ โโโ fasta_qc.csv
โ โ โโโ sample_overview.csv
โ โโโ STAPHSCOPE_ULTIMATE_SAMPLE_CENTRIC_REPORTS/
โ โโโ staphscope_ultimate_sample_centric_report.html
โ โโโ staphscope_ultimate_sample_centric_report.json
โโโ STAPHSCOPE_VISUALIZATIONS/ # Interactive dashboard + static exports
โ โโโ staphscope_dashboard.html # โ Plotly dashboard, single file
โ โโโ PNG/ PDF/ SVG/ DATA/
โ โโโ staphscope_visualizations_bundle.zip
โโโ mge_results/ # Per-module outputs
โโโ mlst_results/
โโโ spa_results/
โโโ sccmec_cge_results/
โโโ sccmec_rpet_results/
โโโ capsule_results/
โโโ agr_results/
โโโ staph_amrfinder_results/
โโโ abricate_results/
โโโ fasta_qc_results/
โโโ staphscope_run.log
Open in your browser:
Staphscope_final_report/STAPHSCOPE_ULTIMATE_GENE_CENTRIC_REPORTS/staphscope_ultimate_gene_centric_report.htmlSTAPHSCOPE_VISUALIZATIONS/staphscope_dashboard.htmlmkdir -p test_data
wget -O test_data/SA.fna \
https://ftp.ncbi.nlm.nih.gov/genomes/all/GCF/000/013/425/GCF_000013425.1_ASM1342v1/GCF_000013425.1_ASM1342v1_genomic.fna
docker run --rm \
-u $(id -u):$(id -g) \
-v "$(pwd)/test_data:/data" \
bbeckleyhub/staphscope:2.0.0 \
-i "/data/*.fna" -o /data/results --threads 4
firefox test_data/results/STAPHSCOPE_VISUALIZATIONS/staphscope_dashboard.html
git clone https://github.com/bbeckley-hub/staphscope-typing-tool.git
cd staphscope-typing-tool
docker build -t staphscope:custom .
The Dockerfile bakes in:
environment.ymlabricate --setupdbstaphscope --pull-mlst-db)HOME=/tmp for non-root executionPATH and LD_LIBRARY_PATH for the conda env| Flag | Description |
|---|---|
-i, --input | Input FASTA file(s) โ supports glob patterns like "*.fna" |
-o, --output | Output directory |
-t, --threads | Number of CPU threads (default: 2) |
--skip-fasta-qc | Skip FASTA QC + fastANI species confirmation |
--skip-mlst | Skip MLST typing |
--skip-spa | Skip spa typing |
--skip-sccmec | Skip SCCmec CGE typing |
--skip-sccmec-rpet | Skip SCCmec RPet typing |
--skip-capsule | Skip capsule typing |
--skip-agr | Skip agr typing |
--skip-amr | Skip AMRFinderPlus |
--skip-abricate | Skip ABRicate |
--skip-mge | Skip MGE profiling |
--skip-lineage | Skip lineage reference generation |
--skip-comprehensive | Skip comprehensive + gene-centric reports |
--skip-sample-centric | Skip sample-centric report |
--skip-visualization | Skip visualization dashboard |
--amr-min-identity | Minimum identity for AMR hits (0โ1) |
--amr-min-coverage | Minimum coverage for AMR hits (0โ1) |
--skip-amr-mutations | Disable point mutation reporting |
--abricate-minid / --abricate-mincov | ABRicate thresholds (default 80) |
--clean-output | Delete output directory before starting |
--keep-temp | Do not delete temp directories (debugging only) |
We also built a companion toolkit that generates iTOL-ready annotation files from StaphScope outputs โ no Excel gymnastics required.
git clone https://github.com/bbeckley-hub/staphscope-toolkit.git
cd staphscope-toolkit
pip install -r requirements.txt
python staphscope_itol.py --input_dir /path/to/Staphscope_final_report
Drag the generated files into iTOLโ โ that's it.
๐ github.com/bbeckley-hub/staphscope-toolkitโ
| Problem | Solution |
|---|---|
| Permission denied / padlock icons | Add -u $(id -u):$(id -g) to your docker run command |
BUNDLED AMRfinderPlus not properly installed (Singularity) | Use singularity run, not singularity exec |
mksquashfs: executable file not found (Singularity pull) | module load squashfs-tools/4.4 before singularity pull |
| Out of memory | Add --memory="8g" to docker run |
Permission denied: '/.local' | Should be fixed by ENV HOME=/tmp โ make sure you're using the v2.0.0 image |
manifest unknown on pull | The tag hasn't been pushed โ check https://hub.docker.com/r/bbeckleyhub/staphscope/tagsโ |
| Cross-run contamination | Use --clean-output or delete the output dir between runs |
For further help, open an issue on GitHubโ or email [email protected]โ .
If you use StaphScope in your research, please cite:
Beckley, B., Amarh, V. (2026). StaphScope: a species-optimized computational pipeline for rapid and accessible Staphylococcus aureus genotyping and surveillance. BMC Genomics, 27:123. DOI: 10.1186/s12864-026-12609-xโ
@article{beckley2026staphscope,
title={StaphScope: a species-optimized computational pipeline for rapid and accessible Staphylococcus aureus genotyping and surveillance},
author={Beckley, Brown and Amarh, Vincent},
journal={BMC Genomics},
volume={27},
pages={123},
year={2026},
doi={10.1186/s12864-026-12609-x}
}
MIT License โ see LICENSEโ for details.
Content type
Image
Digest
sha256:a36c3bb40โฆ
Size
1.8 GB
Last updated
about 13 hours ago
docker pull bbeckleyhub/staphscope