alevax / pyviper

Porting of Protein Activity and Pathway Inference to single cell and Python.
MIT License
4 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.


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 (note: to be updated soon)

Structure and rationale

The main functions available from pyviper are:

Other notable functions include:

Additionally, the following submodules are available:

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

Manuscript in review