Metadata-Version: 2.4
Name: perturbvi
Version: 0.1.6
Summary: Infer regulatory modules through informative latent component model in the single-cell Perturb-seq data
Project-URL: Documentation, https://mancusolab.github.io/perturbvi
Project-URL: Issues, https://github.com/mancusolab/perturbvi/issues
Project-URL: Source, https://github.com/mancusolab/perturbvi
Author-email: Dong Yuan <dongyuan@usc.edu>, Abdullah Al-Nahid <alnahid@usc.edu>, Nicholas Mancuso <nmancuso@usc.edu>
License-Expression: MIT
License-File: LICENSE.txt
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Requires-Python: >=3.9
Requires-Dist: adjusttext
Requires-Dist: equinox
Requires-Dist: importlib-metadata; python_version < '3.8'
Requires-Dist: jax
Requires-Dist: jaxlib
Requires-Dist: jaxtyping
Requires-Dist: lineax
Requires-Dist: matplotlib
Requires-Dist: numpy
Requires-Dist: optax
Requires-Dist: optimistix
Requires-Dist: pandas
Requires-Dist: plum-dispatch
Requires-Dist: scanpy
Requires-Dist: seaborn
Description-Content-Type: text/markdown

[![Documentation-webpage](https://img.shields.io/badge/Docs-Available-brightgreen)](https://mancusolab.github.io/perturbvi/)
[![PyPI-Server](https://img.shields.io/pypi/v/perturbvi.svg)](https://pypi.org/project/perturbvi/)
[![Github](https://img.shields.io/github/stars/mancusolab/perturbvi?style=social)](https://github.com/mancusolab/perturbvi)
[![License](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Project generated with Hatch](https://img.shields.io/badge/%F0%9F%A5%9A-Hatch-4051b5.svg)](https://github.com/pypa/hatch)

# perturbVI
`perturbvi` is a scalable approach to infer regulatory modules through informative latent component model in the single-cell Perturb-seq data.

  [**Installation**](#installation)
  | [**Example**](#get-started-with-example)
  | [**Notes**](#notes)
  | [**Version**](#version-history)
  | [**Support**](#support)
  | [**Other Software**](#other-software)

------------------

## Installation

``` bash
# install susiepca dependency
uv pip install susiepca@git+https://github.com/mancusolab/susiepca.git@main

# install perturbvi
uv pip install perturbvi

# help
perturbvi --help
```

## Get Started with `perturbvi`

Perform inference using SuSiE PCA to find the regulatory modules from CRISPR perturbation data
``` bash
perturbvi <matrix> <guide> <z_dim> <l_dim> <tau> -o=<out_dir> --verbose
```

#### Arguments
- `matrix`: Path to the experiment CSV file.
- `guide`: Path to the guide CSV file.
- `z_dim`: Number of latent factors, Z dim (12).
- `l_dim`: Number of single effects, L dim (400).
- `tau`: Residual precision, Tau (800).
- `out_dir`: Specifies the output directory path.
- `--verbose`: For logging (Optional).

#### Example Usage
```bash
perturbvi luhmes_exp.csv luhmes_G.csv 12 400 800 -o=results --verbose
```

This will save the all the output files (including the parameter file `params.pkl`) into the `results` folder, which can be used for the downstream tasks.

## Notes

-   `perturbvi` uses [JAX](https://github.com/google/jax) with [Just In
    Time](https://jax.readthedocs.io/en/latest/jax-101/02-jitting.html)
    compilation to achieve high-speed computation. However, there are
    some [issues](https://github.com/google/jax/issues/5501) for JAX
    with Mac M1 chip. To solve this, users need to initiate conda using
    [miniforge](https://github.com/conda-forge/miniforge), and then
    install `perturbvi` using `pip` in the desired environment.

## Version History

TBD

## Support

Please report any bugs or feature requests in the [Issue
Tracker](https://github.com/mancusolab/perturbvi/issues). If users have
any questions or comments, please contact Dong Yuan (<dongyuan@usc.edu>)
and Nicholas Mancuso (<nmancuso@usc.edu>).

## Other Software

Feel free to use other software developed by [Mancuso
Lab](https://www.mancusolab.com/):

-   [SuShiE](https://github.com/mancusolab/sushie): a Bayesian
    fine-mapping framework for molecular QTL data across multiple
    ancestries.
-   [MA-FOCUS](https://github.com/mancusolab/ma-focus): a Bayesian
    fine-mapping framework using
    [TWAS](https://www.nature.com/articles/ng.3506) statistics across
    multiple ancestries to identify the causal genes for complex traits.
-   [SuSiE-PCA](https://github.com/mancusolab/susiepca): a scalable
    Bayesian variable selection technique for sparse principal component
    analysis
-   [twas_sim](https://github.com/mancusolab/twas_sim): a Python
    software to simulate [TWAS](https://www.nature.com/articles/ng.3506)
    statistics.
-   [FactorGo](https://github.com/mancusolab/factorgo): a scalable
    variational factor analysis model that learns pleiotropic factors
    from GWAS summary statistics.
-   [HAMSTA](https://github.com/tszfungc/hamsta): a Python software to
    estimate heritability explained by local ancestry data from
    admixture mapping summary statistics.

------------------------------------------------------------------------

`perturbvi` is distributed under the terms of the
[MIT](https://spdx.org/licenses/MIT.html) license.


------------------------------------------------------------------------

This project has been set up using Hatch. For details and usage
information on Hatch see <https://github.com/pypa/hatch>.
