FR

GUIDE · BACTERIAL GENOME ANALYSIS

How to detect antibiotic resistance genes in a bacterial genome, step by step

This guide shows how to find antibiotic resistance genes and mutations in the genome of a bacterial isolate with MEGAM ARG Detection, on Windows and without the command line. All screenshots come from a real analysis of a public Klebsiella pneumoniae genome that you can download to repeat the exercise. The MEGAM interface is currently in French; the screenshots show it as it is.

Key points

  1. Install MEGAM on Windows 10 or 11 (64-bit).
  2. Prepare the biological databases from the application, in one click.
  3. Choose a FASTA (assembled genome) or FASTQ (reads) file.
  4. Start the analysis and follow its steps.
  5. Read the results: species, genes and mutations, genome quality, tool reports.

Before you start

Step 1 — Install MEGAM

Download the installer from the download section, run it, then open MEGAM from the Start menu (“MEGAM” folder). On first launch, the “Bases biologiques” (biological databases) block indicates that the databases must be prepared before the first analysis.

New analysis screen on first launch: add your sequences, then the Biological databases block with the Importer les bases MEGAM and Télécharger et préparer les bases buttons.
First launch: the biological databases block offers to prepare the databases.

Step 2 — Prepare the biological databases

In the “Bases biologiques” block, click Télécharger et préparer les bases (download and prepare the databases). Accept the terms of use of CARD (McMaster University) and PubMLST (University of Oxford), then start the preparation. MEGAM downloads each database from its official source (6.2 GB), checks the checksum of every file, then builds the indexes on your computer itself: there is nothing to handle manually. On our test machine, the download took 20 to 50 minutes depending on the connection, then extraction and index building about 4 minutes. An interrupted preparation resumes without downloading the files already obtained again. You only do this once: analyses then run offline.

If you already have the MEGAM v5 database package, the Importer les bases MEGAM button is still available: select the bases folder containing database-pack.json.

Download and prepare the databases window: 6.2 GB to download from the official sources, checkboxes to accept the CARD and PubMLST terms, Télécharger et préparer button.
Before downloading, MEGAM asks you to accept the CARD and PubMLST terms.

Step 3 — Choose the sequences to analyse

Click Parcourir les fichiers (browse files) and select your file. MEGAM accepts FASTA (assembled genome) and FASTQ (single or paired R1/R2 reads, gzip-compressed or not) and chooses the appropriate workflow itself: for a FASTA file it goes straight to genome description; for FASTQ reads it adds quality control and assembly.

Before starting, MEGAM shows the available memory and the ceiling it allows itself. If free memory is not enough for Kraken2, it disables it and says so: close some applications, then click Revérifier les ressources (re-check resources).

FASTA file of Klebsiella pneumoniae HS11286 selected, resource estimate, databases present and Start analysis button.
The HS11286 genome is selected: “FASTA · without assembly” workflow.

Step 4 — Start the analysis and follow its progress

Click Démarrer l’analyse (start analysis). MEGAM checks the inputs and databases, then runs the tools in sequence: Kraken2 for species identification; seqkit and QUAST for the supplied assembly; Prokka for annotation and MLST for typing; and finally AMRFinderPlus, ABRicate (ResFinder, PlasmidFinder, CARD, NCBI, VFDB), RGI with CARD and PointFinder for resistance. The tracking screen shows the current step, the elapsed time and the tool’s activity.

Analysis tracking in progress: ABRicate CARD step, 8 of 13 steps completed, 4 minutes 21 elapsed.
Analysis in progress: 8 of 13 steps completed.

For this already assembled genome, the 13 steps took 6 minutes 43 seconds on our test machine (8 threads). An analysis starting from FASTQ reads takes longer, because it includes assembly.

Analysis finished: 13 of 13 steps, 6 minutes 43 elapsed.
Analysis finished: the results are ready.

Step 5 — Read the results

The results are organised in five tabs: overview, antibiotics, genes, quality & identity and tool reports. The overview summarises the species identified, the number of resistance annotations, the genome size, the MLST typing and the absence of a supplied antibiogram.

Results overview: Klebsiella pneumoniae, 168 AMR annotations, 5.68 Mb genome in 7 contigs, MLST typing, no antibiogram supplied.
Overview: Klebsiella pneumoniae, 168 annotations from the different tools.

The figure of 168 counts the records from all tools: a gene found by several tools appears several times. The genes tab lists each annotation with its antibiotic class and links to its evidence. For HS11286, it includes:

  • blaKPC-2, a carbapenemase;
  • blaCTX-M-14, an extended-spectrum beta-lactamase, as well as blaTEM-1 and a blaSHV gene whose exact variant differs between tools (SHV-11, SHV-158 or SHV-182);
  • rmtB, a 16S ribosomal RNA methyltransferase associated with aminoglycoside resistance, together with other aminoglycoside genes (aadA2, aac(3)-IId, aph(6)-Id, aph(3'')-Ib);
  • sul1, sul2 (sulfonamides), dfrA12 (trimethoprim), tet(G) (tetracyclines) and floR (phenicols);
  • the chromosomal mutations gyrA S83I and parC S80I, associated with fluoroquinolone resistance.
Genes tab: list of annotations, including blaCTX-M-14, dfrA50, blaTEM-1, rmtB1, tet(G), floR2, sul1 and aadA2, with their class.
Genes tab: every annotation remains verifiable.

RGI also reports chromosomal efflux, porin or regulatory genes (for example acrA, acrB, ramA). They are part of the species’ normal genome: their presence alone does not mean acquired resistance.

The quality & identity tab describes the analysed genome: total length, N50, GC content, number of contigs, and the Kraken2 classification. Here, 99.91% of the assembled bases are assigned to Klebsiella pneumoniae.

Quality and identity tab: total length 5.68 Mb, N50 5,333,942 bp, GC 57.12%, 7 contigs, Klebsiella pneumoniae 99.91% according to Kraken2.
Genome quality and taxonomic classification.

The Exporter les données (export data) button lets you retrieve the results, and the tracking screen shows the folder containing each tool’s files and logs.

Interpret with care

Try MEGAM ARG Detection

Free Windows application, with no usage limit: your sequences stay on your computer.

Download MEGAM

Frequently asked questions

How long does an analysis take?

For the assembled genome of Klebsiella pneumoniae HS11286 (5.68 Mb), the 13 steps took 6 minutes 43 seconds on our test machine (8 threads). The duration depends on the computer and the data: an analysis starting from FASTQ reads takes longer, because it includes assembly.

Do I need an assembled genome or reads?

Both work. MEGAM accepts FASTA (assembled genome) and FASTQ (single or paired R1/R2 reads, compressed or not) and chooses the appropriate workflow: quality control and assembly for reads, direct genome description for a FASTA file.

Why is Kraken2 sometimes disabled?

MEGAM estimates the memory required before each analysis; with the current database, Kraken2 needs about 9 GiB. If free memory is not enough, it is disabled and the application says so. Close some applications, then click “Revérifier les ressources” (re-check resources).

Are the results enough to choose a treatment?

No. MEGAM is a research tool: genetic detections must be interpreted by a specialist and do not replace clinical assessment or an antimicrobial susceptibility test.