From a5d73f6792c3462fb859df7c944362e29ced6a1f Mon Sep 17 00:00:00 2001 From: LTLA Date: Sun, 17 Nov 2024 16:17:59 -0800 Subject: [PATCH] Pass additional arguments to pheatmap via plotMarkerHeatmap. --- R/plotMarkerHeatmap.R | 7 +++++-- man/plotMarkerHeatmap.Rd | 5 ++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/R/plotMarkerHeatmap.R b/R/plotMarkerHeatmap.R index 9b1dfe9..4258e8c 100644 --- a/R/plotMarkerHeatmap.R +++ b/R/plotMarkerHeatmap.R @@ -21,6 +21,7 @@ #' @param top Integer scalar indicating the top most interesting markers to show in the heatmap. #' @param num.threads Integer scalar specifying the number to threads to use. #' @param BPPARAM Deprecated, use \code{num.threads} instead. +#' @param ... Additional parameters for heatmap control passed to \code{\link[pheatmap]{pheatmap}}. #' #' @return #' The output of \code{\link[pheatmap]{pheatmap}} is returned showing the heatmap on the current graphics device. @@ -59,7 +60,8 @@ plotMarkerHeatmap <- function( order.by.summary="min.rank", top=20, num.threads=bpnworkers(BPPARAM), - BPPARAM = SerialParam()) + BPPARAM = SerialParam(), + ...) { test <- .to_clean_matrix(test, assay.type, check.missing=FALSE) all.markers <- metadata(results)$de.genes[[label]] @@ -125,6 +127,7 @@ plotMarkerHeatmap <- function( color=viridis::viridis(25), annotation_col=data.frame(labels=predictions, row.names=colnames(test)), cluster_col=FALSE, - show_colnames=FALSE + show_colnames=FALSE, + ... ) } diff --git a/man/plotMarkerHeatmap.Rd b/man/plotMarkerHeatmap.Rd index 050bb66..8c1954b 100644 --- a/man/plotMarkerHeatmap.Rd +++ b/man/plotMarkerHeatmap.Rd @@ -16,7 +16,8 @@ plotMarkerHeatmap( order.by.summary = "min.rank", top = 20, num.threads = bpnworkers(BPPARAM), - BPPARAM = SerialParam() + BPPARAM = SerialParam(), + ... ) } \arguments{ @@ -50,6 +51,8 @@ If \code{NULL}, the existing row names of \code{test} are used.} \item{num.threads}{Integer scalar specifying the number to threads to use.} \item{BPPARAM}{Deprecated, use \code{num.threads} instead.} + +\item{...}{Additional parameters for heatmap control passed to \code{\link[pheatmap]{pheatmap}}.} } \value{ The output of \code{\link[pheatmap]{pheatmap}} is returned showing the heatmap on the current graphics device.