Skip to content

feat: Add Intelliflex v2.2 flat CSV format support#1184

Merged
nathan-stender merged 2 commits into
mainfrom
feat/intelliflex-v2.2-support
Apr 20, 2026
Merged

feat: Add Intelliflex v2.2 flat CSV format support#1184
nathan-stender merged 2 commits into
mainfrom
feat/intelliflex-v2.2-support

Conversation

@nathan-stender

Copy link
Copy Markdown
Collaborator

Summary

  • Adds support for the Intelliflex v2.2 flat CSV export format (47 fixed columns, 11 metrics per analyte region) alongside the existing v2.0 single-dataset and multi-dataset xPONENT formats
  • Uses pattern-based detection (R##: RP# prefix) to distinguish analyte columns from fixed metadata columns, with backward-compatible fallback to the FIXED_INPUT_COLUMNS list for older formats
  • Resolves real analyte names (HPV6, HPV11, etc.) from ANALYTE NAME columns and region-based bead identifiers from REGION columns
  • Captures all v2.2 data: calibration/verification/fluidics metadata, per-well timestamps, event counts, well types/statuses, dilution factors

Data captured from v2.2 format

Category Fields Location in ASM
Analyte statistics Median, Mean statistic dimensions
Calculated data Background, Net MFI, Net Normalized Median, Avg Net MFI, %CV of Replicates calculated data documents
Analyte metadata Analyte Name → analyte name, Region → bead identifier, Count → bead count analyte document
Device metadata Model Name, Serial Number, Software Version device/data system documents
Protocol Protocol Name, Protocol Version, Panel Name, Bead Type measurement/sample custom info
Calibration/Verification State, Lot, Lot Expiration, Expired, Timestamp (cal + verification + fluidics) measurement custom info
Per-well Well Type, Well Status, Acquisition Start/End, Total Active/Classified/Gated Events, Count %CV measurement custom info
Dilution DILUTION column dilution factor setting

Files changed

  • src/allotropy/parsers/luminex_xponent/constants.py — New metric words and calculated data sections
  • src/allotropy/parsers/luminex_xponent/luminex_xponent_reader.py — Extended SingleDatasetParser with pattern-based column detection, analyte renaming, section mappings
  • src/allotropy/parsers/luminex_xponent/luminex_xponent_structure.py — Per-well metadata keys in count data
  • src/allotropy/parsers/luminex_intelliflex/luminex_intelliflex_structure.py — Pass header custom_info to metadata
  • Test data: new v2.2 test file + regenerated existing test JSON

Test plan

  • All 3 Intelliflex tests pass (example_01, single_dataset, v2_2)
  • All 24 Luminex xPONENT tests pass (no regressions)
  • Full test suite (770 tests) passes via pre-push hook
  • Lint, formatting, and type checking all clean

🤖 Generated with Claude Code

Extends the SingleDatasetParser to handle the v2.2 Intelliflex export
format which has 47 fixed columns (vs 7) and 11 metrics per analyte
region (vs 3). Key changes:

- Pattern-based analyte column detection (R##: RP# prefix) alongside
  the existing FIXED_INPUT_COLUMNS approach for backward compatibility
- New metric words and section mappings: BACKGROUND, NET MEDIAN,
  NET NORMALIZED MEDIAN, REPLICATE %CV, ANALYTE NAME, REGION
- Analyte columns renamed from region prefixes (R25: RP1) to real
  names (HPV6) using ANALYTE NAME metadata columns
- REGION values used as bead identifiers in Units section
- DILUTION column mapped to dilution factor setting
- Per-well data (well type/status, acquisition times, event counts)
  captured in measurement custom info
- Calibration, verification, and fluidics metadata from v2.2 header
  columns flows through to custom info
- Intelliflex structure now passes header custom_info to metadata

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@nathan-stender
nathan-stender requested review from a team and slopez-b as code owners April 18, 2026 05:25
Reduces diff noise in existing test files by aligning key ordering
with main, making the actual content changes easy to review.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@nathan-stender
nathan-stender merged commit 6615fab into main Apr 20, 2026
9 checks passed
@nathan-stender
nathan-stender deleted the feat/intelliflex-v2.2-support branch April 20, 2026 20:09
nathan-stender added a commit that referenced this pull request Apr 20, 2026
### Added

- Add Intelliflex v2.2 flat CSV format support (#1184)
- Migrate example_weyland_yutani to REC/2025/03 plate reader schema
(#1177)
- Add technique shorthand to schema scripts (#1178)

### Changed

- Implement modular schema generation  (#1176)
nathan-stender added a commit that referenced this pull request Apr 22, 2026
## Summary
- Real-world Intelliflex v2.2 CSV exports include a `--DOCUMENT
SIGNATURE--` footer block (serial number, data signature hashes) that
was missing from the test fixture added in #1184
- These footer rows lack a `WELL LOCATION` value, creating duplicate NaN
index entries in the parsed DataFrames. When `Measurement.create` looks
up a location, `df.loc[location]` returns a DataFrame instead of a
Series, causing `pd.isna()` to crash with "truth value of a Series is
ambiguous"
- Fix: strip footer lines starting at `--DOCUMENT SIGNATURE--` before
passing to `read_csv`, so pandas never sees them and dtype inference
stays clean
- Updated the v2.2 test CSV to include a representative document
signature footer

## Test plan
- [x] All 773 tests pass
- [x] Lint + mypy clean
- [x] Verified against real-world `CO026755_P5_INTELLIFLEX (1).csv` that
previously crashed

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants