pool_mut_mat: Pool multiple samples from a mutation matrix together

View source: R/pool_mut_matrix.R

pool_mut_matR Documentation

Pool multiple samples from a mutation matrix together

Description

The mutation counts of columns (samples) are added up according to the grouping variable.

Usage

pool_mut_mat(mut_matrix, grouping)

Arguments

mut_matrix

Mutation count matrix (dimensions: x mutation types X n samples)

grouping

Grouping variable

Value

Mutation count matrix (dimensions: x mutation types X n groups)

Examples

## See the 'mut_matrix()' example for how we obtained the mutation matrix:
mut_mat <- readRDS(system.file("states/mut_mat_data.rds",
  package = "MutationalPatterns"
))
grouping <- c(rep("colon", 3), rep("intestine", 3), rep("liver", 3))
pool_mut_mat(mut_mat, grouping)

UMCUGenetics/MutationalPatterns documentation built on Nov. 24, 2022, 4:31 a.m.