diff --git a/DESCRIPTION b/DESCRIPTION index 76a72bb..1c9f0c2 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: wilson Type: Package Title: Web-Based Interactive Omics Visualization -Version: 2.1.1 +Version: 2.2.0 Authors@R: c( person("Hendrik", "Schultheis", email = "hendrik.schultheis@mpi-bn.mpg.de", role = c("aut", "cre")), person("Jens", "Preussner", email = "jens.preussner@mpi-bn.mpg.de", role = "aut"), diff --git a/NAMESPACE b/NAMESPACE index 355b8a2..8db88f5 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -7,6 +7,10 @@ export(colorPicker) export(colorPickerUI) export(columnSelector) export(columnSelectorUI) +export(create_geneview) +export(create_heatmap) +export(create_pca) +export(create_scatterplot) export(featureSelector) export(featureSelectorUI) export(geneView) diff --git a/NEWS.md b/NEWS.md index 4b8d2f4..41e2e48 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,5 @@ +# wilson 2.2.0 +- export plotting functions # wilson 2.1.1 - fixed multiple unique_id bug in tobias_parser # wilson 2.1.0 diff --git a/R/function.R b/R/function.R index 754c715..10b16c3 100644 --- a/R/function.R +++ b/R/function.R @@ -33,6 +33,8 @@ #' @import data.table #' #' @return Returns list(plot = ggplotly/ ggplot, width, height, ppi, exceed_size). +#' +#' @export create_scatterplot <- function(data, data.labels = NULL, data.hovertext = NULL, transparency = 1, pointsize = 1, labelsize = 3, color = NULL, x_label = "", y_label = "", z_label = "", density = TRUE, line = TRUE, categorized = FALSE, highlight.data = NULL, highlight.labels = NULL, highlight.hovertext = NULL, highlight.color = "#FF0000", xlim = NULL, ylim = NULL, colorbar.limits = NULL, width = "auto", height = "auto", ppi = 72, plot.method = "static", scale = 1){ # force evaluation of all arguments # no promises in plot object @@ -322,6 +324,8 @@ create_scatterplot <- function(data, data.labels = NULL, data.hovertext = NULL, #' @import data.table #' #' @return A named list(plot = ggplot object, data = pca.data, width = width of plot (cm), height = height of plot (cm), ppi = pixel per inch, exceed_size = Boolean whether width/ height exceeded max). +#' +#' @export create_pca <- function(data, color.group = NULL, color.title = NULL, palette = NULL, shape.group = NULL, shape.title = NULL, shapes = c(15:25), dimension.a = 1, dimension.b = 2, dimensions = 6, on.columns = TRUE, labels = FALSE, custom.labels = NULL, pointsize = 2, labelsize = 3, width = 28, height = 28, ppi = 72, scale = 1) { # force evaluation of all arguments # no promises in plot object @@ -500,6 +504,8 @@ create_pca <- function(data, color.group = NULL, color.title = NULL, palette = N #' @details Width/ height limit = 500. If exceeded default to 500 and issue exceed_size = TRUE. #' #' @return Returns list(plot = complexHeatmap/ plotly object, width = width in cm, height = height in cm, ppi = pixel per inch, exceed_size = Boolean whether width/ height exceeded max) depending on plot.method. +#' +#' @export create_heatmap <- function(data, unitlabel = "auto", row.label = TRUE, row.custom.label = NULL, column.label = TRUE, column.custom.label = NULL, clustering = "none", clustdist = "auto", clustmethod = "auto", colors = NULL, winsorize.colors = NULL, plot.method = "static", width = "auto", height = "auto", ppi = 72, scale = 1) { # force evaluation of all arguments # no promises in plot object @@ -771,6 +777,8 @@ create_heatmap <- function(data, unitlabel = "auto", row.label = TRUE, row.custo #' @import data.table #' #' @return Returns depending on plot.method list(plot = ggplot/ plotly object, width = width in cm, height = height in cm, ppi = pixel per inch, exceed_size = Boolean). +#' +#' @export create_geneview <- function(data, grouping, plot.type = "line", facet.target = "gene", facet.cols = 2, colors = NULL, ylabel = NULL, ylimits = NULL, gene.label = NULL, plot.method = "static", width = "auto", height = "auto", ppi = 72, scale = 1){ # force evaluation of all arguments # no promises in plot object