A reproducible end-to-end bioinformatics pipeline for comparative analysis of AMR gene–mobile genetic element associations across human gut metagenomes from Europe, Asia, and Africa.
# AMR-MGE Co-localization Pipeline
> **A reproducible end-to-end bioinformatics pipeline for comparative analysis of AMR gene–mobile genetic element associations across metagenomes from different study cohorts or geographic populations.**
---
## Overview
This repository provides a reproducible, end-to-end framework to analyze whether antimicrobial resistance (AMR) gene–mobile genetic element (MGE) associations and co-localization patterns differ across populations, treatment groups, or geographic regions. It resolves both the *what* (AMR gene diversity/abundance) and the *how* (mechanistic linkage via plasmids, integrons, and insertion sequences/transposons).
### Research Questions Addressed
This pipeline is designed to address key ecological and biological questions regarding resistome mobility, such as:
1. Do AMR gene diversity and abundance differ significantly across different study cohorts or populations?
2. Which MGE types (plasmid, integron, insertion sequence/transposon) predominantly carry AMR genes in each cohort?
3. Do AMR class–MGE type co-localization patterns differ across cohorts, suggesting distinct horizontal gene transfer (HGT) routes?
---
## Pipeline Architecture
```
INPUT: sample_map.csv
│
┌───────────────────────────────┴───────────────────────────────┐
│ snakemake assembly │
│ ================== │
│ 1. Download Raw Reads (sra-tools: prefetch + fasterq-dump) │
│ 2. Quality Control (fastp: adapter/quality filtering) │
│ 3. Host Depletion (Bowtie2 vs hg38: remove human reads) │
│ 4. Metagenome Assembly (MEGAHIT: contig generation) │
└───────────────────────────────┬───────────────────────────────┘
▼
results/{run_id}/data/contigs/
│
┌───────────────────────────────┴───────────────────────────────┐
│ snakemake annotation_aggregation │
│ ================================ …