data_transform_quantile: Quantile-normalize CPM for Each Gene

Description Usage Arguments Value Author(s) Examples

View source: R/data_transform_quantile.R

Description

Quantile-normalize CPM for Each Gene

Transform counts by first computing counts-per-million (CPM), then quantile-normalize CPM for each gene.

Usage

1
data_transform_quantile(sce, ncores = 2)

Arguments

sce

SingleCellExperiment object.

ncores

Argument passed to makeCluster specifying the number of threads.

Value

SingleCellExperiment object with an additional “cpm_quant” slot; this is added if it doesn't already exist.

Author(s)

Joyce Hsiao

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
library(SingleCellExperiment)
data(sce_top101genes)

# Perform CPM normalization using scater and quantile-normalize
# the CPM values of each gene to normal distribution.
sce_top101genes <- data_transform_quantile(sce_top101genes, ncores=2)

plot(y=assay(sce_top101genes, "cpm_quantNormed")[1,],
     x=assay(sce_top101genes, "cpm")[1,],
     xlab = "CPM before quantile-normalization",
     ylab = "CPM after quantile-normalization")

jhsiao999/peco documentation built on Nov. 21, 2020, 5:34 p.m.