Skip to main content

InterSCellar

PyPI License: MIT

InterSCellar is a Python package for surface-Based cell neighborhood and interaction volume analysis in 3D spatial omics.

Package workflow

Installation

Install package:

pip install interscellar

Usage

Import:

import interscellar

3D Pipeline:

(1) Cell Neighbor Detection & Graph Construction

neighbors_3d, adata, conn = interscellar.find_cell_neighbors_3d(
    ome_zarr_path="data/segmentation.zarr",
    metadata_csv_path="data/cell_metadata.csv",
    max_distance_um=0.5,
    voxel_size_um=(0.56, 0.28, 0.28),
    n_jobs=4
)

(2) Interscellar Volume Computation

# Interscellar volumes
volumes_3d, adata, conn = interscellar.compute_interscellar_volumes_3d(
    ome_zarr_path="data/segmentation.zarr",
    neighbor_pairs_csv="results/neighbors_3d.csv",
    neighbor_db_path="/results/neighbor_graph.db",
    voxel_size_um=(0.56, 0.28, 0.28),
    max_distance_um=3.0,
    intracellular_threshold_um=1.0,
    n_jobs=4
)
# Cell-only volumes
cellonly_3d = interscellar.compute_cell_only_volumes_3d(
    ome_zarr_path="data/segmentation.zarr",
    interscellar_volumes_zarr="results/interscellar_volumes.zarr"
)

2D Pipeline:

(1) Cell Neighbor Detection & Graph Construction

neighbors_2d, adata, conn = interscellar.find_cell_neighbors_2d(
    polygon_json_path="data/cell_polygons.json",
    metadata_csv_path="data/cell_metadata.csv",
    max_distance_um=1.0,
    pixel_size_um=0.1085,
    n_jobs=4
)

Utilities:

Feature Extraction

feature-extract-3d \
  --segmentation-zarr "results/interscellar_volumes.zarr" \
  --raw-expression-zarr "data/raw_expression.zarr" \
  --output-csv "results/features_3d.csv"

Volume Visualization

# Full dataset (Napari)
visualize-all-3d \
  --cell-only-zarr "results/cell_only_volumes.zarr" \
  --interscellar-zarr "results/interscellar_volumes.zarr" \
  --cell-only-opacity 0.7 \
  --interscellar-opacity 0.9
# Single pair (Napari)
visualize-pair-3d \
  --pair-id 123 \
  --cell-only-zarr "results/cell_only_volumes.zarr" \
  --interscellar-zarr "results/interscellar_volumes.zarr" \
  --pair-opacity 0.6 \
  --cells-opacity 0.7

Metadata

Release files for InterSCellar 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for InterSCellar 0.1.1
File Size Uploaded
interscellar-0.1.1.tar.gz 52.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for InterSCellar 0.1.1
File Interpreter ABI Platform
interscellar-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 113.3 kB

Release files / interscellar-0.1.1.tar.gz

Download URL interscellar-0.1.1.tar.gz
Size 52.6 kB
Tags Source
SHA-256 checksum
How to use checksums
d615b3be919d9c1685aaa50702cdab4c73d1afdf0331f02e00cadd43980ba06a
BLAKE2b-256 checksum
How to use checksums
54fa4235d55179e279dfa7718f217a7cc2e1d2afb8d89f62abfdf7fc3a2575a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.9

Release files / interscellar-0.1.1-py3-none-any.whl

Download URL interscellar-0.1.1-py3-none-any.whl
Size 60.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7d5d9688459a3f8ec08b68fa85e24c652ad445d38f934f08b1412bc781c225e7
BLAKE2b-256 checksum
How to use checksums
933444e66734a9f2047d502e92cbfac1dbccc16a3ddf2fbc319963e76593aef9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.9

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page