Learn R Programming

diem (version 1.0)

get_gene_pct: Get percent of reads align to given gene(s)

Description

Add a data column for each droplet giving the percentage of raw reads/UMIs that align to genes given in genes. The column name is specified by name.

Usage

get_gene_pct(x, genes, name)

Arguments

x

An SCE object.

genes

Genes to calculate percentage of in counts.

name

Column name to place in dropl_info.

Value

An SCE object.

Examples

Run this code
# NOT RUN {
# Add MT%
mt_genes <- grep(pattern="^mt-", x=rownames(mb_small@gene_data), ignore.case=TRUE, value=TRUE)
mb_small <- get_gene_pct(x = mb_small, genes=mt_genes, name="pct.mt")
# Add MALAT1
genes <- grep(pattern="^malat1$", x=rownames(mb_small@gene_data), ignore.case=TRUE, value=TRUE)
mb_small <- get_gene_pct(x = mb_small, genes=genes, name="MALAT1")
# }

Run the code above in your browser using DataLab