cleanCounts: Filter a counts matrix

View source: R/import.R

cleanCountsR Documentation

Filter a counts matrix

Description

Filter a counts matrix based on gene (row) and cell (column) requirements.

Usage

cleanCounts(
  counts,
  min.lib.size = 1,
  max.lib.size = Inf,
  min.reads = 1,
  min.detected = 1,
  verbose = FALSE,
  plot = FALSE
)

Arguments

counts

A sparse read count matrix. The rows correspond to genes, columns correspond to individual cells

min.lib.size

Minimum number of genes detected in a cell. Cells with fewer genes will be removed (default: 1)

max.lib.size

Maximum number of genes detected in a cell. Cells with more genes will be removed (default: Inf)

min.reads

Minimum number of reads per gene. Genes with fewer reads will be removed (default: 1)

min.detected

Minimum number of cells a gene must be seen in. Genes not seen in a sufficient number of cells will be removed (default: 1)

verbose

Verbosity (default: FALSE)

plot

Whether to plot (default: FALSE)

Value

a filtered read count matrix

Examples

data(mOB)
counts <- cleanCounts(mOB$counts, min.lib.size = 100)


JEFworks-Lab/STdeconvolve documentation built on Nov. 14, 2024, 7:24 p.m.