Skip to content
Mcm190Public

About

Windows desktop GUI for antimicrobial resistance (AMR) gene detection using CARD BLAST - fully bundled, no install needed

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

AMRWin - Antimicrobial Resistance Gene Search for Windows

A standalone Windows desktop application for detecting antimicrobial resistance (AMR) genes in DNA sequences. Drop in a genome assembly, FASTQ reads, or a Sanger AB1 file and AMRWin runs BLAST+ against the CARD database, colour-codes hits by drug class, identifies the bacterial species from 16S reads, and exports results to TSV or Excel. Everything is bundled: no Python, no BLAST+ installation, no database setup required.


Download

Get the latest self-contained Windows executable from the Releases page.

AMRSearch_portable.exe - double-click to run, no installer or admin rights needed. Extracts alongside itself on first launch.


Screenshots

AMR Results - colour-coded by drug class clinical priority AMR Results tab

Speciation - bacterial species ID from 16S rRNA BLAST Speciation tab

Summary - drug class and resistance mechanism breakdown Summary tab

CLI mode - rich terminal output (amr_search.py) CLI output


Features

  • Drag-and-drop input - FASTA (assemblies or amplicons), FASTQ short reads, and Sanger AB1 files
  • CARD BLAST search - nucleotide BLAST against homolog and chromosomal variant resistance models
  • Colour-coded results - hits ranked by clinical priority (carbapenems, colistin, glycopeptides, fluoroquinolones, and more)
  • Speciation - optional 16S rRNA BLAST assigns a species call with identity statistics
  • Auto-detect mode - automatically switches between read mode (short reads) and assembly mode (contigs >= 10 kb) based on sequence length
  • Configurable thresholds - identity %, query coverage %, gene coverage %, e-value, and thread count
  • Export - TSV and formatted Excel workbooks with conditional formatting
  • CLI mode - amr_search.py for headless / scripted pipelines (rich terminal output)
  • Fully self-contained - BLAST+ binaries and both databases bundled inside the exe

How It Works

Pipeline

Input file (FASTA / FASTQ / AB1)
        |
        v
  Format conversion
  FASTQ -> FASTA    AB1 -> FASTA
        |
        v
  Auto-detect mode
  max seq length >= 10 kb -> assembly blastn (task=blastn)
  otherwise               -> read blastn     (task=blastn-short)
        |
        v
  blastn vs CARD nucleotide database
  (homolog + chromosomal variant resistance models)
        |
        v
  Parse BLAST output
  Filter by identity / query coverage / gene coverage / e-value
  Annotate hits from ARO index
  (gene name, drug class, resistance mechanism, AMR gene family)
        |
        v
  Colour-code by drug class -> TSV + Excel export
        |
        v (optional)
  blastn vs NCBI 16S rRNA database
  Aggregate top species hits -> species call + identity stats

CARD Database

The bundled AMR database is built from the CARD broadstreet release using loaders/build_amr_db.py. It includes:

  • Homolog models - acquired resistance genes (ESBLs, carbapenemases, MCR, etc.)
  • Variant models - chromosomal mutations conferring resistance (gyrA, parC, OmpK, etc.)

The ARO index (amr_db_aro_index.tsv) maps BLAST subject IDs to gene names, drug classes, resistance mechanisms, and AMR gene families.

Species Identification

When speciation is enabled the app runs blastn against the NCBI 16S ribosomal RNA database. All high-identity hits are grouped by species; the result with the most supporting sequences and the highest average identity is called as the species. The bundled 16S DB can be updated at any time from within the GUI (Settings > Download 16S DB).


Running from Source

Requires Python 3.10+, BLAST+ on PATH, and the pre-built AMR database files.

# 1. Clone and enter the repo
git clone https://github.com/Mcm190/AMRwin.git
cd AMRwin

# 2. Run the setup script (creates venv, installs deps, checks BLAST+)
powershell -ExecutionPolicy Bypass -File setup.ps1

# 3. Build the CARD database (downloads ~100 MB from card.mcmaster.ca)
.venv\Scripts\python.exe loaders\build_amr_db.py --out amr_db

# 4. Launch the GUI
run_gui.bat
# or
.venv\Scripts\python.exe amr_search_gui.py

CLI usage

.venv\Scripts\python.exe amr_search.py --input reads.fasta --db amr_db
.venv\Scripts\python.exe amr_search.py --input reads.fastq --db amr_db --out results.tsv
.venv\Scripts\python.exe amr_search.py --input sanger.ab1  --db amr_db --min-identity 90

Rebuilding the AMR Database

# Download latest CARD release and build BLAST DB (homolog + variant models)
python loaders\build_amr_db.py --out amr_db

# Acquired genes only
python loaders\build_amr_db.py --out amr_db --models homolog

# All three model types
python loaders\build_amr_db.py --out amr_db --models homolog,variant,overexpression

Requires makeblastdb (part of BLAST+) on PATH.


Building the Portable Executable

# Build with PyInstaller (ONEDIR)
.venv\Scripts\pyinstaller.exe amr_search_gui.spec

# Package into a single self-extracting exe with NSIS
makensis AMRSearch.nsi
# Output: dist\AMRSearch_portable.exe

Requires NSIS for the final packaging step.


References

  1. CARD - Alcock BP, et al. CARD 2023: expanded curation, detection models and ontological representation of antibiotic resistance. Nucleic Acids Research 2023;51(D1):D690-D699. https://doi.org/10.1093/nar/gkac920

  2. BLAST+ - Camacho C, et al. BLAST+: architecture and applications. BMC Bioinformatics 2009;10:421. https://doi.org/10.1186/1471-2105-10-421

  3. NCBI 16S rRNA Database - National Center for Biotechnology Information. 16S ribosomal RNA sequences (Bacteria and Archaea). https://ftp.ncbi.nlm.nih.gov/blast/db/

  4. BioPython - Cock PJA, et al. Biopython: freely available Python tools for computational molecular biology and bioinformatics. Bioinformatics 2009;25(11):1422-1423. https://doi.org/10.1093/bioinformatics/btp163

  5. openpyxl - Gazoni E, Clark C. openpyxl - A Python library to read/write Excel files. https://openpyxl.readthedocs.io/

  6. Rich - Willison W. Rich: rich text and beautiful formatting in the terminal. https://github.com/Textualize/rich

  7. PyInstaller - PyInstaller Development Team. PyInstaller - Freeze Python applications. https://pyinstaller.org/

  8. NSIS - Nullsoft Scriptable Install System. https://nsis.sourceforge.io/

About

Windows desktop GUI for antimicrobial resistance (AMR) gene detection using CARD BLAST - fully bundled, no install needed

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages