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.4.tar.gz (41.3 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.4-py3-none-any.whl (24.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: spatialfeatureexperiment-0.0.4.tar.gz
  • Upload date:
  • Size: 41.3 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.4.tar.gz
Algorithm Hash digest
SHA256 ac8c274b4fcbd36d71e17011bc0b4b07d862f1b741f8607d4a20ba93ef18ab76
MD5 1076b54f88aca3556a18c647c0500250
BLAKE2b-256 14d732b270958dc471b7333bd8c9fed36d4bf8c31bc85d506eab56e1b0bbaeaa

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for spatialfeatureexperiment-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 13f4af265496ba00d6a9bda6bcb0577d9fa7003b26e3b03720bcfa2adb68cec6
MD5 e2b788b5b7aeaf008a48004b670cc0b3
BLAKE2b-256 5f6c667bbd4f3ec5bd69fcb6406c1499086686a206db7d91b1c8c42e2d407bcc

See more details on using hashes here.

Provenance

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