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.0.tar.gz (41.5 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.0-py3-none-any.whl (24.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for spatialfeatureexperiment-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7925aa3d18af15484dda2729e1b7fe77acfe56a426078b7596d1992ef1d36370
MD5 2b535809a223faf5e4e9252ca5e0c803
BLAKE2b-256 e94d0159a7dbd017410dfd9769282d2cf16e84ae08f3c43fab8031bb7ed87a57

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialfeatureexperiment-0.1.0.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.0-py3-none-any.whl.

File metadata

File hashes

Hashes for spatialfeatureexperiment-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6a5232569e6d34452b6d59377225f45c358b704ffb1d7761968b160b0e6037e2
MD5 b3a9aceec687e870f91bb69e00d7c711
BLAKE2b-256 39d96fa479aa8c1f57342c9e23d68a7204fc4ee5d65eeb7fb79b53f2ead463b1

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialfeatureexperiment-0.1.0-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