Skip to content

Commit

Permalink
feat: treeview() outputs either .rds or .html (or both) for interacti…
Browse files Browse the repository at this point in the history
…ve plots
  • Loading branch information
russHyde committed Jan 17, 2023
1 parent 475a98a commit 1b065ed
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
12 changes: 8 additions & 4 deletions R/treeview.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@
#' @param output_dir Outputs will be saved in this directory. Will create the directory if it does
#' not exist.
#' @param output_format String (either \code{rds}, \code{html} or both). Default: both. In which
#' format(s) should the sina-cluster plots be saved?
#' format(s) should the interactive plots be saved? For \code{rds}, a \code{ggtree} or
#' \code{ggplot2} object will be placed in \code{rds} files. For \code{html}, \code{htmlwidget}s
#' will be placed in a \code{html} file.
#' @param heatmap_width,heatmap_lab_offset Width and label-offset parameters for the constructed
#' heatmap.
#'
#' @importFrom rlang .data
#'
#' @return A ggtree plot
#' @return A \code{ggtree} plot.
#'
#' @export

Expand Down Expand Up @@ -251,7 +253,8 @@ treeview <- function(e0,
lgr_trees,
branch_col = "logistic_growth_rate",
n_leaves = n_leaves,
output_dir = output_dir
output_dir = output_dir,
output_format = output_format
)

for (branch_col in setdiff(branch_cols, c("logistic_growth_rate"))) {
Expand All @@ -263,7 +266,8 @@ treeview <- function(e0,
tree_list,
branch_col = branch_col,
n_leaves = n_leaves,
output_dir = output_dir
output_dir = output_dir,
output_format = output_format
)
}
})
Expand Down
6 changes: 4 additions & 2 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 1b065ed

Please sign in to comment.