Skip to content

Commit

Permalink
refac: rename treeview() param for specifying sina-plot output format
Browse files Browse the repository at this point in the history
  • Loading branch information
russHyde committed Jan 17, 2023
1 parent da1ae81 commit f979d24
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions R/plot_cluster_sina.R
Original file line number Diff line number Diff line change
Expand Up @@ -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"}).
#'
Expand Down
10 changes: 5 additions & 5 deletions R/treeview.R
Original file line number Diff line number Diff line change
Expand Up @@ -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.
#'
Expand All @@ -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(
Expand Down Expand Up @@ -284,7 +284,7 @@ treeview <- function(e0,
sina_plot,
varx = vn,
output_dir = output_dir,
output_format = sina_output_format
output_format = output_format
)
}
})
Expand Down
4 changes: 2 additions & 2 deletions man/save_sina_plot.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions man/treeview.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f979d24

Please sign in to comment.