From f979d249ee4e6e8996395fe37e9a9abd11c07c01 Mon Sep 17 00:00:00 2001 From: Russ Hyde Date: Tue, 17 Jan 2023 15:40:14 +0000 Subject: [PATCH] refac: rename treeview() param for specifying sina-plot output format --- R/plot_cluster_sina.R | 4 ++-- R/treeview.R | 10 +++++----- man/save_sina_plot.Rd | 4 ++-- man/treeview.Rd | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/R/plot_cluster_sina.R b/R/plot_cluster_sina.R index 8c07f47..e73a15c 100644 --- a/R/plot_cluster_sina.R +++ b/R/plot_cluster_sina.R @@ -32,8 +32,8 @@ plot_cluster_sina <- function(pldf, #' @param ggobj \code{ggplot2} object. Contains the plot that is to be saved. #' @param varx Scalar string. Which variable is depicted in the plot? #' @param output_dir File path. The directory where the plot will be stored. -#' @param output_format String (either \code{rds}, \code{html} or both). In which formats should -#' the plots be saved? +#' @param output_format String (either \code{rds}, \code{html} or both). Default: both. In +#' which file format(s) should the plots be saved? #' @param width_svg,height_svg The width and height of the plot (only used when #' \code{output_format == "html"}). #' diff --git a/R/treeview.R b/R/treeview.R index c07237f..96c1cc3 100644 --- a/R/treeview.R +++ b/R/treeview.R @@ -11,8 +11,8 @@ #' @param lineages A set of lineage names which will be used to subdivide outputs in scatter plots. #' @param output_dir Outputs will be saved in this directory. Will create the directory if it does #' not exist. -#' @param sina_output_format String (either \code{rds}, \code{html} or both). In which formats -#' should the sina-cluster plots be saved? +#' @param output_format String (either \code{rds}, \code{html} or both). Default: both. In which +#' format(s) should the sina-cluster plots be saved? #' @param heatmap_width,heatmap_lab_offset Width and label-offset parameters for the constructed #' heatmap. #' @@ -27,10 +27,10 @@ treeview <- function(e0, mutations = c("S:A222V", "S:Y145H", "N:Q9L", "S:E484K"), lineages = c("AY\\.9", "AY\\.43", "AY\\.4\\.2"), output_dir = "treeview", - sina_output_format = c("rds", "html"), + output_format = c("rds", "html"), heatmap_width = .075, heatmap_lab_offset = -6) { - sina_output_format <- match.arg(sina_output_format, several.ok = TRUE) + output_format <- match.arg(output_format, several.ok = TRUE) # require logistic growth rate, prevent non-empty branch_cols <- unique(c( @@ -284,7 +284,7 @@ treeview <- function(e0, sina_plot, varx = vn, output_dir = output_dir, - output_format = sina_output_format + output_format = output_format ) } }) diff --git a/man/save_sina_plot.Rd b/man/save_sina_plot.Rd index 4eeae30..a394131 100644 --- a/man/save_sina_plot.Rd +++ b/man/save_sina_plot.Rd @@ -20,8 +20,8 @@ save_sina_plot( \item{output_dir}{File path. The directory where the plot will be stored.} -\item{output_format}{String (either \code{rds}, \code{html} or both). In which formats should -the plots be saved?} +\item{output_format}{String (either \code{rds}, \code{html} or both). Default: both. In +which file format(s) should the plots be saved?} \item{width_svg, height_svg}{The width and height of the plot (only used when \code{output_format == "html"}).} diff --git a/man/treeview.Rd b/man/treeview.Rd index 987a3e0..01f575e 100644 --- a/man/treeview.Rd +++ b/man/treeview.Rd @@ -10,7 +10,7 @@ treeview( mutations = c("S:A222V", "S:Y145H", "N:Q9L", "S:E484K"), lineages = c("AY\\\\.9", "AY\\\\.43", "AY\\\\.4\\\\.2"), output_dir = "treeview", - sina_output_format = c("rds", "html"), + output_format = c("rds", "html"), heatmap_width = 0.075, heatmap_lab_offset = -6 ) @@ -29,8 +29,8 @@ logistic growth rate plot will always be produced.} \item{output_dir}{Outputs will be saved in this directory. Will create the directory if it does not exist.} -\item{sina_output_format}{String (either \code{rds}, \code{html} or both). In which formats -should the sina-cluster plots be saved?} +\item{output_format}{String (either \code{rds}, \code{html} or both). Default: both. In which +format(s) should the sina-cluster plots be saved?} \item{heatmap_width, heatmap_lab_offset}{Width and label-offset parameters for the constructed heatmap.}