Skip to main content

data abstraction and libraries for spatial omics

Project description

emObject

emobject logo

What is emObject?

emObject is an abstraction for multimodal spatial omics data in Python. It’s inspired by other data abstractions and data science libraries like Seurat, but purpose-built for multiplexed imaging, spatial transcriptomics, and similar assays. emObject unlocks a seamless data science workflow between the core data types in a spatial dataset: matrix-format data, images, and masks - via shared indexing and dedicated attributes to hold measurements, featurizations, and annotations on data across spatial scales.

As emObject evolves, we envision this data abstraction providing an expected and efficient format for science and engineering code and as a step towards closing the loop between code and no-code analysis on the Enable platform.

For more info about the design and motivation for emObject, see the manuscript emObject: domain specific data abstraction for spatial omics.

What’s in an emObject?

emObject has dedicated attributes for all the common attributes we encounter in analyzing spatial data. A single emObject represents data at the acquisition level - future functionality is planned to represent experiments.

Data attributes are aligned along several axes:

  1. The observation axis - typically cells or visium spots
  2. The variable axis - typically genes or biomarkers
  3. The segment axis - unique, contiguous regions of ROI masks
emobject schema

Layers

Layers are an additional axis within emObjects that stack the core data attributes - data, var, obs, sobs. This allows us to hold multiple versions - or multiple data modalities - within a single object. For example, we could have a raw and normalized data layer, or a layer for CODEX and a layer for H+E data. Annotations are kept within a layer since computations derived from the images may be affected by the numeric values in data.

baselayer

What gets stored where?

  • Biomarker expression -> data
  • Notes about biomarkers -> var
  • Featurization -> obs
  • Spatial info -> pos
  • Assignment of cells to segments -> seg
  • Annotations on segment level -> sobs
  • Unstructured info, whole image annotations -> meta

Getting started

Requirements

emObject requires Python 3.8 or higher and is tested on MacOS 13.2 (Ventura) and Ubuntu 18.04 and 22.04.

Installation

To install emObject, clone this repo:

git clone https://gitlab.com/enable-medicine-public/emobject.git

and install:

sudo python setup.py install

If you use pipenv as a package manager, you can install via:

pipenv install '-e .' --dev

from within the emobject repository.

You can also install directly via PyPI:

pip install emobject

or, if you use pipenv (recommended):

pipenv install emobject

Using emObject

See the ./notebooks directory for tutorials to get started with emObject. The complete emObject documentation is available at docs.enablemedicine.com.

Using emMorphology extension

See the morphology extension package here.

Citing emObject

If you use emObject in your work, please cite:

@article{Baker2023.06.07.543950,
	author = {Ethan Alexander Garc{\'\i}a Baker and Meng-Yao Huang and Amy Lam and Maha K. Rahim and Matthew F. Bieniosek and Bobby Wang and Nancy R. Zhang and Aaron T Mayer and Alexandro E Trevino},
	journal = {bioRxiv},
	title = {emObject: domain specific data abstraction for spatial omics},
	year = {2023}}

Contributing to emObject

We welcome community contributions. Contribution guide to come

License

emObject is available under the MIT License.

(c) 2023 Enable Medicine, Inc.

Enable Medicine logo

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

emobject-0.7.10.tar.gz (51.6 kB view details)

Uploaded Source

Built Distribution

emobject-0.7.10-py3-none-any.whl (54.8 kB view details)

Uploaded Python 3

File details

Details for the file emobject-0.7.10.tar.gz.

File metadata

  • Download URL: emobject-0.7.10.tar.gz
  • Upload date:
  • Size: 51.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.18

File hashes

Hashes for emobject-0.7.10.tar.gz
Algorithm Hash digest
SHA256 666b47e2da387a752d7b18100c6f8efdfc7d04e1ca9fd0deb9a3ba6d0eaf021d
MD5 4b8e5648a3e6296922d465fa2282986c
BLAKE2b-256 53ef8666e246b7cbe28b9d9ca9aaf44d6e26ff9ad6ec65fc3fbd54079f66eae7

See more details on using hashes here.

File details

Details for the file emobject-0.7.10-py3-none-any.whl.

File metadata

  • Download URL: emobject-0.7.10-py3-none-any.whl
  • Upload date:
  • Size: 54.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.18

File hashes

Hashes for emobject-0.7.10-py3-none-any.whl
Algorithm Hash digest
SHA256 60f6d24712796ea7dd14c141c77988ee79de5df97bfa49a4e2dda74f75dea2c8
MD5 9128abe1389bf04cc3b21f1c17b7c9d8
BLAKE2b-256 5ddf1f358bb707f6029f6aa5200f7f25b07861a19a560bb61a4195171aaa27ff

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page