Git Product home page Git Product logo

distmap's Introduction

DistMap: single cell spatial distributed mapping

About

This R package is created and maintained by Nikos Karaiskos. DistMap can be used to spatially map single cell RNA sequencing data by using an existing reference database of in situs.

DistMap accompanies the following publication

The Drosophila Embryo at Single Cell Transcriptome Resolution,
Science 358, 194 (2017)

N. Karaiskos#, P. Wahle#, J. Alles, A. Boltengagen, S. Ayoub, C. Kocks, N. Rajewsky& and R. Zinzen&

# Contributed equally
& Corresponding authors: N. Rajewsky, R. Zinzen

Contact the author in case you've found a bug.

Installation

The easiest way to install DistMap is through devtools

library(devtools)
install_github("rajewsky-lab/DistMap")

Usage

Reading the data

Pay extra attention if you read data with different commands, for instance read.table against fread from the data.table package. Gene names which contain -s or other special characters might be read differently. In that case you'll probably encounter an error during binarization of the data (see below).

Mapping the data

The DistMap object is used to store the following structures:

  • raw.data, the raw data (e.g. UMI counts) of the experiment, provided by the user as a matrix with genes as rows and cells as columns.
  • data is the normalized data, provided by the user as a matrix similar to the raw data.
  • binarized.data is the binarized version of the single cell data computed via the binarizeSingleCellData function.
  • insitu.matrix is the matrix of the reference database, provided by the user, with genes as columns and positions (bins) as rows. See the included example used in the paper.
  • geometry, a matrix containing the cartesian coordinates of each bin in three dimensional space. Provided by the user, bins as rows and coordinates as columns, see geometry.txt. provided as an example.

The first step is to initialize the DistMap object

dm = new("DistMap",
         raw.data=raw.data,
         data=normalized.data,
         insitu.matrix=insitu.matrix,
         geometry=geometry)

Then the binarized single cell data is computed and the cells are mapped onto the reference atlas

dm <- binarizeSingleCellData(dm, seq(0.15, 0.5, 0.01))
dm <- mapCells(dm)

Once the cells have been mapped, the DistMap functions can be used to compute a vISH or a gradient of a gene and visualize the expression pattern

computeVISH(dm, 'sna', threshold=0.75)
computeGeneGradient(dm, 'sna')

distmap's People

Contributors

nukappa 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.