Metadata-Version: 2.1
Name: miaaim-python
Version: 0.0.1
Summary: Multi-omics Image Alignment and Analysis by Information Manifolds
Home-page: https://github.com/JoshuaHess12/miaaim-python
Maintainer: Joshua Hess
Maintainer-email: joshmhess12@gmail.com
License: MIT
Keywords: high-dimensional image imaging mulitplex manifold-learning
Platform: UNKNOWN
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved
Classifier: Programming Language :: Python
Classifier: Topic :: Software Development
Classifier: Topic :: Scientific/Engineering
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX
Classifier: Operating System :: Unix
Classifier: Operating System :: MacOS
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Description-Content-Type: text/markdown
Requires-Dist: scikit-image (>=0.17.2)
Requires-Dist: numpy (>=1.19.5)
Requires-Dist: pandas (>=1.1.5)
Requires-Dist: pyimzML (>=1.4.1)
Requires-Dist: nibabel (>=3.2.1)
Requires-Dist: scipy (>=1.5.4)
Requires-Dist: h5py (>=3.1.0)
Requires-Dist: pathlib
Requires-Dist: umap-learn (>=0.5.1)
Requires-Dist: uncertainties
Requires-Dist: seaborn
Requires-Dist: matplotlib
Requires-Dist: scikit-learn
Requires-Dist: PyYAML
Requires-Dist: hdi-utils (==0.0.3.1)

# MIAAIM: multi-omics image alignment and analysis by information manifolds
MIAAIM is a software to align multiple-omics tissue imaging data. The worflow includes high-dimensional image compression, registration, and transforming images to align in the same spatial domain. MIAAIM was developed at the [Vaccine and Immunotherapy Center at MGH](http://advancingcures.org) in the labs of [Dr. Patrick Reeves](http://advancingcures.org/reeves-lab/) and [Dr. Ruxandra Sîrbulescu](http://advancingcures.org/sirbulescu-lab/).

For further documentation on the MIAAIM Python impementation, please visit [joshuahess12.github.io/miaaim-python](https://joshuahess12.github.io/miaaim-python/).

## Installation
You can install MIAAIM in Python using either the MIAAIM-Python Docker container, which would allow for complete workflow
reproducibility, or you can install the package into your environment with pip.

### Dependencies
MIAAIM utilizes the [Elastix](https://elastix.lumc.nl) library for image registration computations, which is written in the C++ language. For this reason, we recommend running your workflows with the MIAAIM Python package inside of a Docker container, which we have created to automatically include Elastix. You can still run MIAAIM, however, if you would rather stick with installing packages via pip, you will just need to install Elastix separately. These two options for installing MIAAIM are outlined below:

### Cloning the repository:
To clone the repository directly, use the following command to ensure that all submodules are included:
```bash
git clone https://github.com/JoshuaHess12/miaaim-python.git --recurse-submodules
 ```

### Usage without Docker / Install with Pip:
If you are unable to use Docker on your machine, then you can still use MIAAIM:
1. [download](https://github.com/SuperElastix/elastix/releases/tag/5.0.1) the latest version of Elastix.
2. Make Elastix accessible to your `$PATH` environment (Ex. on a Mac, access your `.bash_profile` and add `export PATH=~/elastix-latest/bin:$PATH` and `export DYLD_LIBRARY_PATH=~/elastix-latest/lib:$DYLD_LIBRARY_PATH`)
3. Run the following command to install MIAAIM on your machine:
```bash
 pip install miaaim-python  # install miaaim
 ```

#### Reproducibility with Pip
If you are using pip to install MIAAIM, you can reconstruct your working environment easily with the commands:
1.
```bash
 pip freeze > requirements.txt  # create documentation of installed packages
 ```
This will create a text file that indicates the specific packages that you are using. You can then
install the specific packages that were exported into another environment with :
2.
```bash
pip install -r requirements.txt
```
We have included a `requirements.txt` file in this repository to use for our convenience.

### Docker
MIAAIM's Python implementation is containerized using Docker to enable a reproducible environment. Inside of this container,
the Python distribution of MIAAIM is already installed. It is therefore set up so that users can copy scripts and data into it in order to run analyses that they need.

To get started with MIAAIM using Docker:
1. [Install Docker](https://docs.docker.com/get-docker/).
2. Ensure that Docker is available to your system using the command `docker images`
3. Pull the miaaim-python docker container `docker pull joshuahess/miaaim-python:latest` where `latest` is the version number.

#### Using MIAAIM inside of Docker
If you are using MIAAIM with Docker, we recommend having a concrete file structure for data and code with relative paths so that your script doesn't rely on absolute file paths outside of the Docker container.

You can mount your custom scripts and data into the virtual environment as follows:
4. Mount your data and scripts into Docker from your local path (`src-path`)
```bash
docker run -it -v /path/to/data:/data joshuahess/miaaim-python:latest bash    # mount data in the "dest-path" folder
```
Here, we assumed that the folder `data` contains your new script and your input data that goes with it.
5. Run your script (named here `script.py`) from the data folder:
```bash
python ./data/scipt.py
```
Note here that any additional packages that you use to process your data that are not included in the docker image will not be found!


