norm_cpm: CPM normalization

Description Usage Arguments Details Value exception See Also Examples

Description

CPM normalization using counts sum of certain genes as scaling factor.

Usage

1
2
3
4
5
6
7
norm_cpm_total(mat)

norm_cpm_top(mat, top_n)

norm_cpm_rm(mat, gene_type)

norm_cpm_refer(mat, refer_gene_id)

Arguments

mat

integer matrix. counts.

top_n

integer scalar. See norm_cpm_top() below.

gene_type

character. See norm_cpm_rm() below.

refer_gene_id

character. Ensembl transcript id, see norm_cpm_refer() below.

Details

norm_cpm_total() uses total genes

norm_cpm_top() uses top 20 genes sorted by counts (assuming top_n = 20L).

norm_cpm_rm() uses non-piRNA genes (assuming gene_type = 'piRNA').

norm_cpm_refer() uses given reference genes

Value

numerical matrix. normalized counts.

exception

some functions may throw errors.

See Also

Other matrix normalization: norm_SCnorm, norm_scater

Examples

1
2
3
4
5
6
7
norm_cpm_total(sim_mat) %>% head()

norm_cpm_top(sim_mat, 20L) %>% head()

norm_cpm_rm(sim_mat, c('miRNA', 'piRNA')) %>% head()

norm_cpm_refer(sim_mat, suggest_refer$id) %>% head()

dongzhuoer/rexseek documentation built on Dec. 16, 2019, 3:19 a.m.