Giter Site home page Giter Site logo

dstg's Introduction

Deconvoluting Spatial Transcriptomics data through Graph-based convolutional networks (DSTG)

This is a TensorFlow implementation of DSTG for decomposing spatial transcriptomics data, which is described in our paper:

Installation

python setup.py install

Requirements

  • tensorflow (>0.12)
  • networkx

Run the demo

load the example data using the convert_data.R script In the example data, we provide two synthetic spatial transcriptomics data generated from scRNA-seq data (GSE72056). Each synthetic data consists of 1,000 spots, which can be found in folder synthetic_data.

cd DSTG
Rscript convert_data.R # load example data 
python train.py # run DSTG

Predicted compositions within each spot are saved in will be shown in the DSTG_Result folder.

Performance of JSD score will be shown if you run

Rscript evaluation.R

If you want to use your own scRNA-seq data to deconvolute your spatail transcriptomcis data, provide you data to script below:

Run your own data

When using your own scRNA-seq data to deconvolute your spatail transcriptomcis data, you have to provide

  • the raw scRNA-seq data matrix and label, which are saved as .RDS format (e.g. 'scRNAseq_data.RDS' & 'scRNAseq_label.RDS')
  • the raw spatial transcriptomics data matrix saved as .RDS format (e.g. 'spatial_data.RDS')
cd DSTG
Rscript  convert_data.R  scRNAseq_data.RDS  spatial_data.RDS  scRNAseq_label.RDS
python train.py # run DSTG

Then you will get your results in the DSTG_Result folder.

Cite

Please cite our paper if you use this code in your own work:

Qianqian Song, Jing Su, DSTG: deconvoluting spatial transcriptomics data through graph-based artificial intelligence, Briefings in Bioinformatics, 2021;, bbaa414, https://doi.org/10.1093/bib/bbaa414

dstg's People

Contributors

qsong-github 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.