Skip to content

as.sir(): capped MIC prefix handling incorrect when S breakpoint equals lowest valid MIC (e.g. CIP in Staphylococcus) #295

Description

@msberends

Bug report

Reported by an AMR package user.

Summary

When the EUCAST S breakpoint is set to the lowest clinically meaningful MIC (e.g. CIP in Staphylococcus aureus: S ≤ 0.001, R > 2), capped MIC values with a < or <= prefix are interpreted incorrectly depending on capped_mic_handling:

  • "standard" (default): <=0.5, <=0.25 → NI instead of I
  • "lenient": <=0.5, <0.5, <=0.25, <0.25 → S even though these values are not below the S breakpoint (0.001)
  • "none": returns I for all of the above, which is arguably correct

Reproducible example

my_mic <- as.mic(c(">4", ">=4", ">2", ">=2", 2, 1, 0.5, 0.25, 0.125,
                   0.012, 0.06, 0.03, 0.02, 0.01, 0.001,
                   "<=0.5", "<0.5", "<=0.25", "<0.25"))

tibble(
  mic                    = my_mic,
  interpretation         = as.sir(my_mic, mo = "Staphylococcus aureus", ab = "CIP"),
  no_handling            = as.sir(my_mic, mo = "Staphylococcus aureus", ab = "CIP", capped_mic_handling = "none"),
  lenient_interpretation = as.sir(my_mic, mo = "Staphylococcus aureus", ab = "CIP", capped_mic_handling = "lenient"),
  standard_interpretation= as.sir(my_mic, mo = "Staphylococcus aureus", ab = "CIP", capped_mic_handling = "standard")
)

Observed output

mic interpretation no_handling lenient standard
>=2.000 NI I R NI
<=0.500 NI I S NI
<0.500 S I S S
<=0.250 NI I S NI
<0.250 S I S S

Expected behaviour

For capped_mic_handling = "lenient": < and <= prefixed MICs that are above the S breakpoint should return I, not S. The current implementation of "lenient" unconditionally maps all </<= values to S, ignoring whether the capped value actually falls below the S breakpoint.

Suggested fix: In "lenient" mode, only return S when the numeric part of the capped MIC is strictly below the S breakpoint. If the numeric part is ≥ S breakpoint (but ≤ R breakpoint), return I instead.

This would make <0.5, <=0.5, <0.25, <=0.25 all return I for CIP/S. aureus (EUCAST), which is clinically correct — a MIC reported as <=0.5 is definitely not susceptible when S requires MIC ≤ 0.001.

Context

  • Drug/organism: Ciprofloxacin (CIP) in Staphylococcus aureus, EUCAST 2026
  • Breakpoints: S ≤ 0.001 mg/L, R > 2 mg/L
  • AMR version: (please confirm)
  • R version: (please confirm)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working, labelled wrong or otherwise erroneous

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions