Installation#

Dependencies#

AMRrules requires Python 3.12 or higher, and needs pip to be installed.

Download and install AMRrules#

Currently, AMRrules is only available for installation via source. We recommend you set up a new conda environment.

# create your conda environment
conda create -n amrrules -c bioconda python=3.12 pip
conda activate amrrules

# clone the repository
git clone https://github.com/AMRverse/AMRrules
cd AMRrules

# install AMRrules
make dev

After installation, you must download the required AMRFinderPlus resource files. Run:

amrrules --download-resources

This will download and cache the necessary files for AMRrules to function. You only need to run this once after installation, or when updating resources (eg a new AMRFinderPlus database has been released).

Check the installation#

Check which organisms have rule-sets available in the installation:

amrrules --list-organisms

Test on one of the included example dataset:

amrrules --input tests/data/input/test_ecoli_wildtype.tsv --output-prefix test_ecoli_wildtype --organism 's__Escherichia coli'

Compare these resulting output files to those in tests/data/example_output

tests/data/example_output/test_ecoli_wildtype_interpreted.tsv:

Name

status

comments

Protein identifier

Contig id

Start

Stop

Strand

Gene symbol

Sequence name

Scope

Element type

Element subtype

Class

Subclass

Method

Target length

Reference sequence length

% Coverage of reference sequence

% Identity to reference sequence

Alignment length

Accession of closest sequence

Name of closest sequence

HMM id

HMM description

Hierarchy node

Species

HQ

variation type

gene

mutation

ruleID

gene context

drug

drug class

phenotype

clinical category

evidence grade

version

organism

SAMN26308439

PASS

NA

NA

SAMN26308439.contig00002

288840

291941

acrF

multidrug efflux RND transporter permease subunit AcrF

plus

AMR

AMR

EFFLUX

EFFLUX

BLASTX

1034

1034

100

99.52

1034

AAC76298.1

multidrug efflux RND transporter permease subunit AcrF

NA

NA

acrF

Escherichia coli

TRUE

Gene presence detected

acrF

1.0.0

SAMN26308439

PASS

NA

NA

SAMN26308439.contig00005

113923

115011

pmrB_Y358N

Escherichia colistin resistant PmrB

core

AMR

POINT

COLISTIN

COLISTIN

POINTX

363

363

100

99.45

363

WP_001300761.1

two-component system sensor histidine kinase PmrB

NA

NA

pmrB

Escherichia coli

TRUE

Protein variant detected

pmrB

p.Tyr358Asn

ECO0081

core

colistin

wildtype

S

moderate

1.0.0

s__Escherichia coli

SAMN26308439

PASS

NA

NA

SAMN26308439.contig00005

159556

160686

blaEC

BlaEC family class C beta-lactamase

plus

AMR

AMR

BETA-LACTAM

BETA-LACTAM

BLASTX

377

377

100

98.41

377

WP_063610930.1

extended-spectrum class C beta-lactamase EC-15

NA

NA

blaEC

Escherichia coli

TRUE

Gene presence detected

blaEC

ECO0001

core

penicillin beta-lactam

wildtype

S

high

1.0.0

s__Escherichia coli

SAMN26308439

PASS

NA

NA

SAMN26308439.contig00005

159556

160686

blaEC

BlaEC family class C beta-lactamase

plus

AMR

AMR

BETA-LACTAM

BETA-LACTAM

BLASTX

377

377

100

98.41

377

WP_063610930.1

extended-spectrum class C beta-lactamase EC-15

NA

NA

blaEC

Escherichia coli

TRUE

Gene presence detected

blaEC

ECO0002

core

ampicillin

wildtype

S

high

1.0.0

s__Escherichia coli

SAMN26308439

PASS

NA

NA

SAMN26308439.contig00005

159556

160686

blaEC

BlaEC family class C beta-lactamase

plus

AMR

AMR

BETA-LACTAM

BETA-LACTAM

BLASTX

377

377

100

98.41

377

WP_063610930.1

extended-spectrum class C beta-lactamase EC-15

NA

NA

blaEC

Escherichia coli

TRUE

Gene presence detected

blaEC

ECO0003

core

amoxicillin

wildtype

S

high

1.0.0

s__Escherichia coli

SAMN26308439

PASS

NA

NA

SAMN26308439.contig00005

159556

160686

blaEC

BlaEC family class C beta-lactamase

