Skip to main content

MIOFlow is a Python package for modeling and analyzing single-cell RNA-seq data using optimal flows.

Project description

MIOFlow

Setup

Create conda environment

$ conda create -n mioflow python=3.10
$ conda activate mioflow

install pytorch according to instructions https://pytorch.org/get-started/

we used

$ conda install pytorch pytorch-cuda=11.6 -c pytorch -c nvidia

install requirements and MIOFlow

$ pip install -e .

Remove unused packages and caches.

$ conda clean --all

Install MIOFlow for developers and internal use:

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

Add kernel to Jupyter Notebook

automatic conda kernels

For greater detail see the official docs for nb_conda_kernels. In short, install nb_conda_kernels in the environment from which you launch JupyterLab / Jupyter Notebooks from (e.g. base) via:

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

$ conda install -n <python_env> ipykernel

manual ipykernel

add to your Jupyter Notebook kernels via

$ python -m ipykernel install --user --name sklab-mioflow

It can be removed via:

$ jupyter kernelspec uninstall sklab-mioflow

list kernels found by Jupyter

kernels recognized by conda

$ python -m nb_conda_kernels list

check which kernels are discovered by Jupyter:

$ 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:

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:

python scripts/run.py --help

Python Package

One could simply import everything and use it piecemeal:

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 - Dyngen tutorial - Petals tutorial

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mioflow-0.1.6.tar.gz (49.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mioflow-0.1.6-py3-none-any.whl (55.4 kB view details)

Uploaded Python 3

File details

Details for the file mioflow-0.1.6.tar.gz.

File metadata

  • Download URL: mioflow-0.1.6.tar.gz
  • Upload date:
  • Size: 49.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.17

File hashes

Hashes for mioflow-0.1.6.tar.gz
Algorithm Hash digest
SHA256 8c7c1e1d22d5912b49390ed44e49d7ab1c4b5fc7dc191feefed268aa7e83bcff
MD5 ad214c78dbddd31ef75260f673f6a131
BLAKE2b-256 b8e9ee07a01485ce381d503915a3724aae43020816a525dae9dcacaf0afa26f5

See more details on using hashes here.

File details

Details for the file mioflow-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: mioflow-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 55.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.17

File hashes

Hashes for mioflow-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 c4f0c0af8a36b5033b6af2c8a569f8b33eb9324223ded9c3a16220bedb9cfe7c
MD5 71d01e1a511f3c9e9a2b2ae762b2e69a
BLAKE2b-256 5ef601e311b0f9896c532386fb7b83b5ddafe96b96e715eab312ca0c81d6f8ec

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page