Giter VIP home page Giter VIP logo

scribe-py's Introduction

Scribe: Towards inferring causal gene regulatory networks from single cell expression Measurements

Scribe

Single-cell transcriptome sequencing now routinely samples thousands of cells, potentially providing enough data to reconstruct causal gene regulatory networks from observational data. Here, we developed Scribe, a toolkit for detecting and visualizing causal regulations, and explore the potential for single-cell experiments to power network reconstruction. Scribe employs Restricted Directed Information to determine causality by estimating the strength of information transferred from a potential regulator to its downstream target by taking advantage of time-delays. We apply Scribe and other leading approaches for network reconstruction to several types of single-cell measurements and show that there is a dramatic drop in performance for "pseudotime” ordered single-cell data compared to live imaging data. We demonstrate that performing causal inference requires temporal coupling between measurements. We show that methods such as “RNA velocity” restore some degree of coupling through an analysis of chromaffin cell fate commitment. These analyses therefore highlight an important shortcoming in experimental and computational methods for analyzing gene regulation at single-cell resolution and point the way towards overcoming it.

Alert

This was a serious bug in causal_net_dynamics_coupling function which leads to incorrect calculation of causality score, if you used it previously please update your analysis wit the fix (May 13, 2020).

Installation

Note that this is our first alpha version of Scribe (as of Aug. 11th, 2019) python package. Scribe is still under active development. Stable version of Scribe will be released when it is ready. Until then, please use Scribe with caution. We welcome any bugs reports (via GitHub issue reporter) and especially code contribution (via GitHub pull requests) of Scribe from users to make it an accessible, useful and extendable tool. For discussion about different usage cases, comments or suggestions related to our manuscript and questions regarding the underlying mathematical formulation of Scribe, we provided a google group goolge group. Scribe developers can be reached by [email protected]. To install the newest version of Scribe, you can git clone our repo and then use::

pip install directory_to_Scribe_py_repo/

Alternatively, You can install Scribe from source, using the following script:

pip install git+https://github.com:aristoteleo/Scribe-py

Citation

Xiaojie Qiu, Arman Rahimzamani, Li Wang, Qi Mao, Timothy Durham, Jose L McFaline-Figueroa, Lauren Saunders, Cole Trapnell, Sreeram Kannan (2018): Towards inferring causal gene regulatory networks from single cell expression measurements. BioRxiv

Cell Systems link: https://www.sciencedirect.com/science/article/abs/pii/S2405471220300363 (downloadable from here: http://cole-trapnell-lab.github.io/papers/qiu-scribe/)

biorxiv link: https://www.biorxiv.org/content/early/2018/09/25/426981

twitter link: https://twitter.com/coletrapnell/status/1044986820520435712

R version

A R version of this package is available at: https://github.com/cole-trapnell-lab/Scribe. Note that I have graduated Cole's lab and won't maintain this package anymore. If anyone wants to maintain it and keep it updated. Please let me know (email: [email protected]).

Integration with Scribe and Dynamo

