Skip to content

as.sir(): Improve support for custom breakpoint data #239

@WGustafsson

Description

@WGustafsson

Description

We are using the AMR package to classify MIC results at the Swedish Veterinary Agency, based on our own custom breakpoint reference. While it generally works well, the support for custom breakpoints has some room for improvement. We suggest the following adjustments:

Breakpoint dataset

  • Allow host to be NA: Our custom breakpoints are host-agnostic and as such we have no data to put in this column (currently we just put "dogs" so that it works, otherwise all SIR values come out as NA). For flexibility, the function could first look for a breakpoint reference row that matches the input host, and secondly match against rows where host is NA.

SIR interpretation logic

  • Allow custom guideline label: The interpretation code is currently written such that a sample can never be classified as "R" if guideline is not EUCAST or CLSI, and will instead be classified as "I" even if is above the R breakpoint.
  • Add parameter for open/closed breakpoint interpretation: To avoid hardcoding EUCAST vs CLSI interpretations of what counts as "R" (and thereby allow custom guidelines), we suggest adding a function parameter to indicate whether a value should be considered "R" if it's >= or just > the R breakpoint. If the former, the function should ensure that the S breakpoint is not equal to the R breakpoint. The value of this parameter could default to the appropriate value for EUCAST/CLSI if guideline is not a custom value, to ensure backward-compatibility.

Use Case (optional)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions