Skip to content

Utils function to sanitise obs columns #934

@timtreis

Description

@timtreis

SpatialData validates the contents of the obs columns:

ValidationError: Table contains invalid names.
For renaming, please see the discussion here https://github.com/scverse/spatialdata/discussions/707 .
  obs/B cells_score: Name must contain only alphanumeric characters, underscores, dots and hyphens.
  obs/Breast cancer_score: Name must contain only alphanumeric characters, underscores, dots and hyphens.
  obs/Breast glandular cells_score: Name must contain only alphanumeric characters, underscores, dots and hyphens.
  obs/Breast myoepithelial cells_score: Name must contain only alphanumeric characters, underscores, dots and hyphens.
  obs/Dendritic cells_score: Name must contain only alphanumeric characters, underscores, dots and hyphens.
  obs/Endothelial cells_score: Name must contain only alphanumeric characters, underscores, dots and hyphens.
  obs/Epithelial cells_score: Name must contain only alphanumeric characters, underscores, dots and hyphens.
  obs/Immune cells_score: Name must contain only alphanumeric characters, underscores, dots and hyphens.
  obs/Mast cells_score: Name must contain only alphanumeric characters, underscores, dots and hyphens.
  obs/NK cells_score: Name must contain only alphanumeric characters, underscores, dots and hyphens.
  obs/Smooth muscle cells_score: Name must contain only alphanumeric characters, underscores, dots and hyphens.
  obs/T cells_score: Name must contain only alphanumeric characters, underscores, dots and hyphens.

Would be nice to have a helper function that fixes the contents

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions