CollapseSpeciesExpressionMatrix: Slim down a multi-species expression matrix, when only one...

View source: R/utilities.R

CollapseSpeciesExpressionMatrixR Documentation

Slim down a multi-species expression matrix, when only one species is primarily of interenst.

Description

Valuable for CITE-seq analyses, where we typically spike in rare populations of 'negative control' cells from a different species.

Usage

CollapseSpeciesExpressionMatrix(
  object,
  prefix = "HUMAN_",
  controls = "MOUSE_",
  ncontrols = 100
)

Arguments

object

A UMI count matrix. Should contain rownames that start with the ensuing arguments prefix.1 or prefix.2

prefix

The prefix denoting rownames for the species of interest. Default is "HUMAN_". These rownames will have this prefix removed in the returned matrix.

controls

The prefix denoting rownames for the species of 'negative control' cells. Default is "MOUSE_".

ncontrols

How many of the most highly expressed (average) negative control features (by default, 100 mouse genes), should be kept? All other rownames starting with prefix.2 are discarded.

Value

A UMI count matrix. Rownames that started with prefix have this prefix discarded. For rownames starting with controls, only the ncontrols most highly expressed features are kept, and the prefix is kept. All other rows are retained.

Examples

## Not run: 
cbmc.rna.collapsed <- CollapseSpeciesExpressionMatrix(cbmc.rna)

## End(Not run)


Seurat documentation built on May 29, 2024, 4:20 a.m.