diff --git a/.Rhistory b/.Rhistory index ee1dc24..a46b83e 100644 --- a/.Rhistory +++ b/.Rhistory @@ -1,7 +1,3 @@ -# xend = "xend", yend = "yend" -# )) + -# ggdendro::theme_dendro() -# b1 <- ggplot(ggdendro::segment(ddata)) + # ggplot2::geom_segment(ggplot2::aes( # x = x, y = y, # xend = xend, yend = yend @@ -510,3 +506,7 @@ patchwork::wrap_plots(ggbars , ggdend + ggplot2::scale_y_reverse(), ncol = 1, heights = c(1,.3)) color_dict +devtools::check_man() +library(MultiEWCE) +res <- ggnetwork_plot_full(cell_type = "Microglia") +library(MultiEWCE) diff --git a/DESCRIPTION b/DESCRIPTION index 652e551..dc345fb 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -25,7 +25,7 @@ Encoding: UTF-8 URL: https://github.com/neurogenomics/MultiEWCE BugReports: https://github.com/neurogenomics/MultiEWCE/issues Roxygen: list(markdown = TRUE) -RoxygenNote: 7.3.0 +RoxygenNote: 7.3.1 Depends: R (>= 4.1) Imports: diff --git a/R/ggnetwork_plot_full.R b/R/ggnetwork_plot_full.R index e7f0c84..4de49d3 100644 --- a/R/ggnetwork_plot_full.R +++ b/R/ggnetwork_plot_full.R @@ -20,6 +20,7 @@ #' @inheritParams HPOExplorer::make_network_plot #' @inheritParams HPOExplorer::filter_descendants #' @inheritParams HPOExplorer::make_network_object +#' @inheritDotParams HPOExplorer::make_network_plot #' @returns A named list of outputs, #' including a interactive network plot of the selected subset #' of results from RD EWCE analysis. @@ -40,6 +41,8 @@ ggnetwork_plot_full <- function(cell_type, size_var = "ontLvl_relative", add_ont_lvl_absolute = TRUE, add_ont_lvl_relative = TRUE, + method = c("ggnetwork","visnetwork"), + interactive = TRUE, verbose = TRUE, ...){ messager("ggnetwork_plot_full",v=verbose) @@ -83,10 +86,11 @@ ggnetwork_plot_full <- function(cell_type, } #### Make plot #### out <- HPOExplorer::make_network_plot(phenos = phenos, - colour_var = colour_var, - size_var = size_var, - interactive = interactive, - ...) + colour_var = colour_var, + size_var = size_var, + interactive = interactive, + method = method, + ...) #### Return #### return(out) } diff --git a/man/ggnetwork_plot_full.Rd b/man/ggnetwork_plot_full.Rd index d6963b9..1ff27c3 100644 --- a/man/ggnetwork_plot_full.Rd +++ b/man/ggnetwork_plot_full.Rd @@ -16,6 +16,8 @@ ggnetwork_plot_full( size_var = "ontLvl_relative", add_ont_lvl_absolute = TRUE, add_ont_lvl_relative = TRUE, + method = c("ggnetwork", "visnetwork"), + interactive = TRUE, verbose = TRUE, ... ) @@ -59,12 +61,21 @@ See \link[KGExplorer]{get_ontology_levels} for more details.} \item{add_ont_lvl_relative}{Add the relative ontology level of each HPO term. See \link[KGExplorer]{get_ontology_levels} for more details.} +\item{method}{Method to construct plot with.} + +\item{interactive}{Make the plot interactive.} + \item{verbose}{Print messages.} \item{...}{ - Arguments passed on to \code{\link[HPOExplorer:make_network_object]{make_network_object}} + Arguments passed on to \code{\link[HPOExplorer:make_]{HPOExplorer::make_network_plot}} \describe{ - \item{\code{}}{} + \item{\code{phenos}}{A data.table containing HPO IDs and other metadata.} + \item{\code{label_var}}{Column containing the label for each node in a graph +(e.g. "hpo_name").} + \item{\code{show_plot}}{Print the plot after it's been generated.} + \item{\code{hoverbox_column}}{Name of the new hoverbox column to add.} + \item{\code{preferred_palettes}}{Preferred palettes to use for each column.} }} } \value{