Skip to content

fix(io): robustly read NanoString CosMX datasets#63

Open
EliHei2 wants to merge 1 commit into
mainfrom
bugfix/read-cosmx
Open

fix(io): robustly read NanoString CosMX datasets#63
EliHei2 wants to merge 1 commit into
mainfrom
bugfix/read-cosmx

Conversation

@EliHei2
Copy link
Copy Markdown
Collaborator

@EliHei2 EliHei2 commented Jun 1, 2026

Generalize CosMXPreprocessor so CosMX exports actually read: resolve the transcripts source (CSV glob or transcripts.parquet fallback), resolve x/y/feature/assignment/compartment columns by candidate names, map CosMX compartments to the standard schema, and read cell/nucleus polygons from masks. Bundles the small column/boundary resolution helpers it needs, so it is self-contained and independent of the platform-detection feature.

What to review:

  • src/segger/io/preprocessor.py: the helper functions + the CosMXPreprocessor rewrite (validate / transcripts / boundaries).
  • src/segger/io/fields.py: CosMx fallback_filename.
  • Verify against a real CosMX export. Minimal: no qv/z or synthetic boundaries.

Base: main (does not depend on feat/io-platform-detection).

Generalize CosMXPreprocessor so CosMX exports actually read: resolve the
transcripts source (CSV glob or transcripts.parquet fallback), resolve
x/y/feature/assignment/compartment columns by candidate names, map CosMX
compartments to the standard schema, and read cell/nucleus polygons from masks.
Bundles the small column/boundary resolution helpers it needs, so it is
self-contained and independent of the platform-detection feature.

What to review:
- src/segger/io/preprocessor.py: the helper functions + the CosMXPreprocessor
  rewrite (validate / transcripts / boundaries).
- src/segger/io/fields.py: CosMx fallback_filename.
- Verify against a real CosMX export. Minimal: no qv/z or synthetic boundaries.

Base: main (does not depend on feat/io-platform-detection).
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