Skip to content

Commit 0c5f134

Browse files
committed
migrate setup from old repo
1 parent aa71a3f commit 0c5f134

45 files changed

Lines changed: 2151 additions & 2 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
2+
.idea/
3+
.DS_Store
4+
.Rhistory
5+
*.tiff
6+
7+
18
# Byte-compiled / optimized / DLL files
29
__pycache__/
310
*.py[cod]

Dockerfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM superelastix/elastix:5.0.1 AS elastix
2+
3+
COPY . /app/
4+
5+
RUN apt update && apt -y upgrade
6+
RUN apt install python3.8 -y
7+
RUN apt-get update && apt-get install -y python3-pip
8+
RUN apt-get -y install git
9+
RUN ln -sf /usr/bin/pip3 /usr/bin/pip
10+
RUN ln -sf /usr/bin/python3.8 /usr/bin/python
11+
12+
RUN pip3 install install scikit-image numpy pandas pyimzml nibabel scipy h5py pathlib umap-learn uncertainties seaborn matplotlib scikit-learn PyYAML
13+
14+
RUN pip3 install "dask[complete]"
15+
16+
RUN pip3 install -e git+https://github.com/JoshuaHess12/hdi-utils.git@main#egg=hdi-utils
17+
RUN pip3 install miaaim-python

MANIFEST.in

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
include Dockerfile
2+
include LICENSE
3+
recursive-include miaaim *.dockerignore
4+
recursive-include miaaim *.jpeg
5+
recursive-include miaaim *.md
6+
recursive-include miaaim *.py
7+
recursive-include miaaim *.yml

README.md

Lines changed: 58 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,58 @@
1-
# miaaim-python
2-
MIAAIM: Multi-omics Image Alignment and Analysis by Information Manifolds
1+
# MIAAIM: multi-modal image alignment and analysis by information manifolds
2+
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/).
3+
4+
For further documentation on the MIAAIM Python impementation, please visit [miaaim.org](http://miaaim.org).
5+
6+
## Installation
7+
You can install MIAAIM in Python using either the MIAAIM-Python Docker container, which would allow for complete workflow
8+
reproducibility, or you can install the package into your environment with pip.
9+
10+
### Dependencies
11+
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:
12+
13+
### Usage without Docker / Install with Pip:
14+
If you are unable to use Docker on your machine, then you can still use MIAAIM:
15+
1. [download](https://github.com/SuperElastix/elastix/releases/tag/5.0.1) the latest version of Elastix.
16+
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`)
17+
3. Run the following command to install MIAAIM on your machine:
18+
```bash
19+
pip install miaaim-python # install miaaim
20+
```
21+
22+
#### Reproducibility with Pip
23+
If you are using pip to install MIAAIM, you can reconstruct your working environment easily with the commands:
24+
1.
25+
```bash
26+
pip freeze > requirements.txt # create documentation of installed packages
27+
```
28+
This will create a text file that indicates the specific packages that you are using. You can then
29+
install the specific packages that were exported into another environment with :
30+
2.
31+
```bash
32+
pip install -r requirements.txt
33+
```
34+
We have included a `requirements.txt` file in this repository to use for our convenience.
35+
36+
### Docker
37+
MIAAIM's Python implementation is containerized using Docker to enable a reproducible environment. Inside of this container,
38+
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.
39+
40+
To get started with MIAAIM using Docker:
41+
1. [Install Docker](https://docs.docker.com/get-docker/).
42+
2. Ensure that Docker is available to your system using the command `docker images`
43+
3. Pull the miaaim-python docker container `docker pull joshuahess/miaaim-python:latest` where `latest` is the version number.
44+
45+
#### Using MIAAIM inside of Docker
46+
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.
47+
48+
You can mount your custom scripts and data into the virtual environment as follows:
49+
4. Mount your data and scripts into Docker from your local path (`src-path`)
50+
```bash
51+
docker run -it -v /path/to/data:/data joshuahess/miaaim-python:latest bash # mount data in the "dest-path" folder
52+
```
53+
Here, we assumed that the folder `data` contains your new script and your input data that goes with it.
54+
5. Run your script (named here `script.py`) from the data folder:
55+
```bash
56+
python ./data/scipt.py
57+
```
58+
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!

docs/CNAME

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
miaaim.org

docs/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= python -msphinx
8+
SOURCEDIR = source
9+
BUILDDIR = build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/_static/.gitkeep

Whitespace-only changes.

docs/make.bat

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
@ECHO OFF
2+
3+
pushd %~dp0
4+
5+
REM Command file for Sphinx documentation
6+
7+
if "%SPHINXBUILD%" == "" (
8+
set SPHINXBUILD=sphinx-build
9+
)
10+
set SOURCEDIR=source
11+
set BUILDDIR=build
12+
13+
if "%1" == "" goto help
14+
15+
%SPHINXBUILD% >NUL 2>NUL
16+
if errorlevel 9009 (
17+
echo.
18+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
19+
echo.installed, then set the SPHINXBUILD environment variable to point
20+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
21+
echo.may add the Sphinx directory to PATH.
22+
echo.
23+
echo.If you don't have Sphinx installed, grab it from
24+
echo.http://sphinx-doc.org/
25+
exit /b 1
26+
)
27+
28+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
29+
goto end
30+
31+
:help
32+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
33+
34+
:end
35+
popd

docs/source/_static/custom.css

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
div.leftside {
2+
width: 414px;
3+
padding: 0px 3px 0px 0px;
4+
float: left;
5+
}
6+
7+
div.rightside {
8+
margin-left: 425;
9+
}
10+
11+

docs/source/acknowledgements.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Acknowledgements
2+
================
3+
4+
The development of this software using the Nextflow language was
5+
influenced by the `MCMICRO <https://github.com/labsyspharm/mcmicro>`_ software
6+
developed by `Denis Schapiro <https://github.com/DenisSch>`_ and
7+
`Artem Sokolov <https://github.com/ArtemSokolov>`_ at the `Laboratory of Systems
8+
Pharmacology at HMS <https://hits.harvard.edu/the-program/laboratory-of-systems-pharmacology/about/>`_.

0 commit comments

Comments
 (0)