Git Product home page Git Product logo

drivaer's Introduction

DrivAER for manifold interpretation in scRNA-seq data

DrivAER is a method for identification of Driving transcriptional programs based on AutoEncoder derived Relevance scores. DrivAER infers relevance scores for transcriptional programs with respect to specified outcomes of interest in single-cell RNA sequencing data, such as psuedotemporal ordering or disease status.

See our preprint for more details.

Workflow (a) DrivAER iteratively subjects annotated gene sets to unsupervised dimension reduction via DCA. (b) For each gene set the generated two-dimensional data manifold coordinates are used as (c) input features in a random forest model to predict the outcome of interest (i.e. pseudotemporal ordering). (d) The random forest prediction accuracy represents the relevance score.

Check out our live, interactive tutorial!

The following Google colab notebooks allow you to interactively explore DrivAER and can be run within your browser. We have prepared two analysis examples:

  1. Blood development
  2. Interferon stimulation

Installation

via pip

pip install git+https://github.com/lkmklsmn/DrivAER.git

via git

git clone https://github.com/lkmklsmn/DrivAER
cd DrivAER
python setup.py install

Input

  1. Raw count expression matrix
  2. Outcome of interest (pseudotemporal ordering/cell grouping etc)
  3. Gene set annotation

Output

  1. Relevance scores for each annotated transcriptional program
  2. Data manifolds derived from each transcriptional program
  3. Various visualizations (heatmap, DCA embedding, barplots)

Usage

Step 1: Get Gene Set Annotations

DrivAER supports annotations in gmt and csv format, as well as user-defined annotation file.

1.1 From gmt format

The gmt format files for Broad's MSigDB can be downloaded from the Broad Website.

Gene set Source Gene1 Gene2 Gene3
set1 source gene1 gene2 gene3
set2 source gene1 gene2 gene3
set3 source gene1 gene2 gene3
import DrivAER as dv
C3_mouse = dv.get_anno(filename = "C3.gmt", filetype = "gmt", conv_mouse = True)

1.2 From tsv format

The tsv format files can be downloaded from Trandcription Factor sites, such as TRRUST. DrivAER provides built-in annotations from TRRUST.

Transcription factor Target Type Source
set1 gene1 XX XX
set1 gene2 XX XX
set1 gene3 XX XX
set2 gene1 XX XX
trrust_human = dv.get_anno(filename = "trrust_human.tsv", filetype = "tsv", conv_mouse = False)

1.3 From user-defined gene set annotations

Users can create your own gene set annotations. The format is a pandas series. Index are trandcription factor names or gene set names. Each row contains a list of corresponding genes.

Step 2: Calculate relevance scores

res = dv.calc_relevance(count = your_count, pheno = your_pt, tf_targets = C3_mouse, min_targets=5,
               ae_type="nb-conddisp", epochs=100, early_stop=3, hidden_size=(8, 2, 8), verbose=False)

Step 3: Generate visualizations

dv.rank_plot(result, save, path)
dv.embedding_plot(result, tf_name, pheno, datatype, save, path)
dv.gene_plot(result, count, tf_name, gene, save, path)

drivaer's People

Contributors

fangfang0906 avatar lkmklsmn avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.