Package: emobject
emObjectWhat 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 manuscriptemObject: 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:The observation axis - typically cells or visium spotsThe variable axis - typically genes or biomarkersThe segment axis - unique, contiguous regions of ROI masksLayersLayers 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 indata.What gets stored where?Biomarker expression ->dataNotes about biomarkers ->varFeaturization ->obsSpatial info ->posAssignment of cells to segments ->segAnnotations on segment level ->sobsUnstructured info, whole image annotations ->metaGetting startedRequirementsemObject requires Python 3.8 or higher and is tested on MacOS 13.2 (Ventura) and Ubuntu 18.04 and 22.04.InstallationTo install emObject, clone this repo:gitclonehttps://gitlab.com/enable-medicine-public/emobject.gitand install:sudopythonsetup.pyinstallIf you usepipenvas a package manager, you can install via:pipenvinstall'-e .'--devfrom within theemobjectrepository.You can also install directly via PyPI:pipinstallemobjector, if you usepipenv(recommended):pipenvinstallemobjectUsing emObjectSee the./notebooksdirectory for tutorials to get started with emObject. The complete emObject documentation is available atdocs.enablemedicine.com.Using emMorphology extensionSee the morphology extension packagehere.Citing emObjectIf 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 emObjectWe welcome community contributions. Contribution guide to comeLicenseemObject is available under the MIT License.(c)2023 Enable Medicine, Inc.