plus

AMR

AMR

BETA-LACTAM

BETA-LACTAM

BLASTX

377

377

100

98.41

377

WP_063610930.1

extended-spectrum class C beta-lactamase EC-15

NA

NA

blaEC

Escherichia coli

TRUE

Gene presence detected

blaEC

ECO0004

core

piperacillin

wildtype

S

high

1.0.0

s__Escherichia coli

SAMN26308439

PASS

NA

NA

SAMN26308439.contig00005

159556

160686

blaEC

BlaEC family class C beta-lactamase

plus

AMR

AMR

BETA-LACTAM

BETA-LACTAM

BLASTX

377

377

100

98.41

377

WP_063610930.1

extended-spectrum class C beta-lactamase EC-15

NA

NA

blaEC

Escherichia coli

TRUE

Gene presence detected

blaEC

ECO0005

core

first-generation cephalosporin

wildtype

S

high

1.0.0

s__Escherichia coli

SAMN26308439

PASS

NA

NA

SAMN26308439.contig00005

159556

160686

blaEC

BlaEC family class C beta-lactamase

plus

AMR

AMR

BETA-LACTAM

BETA-LACTAM

BLASTX

377

377

100

98.41

377

WP_063610930.1

extended-spectrum class C beta-lactamase EC-15

NA

NA

blaEC

Escherichia coli

TRUE

Gene presence detected

blaEC

ECO0006

core

cefazolin

wildtype

I

high

1.0.0

s__Escherichia coli

SAMN26308439

PASS

NA

NA

SAMN26308439.contig00005

159556

160686

blaEC

BlaEC family class C beta-lactamase

plus

AMR

AMR

BETA-LACTAM

BETA-LACTAM

BLASTX

377

377

100

98.41

377

WP_063610930.1

extended-spectrum class C beta-lactamase EC-15

NA

NA

blaEC

Escherichia coli

TRUE

Gene presence detected

blaEC

ECO0007

core

second-generation cephalosporin

wildtype

S

high

1.0.0

s__Escherichia coli

SAMN26308439

PASS

NA

NA

SAMN26308439.contig00005

159556

160686

blaEC

BlaEC family class C beta-lactamase

plus

AMR

AMR

BETA-LACTAM

BETA-LACTAM

BLASTX

377

377

100

98.41

377

WP_063610930.1

extended-spectrum class C beta-lactamase EC-15

NA

NA

blaEC

Escherichia coli

TRUE

Gene presence detected

blaEC

ECO0008

core

cefoxitin

wildtype

S

high

1.0.0

s__Escherichia coli

SAMN26308439

PASS

NA

NA

SAMN26308439.contig00005

159556

160686

blaEC

BlaEC family class C beta-lactamase

plus

AMR

AMR

BETA-LACTAM

BETA-LACTAM

BLASTX

377

377

100

98.41

377

WP_063610930.1

extended-spectrum class C beta-lactamase EC-15

NA

NA

blaEC

Escherichia coli

TRUE

Gene presence detected

blaEC

ECO0009

core

cefuroxime

wildtype

S

high

1.0.0

s__Escherichia coli

SAMN26308439

PASS

NA

NA

SAMN26308439.contig00005

159556

160686

blaEC

BlaEC family class C beta-lactamase

plus

AMR

AMR

BETA-LACTAM

BETA-LACTAM

BLASTX

377

377

100

98.41

377

WP_063610930.1

extended-spectrum class C beta-lactamase EC-15

NA

NA

blaEC

Escherichia coli

TRUE

Gene presence detected

blaEC

ECO0011

core

cefotaxime

wildtype

S

high

1.0.0

s__Escherichia coli

SAMN26308439

PASS

NA

NA

SAMN26308439.contig00005

159556

160686

blaEC

BlaEC family class C beta-lactamase

plus

AMR

AMR

BETA-LACTAM

BETA-LACTAM

BLASTX

377

377

100

98.41

377

WP_063610930.1

extended-spectrum class C beta-lactamase EC-15

NA

NA

blaEC

Escherichia coli

TRUE

Gene presence detected

blaEC

ECO0012

core

third-generation cephalosporin

wildtype

S

high

1.0.0

s__Escherichia coli

SAMN26308439

PASS

NA

NA

SAMN26308439.contig00005

159556

160686

blaEC

BlaEC family class C beta-lactamase

plus

AMR

