droplet_counts_per_compartment: Droplet counts per compartment

droplet_counts_per_compartmentR Documentation

Droplet counts per compartment

Description

Calculate count sums for subsets of columns in a matrix

Usage

droplet_counts_per_compartment(
  matrix,
  compartment,
  sum_function = sum,
  remaining_include = TRUE,
  remaining_name = "empty"
)

Arguments

matrix

Count matrix

compartment

A named list of compartments and their barcodes (i.e. list("cells"=c("BC1", "BC2, ...), "debris"=c("BC101", "BC222, ...)))

sum_function

Function applied to each group of barcodes

remaining_include

Should barcodes that are not included in compartment list be included as its own compartment (i.e. for empty droplets)

remaining_name

If remaining barcodes are included as a compartment, what should it be called?

Value

Vector or matrix depending on the sum function


Terkild/scutility documentation built on Jan. 16, 2025, 5:28 p.m.