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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

interscellar-0.1.1.tar.gz (52.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

interscellar-0.1.1-py3-none-any.whl (60.8 kB view details)

Uploaded Python 3

File details

Details for the file interscellar-0.1.1.tar.gz.

File metadata

  • Download URL: interscellar-0.1.1.tar.gz
  • Upload date:
  • Size: 52.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for interscellar-0.1.1.tar.gz
Algorithm Hash digest
SHA256 d615b3be919d9c1685aaa50702cdab4c73d1afdf0331f02e00cadd43980ba06a
MD5 d0aff4a09c897fcbb8998408d480f787
BLAKE2b-256 54fa4235d55179e279dfa7718f217a7cc2e1d2afb8d89f62abfdf7fc3a2575a2

See more details on using hashes here.

File details

Details for the file interscellar-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: interscellar-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 60.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for interscellar-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7d5d9688459a3f8ec08b68fa85e24c652ad445d38f934f08b1412bc781c225e7
MD5 570e688fa273ae6e6a233aa3d137aec7
BLAKE2b-256 933444e66734a9f2047d502e92cbfac1dbccc16a3ddf2fbc319963e76593aef9

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page