FilterGB: Filter out low count genes and barcodes from count matrix

Description Usage Arguments Value Examples

View source: R/FilterGB.R

Description

This function is used for filtering out low count genes and barcodes from count matrix based on total gene expression count (row sums) and barcode expression count (column sums). CB2FindCell has already integrated this function into it with g_threshold = 0 and b_threshold = 0. If users plan to customize their filtering threshold, this function can be applied to the raw expression count matrix prior to running CB2FindCell.

Usage

1
FilterGB(dat, g_threshold = 0, b_threshold = 0)

Arguments

dat

Input count matrix to be filtered.

g_threshold

Nonnegative integer. Default: 0. Filtering threshold for genes. Any gene whose total expression count is less or equal to g_threshold will be filtered out.

b_threshold

Nonnegative integer. Default: 0. Filtering threshold for barcodes. Any barcode whose total count is less or equal to b_threshold will be filtered out.

Value

A filtered matrix with the same format as input matrix.

Examples

1
2
3
4
data(mbrainSub)
dim(mbrainSub)
mbrainSub_f <- FilterGB(mbrainSub)
dim(mbrainSub_f)

scCB2 documentation built on Nov. 8, 2020, 5:48 p.m.