View source: R/SummarizeHeatmaps.R
SummarizeHeatmaps | R Documentation |
Summarize heatmap count matrices from individual bam samples.
SummarizeHeatmaps(counts, sampleList, summarizing = mean, verbose = TRUE)
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. |
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.
A list of summarized (by group) counts across peak summits.
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")))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.