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.1.tar.gz (26.1 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.1-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: spatialfeatureexperiment-0.0.1.tar.gz
  • Upload date:
  • Size: 26.1 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.1.tar.gz
Algorithm Hash digest
SHA256 71913813fa40c14f2f767c69d41fd6f69d4f3b2f1755bc234617d853a1aa52c0
MD5 577a0b7cff3a29876f0db1605b26ad21
BLAKE2b-256 9a246fc579c47ae5cd8c2b69ce3cd240ee2683b4df943ba68467399b759de0aa

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for spatialfeatureexperiment-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 033f2726a8654c152276709e04a125b2dd9b5501bba3f1646f9155a9b1eb8343
MD5 1adbad75e4274793a32787ca0b20f017
BLAKE2b-256 8756fdd17b6a7b832f1ddd925217698e18b9327035c75dc5444736c5f42823a1

See more details on using hashes here.

Provenance

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