Automated Antimicrobial Resistance Profiler for Bacterial Genomes
Professional Bioinformatics Pipeline developed for Forneus Technologies
🌟 Live Demo: AMR Genome Analyzer on Streamlit
A sleek, glassmorphism-inspired UI designed for enterprise bioinformatics.
Automated detection of resistance mechanisms and key genomic metrics.
High-level summary of the most critical resistance findings.
Granular data view showing exact gene locations, identities, and resistance mechanisms.
Clear, actionable summaries for immediate medical or research decision-making.
AMR Genome Analyzer is a Python command-line tool that automates the detection of antimicrobial resistance (AMR) genes in bacterial genomes. It integrates with the NCBI Entrez API to fetch GenBank records, parses standard BLAST tabular output (.tsv) filtered against the CARD (Comprehensive Antibiotic Resistance Database), and produces a professional, publication-ready visualization.
This tool is designed for:
- Veterinary microbiologists needing quick AMR profiling of pathogens (e.g., Staphylococcus aureus, E. coli)
- Researchers performing rapid genomic surveillance
- Freelance bioinformaticians delivering AMR reports to clients
| Feature | Description |
|---|---|
| 🔬 NCBI Entrez Integration | Auto-downloads bacterial genomes by accession number (GenBank format) |
| 🧬 BLAST Result Parsing | Reads standard -outfmt 6 TSV output, filters by identity threshold |
| 📊 Smart Visualization | Horizontal bar chart colored by antibiotic class with mechanism labels |
| 🎭 Demo Mode | Runs without internet/BLAST using realistic simulated S. aureus data |
| 🧪 Full Test Coverage | 10 pytest tests covering all core functions and edge cases |
| ⚙️ Flexible CLI | argparse-based interface with --demo, --accession, --identity, --top flags |
git clone https://github.com/YOUR_USERNAME/amr-genome-analyzer.git
cd amr-genome-analyzer
pip install -r requirements.txtcp .env.example .env
# Open .env and replace with your real email:
# NCBI_EMAIL=your_real_email@example.compython project.py --demo# Default genome: Staphylococcus aureus NCTC 8325
python project.py --accession NC_007795.1
# Custom identity threshold and top-15 genes
python project.py --accession NC_007795.1 --identity 80 --top 15python project.py --helpamr-genome-analyzer/
├── project.py # Main program (download → filter → visualize)
├── test_project.py # pytest unit tests (10 tests)
├── requirements.txt # Python dependencies
├── .env.example # Template for environment variables
├── .gitignore # Excludes .env and cache from Git
├── data/ # Downloaded GenBank genome files (auto-created)
└── results/ # Output charts and BLAST data (auto-created)
├── blast_hits.tsv
└── top_resistance_genes.png
pytest test_project.py -vExpected output: 10 passed covering:
- DataFrame generation and structure validation
- BLAST file filtering and sorting correctness
- Error handling (missing file, empty file)
- Chart file creation and empty-data handling
The tool generates a chart like this:
- Each bar = one resistance gene
- Color = antibiotic class (red=beta-lactam, orange=tetracycline, blue=macrolide, etc.)
- % label inside bar = identity to CARD reference
- Italic text right of bar = resistance mechanism
- CARD (Comprehensive Antibiotic Resistance Database) — gold standard reference for AMR genes
- BLAST (Basic Local Alignment Search Tool) — sequence similarity search
- mecA gene — confers methicillin resistance (MRSA)
- vanA gene — glycopeptide (vancomycin) resistance
- Identity threshold ≥70% recommended for species-level hits
- Streamlit web interface for clinical use
- Multi-genome batch processing
- PDF report generation
- Real-time BLAST API integration (NCBI BLAST+)
- Species auto-detection from genome metadata
| Package | Version | Purpose |
|---|---|---|
biopython |
≥1.81 | NCBI Entrez API, SeqIO parsing |
pandas |
≥2.0.0 | Data manipulation |
matplotlib |
≥3.7.0 | Visualization |
python-dotenv |
≥1.0.0 | Secure environment configuration |
pytest |
≥7.4.0 | Unit testing |
Built as CS50P final project.
Domain: Veterinary bioinformatics / AMR genomics
Platform: Python 3.11+
Juliia Nuzhnenko
- Email: julia.n@forneus.io
- LinkedIn: Juliia Nuzhnenko
Powered by Forneus Technologies