bio-metagenomics-amr-detection
Version Compatibility
Reference examples tested with: AMRFinderPlus 3.12+, RGI 6+ (CARD 3.2+), ABRicate 1.0+, pandas 2.2+.
Before using code patterns, verify installed versions match. If versions differ:
- CLI:
amrfinder -V(reports software AND database version),rgi main --version,abricate --listto confirm DB snapshots - Python:
pip show <package>thenhelp(module.function)to check signatures
If code throws ImportError, AttributeError, or TypeError, introspect the installed package and adapt the example to match the actual API rather than retrying.
The AMR reference DATABASE is versioned and updated roughly monthly; amrfinder -V reports both software and database version, and ABRicate ships pinned database snapshots so two labs on different versions get different calls. Record the tool version, the database version, and (for read-based work) the normalization unit and sequencing depth - none are recoverable later.
AMR Detection (Community Resistome)
"What resistance genes are in my community, and how abundant?" -> Match reads or contigs to a curated ARG database - reporting that ARG sequences are present at some relative abundance, never that the sample is resistant, because a metagenomic hit has no host and no expression.
- CLI (reads):
rgi bwt -1 R1.fq.gz -2 R2.fq.gz -a kma -n 16 -o sample --local - CLI (contigs/MAGs):
amrfinder -n contigs.fasta --plus -o amr.tsv