CID.Normalize: Library size normalize

Description Usage Arguments Value Examples

View source: R/helper_functions.R

Description

CID.Normalize normalizes the expression matrix to the mean library size.

Usage

1

Arguments

E

Expression matrix

Value

Normalized expression matrix where each cell sums to the mean total counts

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
## Not run: 
# download single cell data for classification
file.dir = "https://cf.10xgenomics.com/samples/cell-exp/3.0.0/pbmc_1k_v3/"
file = "pbmc_1k_v3_filtered_feature_bc_matrix.h5"
download.file(paste0(file.dir, file), "Ex.h5")

# load data, process with Seurat
library(Seurat)
E = Read10X_h5(filename = "Ex.h5")

# observe average total counts
mean(Matrix::colSums(E))

# run normalization
E_norm = CID.Normalize(E)

# check normalization
kmu = mean(Matrix::colSums(E_norm))
head(kmu)

## End(Not run)

SignacX documentation built on Nov. 18, 2021, 5:07 p.m.