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

View source: R/FilterGB.R

FilterGBR Documentation

Filter out low count genes and barcodes from count matrix

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

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

data(mbrainSub)
dim(mbrainSub)
mbrainSub_f <- FilterGB(mbrainSub)
dim(mbrainSub_f)


zijianni/scCB2 documentation built on April 24, 2023, 12:55 p.m.