I am recently working on developing a new framework that tries to go beyond RNA velocity to map the full vector field of single cells. You may find this project interesting (https://github.com/aristoteleo/dynamo-release). In a month or two, Scribe will be fully integrated with Dynamo, so stayed tuned.

Contribution

If you want to contribute to the development of Scribe, please check out CONTRIBUTION instruction: Contribution

Documentation

The documentation of Scribe package is available at readthedocs

scribe-py's People

Contributors

xiaojieqiu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

scribe-py's Issues

Install error

Hi, when I try to install I get an error. The error below is from a Mac, but on linux I get the same thing (with some different line numbers)

I did a pip install (I fixed a typo and changed a : to a /). So I entered

pip install git+https://github.com/aristoteleo/Scribe-py

and got the output below. Thanks for taking a look!

Collecting git+https://github.com/aristoteleo/Scribe-py
Cloning https://github.com/aristoteleo/Scribe-py to /private/var/folders/yd/lvv_242j0_j38xt5p54y2q8w0000gn/T/pip-req-build-zoh5p0rp
Running command git clone -q https://github.com/aristoteleo/Scribe-py /private/var/folders/yd/lvv_242j0_j38xt5p54y2q8w0000gn/T/pip-req-build-zoh5p0rp
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing wheel metadata ... error
ERROR: Command errored out with exit status 1:
command: /opt/anaconda3/bin/python /opt/anaconda3/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /var/folders/yd/lvv_242j0_j38xt5p54y2q8w0000gn/T/tmpc8h1o041
cwd: /private/var/folders/yd/lvv_242j0_j38xt5p54y2q8w0000gn/T/pip-req-build-zoh5p0rp
Complete output (28 lines):
Traceback (most recent call last):
File "/opt/anaconda3/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 257, in
main()
File "/opt/anaconda3/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 240, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/opt/anaconda3/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 110, in prepare_metadata_for_build_wheel
return hook(metadata_directory, config_settings)
File "/private/var/folders/yd/lvv_242j0_j38xt5p54y2q8w0000gn/T/pip-build-env-ys8mlda8/overlay/lib/python3.7/site-packages/flit_core/buildapi.py", line 46, in prepare_metadata_for_build_wheel
metadata = make_metadata(module, ini_info)
File "/private/var/folders/yd/lvv_242j0_j38xt5p54y2q8w0000gn/T/pip-build-env-ys8mlda8/overlay/lib/python3.7/site-packages/flit_core/common.py", line 392, in make_metadata
md_dict.update(get_info_from_module(module, ini_info.dynamic_metadata))
File "/private/var/folders/yd/lvv_242j0_j38xt5p54y2q8w0000gn/T/pip-build-env-ys8mlda8/overlay/lib/python3.7/site-packages/flit_core/common.py", line 189, in get_info_from_module
docstring, version = get_docstring_and_version_via_import(target)
File "/private/var/folders/yd/lvv_242j0_j38xt5p54y2q8w0000gn/T/pip-build-env-ys8mlda8/overlay/lib/python3.7/site-packages/flit_core/common.py", line 165, in get_docstring_and_version_via_import
m = sl.load_module()
File "", line 407, in _check_name_wrapper
File "", line 907, in load_module
File "", line 732, in load_module
File "", line 265, in _load_module_shim
File "", line 696, in _load
File "", line 677, in _load_unlocked
File "", line 728, in exec_module
File "", line 219, in _call_with_frames_removed
File "/private/var/folders/yd/lvv_242j0_j38xt5p54y2q8w0000gn/T/pip-req-build-zoh5p0rp/Scribe/init.py", line 13, in
from . import pl
File "/private/var/folders/yd/lvv_242j0_j38xt5p54y2q8w0000gn/T/pip-req-build-zoh5p0rp/Scribe/pl.py", line 4, in
from Scribe.plot import *
ModuleNotFoundError: No module named 'Scribe'
----------------------------------------
ERROR: Command errored out with exit status 1: /opt/anaconda3/bin/python /opt/anaconda3/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /var/folders/yd/lvv_242j0_j38xt5p54y2q8w0000gn/T/tmpc8h1o041 Check the logs for full command output.

RDI score

Hi, I try to use your method on a scRNA sequencing data and also plan to do some benchmark with other casual inference methods, however, I have difficulty understanding the RDI score used here. So is the RDI score also sum over t as the DI or transfer entropy? And I can't see where is the first-order Markov assumption being used here as the delta goes from 1 to n.

Kind Regards,
Teng

Update heatmap related plot

Currently the heatmap plots are kind buggy and cannot deal with multiple gene pairs nicely. Need to improve the quality of these #plotting functions

data used in figSI3_ROC_scRNASeq.R

Would you please also share the following datasets that were used in figSI3_ROC_scRNASeq.R? (https://github.com/aristoteleo/Scribe_paper)
Although the LPS dataset can be downloaded from the GEO database, I find that the format of the data I processed does not match the code. I have also developed a method to infer causal GRN from the cross-sectional data and want to benchmark it with Scribe and other methods. So it will be appreciated that if you can send me the following data as well:

"/Users/xqiu/Dropbox (Cole Trapnell's Lab)/Projects/fstree_ddrtree/RData/analysis_shalek_data.RData"

'./csv_data/LPS_network'

'./csv_data/LPS_subset_network'

'./csv_data/TF_hiearchy.txt'

Thank you so much.

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.