Skip to main content

Infer regulatory modules through informative latent component model in the single-cell Perturb-seq data

Project description

Documentation-webpage PyPI-Server Github License Project generated with Hatch

perturbVI

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

Installation | Example | Notes | Version | Support | Other Software


Installation

# 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

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

perturbvi luhmes_exp.csv luhmes_G.csv 12 400 800 -o=results --verbose

This will save all the files (including params.pkl) in results folder.

We can analyze results:

import perturbvi

guide_path="luhmes_G.csv"
gene_symbol_path = "luhmes_gene_symbol.csv"

OUTPUT_DIR = "results"

G = pd.read_csv(guide_path, index_col=0)
G_reduce = G.drop(columns=["Nontargeting"])
# 14 genes perturbed
perturbed = G_reduce.columns.to_list()
# 6000 gene symbols (background genes)
genes = pd.read_csv(gene_path, header=None)[0].to_list()

results = perturbvi.utils.analyze_output(
  OUTPUT_DIR, 
  perturb_genes=perturbed, 
  background_genes=genes
)

# number of degs per w from PIP
print(results["num_deg_per_w"])

# number of degs per perturbed gene from LFSR
print(results["num_deg_per_perturbed_gene"])

Notes

  • perturbvi uses JAX with Just In Time compilation to achieve high-speed computation. However, there are some issues for JAX with Mac M1 chip. To solve this, users need to initiate conda using 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. 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:

  • SuShiE: a Bayesian fine-mapping framework for molecular QTL data across multiple ancestries.
  • MA-FOCUS: a Bayesian fine-mapping framework using TWAS statistics across multiple ancestries to identify the causal genes for complex traits.
  • SuSiE-PCA: a scalable Bayesian variable selection technique for sparse principal component analysis
  • twas_sim: a Python software to simulate TWAS statistics.
  • FactorGo: a scalable variational factor analysis model that learns pleiotropic factors from GWAS summary statistics.
  • 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 license.


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

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

perturbvi-0.2.2.tar.gz (26.0 kB view details)

Uploaded Source

Built Distribution

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

perturbvi-0.2.2-py3-none-any.whl (30.0 kB view details)

Uploaded Python 3

File details

Details for the file perturbvi-0.2.2.tar.gz.

File metadata

  • Download URL: perturbvi-0.2.2.tar.gz
  • Upload date:
  • Size: 26.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.4.17

File hashes

Hashes for perturbvi-0.2.2.tar.gz
Algorithm Hash digest
SHA256 dd3b650233576c99c603cc8e211293b71bebaafc506a42e55cc1e0757405b3ee
MD5 891000d206d421a97d3afaffc1721382
BLAKE2b-256 9f6722342b0be570e691465fe676167e07d84e17002b649100f645f2ab79279d

See more details on using hashes here.

File details

Details for the file perturbvi-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: perturbvi-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 30.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.4.17

File hashes

Hashes for perturbvi-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 fa899dfcb0e7ce46e638d642af1aa30082dc289cac261f196e1f50a7f0814a22
MD5 e8af6f928805aad9b35e18d8d872f01a
BLAKE2b-256 516f2ea947efd49c25f9747b5503a59329ec336308584d7c0c82ab54f7e2b964

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