Welcome to pyAMR’s documentation!

pyAMR

PyAMR is a python lightweight library to facilitate the computation of common Antimicrobial Resistance (AMR) related statistics such as the proportion of resistance isolates, the resistance trend or the antimicrobial spectrum of activity. In addition, it includes a number of examples to visualise such information which relay on plotting libraries such as matplotlib, seaborn or plotly.



Antimicrobial drugs are commonly used. We have all heard of antibiotics, which fight bacteria, but there are also antifungals, antivirals and antiparasitics that fight fungi, viruses and parasites, respectively. The more we use these drugs, the less effective they become and this problem is known as antimicrobial resistance (AMR). Resistant infections can be difficult, and sometimes impossible, to treat. Thus providing accurate and up to date AMR surveillance reports supports interventions and toolkits to improve antibiotic prescribing in the community, including prescribing in general practices (GPs), dental and other settings and hospitals.

Let’s see some reports that can be computed using PyAMR.

Example of AMR reports

Name

Title

Metrics

Report I

Surveillance on AMR resistance

number of isolates,
resistance rate or SARI
resistance trend or SART

Report II

Effectiveness of an antimicrobial

spectrum of activity or ASAI

Report I: Surveillance of AMR resistance

In order to present AMR surveillance results, the susceptibility test data is often first grouped by three parameters: (i) the specimen or sample type (e.g. urine), (i) the infectious organism or pathogen, and (iii) the antimicrobial. The following report provides results for all the antimicrobials tested in urine samples in which Escherichia coli was grown and tested.

_images/todo-sart-table.png

The table contains the following information:

  • R is the overall resistance; that is, the total proportion of resistance isolates.

  • TM is the monthly resistance trend (it would be 1 if resistance goes from 0 to 1 in a month).

  • TY is the yearly resistance trend (TM x 12).

  • pearson is the correlation coefficient computed between the vector with the number of isolates used to compute the resistance on each time period (e.g. month or year) and the overall resistance obtained. It is used to assess whether the strategy used for testing might be affecting the resistance values. Ideally, there should not be a strong correlation between them (-0.5 <= pearson <= 0.5).

  • isolates is the the total number of isolates used to compute such metrics.

  • references includes manuscripts within the literate which presented similar resistance values to the ones displayed in the table. For more information about these, see the original manuscript.

Report II: Effectiveness of an Antimicrobial

The antimicrobial spectrum of activity refers to the range of microbe species that are susceptible to these agents and therefore can be treated. In general, antimicrobial agents are classified into broad, intermediate or narrow spectrum. Broad spectrum antimicrobials are active against both Gram-positive and Gram-negative bacteria. In contrast, narrow spectrum antimicrobials have limited activity and are effective only against particular species of bacteria. While these profiles appeared in the mid-1950s, little effort has been made to define them. Furthermore, such ambiguous labels are overused for different and even contradictory purposes.

To address this issue, the library defines the Antimicrobial Spectrum of Activity Index (ASAI) which provides a way to compute a single numerical value. The following report provides results for all the antimicrobials and microorganisms tested in urine samples.

_images/todo-asai-table.png

The table table includes the following columns:

  • antimicrobial is the antimicrobial

  • ASAI_N is the spectrum of activity against gram negative bacteria.

  • ASAI_P is the spectrum of activity against gram positive bacteria.

  • N_gn is the number of different (unique) genus.

  • N_sp is the number of different (unique) species.




When using any of this project’s source code, please cite:

@article{hernandez2021resistance,
  title = {Resistance Trend Estimation Using Regression Analysis to Enhance Antimicrobial Surveillance: A Multi-Centre Study in London 2009--2016},
  author = {Hernandez, Bernard and Herrero-Vi{\~n}as, Pau and Rawson, Timothy M and Moore, Luke SP and Holmes, Alison H and Georgiou, Pantelis},
  journal = {Antibiotics},
  volume = {10},
  number = {10},
  pages = {1267},
  year = {2021},
  month = oct,
  publisher = {MDPI},
  doi = {10.3390/antibiotics10101267},
  url = {},
}

Note

The PhD thesis is available on Spiral.

Indices and tables