pyXenium.contour#

add_contours_from_geojson

Import polygon contours from a GeoJSON file into XeniumSlide.shapes.

build_contour_feature_table

Build a contour-centric multimodal feature table.

compare_contour_cell_composition

Compare cell-type proportions and quantities across contour groups.

compare_contour_de

Compare contour groups with contour-level pseudobulk expression.

compare_contour_transcript_de

Compare contour groups with transcript-count pseudobulk normalization.

expand_contours

Expand an existing contour layer into a derived contour layer.

generate_barrier_contour_shells

Generate per-contour shells whose outward rings exclude other contours.

generate_contour_shells

Generate independent inward/outward signed-distance shells for each contour.

generate_xenium_explorer_annotations

Generate Xenium Explorer-compatible structure annotations via HistoSeg.

ring_density

Compute inward/outward ring density around contour annotations in XeniumSlide.

smooth_density_by_distance

Compute a continuous signed-distance density profile around contour annotations.

summarize_contour_composition

Summarize cell-type and gene/program composition inside each contour.

summarize_contour_topology

Summarize contour boundary-neighbor and enclosure relationships.