SummarizeHeatmaps: SummarizeHeatmaps

View source: R/SummarizeHeatmaps.R

SummarizeHeatmapsR Documentation

SummarizeHeatmaps

Description

Summarize heatmap count matrices from individual bam samples.

Usage

SummarizeHeatmaps(counts, sampleList, summarizing = mean, verbose = TRUE)

Arguments

counts

A list of counts across peak summits generated by SummitHeatmap. Each element must be a matrix with unique row names.

sampleList

A list where each element is a character vector of sample names that should be grouped. The name of each element of this list specifies the group name.

summarizing

Function to use for summarizing data. Defaults to mean. Must be a function that can be applied to a numeric vector (e.g., mean, median, sum).

verbose

Logical indicating whether to print progress messages. Default is TRUE.

Details

This function takes a list of heatmap count matrices (from individual bam files) and summarizes them (by user defined groups). The matrices should have unique row names and consistent dimensions. This implementation is optimized for performance.

Value

A list of summarized (by group) counts across peak summits.

Examples

counts <- list(matrix(rnorm(21000,2,1),ncol=21,
nrow=100,dimnames=list(1:100,-10:10)),
               matrix(rnorm(21000,2,1),ncol=21,
               nrow=100,dimnames=list(1:100,-10:10)),
               matrix(rnorm(21000,2,1),ncol=21,
               nrow=100,dimnames=list(1:100,-10:10)),
               matrix(rnorm(21000,2,1),ncol=21,
               nrow=100,dimnames=list(1:100,-10:10)))
bamNames <- c("counts1","counts2","counts3","counts4")
names(counts) <- bamNames
SummarizeHeatmaps(counts,sampleList=list
(countsA=c("counts1","counts2"),countsB=c("counts3","counts4")))


fmi-basel/gbuehler-MiniChip documentation built on June 13, 2025, 6:15 a.m.