omics.co.in logo omics.co.in

Chapter 13: Antimicrobial Resistance (AMR) & Viral Metagenomics

Tested Stacks: GATK 4.6.1 Samtools 1.21 Nextflow 24.10 Seurat v5.1 Python 3.12
Prerequisites: Basic Linux CLI & Sequencing Formats
📚 Chapter 13 of 13 0% Course Completed

Chapter 13: Antimicrobial Resistance (AMR) & Viral Metagenomics

Metagenomics provides critical surveillance for global public health threats: tracking the dissemination of Antimicrobial Resistance (AMR) genes across clinical and agricultural environments, and discovering bacteriophages and novel eukaryotic viruses in the viral metagenome (virome).

The Comprehensive Antibiotic Resistance Database (CARD)

CARD categorizes AMR genes into specific molecular resistance mechanisms:

  • Antibiotic Inactivation: \(\beta\)-lactamases (e.g. blaTEM, blaKPC) hydrolyzing penicillin/carbapenem rings.
  • Efflux Pumps: Multidrug resistance pumps (e.g. MexAB-OprM, AcrAB-TolC).
  • Target Alteration / Protection: Point mutations in DNA gyrase (gyrA, fluoroquinolones) or ribosomal methylation.

1. Profiling the Resistome with CARD RGI

# Predict AMR genes from assembled contigs or MAGs
rgi main \\
    --input_sequence assembled_contigs.fasta \\
    --output_file ./amr_results \\
    --input_type contig \\
    --num_threads 16 \\
    --clean \\
    --include_loose # Filter strictly by Strict or Perfect hits

2. Discovering Bacteriophages with VirSorter2 & CheckV

# 1. Identify viral contigs from metagenomic assembly
virsorter run \\
    -w ./virsorter_out/ \\
    -i assembled_contigs.fasta \\
    --min-length 1500 \\
    -j 16 all

# 2. Assess viral genome completeness and host contamination with CheckV
checkv end_to_end \\
    ./virsorter_out/final-viral-combined.fa \\
    ./checkv_out/ \\
    -t 16
⚠️

Common Pitfalls & Troubleshooting Checklist

  • Java Heap Exhaustion (GATK / Picard): If processes terminate with java.lang.OutOfMemoryError, set your environment variable explicitly: export _JAVA_OPTIONS="-Xmx16g -Djava.io.tmpdir=/tmp".
  • Index Timestamp Mismatch: If tools complain that a BAM index is missing or out of date, regenerate with samtools index -@ 4 sample.bam.
  • Conda Channel Conflicts: Avoid ABI incompatibilities between bioconda and conda-forge by setting strict priority: conda config --set channel_priority strict.
  • Chromosome Naming Contamination: Always verify whether reference FASTA headers use chr1 or 1; divergent naming causes silent alignment drops.
Was this guide helpful to your research?
Help us maintain 100% accurate, peer-reviewed bioinformatics standards.
📝 Propose Edit on GitHub ↗