Metadata-Version: 2.1
Name: cellmaps_image_embedding
Version: 0.3.3
Summary: A tool to generate embeddings from HPA IF images
Home-page: https://github.com/idekerlab/cellmaps_image_embedding
Author: Cell Maps team
Author-email: tools@cm4ai.org
License: MIT license
Keywords: cellmaps_image_embedding
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Description-Content-Type: text/x-rst
License-File: LICENSE
License-File: AUTHORS.rst
Requires-Dist: cellmaps_utils<1.0.0,>=0.4.0
Requires-Dist: requests<3.0.0,>=2.31.0
Requires-Dist: tqdm<5.0.0,>=4.66.6
Requires-Dist: numpy<2.0.0,>=1.24.4
Requires-Dist: pandas<3.0.0,>=2.0.0
Requires-Dist: torch<3.0.0,>=2.0.0
Requires-Dist: torchvision<1.0.0,>=0.15.0
Requires-Dist: opencv-python<4.10,>=4.9.0.80
Requires-Dist: mlcrate==0.2.0
Requires-Dist: scikit-image<1.0.0,>=0.21.0
Requires-Dist: scikit-learn<1.4.0,>=0.19.0
Requires-Dist: pillow<11.0.0,>=10.2.0

=============================================
Cell Maps ImmunoFluorescent Image Embedder
=============================================
The Cell Maps Image Embedder is part of the Cell Mapping Toolkit

|a| |b| |c| |d|

.. |a| image:: https://img.shields.io/pypi/v/cellmaps_image_embedding.svg
        :target: https://pypi.python.org/pypi/cellmaps_image_embedding


.. |b| image:: https://app.travis-ci.com/idekerlab/cellmaps_image_embedding.svg?branch=main
        :target: https://app.travis-ci.com/idekerlab/cellmaps_image_embedding


.. |c| image:: https://readthedocs.org/projects/cellmaps-image-embedding/badge/?version=latest
        :target: https://cellmaps-image-embedding.readthedocs.io/en/latest/?badge=latest
        :alt: Documentation Status


.. |d| image:: https://zenodo.org/badge/618547854.svg
        :target: https://zenodo.org/doi/10.5281/zenodo.10607452
        :alt: Zenodo DOI badge


Generate embeddings from ImmunoFluorescent image data from `Human Protein Atlas <https://www.proteinatlas.org/>`__

* Free software: MIT license
* Documentation: https://cellmaps-image-embedding.readthedocs.io.

Dependencies
------------

* `cellmaps_utils <https://pypi.org/project/cellmaps-utils>`__
* `tqdm <https://pypi.org/project/tqdm>`__
* `numpy <https://pypi.org/project/numpy>`__
* `pandas>=0.23.1 <https://pypi.org/project/pandas>`__
* `torch <https://pypi.org/project/torch>`__
* `torchvision <https://pypi.org/project/torchvision>`__
* `opencv-python <https://pypi.org/project/opencv-python>`__
* `mlcrate <https://pypi.org/project/mlcrate>`__
* `scikit-image <https://pypi.org/project/scikit-image>`__
* `scikit-learn>=0.19.0 <https://pypi.org/project/scikit-learn>`__
* `Pillow <https://pypi.org/project/Pillow>`__

Compatibility
-------------

* Python 3.8 - 3.11

Installation
------------

.. code-block::

   git clone https://github.com/idekerlab/cellmaps_image_embedding
   cd cellmaps_image_embedding
   pip install -r requirements_dev.txt
   make dist
   pip install dist/cellmaps_image_embedding*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_image_embedding
    pip uninstall cellmaps_image_embedding -y ; make clean dist; pip install dist/cellmaps_image_embedding*whl



Needed files
------------

The output directory for the image downloads is required (see `Cell Maps Image Downloader <https://github.com/idekerlab/cellmaps_imagedownloader/>`__). Optionally, a path to the image embedding model can be provided.

Usage
-----

For information invoke :code:`cellmaps_image_embeddingcmd.py -h`


**Example usage**

.. code-block::

   cellmaps_image_embeddingcmd.py ./cellmaps_image_embedding_outdir --inputdir ./cellmaps_imagedownloader_outdir


Via Docker
~~~~~~~~~~~~~~~~~~~~~~

**Example usage**


.. code-block::

   Coming soon...

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
=======

0.3.3 (2025-07-03)
--------------------

* Fix for UD-3116, missing header 0 row

0.3.2 (2025-05-13)
--------------------

* Updated to PEP 517 compliant build system

0.3.1 (2025-03-18)
-------------------

* Add version bounds for required packages.

* Bug fix for change in pytorch 2.6.

0.3.0 (2024-12-02)
-------------------

* Added README generation.

* Refactor code.

0.2.1 (2024-09-06)
-------------------

* Bug fix in ``--inputdir`` argument.

0.2.0 (2024-08-29)
-------------------

* 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.

* Bug fixes
    * Resolved an issue in embedding generation process where images associated with multiple genes were not correctly
      handled (ambiguous antibodies).

0.1.0 (2024-02-01)
------------------

* First release on PyPI.
