Skip to main content

Container class for storing data from spatial feature experiments

Project description

PyPI-Server Unit tests

SpatialFeatureExperiment

A Python package for storing and analyzing spatial-omics experimental data. This package provide the SpatialFeatureExperiment class, based on the R package and class.

Install

To get started, install the package from PyPI

pip install spatialfeatureexperiment

Quick Usage

This package uses shapely and geopandas to support the *_geometries slots.

from spatialexperiment import SpatialFeatureExperiment
import numpy as np
import geopandas as gpd
from shapely.geometry import Polygon

nrows = 200
ncols = 500
counts = np.random.rand(nrows, ncols)
polys = gpd.GeoSeries(
    [
        Polygon([(1, -1), (1, 0), (0, 0)]),
        Polygon([(3, -1), (4, 0), (3, 1)]),
    ]
)

colgeoms = {"polygons" : gpd.GeoDataFrame({"geometry": polys})}
tspe = SpatialFeatureExperiment(assays={"spots": counts}, col_geometries=colgeoms)

Note

This project has been set up using BiocSetup and PyScaffold.

Project details


Download files

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

Source Distribution

spatialfeatureexperiment-0.1.1.tar.gz (41.6 kB view details)

Uploaded Source

Built Distribution

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

spatialfeatureexperiment-0.1.1-py3-none-any.whl (24.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: spatialfeatureexperiment-0.1.1.tar.gz
  • Upload date:
  • Size: 41.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for spatialfeatureexperiment-0.1.1.tar.gz
Algorithm Hash digest
SHA256 f53b2c640138bf303d76bd22837d390bc3cbe1a19ba6935ea07064278cb2be0e
MD5 c966f30ca2fa6f19fcc27fade2a2fea5
BLAKE2b-256 977f5a526033414fe47be4dff9ccad8c76acd403715c0ac1cdf8d49011ed1f4b

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialfeatureexperiment-0.1.1.tar.gz:

Publisher: publish-pypi.yml on BiocPy/SpatialFeatureExperiment

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for spatialfeatureexperiment-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 333f831e81bb78b1438b19aeca734a6d9cd301f876d7b75e0de3e259a454c433
MD5 4cf456d999de469311a74f9bcdc9bf98
BLAKE2b-256 1352858567568e117d6617acf61e183c49219aedc2ae0a15b16d35831e0126ad

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialfeatureexperiment-0.1.1-py3-none-any.whl:

Publisher: publish-pypi.yml on BiocPy/SpatialFeatureExperiment

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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