`minimum_matching_score` not always considered
msberends opened this issue · comments
Matthijs Berends commented
Example:
as.mo(c("Borrelia burgdorf", "HBV (some antigen test)"), minimum_matching_score = 0.7)
#> ℹ Microorganism translation was uncertain for "Borrelia burgdorf" (assumed Borrelia burgdorferi) and "HBV (some antigen test)" (assumed
#> Abiotrophia). Run mo_uncertainties() to review these uncertainties, or use add_custom_microorganisms() to add custom entries.
#> Class 'mo'
#> [1] B_BORRL_BRGD B_ABTRP
AMR::mo_uncertainties()
#> Matching scores are based on the resemblance between the input and the full taxonomic name, and the pathogenicity in humans. See
#> ?mo_matching_score.
#> Colour keys: 0.000-0.499 0.500-0.599 0.600-0.699 0.700-1.000
#>
#> --------------------------------------------------------------------------------------------------------------------------------------------------------
#> "Borrelia burgdorf" -> Borrelia burgdorferi (B_BORRL_BRGD, 0.925)
#> Also matched: Borreliella burgdorferi (0.870), Borrelia crocidurae (0.658), Borrelia turicatae (0.639), Borrelia parkeri (0.625),
#> Borrelia recurrentis (0.625), Borrelia duttonii (0.618), Salmonella Bergedorf (0.600), Borrelia brasiliensis (0.595), Borrelia
#> caucasica (0.583), and Borrelia miyamotoi (0.583)
#> --------------------------------------------------------------------------------------------------------------------------------------------------------
#> "HBV (some antigen test)" -> Abiotrophia (B_ABTRP, 0.500)
#> Also matched: Abiotrophia defectiva (0.500), Abiotrophia elegans (0.500), Acetobacter (0.500), Acetobacter indonesiensis (0.500),
#> Achromobacter (0.500), Achromobacter aegrifaciens (0.500), Achromobacter denitrificans (0.500), Achromobacter denitrificans
#> denitrificans (0.500), Achromobacter denitrificans xylosoxydans (0.500), and Achromobacter dolens (0.500)
#>
#> Only the first 10 other matches of each record are shown. Run print(mo_uncertainties(), n = ...) to view more entries, or save
#> mo_uncertainties() to an object.
So in the second case, Abiotrophia was matched with a score of 0.5, which is lower than the requested 0.7. This should never happen.