AMR

BETA-LACTAM

BETA-LACTAM

BLASTX

377

377

100

98.41

377

WP_063610930.1

extended-spectrum class C beta-lactamase EC-15

NA

NA

blaEC

Escherichia coli

TRUE

Gene presence detected

blaEC

ECO0013

core

ceftriaxone

wildtype

S

high

1.0.0

s__Escherichia coli

SAMN26308439

PASS

NA

NA

SAMN26308439.contig00005

159556

160686

blaEC

BlaEC family class C beta-lactamase

plus

AMR

AMR

BETA-LACTAM

BETA-LACTAM

BLASTX

377

377

100

98.41

377

WP_063610930.1

extended-spectrum class C beta-lactamase EC-15

NA

NA

blaEC

Escherichia coli

TRUE

Gene presence detected

blaEC

ECO0014

core

ceftazidime

wildtype

S

high

1.0.0

s__Escherichia coli

SAMN26308439

PASS

NA

NA

SAMN26308439.contig00005

159556

160686

blaEC

BlaEC family class C beta-lactamase

plus

AMR

AMR

BETA-LACTAM

BETA-LACTAM

BLASTX

377

377

100

98.41

377

WP_063610930.1

extended-spectrum class C beta-lactamase EC-15

NA

NA

blaEC

Escherichia coli

TRUE

Gene presence detected

blaEC

ECO0015

core

cefixime

wildtype

S

high

1.0.0

s__Escherichia coli

SAMN26308439

PASS

NA

NA

SAMN26308439.contig00005

159556

160686

blaEC

BlaEC family class C beta-lactamase

plus

AMR

AMR

BETA-LACTAM

BETA-LACTAM

BLASTX

377

377

100

98.41

377

WP_063610930.1

extended-spectrum class C beta-lactamase EC-15

NA

NA

blaEC

Escherichia coli

TRUE

Gene presence detected

blaEC

ECO0016

core

carbapenem

wildtype

S

high

1.0.0

s__Escherichia coli

SAMN26308439

PASS

NA

NA

SAMN26308439.contig00005

159556

160686

blaEC

BlaEC family class C beta-lactamase

plus

AMR

AMR

BETA-LACTAM

BETA-LACTAM

BLASTX

377

377

100

98.41

377

WP_063610930.1

extended-spectrum class C beta-lactamase EC-15

NA

NA

blaEC

Escherichia coli

TRUE

Gene presence detected

blaEC

ECO0017

core

imipenem

wildtype

S

high

1.0.0

s__Escherichia coli

SAMN26308439

PASS

NA

NA

SAMN26308439.contig00005

159556

160686

blaEC

BlaEC family class C beta-lactamase

plus

AMR

AMR

BETA-LACTAM

BETA-LACTAM

BLASTX

377

377

100

98.41

377

WP_063610930.1

extended-spectrum class C beta-lactamase EC-15

NA

NA

blaEC

Escherichia coli

TRUE

Gene presence detected

blaEC

ECO0018

core

aztreonam

wildtype

S

high

1.0.0

s__Escherichia coli

SAMN26308439

PASS

NA

NA

SAMN26308439.contig00005

159556

160686

blaEC

BlaEC family class C beta-lactamase

plus

AMR

AMR

BETA-LACTAM

BETA-LACTAM

BLASTX

377

377

100

98.41

377

WP_063610930.1

extended-spectrum class C beta-lactamase EC-15

NA

NA

blaEC

Escherichia coli

TRUE

Gene presence detected

blaEC

ECO0084

core

cefepime

wildtype

S

high

1.0.0

s__Escherichia coli

SAMN26308439

PASS

NA

NA

SAMN26308439.contig00005

159556

160686

blaEC

BlaEC family class C beta-lactamase

plus

AMR

AMR

BETA-LACTAM

BETA-LACTAM

BLASTX

377

377

100

98.41

377

WP_063610930.1

extended-spectrum class C beta-lactamase EC-15

NA

NA

blaEC

Escherichia coli

TRUE

Gene presence detected

blaEC

ECO0085

core

cefpirome

wildtype

S

high

1.0.0

s__Escherichia coli

SAMN26308439

PASS

NA

NA

SAMN26308439.contig00007

68693

70048

glpT_E448K

Escherichia fosfomycin resistant GlpT

core

AMR

POINT

FOSFOMYCIN

