filter_counts: filter_counts

View source: R/filter_counts.R

filter_countsR Documentation

filter_counts

Description

This function is used to preprocess matrix of read counts to only keep genes with a certain number of nonzero entries.

Usage

filter_counts(counts, perc.zero = 0.1)

Arguments

counts

A non-negative integer matrix of scRNA-seq raw read counts. The rows of the matrix are genes and columns are samples/cells.

perc.zero

A numeric value between 0 and 1 that represents the proportion of zeros per gene in the processed dataset.

Value

An object of class Matrix with genes removed if they have more than perc.zero zeros.

Examples


# load toy  example data

data(scData)

# apply the filter_counts function to filter out genes if they have
# more than 10% zero

scData_filt <- filter_counts(scData$counts, perc.zero = 0.1)

Malindrie/scShapes documentation built on Nov. 21, 2022, 8:58 a.m.