Skip to content

Skip text obsm entries when looking for coordinates - #32

Merged
sminot merged 1 commit into
mainfrom
world-space-skip-non-numeric-obsm
Nov 30, 2026
Merged

sminot merged 1 commit into
mainfrom
world-space-skip-non-numeric-obsm

Conversation

@sminot

@sminot sminot commented Nov 30, 2026

Copy link
Copy Markdown
Collaborator

world_space compares every obsm entry against a multi-region table's stitched coordinates, and converts each to float to do it. An Element Cytos export keeps each cell's guide assignment as a text data frame in obsm, so its import failed right after stitching the first table:

  File ".../app/sessions/transform.py", line 189, in world_space
    if np.abs(arr[:, :2].astype(float) - world).max() <= 1e-3 * span:
ValueError: could not convert string to float: 'CTNNB1_2'

Non-numeric entries are skipped there, and left out of describe_fields' obsm list, which the viewer already does. The synthetic store in test_cli.py now carries one.

🤖 Generated with Claude Code

`world_space` compared every obsm entry against the stitched coordinates as floats,
and an Element Cytos export keeps each cell's guide assignment as a text data frame
in obsm, so importing it failed with "could not convert string to float". Skip
non-numeric entries there, and leave them out of the Studio's obsm pickers, which
the viewer already does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sminot
sminot marked this pull request as ready for review November 30, 2026 20:07
@sminot
sminot merged commit 5ab8763 into main Nov 30, 2026
11 checks passed
@sminot
sminot deleted the world-space-skip-non-numeric-obsm branch November 30, 2026 20:07
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.

1 participant