FOSFOMYCIN

POINTX

452

452

100

99.78

452

WP_000948731.1

glycerol-3-phosphate transporter GlpT

NA

NA

glpT

Escherichia coli

TRUE

Protein variant detected

glpT

p.Glu448Lys

ECO0082

core

fosfomycin

wildtype

S

moderate

1.0.0

s__Escherichia coli

SAMN26308439

PASS

NA

NA

SAMN26308439.contig00039

5645

6871

mdtM

multidrug efflux MFS transporter MdtM

plus

AMR

AMR

EFFLUX

EFFLUX

BLASTX

409

410

99.76

98.04

409

AAC77293.1

multidrug efflux MFS transporter MdtM

NA

NA

mdtM

Escherichia coli

TRUE

Gene presence detected

mdtM

1.0.0

tests/data/example_output/test_ecoli_wildtype_genome_summary.tsv:

sample

drug

drug class

clinical category

phenotype

evidence grade

markers (non-S)

markers (no rule)

markers (S)

ruleIDs

combo rules

organism

SAMN26308439

(all)

carbapenem

S

wildtype

high

blaEC

ECO0016

s__Escherichia coli

SAMN26308439

imipenem

carbapenem

S

wildtype

high

blaEC

ECO0016;ECO0017

s__Escherichia coli

SAMN26308439

(all)

first-generation cephalosporin

S

wildtype

high

blaEC

ECO0005

s__Escherichia coli

SAMN26308439

cefazolin

first-generation cephalosporin

I

wildtype

high

blaEC

blaEC

ECO0005;ECO0006

s__Escherichia coli

SAMN26308439

cefepime

fourth-generation cephalosporin

S

wildtype

high

blaEC

ECO0084

s__Escherichia coli

SAMN26308439

cefpirome

fourth-generation cephalosporin

S

wildtype

high

blaEC

ECO0085

s__Escherichia coli

SAMN26308439

aztreonam

monobactam

S

wildtype

high

blaEC

ECO0018

s__Escherichia coli

SAMN26308439

(all)

penicillin beta-lactam

S

wildtype

high

blaEC

ECO0001

s__Escherichia coli

SAMN26308439

amoxicillin

penicillin beta-lactam

S

wildtype

high

blaEC

ECO0001;ECO0003

s__Escherichia coli

SAMN26308439

ampicillin

penicillin beta-lactam

S

wildtype

high

blaEC

ECO0001;ECO0002

s__Escherichia coli

SAMN26308439

piperacillin

penicillin beta-lactam

S

wildtype

high

blaEC

ECO0001;ECO0004

s__Escherichia coli

SAMN26308439

fosfomycin

phosphonic acid antibiotic

S

wildtype

moderate

glpT:p.Glu448Lys

ECO0082

s__Escherichia coli

SAMN26308439

colistin

polymyxin antibiotic

S

wildtype

moderate

pmrB:p.Tyr358Asn

ECO0081

s__Escherichia coli

SAMN26308439

(all)

second-generation cephalosporin

S

wildtype

high

blaEC

ECO0007

s__Escherichia coli

SAMN26308439

cefoxitin

second-generation cephalosporin

S

wildtype

high

blaEC

ECO0007;ECO0008

s__Escherichia coli

SAMN26308439

cefuroxime

second-generation cephalosporin

S

wildtype

high

blaEC

ECO0007;ECO0009

s__Escherichia coli

SAMN26308439

(all)

third-generation cephalosporin

S

wildtype

high

blaEC

ECO0012

s__Escherichia coli

SAMN26308439

cefixime

third-generation cephalosporin

S

wildtype

high

blaEC

ECO0012;ECO0015

s__Escherichia coli

SAMN26308439

cefotaxime

third-generation cephalosporin

S

wildtype

high

blaEC

ECO0011;ECO0012

s__Escherichia coli

SAMN26308439

ceftazidime

third-generation cephalosporin

S

wildtype

high

blaEC

ECO0012;ECO0014

s__Escherichia coli

SAMN26308439

ceftriaxone

third-generation cephalosporin

S

wildtype

high

blaEC

ECO0012;ECO0013

s__Escherichia coli

SAMN26308439

(n/a)

antibiotic efflux

none

acrF;mdtM

s__Escherichia coli

Usage info and test data#

More info on usage options can be found on the Usage page.

Additional test data and example commands can be found on the Tests page.