How tatsu1207/amr works
AMR Predictor is a web service for estimating antimicrobial resistance phenotypes from bacterial genome assemblies. A user uploads a FASTA through the browser; the API creates a job, identifies the organism and sequence type, runs streamlined genome annotation, builds model features, and returns per-antibiotic predictions with detected genes and mutations. The repository also documents a broader 18-step annotation workflow and offline feature-matrix and model-training capabilities. The graph follows the sampled web path; some broader capabilities are documented in the README but their implementation links were not sampled.
Main entry points: runner.py Pipeline orchestrator · main.py HTTP API · app.js Upload and results UI · predict.py Phenotype prediction
Components 17
Web interface
- Upload and results UI
app/static/js/app.js
API and jobs
- HTTP API
app/main.py - Runtime configuration
app/config.py - Job state store
app/models/job_store.py - Job and result schemas
app/models/schemas.py
Genome analysis
- Pipeline orchestrator
app/pipeline/runner.py - Species and MLST
app/pipeline/species_id.py - Annotation routines
app/pipeline/annotate.py - Streamlined annotation
annotate_minimal.sh - Genome annotation tools
Feature prediction
- Feature extraction
app/pipeline/features.py - Phenotype prediction
app/pipeline/predict.py - Species-drug models
models - Prediction results
app/models/schemas.py - Offline training and matrices
Other components
- Genome analyst
- MLST executable
Connections 23
- Genome analyst → Upload and results UI: uploads genome
README.md - Upload and results UI → HTTP API: sends upload
app/static/js/app.js - HTTP API → Job state store: creates and reads
app/main.py - HTTP API → Pipeline orchestrator: starts job
app/main.py - HTTP API → Job and result schemas: checks stage
app/main.py - HTTP API → Runtime configuration: uses limits
app/main.py - HTTP API → Upload and results UI: serves status and results
- Upload and results UI → HTTP API: polls and fetches
app/static/js/app.js - Pipeline orchestrator → Job state store: updates state
app/pipeline/runner.py - Pipeline orchestrator → MLST executable: runs identification
app/pipeline/runner.py - Pipeline orchestrator → Species and MLST: identifies species
- Pipeline orchestrator → Streamlined annotation: runs annotation
app/pipeline/runner.py - Streamlined annotation → Genome annotation tools: runs tools
- Annotation routines → Genome annotation tools: invokes tools
- Pipeline orchestrator → Feature extraction: extracts features
app/pipeline/runner.py - Feature extraction → Streamlined annotation: reads annotation outputs
- Pipeline orchestrator → Phenotype prediction: requests predictions
app/pipeline/runner.py - Phenotype prediction → Runtime configuration: loads model path
app/pipeline/predict.py - Phenotype prediction → Species-drug models: loads model files
app/pipeline/predict.py - Phenotype prediction → Prediction results: builds results
app/pipeline/predict.py - Upload and results UI → Prediction results: renders predictions
- Offline training and matrices → Species-drug models: trains model set
README.md - Offline training and matrices → Feature extraction: builds feature matrices
README.md