Skip to main content

A tool to generate coembeddings from IF image embeddings and PPI network embeddings

Project description

Cell Maps CoEmbedder

The Cell Maps CoEmbedding is part of the Cell Mapping Toolkit

https://img.shields.io/pypi/v/cellmaps_coembedding.svg https://app.travis-ci.com/idekerlab/cellmaps_coembedding.svg?branch=main Documentation Status Zenodo DOI badge

Creates Coembedding from Cell Maps ImmunoFluorscent Image Embedder and Cell Maps PPI Embedder using an implementation of MUSE

Dependencies

Compatibility

  • Python 3.8 - 3.11

Installation

git clone https://github.com/idekerlab/cellmaps_coembedding
cd cellmaps_coembedding
pip install -r requirements_dev.txt
make dist
pip install dist/cellmaps_coembedding*whl

Run make command with no arguments to see other build/deploy options including creation of Docker image

make

Output:

clean                remove all build, test, coverage and Python artifacts
clean-build          remove build artifacts
clean-pyc            remove Python file artifacts
clean-test           remove test and coverage artifacts
lint                 check style with flake8
test                 run tests quickly with the default Python
test-all             run tests on every Python version with tox
coverage             check code coverage quickly with the default Python
docs                 generate Sphinx HTML documentation, including API docs
servedocs            compile the docs watching for changes
testrelease          package and upload a TEST release
release              package and upload a release
dist                 builds source and wheel package
install              install the package to the active Python's site-packages
dockerbuild          build docker image and store in local repository
dockerpush           push image to dockerhub

Before running tests, please install pip install -r requirements_dev.txt.

For developers

To deploy development versions of this package

Below are steps to make changes to this code base, deploy, and then run against those changes.

  1. Make changes

    Modify code in this repo as desired

  2. Build and deploy

# From base directory of this repo cellmaps_coembedding
pip uninstall cellmaps_coembedding -y ; make clean dist; pip install dist/cellmaps_coembedding*whl

Needed files

The output directories for the image embeddings (see Cell Maps Image Embedding) and protein-protein interaction network embeddings (see Cell Maps PPI Embedding) are required.

Usage

For information invoke cellmaps_coembeddingcmd.py -h

Example usage

cellmaps_coembeddingcmd.py ./cellmaps_coembedding_outdir --embeddings ./cellmaps_image_embedding_outdir ./cellmaps_ppi_embedding_outdir

Via Docker

Example usage

Coming soon...

Cite

If you find this tool useful, please cite:

Lenkiewicz, J., Churas, C., Hu, M., Qian, G., Jain, M., Levinson, M. A., … & Schaffer, L. V. (2025). Cell Mapping Toolkit: An end-to-end pipeline for mapping subcellular organization. Bioinformatics, 41(6), btaf205.

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

History

1.5.0 (2025-10-23)

  • Deprecated cellmaps_coembedding.protein_gps module in favor of cellmaps_coembedding.proteinprojector. Updated documentation accordingly.

1.4.0 (2025-09-10)

  • Expose k parameter as flag

1.3.1 (2025-07-03)

  • Fix for UD-3116, missing header 0 row

1.3.0 (2025-05-29)

  • Create flags for parameters of proteingps coembedding algorithm

1.2.2 (2025-05-15)

  • Updated to PEP 517 compliant build system

  • Bug fixes: update constants, add back L2 normalization and fix separator issue for proteinGPS

1.2.1 (2025-04-14)

  • Fix scipy package version

1.2.0 (2025-03-19)

  • Added functionality to generate umap of embeddings (in cellmaps_coembedding.utils)

1.1.0 (2025-03-05)

  • Added functionality to evaluate embeddings using statistical analysis and visualization (functions get_embedding_eval_data and generate_embedding_evaluation_figures in cellmaps_coembedding.utils).

  • Update defauls (EPOCHS and DROPOUT)

1.0.0 (2025-01-28)

  • Rename auto coembedding name and proteinGPS. –algorithm auto option is depreacted and –algorithm proteingps should be used. The coembedding implementation was moved to ProteinGPSCoEmbeddingGenerator class and AutoCoEmbeddingGenerator is deprecated and calls proteingps. The package name was renamed from autoembed_sc to proteingps.

  • Removed l2 normalization

  • Constants updated in ProteinGPSCoEmbeddingGenerator (triplet_margin=0.2) and in proteingps’s fit_predict (triplet_margin=0.2, lambda_reconstruction=5.0, lambda_triplet=5.0)

  • Bug fix: add missing a .to(device) call to ensure tensors are correctly moved to the appropriate device.

  • Update version bounds of required packages

0.4.0 (2024-12-02)

  • Added README generation.

  • Refactor code.

  • Update defaults (EPOCHS)

0.3.1 (2024-09-13)

  • Bug fix: raise more informative error when no embeddings overlap.

0.3.0 (2024-09-06)

  • Added --provenance flag to pass a path to json file with provenance information. This removes the necessity of input directory to be an RO-Crate.

0.2.0 (2024-07-17)

  • Added a new coembedding algorithm accessible via flag --algorithm auto. This algorithm utilizes neural networks to generate latent embeddings, optimizing both reconstruction and triplet losses to improve embedding accuracy by learning intra- and inter-modality relationships.

0.1.0 (2024-02-12)

  • First release on PyPI.

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

cellmaps_coembedding-1.5.0.tar.gz (230.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cellmaps_coembedding-1.5.0-py2.py3-none-any.whl (247.3 kB view details)

Uploaded Python 2Python 3

File details

Details for the file cellmaps_coembedding-1.5.0.tar.gz.

File metadata

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

File hashes

Hashes for cellmaps_coembedding-1.5.0.tar.gz
Algorithm Hash digest
SHA256 17d770421f49f83d2fe1912bb7d1b09e1cf903b396756f00641f65d023098942
MD5 684af3a42a67fdd8f29723be29422846
BLAKE2b-256 536ef797ec676bf7c3ba7e74fbfe7c3cb2a1b8b770e9cda6bba9d719c1735810

See more details on using hashes here.

File details

Details for the file cellmaps_coembedding-1.5.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for cellmaps_coembedding-1.5.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 06f97216a80bfc8c44cd6016bb56c10094688816749d42892d3baeafd56db7da
MD5 ddb5afd4db442f4f75b280009fa44fc4
BLAKE2b-256 aab497273a240c7c44b97ed12e3ab0d7b145b954d59a0e22ca3f7b19f226fbba

See more details on using hashes here.

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