Giter Site home page Giter Site logo

sd2's Introduction

SD2: Spatially resolved transcriptomics deconvolution through integration of spatial and dropout information


Pipeline

Training process


Extract the dropout genes and generate pseudo-ST spots The input files are following:

  1. sc_matrix (The expression profile of scRNA-seq data whose rows are genes and columns are cells)
  2. st_matrix (The expression profile of ST data whose rows are genes and columns are spots)
  3. cell_type (The cell-type annotation vector of scRNA-seq data whose value is cell-type name corresponding with each cell)
  4. st_location (The data frame of coordinates for ST spots whose rows are spots indices and columns are "X" and "Y" representing the X and Y coordinates of each spot)
source(SD2_utiles.R)

SD2(sc_matrix,
    st_matrix,
    cell_type,
    ST_location = st_location,
    spot_num = 300, 
    lower_cellnum = 10,
    upper_cellnum = 20)

The first four items of process_data function are required. 'spot_num' is the number of generated pseudo-ST spots. ‘lower_cellnum' and 'upper_cellnum' indicate the range of cell number of each spot you want.

Construct the graph according to the transcriptional similarity and spatial connection and train by GCN

system(python train.py)

The final result would appear in the folder 'SD2_results' and entitled as "predict_output.csv'.

Here is an example of apply SD2 to the PDAC datasets (generated from Spatial Transcriptomics technique)

### load the SD2 utiles and the orginal PDAC data with its adjacent scRNA-seq data

source(SD2_utiles.R)
ST_data = readRDS('PDAC_GSM4100721.rds')
sc_count = ST_data$sc_count
st_count = ST_data$st_count
cell_type = ST_data$cell_type
st_location = ST_data$st_location

### apply the SD2 to PDAC

SD2(as.matrix(sc_count),
    as.matrix(st_count),
    cell_type,
    ST_location = st_location[,c('x','y')],
    spot_num = 300, 
    lower_cellnum = 10,
    upper_cellnum = 20)

system(python train.py)


Citation

Haoyang Li, Hanmin Li, Juexiao Zhou, Xin Gao, SD2: spatially resolved transcriptomics deconvolution through integration of dropout and spatial information, Bioinformatics, 2022;, btac605, https://doi.org/10.1093/bioinformatics/btac605

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.