summarize | R Documentation |
summarize the rows of a deepTools matrix
summarize( object = "profileplyr", fun = "function", output = "character", keep_all_mcols = "logical", sampleData_columns_for_longPlot = "character" ) ## S4 method for signature 'profileplyr' summarize( object = "profileplyr", fun = "function", output = "character", keep_all_mcols = FALSE, sampleData_columns_for_longPlot = NULL )
object |
A profileplyr object |
fun |
the function used to summarize the ranges (e.g. rowMeans or rowMax) |
output |
Must be either "matrix", "long", or "object". |
keep_all_mcols |
if output is 'long' and this is set to TRUE, then all metadata columns in the rowRanges will be included in the output. If FALSE (default value), then only the column indicated in the 'rowGroupsInUse' slot of the metadata will be included in the output dataframe. |
sampleData_columns_for_longPlot |
If output is set to 'long', then this argument can be used to add information stored in sampleData(object) to the summarized data frame. This needs to be a character vector with elements matching coumn names in sampleData(object). |
Takes a SE object and outputs a summarized experiment object with a matrix containing ranges as rows and each sample having one column with summary statistic
If output="matrix" returns a matrix, if output="long" returns a data.frame in long format, if output="object" returns a SummarizedExperiment object with the summarized matrix.
summarize(profileplyr)
: summarize the rows of a deepTools matrix
example <- system.file("extdata", "example_deepTools_MAT", package = "profileplyr") object <- import_deepToolsMat(example) # output matrix (can be used to make a heatmap) object_sumMat <- summarize(object, fun = rowMeans, output = "matrix") # output long dataframe for ggplot object_long <- summarize(object, fun = rowMeans, output = "long") object_long[1:3, ] library(ggplot2) ggplot(object_long, aes(x = Sample, y = log(Signal))) + geom_boxplot() # output profileplyr object containing summarized matrix summarize(object, fun = rowMeans, output = "object")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.