alevax / pyviper

Porting of Protein Activity and Pathway Inference to single cell and Python.
MIT License
10 stars 0 forks source link

image pyVIPER (VIPER Analysis in Python for single-cell RNASeq)

PyPI License: MIT Downloads

This package enables network-based protein activity estimation on Python. It provides also interfaces for scanpy (single-cell RNASeq analysis in Python). Functions are partly transplanted from R package viper and the R package NaRnEA.

The user-friendly documentation is available at: https://alevax.github.io/pyviper/index.html.

viper_visualized

Dependencies

If you are using a version of scanpy <1.9.3, it is also advisable to downgrade pandas to (>=1.3.0 & <2.0), due to scanpy incompatibility (issue)

Installation

pypi

pip install viper-in-python

local

git clone https://github.com/alevax/pyviper/
cd pyviper
pip install -e .

Usage

import pandas as pd
import anndata
import pyviper

# Load sample data
ges = anndata.read_text("test/unit_tests/test_1/test_1_inputs/LNCaPWT_gExpr_GES.tsv").T

# Load network
network = pyviper.load.msigdb_regulon("h")

# Translate sample data from ensembl to gene names
pyviper.pp.translate(ges, desired_format = "human_symbol")

## Filter targets in the interactome
network.filter_targets(ges.var_names)

# Compute regulon activities
## area
activity = pyviper.viper(gex_data=ges, interactome=network, enrichment="area")
print(activity.to_df())

## narnea
activity = pyviper.viper(gex_data=ges, interactome=network, enrichment="narnea", eset_filter=False)
print(activity.to_df())

Tutorials

  1. Analyzing scRNA-seq data at the Protein Activity Level
  2. Inferring Protein Activity from scRNA-seq data from multiple cell populations with the meta-VIPER approach
  3. Generating Metacells for ARACNe3 network generation and VIPER protein activity analysis

Structure and rationale

The main functions available from pyviper are:

Other notable functions include:

Additionally, the following submodules are available:

Last, a new Interactome class allows users to load and interrogate ARACNe- and SCENIC-inferred gene regulatory networks.

Contact

Please, report any issues that you experience through this repository "Issues".

For any other info or queries please write to Alessandro Vasciaveo (av2729@cumc.columbia.edu)

License

pyviper is distributed under a MIT License (see LICENSE).

Citation

If you used pyVIPER in your publication, please cite our work here:

Wang, A.L.E., Lin, Z., Zanella, L., Vlahos, L., Girotto, M.A., Zafar, A., ... & Vasciaveo, A. (2024). pyVIPER: A fast and scalable Python package for rank-based enrichment analysis of single-cell RNASeq data. bioRxiv, 2024-08. doi: https://doi.org/10.1101/2024.08.25.609585.

Manuscript in review