diff --git a/DESCRIPTION b/DESCRIPTION index f7120edb..38b3d75c 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -2,7 +2,7 @@ Package: volcano3D Type: Package Title: Interactive Plotting of Three-Way Differential Expression Analysis -Version: 1.1.0 +Version: 1.2.0 Authors@R: c(person("Katriona", "Goldmann", role = c("aut", "cre"), email = "k.goldmann@qmul.ac.uk", comment = c(ORCID = "0000-0002-9073-6323")), diff --git a/NEWS.md b/NEWS.md index 711ced9d..8e84b2b8 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,10 @@ News ===== +# volcano3D 1.2.0 +###### 25/02/2021 +* Add argument for scene camera in volcano3D + # volcano3D 1.1.0 ###### 04/02/2021 * allow colour coding to be based on pvalue or adjusted pvalue according to cutoff_criteria diff --git a/R/volcano3D.R b/R/volcano3D.R index cd62873c..2a9c5695 100644 --- a/R/volcano3D.R +++ b/R/volcano3D.R @@ -54,6 +54,12 @@ #' @param xy_aspectratio The aspect ratio for the xy axis compared to z #' (default = 1). Decreasing this makes the grid wider in the plot window. #' @param plot_height The plot height in px. Default=700. +#' @param camera_eye The (x,y,z) components of the 'eye' camera vector. This +#' vector determines the view point about the origin of this scene. +#' @param source a character string of length 1. Match the value of this string +#' with the source argument in \code{\link[plotly]{event_data}} to retrieve the +#' event data corresponding to a specific plot (shiny apps can have multiple +#' plots). #' @param ... Optional parameters to pass to \code{\link{polar_grid}}. #' @return Returns a cylindrical 3D plotly plot featuring variables on a #' tri-axis radial graph with the -log10(multi-group test p-value) on the @@ -115,6 +121,8 @@ volcano3D <- function(polar, z_aspectratio = 1, xy_aspectratio = 1, plot_height = 700, + camera_eye = list(x=1.25, y=1.25, z=1.25), + source="volcano3D", ...){ if(! class(polar) %in% c("polar")) stop("polar must be a polar object") @@ -286,7 +294,7 @@ volcano3D <- function(polar, colors = switch(colour_scale, "discrete" = colours, "continuous" = NULL), - type = "scatter3d", mode = "markers") %>% + type = "scatter3d", mode = "markers", source = source) %>% # Add the cylindrical grid add_trace(x = polar_grid$x, y = polar_grid$y, z = polar_grid$z, @@ -335,14 +343,16 @@ volcano3D <- function(polar, plot_bgcolor = 'rgba(0, 0, 0, 0)', scene = list( - aspectratio = list(x = xy_aspectratio, - y = xy_aspectratio, + camera = list(eye = camera_eye), + aspectratio = list(x = xy_aspectratio, + y = xy_aspectratio, z = z_aspectratio), dragmode = "turntable", xaxis = axis_settings_xy, yaxis = axis_settings_xy, zaxis = axis_settings, - annotations = annot), + annotations = annot + ), xaxis = list(title = "x"), yaxis = list(title = "y") ) diff --git a/docs/404.html b/docs/404.html index 3db21332..af6876eb 100644 --- a/docs/404.html +++ b/docs/404.html @@ -89,7 +89,7 @@ volcano3D - 1.1.0 + 1.2.0 diff --git a/docs/ReadMe.html b/docs/ReadMe.html index 5b33b748..3164326e 100644 --- a/docs/ReadMe.html +++ b/docs/ReadMe.html @@ -89,7 +89,7 @@ volcano3D - 1.1.0 + 1.2.0 diff --git a/docs/articles/Extended_Vignette.html b/docs/articles/Extended_Vignette.html index cf2db5a0..93cfc059 100644 --- a/docs/articles/Extended_Vignette.html +++ b/docs/articles/Extended_Vignette.html @@ -44,7 +44,7 @@ volcano3D - 1.1.0 + 1.2.0 @@ -1255,8 +1255,8 @@

radial_plotly(polar = syn_polar, label_rows = c("SLAMF6", "PARP16", "ITM2C"), hover=hovertext) -
-

By hovering over certain points you can also determine genes for future interrogation.

+
+

By hovering over certain points you can also determine genes for future interrogation.

Similarly we can create a static ggplot image using radial_ggplot:

 radial_ggplot(polar = syn_polar,
@@ -1308,8 +1308,8 @@ 

plot_method='plotly') plotly::subplot(plot1, plot2, plot3, titleY=TRUE, margin=0.05)

-
-

Or using ggplot

+
+

Or using ggplot

 plot1 <- boxplot_trio(syn_polar,
                       value = "FAM92B",
@@ -1353,8 +1353,8 @@ 

plot_height = 800) p

-
-

We can alter the colour code using the colours parameter. These are assigned in order group1+, group1+group2+, group2+, group2+group3+, group3+, group1+group3+.

+
+

We can alter the colour code using the colours parameter. These are assigned in order group1+, group1+group2+, group2+, group2+group3+, group3+, group1+group3+.

 p <- volcano3D(syn_polar,
                label_rows = c("SLAMF6", "PARP16", "ITM2C"),
@@ -1367,8 +1367,8 @@ 

plot_height=800) p

-
- +
+
@@ -1413,8 +1413,8 @@

p <- show_grid(four_grid) p$cylindrical

-
-

and pass it into the plotting functions:

+
+

and pass it into the plotting functions:

 volcano3D(syn_polar,
           grid = four_grid,
@@ -1422,8 +1422,8 @@ 

label_size = 10, xy_aspectratio = 1, z_aspectratio = 0.9)

-
-

For example to extend the radial axis and increase the number of spokes in 2D we can apply:

+
+

For example to extend the radial axis and increase the number of spokes in 2D we can apply:

 new_grid = polar_grid(r_vector=NULL,
                       z_vector=-log10(syn_polar@pvalues$LRT_pvalue),
@@ -1440,8 +1440,8 @@ 

label_rows = c("SLAMF6", "PARP16", "ITM2C")) p %>% config(editable = TRUE)

-
- +
+

@@ -1506,8 +1506,8 @@

 radial_plotly(polar = syn_mod_polar,
               label_rows = c("M156.0", "M37.2"))
-
-

Or a ggplot static image using radial_ggplot:

+
+

Or a ggplot static image using radial_ggplot:

 radial_ggplot(polar = syn_mod_polar,
               label_rows = c("M156.0", "M37.2"),
diff --git a/docs/articles/Extended_Vignette_files/figure-html/unnamed-chunk-15-1.png b/docs/articles/Extended_Vignette_files/figure-html/unnamed-chunk-15-1.png
index f5d50b20..2fa5d633 100644
Binary files a/docs/articles/Extended_Vignette_files/figure-html/unnamed-chunk-15-1.png and b/docs/articles/Extended_Vignette_files/figure-html/unnamed-chunk-15-1.png differ
diff --git a/docs/articles/Extended_Vignette_files/figure-html/unnamed-chunk-16-1.png b/docs/articles/Extended_Vignette_files/figure-html/unnamed-chunk-16-1.png
index 2e2ad610..840340a8 100644
Binary files a/docs/articles/Extended_Vignette_files/figure-html/unnamed-chunk-16-1.png and b/docs/articles/Extended_Vignette_files/figure-html/unnamed-chunk-16-1.png differ
diff --git a/docs/articles/Extended_Vignette_files/figure-html/unnamed-chunk-17-1.png b/docs/articles/Extended_Vignette_files/figure-html/unnamed-chunk-17-1.png
index a5dd647d..5de13eaa 100644
Binary files a/docs/articles/Extended_Vignette_files/figure-html/unnamed-chunk-17-1.png and b/docs/articles/Extended_Vignette_files/figure-html/unnamed-chunk-17-1.png differ
diff --git a/docs/articles/Extended_Vignette_files/figure-html/unnamed-chunk-18-1.png b/docs/articles/Extended_Vignette_files/figure-html/unnamed-chunk-18-1.png
index c0ca682e..2b03fcd2 100644
Binary files a/docs/articles/Extended_Vignette_files/figure-html/unnamed-chunk-18-1.png and b/docs/articles/Extended_Vignette_files/figure-html/unnamed-chunk-18-1.png differ
diff --git a/docs/articles/Vignette.html b/docs/articles/Vignette.html
index 5a025781..6e15838e 100644
--- a/docs/articles/Vignette.html
+++ b/docs/articles/Vignette.html
@@ -44,7 +44,7 @@
       
       
         volcano3D
-        1.1.0
+        1.2.0
       
     
@@ -142,7 +142,7 @@

  • setting up the input pvalues data frame
  • using the volcano3D package to create and deploy a shiny app
  • -

    Lifecycle: Stable License: GPL v2 CRAN status Downloads 2021-03-04 Build Status GitHub issues build

    +

    Lifecycle: Stable License: GPL v2 CRAN status Downloads 2021-03-25 Build Status GitHub issues build

    Getting Started

    diff --git a/docs/articles/Vignette_files/figure-html/unnamed-chunk-13-1.png b/docs/articles/Vignette_files/figure-html/unnamed-chunk-13-1.png index 2b89e438..9e3eeca9 100644 Binary files a/docs/articles/Vignette_files/figure-html/unnamed-chunk-13-1.png and b/docs/articles/Vignette_files/figure-html/unnamed-chunk-13-1.png differ diff --git a/docs/articles/index.html b/docs/articles/index.html index 447a694d..b6336e25 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -89,7 +89,7 @@ volcano3D - 1.1.0 + 1.2.0
    diff --git a/docs/articles/pvalues_generator.html b/docs/articles/pvalues_generator.html index d08c1c7c..4485db32 100644 --- a/docs/articles/pvalues_generator.html +++ b/docs/articles/pvalues_generator.html @@ -44,7 +44,7 @@ volcano3D - 1.1.0 + 1.2.0

    diff --git a/docs/articles/shiny_builder.html b/docs/articles/shiny_builder.html index 47658140..ec89cb88 100644 --- a/docs/articles/shiny_builder.html +++ b/docs/articles/shiny_builder.html @@ -44,7 +44,7 @@ volcano3D - 1.1.0 + 1.2.0 diff --git a/docs/articles/shiny_builder_files/figure-html/unnamed-chunk-7-1.png b/docs/articles/shiny_builder_files/figure-html/unnamed-chunk-7-1.png index 414bb783..d24f2a27 100644 Binary files a/docs/articles/shiny_builder_files/figure-html/unnamed-chunk-7-1.png and b/docs/articles/shiny_builder_files/figure-html/unnamed-chunk-7-1.png differ diff --git a/docs/authors.html b/docs/authors.html index a42a6318..df46f368 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -89,7 +89,7 @@ volcano3D - 1.1.0 + 1.2.0 diff --git a/docs/index.html b/docs/index.html index 2883b622..ea75ae01 100644 --- a/docs/index.html +++ b/docs/index.html @@ -46,7 +46,7 @@ volcano3D - 1.1.0 + 1.2.0 diff --git a/docs/news/index.html b/docs/news/index.html index a77e5dcb..b56fc98c 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -89,7 +89,7 @@ volcano3D - 1.1.0 + 1.2.0 @@ -163,6 +163,17 @@

    Changelog

    Source: NEWS.md +
    +

    +volcano3D 1.2.0 Unreleased +

    +
    +
    25/02/2021
    +
      +
    • Add argument for scene camera in volcano3D
    • +
    +
    +

    volcano3D 1.1.0 2021-02-22 diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 4042642f..c216f36d 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -1,4 +1,4 @@ -pandoc: '2.11' +pandoc: 2.11.4 pkgdown: 1.6.1 pkgdown_sha: ~ articles: @@ -6,5 +6,5 @@ articles: Vignette: Vignette.html pvalues_generator: pvalues_generator.html shiny_builder: shiny_builder.html -last_built: 2021-03-04T14:40Z +last_built: 2021-03-25T13:04Z diff --git a/docs/reference/boxplot_trio.html b/docs/reference/boxplot_trio.html index de4be538..813b52c6 100644 --- a/docs/reference/boxplot_trio.html +++ b/docs/reference/boxplot_trio.html @@ -91,7 +91,7 @@ volcano3D - 1.1.0 + 1.2.0

    diff --git a/docs/reference/grid-class.html b/docs/reference/grid-class.html index df442f91..1aca94cd 100644 --- a/docs/reference/grid-class.html +++ b/docs/reference/grid-class.html @@ -90,7 +90,7 @@ volcano3D - 1.1.0 + 1.2.0 diff --git a/docs/reference/index.html b/docs/reference/index.html index 346236af..3447e74f 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -89,7 +89,7 @@ volcano3D - 1.1.0 + 1.2.0 diff --git a/docs/reference/polar-class.html b/docs/reference/polar-class.html index 260daa79..33170ca3 100644 --- a/docs/reference/polar-class.html +++ b/docs/reference/polar-class.html @@ -93,7 +93,7 @@ volcano3D - 1.1.0 + 1.2.0 diff --git a/docs/reference/polar_coords.html b/docs/reference/polar_coords.html index 0794c95a..81ce583b 100644 --- a/docs/reference/polar_coords.html +++ b/docs/reference/polar_coords.html @@ -92,7 +92,7 @@ volcano3D - 1.1.0 + 1.2.0 diff --git a/docs/reference/polar_grid.html b/docs/reference/polar_grid.html index c75af431..4c41a7f1 100644 --- a/docs/reference/polar_grid.html +++ b/docs/reference/polar_grid.html @@ -91,7 +91,7 @@ volcano3D - 1.1.0 + 1.2.0 diff --git a/docs/reference/radial_ggplot.html b/docs/reference/radial_ggplot.html index 32e40429..7b9c5428 100644 --- a/docs/reference/radial_ggplot.html +++ b/docs/reference/radial_ggplot.html @@ -90,7 +90,7 @@ volcano3D - 1.1.0 + 1.2.0 diff --git a/docs/reference/radial_plotly.html b/docs/reference/radial_plotly.html index 48893a24..72db730a 100644 --- a/docs/reference/radial_plotly.html +++ b/docs/reference/radial_plotly.html @@ -91,7 +91,7 @@ volcano3D - 1.1.0 + 1.2.0 diff --git a/docs/reference/show_grid.html b/docs/reference/show_grid.html index 1ddc2745..6c1f0918 100644 --- a/docs/reference/show_grid.html +++ b/docs/reference/show_grid.html @@ -91,7 +91,7 @@ volcano3D - 1.1.0 + 1.2.0 diff --git a/docs/reference/significance_subset.html b/docs/reference/significance_subset.html index 864edfc9..9c2710f6 100644 --- a/docs/reference/significance_subset.html +++ b/docs/reference/significance_subset.html @@ -90,7 +90,7 @@ volcano3D - 1.1.0 + 1.2.0 diff --git a/docs/reference/syn_example_meta.html b/docs/reference/syn_example_meta.html index 11c5b3c8..122d998c 100644 --- a/docs/reference/syn_example_meta.html +++ b/docs/reference/syn_example_meta.html @@ -91,7 +91,7 @@ volcano3D - 1.1.0 + 1.2.0 diff --git a/docs/reference/syn_example_p.html b/docs/reference/syn_example_p.html index 1fc3c196..dd4ddb0b 100644 --- a/docs/reference/syn_example_p.html +++ b/docs/reference/syn_example_p.html @@ -91,7 +91,7 @@ volcano3D - 1.1.0 + 1.2.0 diff --git a/docs/reference/syn_example_rld.html b/docs/reference/syn_example_rld.html index cb80006c..a90caa75 100644 --- a/docs/reference/syn_example_rld.html +++ b/docs/reference/syn_example_rld.html @@ -91,7 +91,7 @@ volcano3D - 1.1.0 + 1.2.0 diff --git a/docs/reference/volcano3D.html b/docs/reference/volcano3D.html index fb989ac2..c2fe81f8 100644 --- a/docs/reference/volcano3D.html +++ b/docs/reference/volcano3D.html @@ -90,7 +90,7 @@ volcano3D - 1.1.0 + 1.2.0 @@ -194,6 +194,8 @@

    Three-Dimensional Volcano Plot

    z_aspectratio = 1, xy_aspectratio = 1, plot_height = 700, + camera_eye = list(x = 1.25, y = 1.25, z = 1.25), + source = "volcano3D", ... ) @@ -325,6 +327,18 @@

    Arg plot_height

    The plot height in px. Default=700.

    + + camera_eye +

    The (x,y,z) components of the 'eye' camera vector. This +vector determines the view point about the origin of this scene.

    + + + source +

    a character string of length 1. Match the value of this string +with the source argument in event_data to retrieve the +event data corresponding to a specific plot (shiny apps can have multiple +plots).

    + ...

    Optional parameters to pass to polar_grid.

    diff --git a/docs/reference/volcano_plot.html b/docs/reference/volcano_plot.html index aced5dfc..981889c5 100644 --- a/docs/reference/volcano_plot.html +++ b/docs/reference/volcano_plot.html @@ -90,7 +90,7 @@ volcano3D - 1.1.0 + 1.2.0 diff --git a/docs/reference/volcano_trio.html b/docs/reference/volcano_trio.html index 70663358..7793cacb 100644 --- a/docs/reference/volcano_trio.html +++ b/docs/reference/volcano_trio.html @@ -91,7 +91,7 @@ volcano3D - 1.1.0 + 1.2.0 diff --git a/man/volcano3D.Rd b/man/volcano3D.Rd index 5ca12e34..eb7f0bd1 100644 --- a/man/volcano3D.Rd +++ b/man/volcano3D.Rd @@ -29,6 +29,8 @@ volcano3D( z_aspectratio = 1, xy_aspectratio = 1, plot_height = 700, + camera_eye = list(x = 1.25, y = 1.25, z = 1.25), + source = "volcano3D", ... ) } @@ -110,6 +112,14 @@ The stats for all multi-group tests. \item{plot_height}{The plot height in px. Default=700.} +\item{camera_eye}{The (x,y,z) components of the 'eye' camera vector. This +vector determines the view point about the origin of this scene.} + +\item{source}{a character string of length 1. Match the value of this string +with the source argument in \code{\link[plotly]{event_data}} to retrieve the +event data corresponding to a specific plot (shiny apps can have multiple +plots).} + \item{...}{Optional parameters to pass to \code{\link{polar_grid}}.} } \value{