Plot CNV Results into a Heatmap Builds a heatmap to visualize the CNV results based on genomic scores.
plotCNVResults.RdPlot CNV Results into a Heatmap Builds a heatmap to visualize the CNV results based on genomic scores.
Usage
plotCNVResults(
seuratObj,
referenceVar = NULL,
clustersVar = "cnv_clusters",
splitPlotOnVar = clustersVar,
denoise = TRUE,
savePath = ".",
printPlot = FALSE,
referencePalette = "default",
clusters_palette = "default",
outputType = "png",
raster_resize_mat = TRUE
)Arguments
- seuratObj
A Seurat object containing the genomic scores computed previously.
- referenceVar
The name of the metadata column in the Seurat object containing reference annotations.
- clustersVar
The name of the metadata column containing cluster information (default =
"cnv_clusters").- splitPlotOnVar
The name of the metadata column used to split the heatmap rows (e.g., cell type or cluster) (default =
clustersVar).- denoise
If
TRUE, the denoised data will be used in the heatmap (default =TRUE).- savePath
The path where the heatmap will be saved. If
NULL, the plot will not be saved (default =".").- printPlot
Logical. If
TRUE, prints the heatmap to the console.- referencePalette
A color palette for
referenceVar. You can provide a custom palette as a vector of color codes (e.g.,c("#FF0000", "#00FF00")).- clusters_palette
A color palette for
clustersVar. You can provide a custom palette as a vector of color codes (e.g.,c("#F8766D", "#A3A500", "#00BF7D")).- outputType
Character. Specifies the file format for saving the plot, either
"png"or"pdf".- raster_resize_mat
Whether resize the matrix to let the dimension of the matrix the same as the dimension of the raster image. Default is TRUE. If rendering fails with TRUE, the function automatically retries with FALSE.