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.0.3.tar.gz (40.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.0.3-py3-none-any.whl (23.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for spatialfeatureexperiment-0.0.3.tar.gz
Algorithm Hash digest
SHA256 91450bd4d348c9e2642877950e2b5a46f0bc56d5cc0487348e886040a1365db2
MD5 04652b131d1ee955c2561e6368875bae
BLAKE2b-256 363749bc5768d5b028e34bd7e480b0aed4cb4a592f2ea91ee5990e7d009c2c17

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for spatialfeatureexperiment-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f2e5c5b8640335521efbed25be549275b06f4b39d45a61534b098c32e1f71ad6
MD5 54bf99f6752a705afb435ba6f2b36a46
BLAKE2b-256 1d9b5c6552a3b5d4c6296303c81a718fd93c69466ba54571f168e33f155206c9

See more details on using hashes here.

Provenance

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