# MIOFlow
<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->
## Setup
Create conda environment
``` bash
$ conda create -n mioflow python=3.10
$ conda activate mioflow
```
install pytorch according to instructions
https://pytorch.org/get-started/
we used
``` bash
$ conda install pytorch pytorch-cuda=11.6 -c pytorch -c nvidia
```
install requirements and MIOFlow
``` bash
$ pip install -e .
```
Remove unused packages and caches.
``` bash
$ conda clean --all
```
Install MIOFlow for developers and internal use:
``` bash
$ cd path/to/this/repository
$ pip install -e MIOFlow
```
### Data
Most datasets are available in the directory `data`. The file `eb_v4_df_pca200.npy` can be downloaded [here](https://drive.google.com/file/d/1HvEUDO1U73iHmt-vY4YbTvOUxr6IdpK_/view?usp=drive_link).
### Add kernel to Jupyter Notebook
#### automatic conda kernels
For greater detail see the official docs for
[`nb_conda_kernels`](https://github.com/Anaconda-Platform/nb_conda_kernels).
In short, install `nb_conda_kernels` in the environment from which you
launch JupyterLab / Jupyter Notebooks from (e.g. `base`) via:
``` bash
$ conda install -n <notebook_env> nb_conda_kernels
```
to add a new or exist conda environment to Jupyter simply install
`ipykernel` into that conda environment e.g.
``` bash
$ conda install -n <python_env> ipykernel
```
#### manual ipykernel
add to your Jupyter Notebook kernels via
``` bash
$ python -m ipykernel install --user --name sklab-mioflow
```
It can be removed via:
``` bash
$ jupyter kernelspec uninstall sklab-mioflow
```
#### list kernels found by Jupyter
kernels recognized by conda
``` bash
$ python -m nb_conda_kernels list
```
check which kernels are discovered by Jupyter:
``` bash
$ jupyter kernelspec list
```
## How to use
This repository consists of our python library `MIOFlow` as well as a
directory of scripts for running and using it.
### Scripts
To recreate our results with MMD loss and density regulariazation you
can run the following command:
``` bash
python scripts/run.py -d petals -c mmd -n petal-mmd
```
This will generate the directory `results/petals-mmd` and save
everything there.
For a full list of parameters try running:
``` bash
python scripts/run.py --help
```
### Python Package
One could simply import everything and use it piecemeal:
``` python
from MIOFlow.ode import *
from MIOFlow.losses import *
from MIOFlow.utils import *
from MIOFlow.models import *
from MIOFlow.plots import *
from MIOFlow.train import *
from MIOFlow.constants import *
from MIOFlow.datasets import *
from MIOFlow.exp import *
from MIOFlow.geo import *
from MIOFlow.eval import *
```
### Tutorials
One can also consult or modify the tutorial notebooks for their uses: -
[EB Bodies
tutorial](https://github.com/KrishnaswamyLab/MIOFlow/blob/main/notebooks/%5BTutorial%5D%20EB-Hold-out.ipynb) -
[Dyngen
tutorial](https://github.com/KrishnaswamyLab/MIOFlow/blob/main/notebooks/%5BTutorial%5D%20Dyngen.ipynb) -
[Petals
tutorial](https://github.com/KrishnaswamyLab/MIOFlow/blob/main/notebooks/%5BTutorial%5D%20Petal.ipynb)
Raw data
{
"_id": null,
"home_page": null,
"name": "mioflow",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": "neural ode, trajectory, emd, Optional Transport, single cell RNA, mioflow",
"author": null,
"author_email": "xingzhis <xingzhi.sun@yale.edu>, bjoaofelipe <joaofelipe.rocha@yale.edu>",
"download_url": "https://files.pythonhosted.org/packages/89/c6/5fb174febf34bbcdf8b51ead0f54ddbef57fac7e76defb1121906d0ffec7/mioflow-0.1.5.tar.gz",
"platform": null,
"description": "# MIOFlow\n\n<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->\n\n## Setup\n\nCreate conda environment\n\n``` bash\n$ conda create -n mioflow python=3.10\n$ conda activate mioflow\n```\n\ninstall pytorch according to instructions\nhttps://pytorch.org/get-started/\n\nwe used\n\n``` bash\n$ conda install pytorch pytorch-cuda=11.6 -c pytorch -c nvidia\n```\n\ninstall requirements and MIOFlow\n\n``` bash\n$ pip install -e .\n```\n\nRemove unused packages and caches.\n\n``` bash\n$ conda clean --all\n```\n\nInstall MIOFlow for developers and internal use:\n\n``` bash\n$ cd path/to/this/repository\n$ pip install -e MIOFlow\n```\n\n### Data\nMost datasets are available in the directory `data`. The file `eb_v4_df_pca200.npy` can be downloaded [here](https://drive.google.com/file/d/1HvEUDO1U73iHmt-vY4YbTvOUxr6IdpK_/view?usp=drive_link).\n\n### Add kernel to Jupyter Notebook\n\n#### automatic conda kernels\n\nFor greater detail see the official docs for\n[`nb_conda_kernels`](https://github.com/Anaconda-Platform/nb_conda_kernels).\nIn short, install `nb_conda_kernels` in the environment from which you\nlaunch JupyterLab / Jupyter Notebooks from (e.g.\u00a0`base`) via:\n\n``` bash\n$ conda install -n <notebook_env> nb_conda_kernels\n```\n\nto add a new or exist conda environment to Jupyter simply install\n`ipykernel` into that conda environment e.g.\n\n``` bash\n$ conda install -n <python_env> ipykernel\n```\n\n#### manual ipykernel\n\nadd to your Jupyter Notebook kernels via\n\n``` bash\n$ python -m ipykernel install --user --name sklab-mioflow\n```\n\nIt can be removed via:\n\n``` bash\n$ jupyter kernelspec uninstall sklab-mioflow\n```\n\n#### list kernels found by Jupyter\n\nkernels recognized by conda\n\n``` bash\n$ python -m nb_conda_kernels list\n```\n\ncheck which kernels are discovered by Jupyter:\n\n``` bash\n$ jupyter kernelspec list\n```\n\n## How to use\n\nThis repository consists of our python library `MIOFlow` as well as a\ndirectory of scripts for running and using it.\n\n### Scripts\n\nTo recreate our results with MMD loss and density regulariazation you\ncan run the following command:\n\n``` bash\npython scripts/run.py -d petals -c mmd -n petal-mmd\n```\n\nThis will generate the directory `results/petals-mmd` and save\neverything there.\n\nFor a full list of parameters try running:\n\n``` bash\npython scripts/run.py --help\n```\n\n### Python Package\n\nOne could simply import everything and use it piecemeal:\n\n``` python\nfrom MIOFlow.ode import *\nfrom MIOFlow.losses import *\nfrom MIOFlow.utils import *\nfrom MIOFlow.models import *\nfrom MIOFlow.plots import *\nfrom MIOFlow.train import *\nfrom MIOFlow.constants import *\nfrom MIOFlow.datasets import *\nfrom MIOFlow.exp import *\nfrom MIOFlow.geo import *\nfrom MIOFlow.eval import *\n```\n\n### Tutorials\n\nOne can also consult or modify the tutorial notebooks for their uses: -\n[EB Bodies\ntutorial](https://github.com/KrishnaswamyLab/MIOFlow/blob/main/notebooks/%5BTutorial%5D%20EB-Hold-out.ipynb) -\n[Dyngen\ntutorial](https://github.com/KrishnaswamyLab/MIOFlow/blob/main/notebooks/%5BTutorial%5D%20Dyngen.ipynb) -\n[Petals\ntutorial](https://github.com/KrishnaswamyLab/MIOFlow/blob/main/notebooks/%5BTutorial%5D%20Petal.ipynb)\n",
"bugtrack_url": null,
"license": null,
"summary": "MIOFlow is a Python package for modeling and analyzing single-cell RNA-seq data using optimal flows.",
"version": "0.1.5",
"project_urls": null,
"split_keywords": [
"neural ode",
" trajectory",
" emd",
" optional transport",
" single cell rna",
" mioflow"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "2abbeee5cf0c6e785ecb04da98a402f7006e38d8068ab0ea2b403a8be32142d7",
"md5": "3c52cf169ca6d60587c59a893b834580",
"sha256": "ac35a32098640a5e04665b24d280f409ee2c46910428dc80b2f9566a549ecd03"
},
"downloads": -1,
"filename": "mioflow-0.1.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "3c52cf169ca6d60587c59a893b834580",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 41347,
"upload_time": "2025-07-14T22:32:00",
"upload_time_iso_8601": "2025-07-14T22:32:00.561626Z",
"url": "https://files.pythonhosted.org/packages/2a/bb/eee5cf0c6e785ecb04da98a402f7006e38d8068ab0ea2b403a8be32142d7/mioflow-0.1.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "89c65fb174febf34bbcdf8b51ead0f54ddbef57fac7e76defb1121906d0ffec7",
"md5": "8a8b4c9001c6559a74e0fff9325bc577",
"sha256": "651cad8bcf0550920cd623eb74ac2a3282ed8669c4cb9fad2695db85e3403890"
},
"downloads": -1,
"filename": "mioflow-0.1.5.tar.gz",
"has_sig": false,
"md5_digest": "8a8b4c9001c6559a74e0fff9325bc577",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 37746,
"upload_time": "2025-07-14T22:32:01",
"upload_time_iso_8601": "2025-07-14T22:32:01.776379Z",
"url": "https://files.pythonhosted.org/packages/89/c6/5fb174febf34bbcdf8b51ead0f54ddbef57fac7e76defb1121906d0ffec7/mioflow-0.1.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-14 22:32:01",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "mioflow"
}