=====================
Cell Maps CoEmbedder
=====================
The Cell Maps CoEmbedding is part of the Cell Mapping Toolkit
.. image:: https://img.shields.io/pypi/v/cellmaps_coembedding.svg
:target: https://pypi.python.org/pypi/cellmaps_coembedding
.. image:: https://app.travis-ci.com/idekerlab/cellmaps_coembedding.svg?branch=main
:target: https://app.travis-ci.com/idekerlab/cellmaps_coembedding
.. image:: https://readthedocs.org/projects/cellmaps-coembedding/badge/?version=latest
:target: https://cellmaps-coembedding.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status
.. image:: https://zenodo.org/badge/620523316.svg
:target: https://zenodo.org/doi/10.5281/zenodo.10651873
:alt: Zenodo DOI badge
Creates Coembedding from `Cell Maps ImmunoFluorscent Image Embedder <https://cellmaps-image-embedding.readthedocs.io>`__
and `Cell Maps PPI Embedder <https://cellmaps-ppi-embedding.readthedocs.io>`__ using an implementation of `MUSE <https://github.com/AltschulerWu-Lab/MUSE>`__
* Free software: MIT license
* Documentation: https://cellmaps-coembedding.readthedocs.io.
Dependencies
------------
* `cellmaps_utils <https://pypi.org/project/cellmaps-utils>`__
* `phenograph <https://pypi.org/project/phenograph>`__
* `numpy <https://pypi.org/project/numpy>`__
* `torch <https://pypi.org/project/torch>`__
* `pandas <https://pypi.org/project/pandas>`__
* `matplotlib <https://pypi.org/project/matplotlib>`__
* `dill <https://pypi.org/project/dill>`__
* `tqdm <https://pypi.org/project/tqdm>`__
* `scipy <https://pypi.org/project/scipy/>`__
Compatibility
-------------
* Python 3.8 - 3.11
Installation
------------
.. code-block::
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
.. code-block::
make
Output:
.. code-block::
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.
#. Make changes
Modify code in this repo as desired
#. Build and deploy
.. code-block::
# 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 <https://github.com/idekerlab/cellmaps_image_embedding/>`__) and protein-protein interaction network embeddings (see `Cell Maps PPI Embedding <https://github.com/idekerlab/cellmaps_ppi_embedding/>`__) are required.
Usage
-----
For information invoke :code:`cellmaps_coembeddingcmd.py -h`
**Example usage**
.. code-block::
cellmaps_coembeddingcmd.py ./cellmaps_coembedding_outdir --embeddings ./cellmaps_image_embedding_outdir ./cellmaps_ppi_embedding_outdir
Via Docker
~~~~~~~~~~~~~~~~~~~~~~
**Example usage**
.. code-block::
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.
.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage
.. _NDEx: http://www.ndexbio.org
=======
History
=======
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.
Raw data
{
"_id": null,
"home_page": "https://github.com/idekerlab/cellmaps_coembedding",
"name": "cellmaps-coembedding",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "cellmaps_coembedding",
"author": "Cell Maps team",
"author_email": "tools@cm4ai.org",
"download_url": "https://files.pythonhosted.org/packages/1c/aa/fb960ab9a32dbf09c1985179f43e2773d02bee8eb13219390b01c8ca8c4f/cellmaps_coembedding-1.4.0.tar.gz",
"platform": null,
"description": "=====================\nCell Maps CoEmbedder\n=====================\nThe Cell Maps CoEmbedding is part of the Cell Mapping Toolkit\n\n.. image:: https://img.shields.io/pypi/v/cellmaps_coembedding.svg\n :target: https://pypi.python.org/pypi/cellmaps_coembedding\n\n.. image:: https://app.travis-ci.com/idekerlab/cellmaps_coembedding.svg?branch=main\n :target: https://app.travis-ci.com/idekerlab/cellmaps_coembedding\n\n.. image:: https://readthedocs.org/projects/cellmaps-coembedding/badge/?version=latest\n :target: https://cellmaps-coembedding.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n\n.. image:: https://zenodo.org/badge/620523316.svg\n :target: https://zenodo.org/doi/10.5281/zenodo.10651873\n :alt: Zenodo DOI badge\n\nCreates Coembedding from `Cell Maps ImmunoFluorscent Image Embedder <https://cellmaps-image-embedding.readthedocs.io>`__\nand `Cell Maps PPI Embedder <https://cellmaps-ppi-embedding.readthedocs.io>`__ using an implementation of `MUSE <https://github.com/AltschulerWu-Lab/MUSE>`__\n\n* Free software: MIT license\n* Documentation: https://cellmaps-coembedding.readthedocs.io.\n\n\nDependencies\n------------\n\n* `cellmaps_utils <https://pypi.org/project/cellmaps-utils>`__\n* `phenograph <https://pypi.org/project/phenograph>`__\n* `numpy <https://pypi.org/project/numpy>`__\n* `torch <https://pypi.org/project/torch>`__\n* `pandas <https://pypi.org/project/pandas>`__\n* `matplotlib <https://pypi.org/project/matplotlib>`__\n* `dill <https://pypi.org/project/dill>`__\n* `tqdm <https://pypi.org/project/tqdm>`__\n* `scipy <https://pypi.org/project/scipy/>`__\n\n\nCompatibility\n-------------\n\n* Python 3.8 - 3.11\n\nInstallation\n------------\n\n.. code-block::\n\n git clone https://github.com/idekerlab/cellmaps_coembedding\n cd cellmaps_coembedding\n pip install -r requirements_dev.txt\n make dist\n pip install dist/cellmaps_coembedding*whl\n\n\nRun **make** command with no arguments to see other build/deploy options including creation of Docker image\n\n.. code-block::\n\n make\n\nOutput:\n\n.. code-block::\n\n clean remove all build, test, coverage and Python artifacts\n clean-build remove build artifacts\n clean-pyc remove Python file artifacts\n clean-test remove test and coverage artifacts\n lint check style with flake8\n test run tests quickly with the default Python\n test-all run tests on every Python version with tox\n coverage check code coverage quickly with the default Python\n docs generate Sphinx HTML documentation, including API docs\n servedocs compile the docs watching for changes\n testrelease package and upload a TEST release\n release package and upload a release\n dist builds source and wheel package\n install install the package to the active Python's site-packages\n dockerbuild build docker image and store in local repository\n dockerpush push image to dockerhub\n\nBefore running tests, please install ``pip install -r requirements_dev.txt``.\n\nFor developers\n-------------------------------------------\n\nTo deploy development versions of this package\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nBelow are steps to make changes to this code base, deploy, and then run\nagainst those changes.\n\n#. Make changes\n\n Modify code in this repo as desired\n\n#. Build and deploy\n\n.. code-block::\n\n # From base directory of this repo cellmaps_coembedding\n pip uninstall cellmaps_coembedding -y ; make clean dist; pip install dist/cellmaps_coembedding*whl\n\n\n\nNeeded files\n------------\n\nThe output directories for the image embeddings (see `Cell Maps Image Embedding <https://github.com/idekerlab/cellmaps_image_embedding/>`__) and protein-protein interaction network embeddings (see `Cell Maps PPI Embedding <https://github.com/idekerlab/cellmaps_ppi_embedding/>`__) are required.\n\n\nUsage\n-----\n\nFor information invoke :code:`cellmaps_coembeddingcmd.py -h`\n\n**Example usage**\n\n.. code-block::\n\n cellmaps_coembeddingcmd.py ./cellmaps_coembedding_outdir --embeddings ./cellmaps_image_embedding_outdir ./cellmaps_ppi_embedding_outdir\n\n\n\nVia Docker\n~~~~~~~~~~~~~~~~~~~~~~\n\n**Example usage**\n\n\n.. code-block::\n\n Coming soon...\n\nCite\n-------\n\nIf you find this tool useful, please cite:\n\nLenkiewicz, 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.\n\nCredits\n-------\n\nThis package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.\n\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage\n.. _NDEx: http://www.ndexbio.org\n\n\n=======\nHistory\n=======\n\n1.4.0 (2025-09-10)\n--------------------\n\n* Expose k parameter as flag\n\n1.3.1 (2025-07-03)\n--------------------\n\n* Fix for UD-3116, missing header 0 row\n\n1.3.0 (2025-05-29)\n-------------------\n\n* Create flags for parameters of proteingps coembedding algorithm\n\n1.2.2 (2025-05-15)\n-------------------\n\n* Updated to PEP 517 compliant build system\n* Bug fixes: update constants, add back L2 normalization and fix separator issue for proteinGPS\n\n1.2.1 (2025-04-14)\n-------------------\n\n* Fix scipy package version\n\n1.2.0 (2025-03-19)\n-------------------\n\n* Added functionality to generate umap of embeddings (in cellmaps_coembedding.utils)\n\n1.1.0 (2025-03-05)\n-------------------\n\n* Added functionality to evaluate embeddings using statistical analysis and visualization (functions\n `get_embedding_eval_data` and `generate_embedding_evaluation_figures` in cellmaps_coembedding.utils).\n\n* Update defauls (EPOCHS and DROPOUT)\n\n1.0.0 (2025-01-28)\n-------------------\n\n* Rename auto coembedding name and proteinGPS. `--algorithm auto` option is depreacted and `--algorithm proteingps`\n should be used. The coembedding implementation was moved to `ProteinGPSCoEmbeddingGenerator` class and\n `AutoCoEmbeddingGenerator` is deprecated and calls proteingps. The package name was renamed from `autoembed_sc`\n to `proteingps`.\n\n* Removed l2 normalization\n\n* Constants updated in `ProteinGPSCoEmbeddingGenerator` (triplet_margin=0.2) and in proteingps's fit_predict\n (triplet_margin=0.2, lambda_reconstruction=5.0, lambda_triplet=5.0)\n\n* Bug fix: add missing a `.to(device)` call to ensure tensors are correctly moved to the appropriate device.\n\n* Update version bounds of required packages\n\n0.4.0 (2024-12-02)\n-------------------\n\n* Added README generation.\n\n* Refactor code.\n\n* Update defaults (EPOCHS)\n\n0.3.1 (2024-09-13)\n------------------\n\n* Bug fix: raise more informative error when no embeddings overlap.\n\n0.3.0 (2024-09-06)\n------------------\n\n* Added ``--provenance`` flag to pass a path to json file with provenance information. This removes the\n necessity of input directory to be an RO-Crate.\n\n0.2.0 (2024-07-17)\n------------------\n\n* Added a new coembedding algorithm accessible via flag ``--algorithm auto``. This algorithm utilizes neural networks\n to generate latent embeddings, optimizing both reconstruction and triplet losses to improve embedding accuracy\n by learning intra- and inter-modality relationships.\n\n0.1.0 (2024-02-12)\n------------------\n\n* First release on PyPI.\n",
"bugtrack_url": null,
"license": "MIT license",
"summary": "A tool to generate coembeddings from IF image embeddings and PPI network embeddings",
"version": "1.4.0",
"project_urls": {
"Homepage": "https://github.com/idekerlab/cellmaps_coembedding"
},
"split_keywords": [
"cellmaps_coembedding"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "9ca1dfd19dbb25430e9970be0370c639b849126133b04d1024aa3015c52b7a48",
"md5": "393145f6999583bf1f243c3230cf22a6",
"sha256": "72e1cb2cd70ffeff38460617b982205cca88112333c8d0ef116d0449e2918231"
},
"downloads": -1,
"filename": "cellmaps_coembedding-1.4.0-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "393145f6999583bf1f243c3230cf22a6",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 246684,
"upload_time": "2025-09-10T16:41:58",
"upload_time_iso_8601": "2025-09-10T16:41:58.995616Z",
"url": "https://files.pythonhosted.org/packages/9c/a1/dfd19dbb25430e9970be0370c639b849126133b04d1024aa3015c52b7a48/cellmaps_coembedding-1.4.0-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "1caafb960ab9a32dbf09c1985179f43e2773d02bee8eb13219390b01c8ca8c4f",
"md5": "9bc64feebb63e72f3837aca497a23104",
"sha256": "cd1950c87bf03dd4cf82df5f661bc3471743bd31dd381a14016fdc71afc11430"
},
"downloads": -1,
"filename": "cellmaps_coembedding-1.4.0.tar.gz",
"has_sig": false,
"md5_digest": "9bc64feebb63e72f3837aca497a23104",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 229761,
"upload_time": "2025-09-10T16:42:00",
"upload_time_iso_8601": "2025-09-10T16:42:00.503464Z",
"url": "https://files.pythonhosted.org/packages/1c/aa/fb960ab9a32dbf09c1985179f43e2773d02bee8eb13219390b01c8ca8c4f/cellmaps_coembedding-1.4.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-09-10 16:42:00",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "idekerlab",
"github_project": "cellmaps_coembedding",
"travis_ci": true,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "cellmaps_utils",
"specs": [
[
"<",
"1.0.0"
],
[
">=",
"0.4.0"
]
]
},
{
"name": "phenograph",
"specs": [
[
">=",
"1.5.7"
],
[
"<",
"2.0.0"
]
]
},
{
"name": "numpy",
"specs": [
[
"<",
"2.0.0"
],
[
">=",
"1.24.4"
]
]
},
{
"name": "torch",
"specs": [
[
"<",
"3.0.0"
],
[
">=",
"2.0.0"
]
]
},
{
"name": "pandas",
"specs": [
[
"<",
"3.0.0"
],
[
">=",
"2.0.0"
]
]
},
{
"name": "matplotlib",
"specs": [
[
"<",
"4.0.0"
],
[
">=",
"3.7.4"
]
]
},
{
"name": "dill",
"specs": [
[
"<",
"0.4.0"
],
[
">=",
"0.3.8"
]
]
},
{
"name": "tqdm",
"specs": [
[
">=",
"4.67.1"
],
[
"<",
"5.0.0"
]
]
},
{
"name": "scipy",
"specs": [
[
">=",
"1.10.1"
],
[
"<",
"1.13"
]
]
}
],
"tox": true,
"lcname": "cellmaps-coembedding"
}