ApplyMatrixByGroup: Apply function to integration sites per base per group

ApplyMatrixByGroupR Documentation

Apply function to integration sites per base per group

Description

Perform colSums on a cut matrix with cells in the rows and position in the columns, for each group of cells separately.

Usage

ApplyMatrixByGroup(
  mat,
  groups,
  fun,
  normalize = TRUE,
  group.scale.factors = NULL,
  scale.factor = NULL
)

Arguments

mat

A cut matrix. See CutMatrix

groups

A vector of group identities, with the name of each element in the vector set to the cell name.

fun

Function to apply to each group of cells. For example, colSums or colMeans.

normalize

Perform sequencing depth and cell count normalization

group.scale.factors

Scaling factor for each group. Should be computed using the number of cells in the group and the average number of counts in the group.

scale.factor

Scaling factor to use. If NULL (default), will use the median normalization factor for all the groups.

Value

ApplyMatrixByGroup


Honchkrow/SignacSlim documentation built on April 9, 2022, 1:49 a.m.