ApplyMatrixByGroup: Apply function to integration sites per base per group

ApplyMatrixByGroupR Documentation

Apply function to integration sites per base per group

Description

Apply function to integration sites per base per group

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.

Details

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

Value

ApplyMatrixByGroup


wzthu/esATAC documentation built on Aug. 12, 2022, 7:41 a.m.