Trending

World technology news

→
Hand-labelled laboratory sample tubes standing in a rack
CRAN identifixIn-depth report

Open-source identifix 0.1.0 matches differently written sample IDs in R

Matthias Pucher’s first CRAN release matches IDs in stages and keeps ambiguous records available for review.

·CRAN identifix
Reading progress0%

The package reached CRAN on November 28

Matthias Pucher’s identifix package for R reached CRAN in its first release, version 0.1.0, on Saturday. The source archive’s DESCRIPTION records publication at 14:30:02 UTC, or 17:30:02 in Istanbul. Dirk Eddelbuettel’s independent CRANberries tracker logged it among the day’s new packages. The package addresses a problem that comes up when two records describe the same sample or object. A field list may use spaces, while a laboratory spreadsheet may use dashes. The rows may arrive in a different order. Matching by position would quietly join the wrong records. The package works on the labels, then makes the decisions available for inspection.

Matching proceeds from strict to lenient steps

The initial comparison can check for an exact match. Other stages account for details such as whitespace, letter case, punctuation, accents, and leading zeros. The release also describes options for dates, word order, spelling differences, and abbreviations. Which options make sense depends on the source records. A leading zero may be decoration in one system and part of a permanent identifier in another. Keep the original names beside any result of the match, along with information about the rule used. The release notes describe an important safeguard. A pair accepted by a rule has to be unambiguous across both complete sets.

Read the position and check the report

The idfix_match result points from each name in the first list to a position in the second, with an absent value where there is no accepted match. The idfix_report function identifies the stage behind a match and supplies information on names left out. The package raises an error for duplicate names within a list. A reviewer can use this information before joining any measurements or analyses. For example, examine whether TR 007 and TR-007 follow the same naming rules, and check how a third spelling without the prefix is used. A plausible label should lead back to a source record.

Reuse an approved decision across recurring imports

The package includes idfix_review for interactive examination. The release documents both console use and an optional Shiny interface. It also provides idfix_known to carry reviewed decisions into later matching runs. A confirmed pair can be brought into another import, and a rejected pair can stay excluded. Decide how long a reviewed mapping should apply if labels get reused over time. You can retain that decision with the version of the package and the matching options used for an import. The first CRAN archive declares a requirement of R 4.1 or later and has no compilation step.

Try a fixture before joining the full dataset

Start with a few non-sensitive example IDs from two source formats. Include known matches and at least one label that could point to two records. Keep the reference result so the next import can be compared against it. Check accepted matches, unresolved rows, and duplicates before using the index to align measurements. After the join, compare the total row count with the expected sample count. A saved report makes it possible to examine whether a new spelling was handled automatically or went to review. That review trail is a practical part of what the initial version adds to an R workflow.

Archive photo · mararie / Wikimedia Commons ↗ · CC BY-SA 2.0 · An archive photograph illustrating the use of sample labels.

Sources and verification
Be the first reader ✎ Write a comment

Reader discussion

Discussion prompt

What is the most important unanswered question about this topic?

No comments yet. Be the first to contribute.

Write a comment

Comments are real visitor contributions. Repeated, link-heavy or abusive submissions may be limited.