Giter Site home page Giter Site logo

gtestimate's Introduction

GTestimate

GTestimate is a scRNA-seq normalization method. In contrast to other methods it uses the Simple Good-Turing estimator for the per cell relative gene expression estimation. Thereby GTestimate can account for the unobserved genes and avoid overestimation of the observed genes. At default settings it serves as a drop-in replacement for Seurat's NormalizeData().

Installation

You can install the development version of GTestimate like so:

if (!requireNamespace("devtools", quietly = TRUE))
    install.packages("devtools")
if (!requireNamespace("sparseMatrixStats", quietly = TRUE))
  devtools::install_github("const-ae/sparseMatrixStats")

devtools::install_github("Martin-Fahrenberger/GTestimate")

Seurat Example

This is a basic example of how to use GTestimate to normalize scRNA-seq data in a Seurat workflow.

library(GTestimate)
library(Seurat)
data('pbmc_small')

pbmc_small <- GTestimate(pbmc_small) # Instead of NormalizeData(pbmc_small)
pbmc_small <- FindVariableFeatures(pbmc_small)
pbmc_small <- ScaleData(pbmc_small)
pbmc_small <- RunPCA(pbmc_small)
# and so on

SingleCellExperiment Example

This is a basic example of how to use GTestimate to normalize scRNA-seq data in a SingleCellExperiment workflow using size-factors.

library(GTestimate)
library(Seurat)
library(scran)
data('pbmc_small')

pbmc_sce <- as.SingleCellExperiment(pbmc_small)

pbmc_sce <- computeSumFactors(pbmc_sce)
pbmc_sce <- GTestimate(pbmc_sce, size.factors = sizeFactors(pbmc_sce)) # Instead of logNormCounts(sce)
# and so on

Credit

The core implementation of the Simple Good-Turing estimator in C++ has been adapted from Aaron Lun's implementation for the edgeR R-package. His implementation was in turn based on Geoffrey Sampson's C code acessible at https://www.grsampson.net/D_SGT.c

gtestimate's People

Contributors

martin-fahrenberger avatar

Stargazers

 avatar

Watchers

 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.