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

Uploaded Python 3

File details

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

File metadata

  • Download URL: spatialfeatureexperiment-0.0.5.tar.gz
  • Upload date:
  • Size: 41.4 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.5.tar.gz
Algorithm Hash digest
SHA256 2ebdcef198de0f33c0bb9a8c5349a0ee8e75ee105a6e7ea1ded7a0b36167f03c
MD5 9c3243419bcfcf9999dcdb79d4c5c16a
BLAKE2b-256 0eae3070bb7aa9073d041209995e9d8ca9d5cd6fdc4c3bd9923f0e7354e17959

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for spatialfeatureexperiment-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 b5152704053e8f83653ee021a09ea79d6dba96455db0a7fe9c476872d80e64fa
MD5 e148add4b4a5f66829262a8968d2a22e
BLAKE2b-256 86c255c10b076dcab660001b83e2d749e4fcc40c2959be091201d149d97d4426

See more details on using hashes here.

Provenance

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