Visualization Package for CanvasXpress in R

Enables creation of visualizations using the CanvasXpress framework in R. CanvasXpress is a standalone JavaScript library for reproducible research with complete tracking of data and end-user modifications stored in a single PNG image that can be played back. See < http://canvasxpress.org> for more information.



title: "CanvasXpress R Library" output: html_document: self_contained: no

CRAN_Status_Badge CRAN_Downloads_Badge CDNJ version Travis-CI Build Status Coverage Status

canvasXpress was developed as the core visualization component for bioinformatics and systems biology analysis at Bristol-Myers Squibb. It supports a large number of visualizations to display scientific and non-scientific data. canvasXpress also includes a simple and unobtrusive user interface to explore complex data sets, a sophisticated and unique mechanism to keep track of all user customization for Reproducible Research purposes, as well as an 'out of the box' broadcasting capability to synchronize selected data points in all canvasXpress plots in a page. Data can be easily sorted, grouped, transposed, transformed or clustered dynamically. The fully customizable mouse events as well as the zooming, panning and drag-and-drop capabilities are features that make this library unique in its class.

canvasXpress can be now simply used within R at the console to generate conventional plots, in R-Studio or seamlessly embedded in Shiny web applications. An full-fledged example of the canvasXpress library including the mouse events, zooming, and broadcasting capabilities is included in this package in the shiny directory. This canvasXpress R library was created with the htmlwidgets package.

canvasXpress is available for installation from CRAN or you can install the latest version of canvasXpress from GitHub as follows:

devtools::install_github('neuhausi/canvasXpress')

Examples

These are included to get you started on basic charting - there are many more examples (including complex and compound visualizations) with R code available in the Examples section of the main website at http://canvasxpress.org

Scatter 3D Plot

y <- read.table("http://www.canvasxpress.org/data/cX-irist-dat.txt", header=TRUE, sep="\t", 
                quote="", row.names=1, fill=TRUE, check.names=FALSE, stringsAsFactors=FALSE)
z <- read.table("http://www.canvasxpress.org/data/cX-irist-var.txt", header=TRUE, sep= "\t", 
                quote="", row.names=1, fill=TRUE, check.names=FALSE, stringsAsFactors=FALSE)
               
canvasXpress(data      = y,
             varAnnot  = z,
             colorBy   = "Species",
             ellipseBy = "Species",
             graphType = "Scatter3D",
             title     = "Iris Data Set",
             xAxis     = list("Sepal.Length"),
             yAxis     = list("Petal.Width"),
             zAxis     = list("Petal.Length"))

Scatter3D

Scatter 2D Matrix Plot

y <- read.table("http://www.canvasxpress.org/data/cX-irist-dat.txt", header=TRUE, sep="\t", 
                quote="", row.names=1, fill=TRUE, check.names=FALSE, stringsAsFactors=FALSE)
z <- read.table("http://www.canvasxpress.org/data/cX-irist-var.txt", header=TRUE, sep= "\t", 
                quote="", row.names=1, fill=TRUE, check.names=FALSE, stringsAsFactors=FALSE)
                   
canvasXpress(data              = y,
             varAnnot          = z,
             graphType         = "Scatter2D",
             scatterPlotMatrix = TRUE,
             colorBy           = "Species",
             showTransition    = TRUE)

Scatter2DMatrix

Boxplot

y <- read.table("http://www.canvasxpress.org/data/cX-iris-dat.txt", header=TRUE, sep="\t", 
                quote="", row.names=1, fill=TRUE, check.names=FALSE, stringsAsFactors=FALSE)
x <- read.table("http://www.canvasxpress.org/data/cX-iris-smp.txt", header=TRUE, sep= "\t", 
                quote="", row.names=1, fill=TRUE, check.names=FALSE, stringsAsFactors=FALSE)
                
canvasXpress(data              = y,
             smpAnnot          = x,
             graphType         = "Boxplot",
             graphOrientation  = "vertical",
             title             = "Iris flower data set",
             smpTitle          = "Species",
             smpLabelFontStyle = "italic",
             smpLabelRotate    = 90,
             xAxis2Show        = FALSE,
             afterRender       = list(list("groupSamples", list("Species"))))

Boxplot

Heatmap (Multi-dimensional)

y  <- read.table("http://www.canvasxpress.org/data/cX-multidimensionalheatmap-dat.txt", header=TRUE, sep="\t", 
                 quote="", row.names=1, fill=TRUE, check.names=FALSE, stringsAsFactors=FALSE)
y2 <- read.table("http://www.canvasxpress.org/data/cX-multidimensionalheatmap-dat2.txt", header=TRUE, sep="\t", 
                 quote="", row.names=1, fill=TRUE, check.names=FALSE, stringsAsFactors=FALSE)
y3 <- read.table("http://www.canvasxpress.org/data/cX-multidimensionalheatmap-dat3.txt", header=TRUE, sep="\t", 
                 quote="", row.names=1, fill=TRUE, check.names=FALSE, stringsAsFactors=FALSE)
y4 <- read.table("http://www.canvasxpress.org/data/cX-multidimensionalheatmap-dat4.txt", header=TRUE, sep="\t", 
                 quote="", row.names=1, fill=TRUE, check.names=FALSE, stringsAsFactors=FALSE)
x  <- read.table("http://www.canvasxpress.org/data/cX-multidimensionalheatmap-smp.txt", header=TRUE, sep= "\t", 
                 quote="", row.names=1, fill=TRUE, check.names=FALSE, stringsAsFactors=FALSE)
z  <- read.table("http://www.canvasxpress.org/data/cX-multidimensionalheatmap-var.txt", header=TRUE, sep= "\t", 
                 quote="", row.names=1, fill=TRUE, check.names=FALSE, stringsAsFactors=FALSE)
 
canvasXpress(data          = list(y = y, data2 = y2, data3 = y3, data4 = y4),
             smpAnnot      = x,
             varAnnot      = z,
             graphType     = "Heatmap",
             guides        = TRUE,
             outlineBy     = "Outline",
             outlineByData = "data2",
             shapeBy       = "Shape",
             shapeByData   = "data3",
             sizeBy        = "Size",
             sizeByData    = "data4")

Heatmap

Four way Venn Diagram

canvasXpress(vennData   = data.frame(AC=456, A=340, ABC=552, ABCD=148, BC=915, ACD=298, BCD=613, 
                            B=562, CD=143, ABD=578, C=620, D=592, AB=639, BD=354, AD=257),
             graphType  = "Venn",
             vennLegend = list(A="List 1", D="List 4", C="List 3", B="List 2"),
             vennGroups = 4)

Venn

More Examples and Resources

In addition to the built-in package documentation there are vignettes with more information on getting started and additional examples:

#List all package vignettes
vignette(package = "canvasXpress")
 
#View a specific vignette
vignette("getting_started", package = "canvasXpress")
vignette("additional_examples", package = "canvasXpress")

For the use of canvasXpress plots in shiny there are interactive examples available through the package function cxShinyExample

#List example names
cxShinyExample()
 
#Run an interactive shiny example
cxShinyExample(example = "example1")

There is also a wealth of additional information including full API documentation and extensive R and JavaScript examples at http://www.canvasxpress.org.

News

R Package NEWS

This file details changes to the canvasXpress R package only - for detailed information on changes to the stand-alone JavaScript CanvasXpress library see the main website.


v1.23.9

  • Updated CanvasXpress JavaScript and CSS libraries to v23.9
  • Bugfixes for changes in precalculated SD in bar charts

v1.23.6

  • Updated CanvasXpress JavaScript and CSS libraries to v23.6
  • Resolved issue with DT 0.5 compatibility
  • Support for precalculated SD in bar charts added to R package

v1.23.3

  • Updated CanvasXpress JavaScript and CSS libraries to v23.3

v1.22.9

  • Updated CanvasXpress JavaScript and CSS libraries to v22.9

v1.22.6

  • Updated CanvasXpress JavaScript and CSS libraries to v22.6
  • Tested updated and expanded to match new CX functionality

v1.21.6

  • Updated CanvasXpress JavaScript and CSS libraries to v21.6

v1.20.5

  • Updated CanvasXpress JavaScript and CSS libraries to v20.5
  • Tests updated and expanded to match new CX functionality

v1.20.1

  • Updated CanvasXpress JavaScript and CSS libraries to v20.1

v1.19.0

  • Updated CanvasXpress JavaScript and CSS libraries to v19.0

v1.18.8

  • Updated CanvasXpress JavaScript and CSS libraries to v18.8

v1.18.5

  • Updated CanvasXpress JavaScript and CSS libraries to v18.5

v1.18.3

  • Updated CanvasXpress JavaScript and CSS libraries to v18.3

v1.18.2

  • Bugfix for destruction of htmlwidget

v1.18.1

  • Updated CanvasXpress JavaScript and CSS libraries to v18.1
  • Added destroy functionality for shiny applications the require removal of canvasXpress charts

v1.17.9

  • Updated CanvasXpress JavaScript and CSS libraries to v17.9

v1.17.5

  • Updated CanvasXpress JavaScript and CSS libraries to v17.5

v1.17.4 - Major Release

  • Updated CanvasXpress JavaScript and CSS libraries to v17.4
  • Functionality improved and streamlined to cover the full canvasXpress library functionality in a backwards-compatible way. (Genome plots will be supported at a future date)
  • Full automated test suite matching the examples from the main website
  • Updated documentation and examples
  • Version updated to 1 from 0 - the second and third parts of the version number still follow the canvasXpress JS library version so that it is clear to users which version of the JS library is being used.

v0.17.2

  • Updated CanvasXpress JavaScript and CSS libraries to v17.2

v0.16.7

  • Updated CanvasXpress JavaScript and CSS libraries to v16.7

v0.16.6

  • Updated CanvasXpress JavaScript and CSS libraries to v16.6

v0.16.2

  • Updated CanvasXpress JavaScript and CSS libraries to v16.2
  • Added dendrogram functionality compatibility (Newick tree format)
  • Added precalculated boxplot data functionality (5-number summary + outliers)
  • Updated documentation for the above additions
  • Added additional vignette with examples and tips on using CanvasXpress with R

v0.15.5

  • Updated CanvasXpress JavaScript and CSS libraries to v15.5

v0.15.2

  • Updated CanvasXpress JavaScript and CSS libraries to v15.2

v0.14.7

  • Updated CanvasXpress JavaScript and CSS libraries to v14.7

v0.14.3

  • Updated CanvasXpress JavaScript and CSS libraries to v14.3

v0.14.0

  • Updated CanvasXpress JavasScript and CSS libraries to v14.0
  • Updated TravisCI parameters

v0.13.8

  • Updated CanvasXpress JavasScript and CSS libraries to v13.8
  • Added the CDNJ tag to the README file

v0.13.7

  • Updated CanvasXpress JavasScript and CSS libraries to v13.7
  • Package Version Updated - will generally follow the JS library version for clarity

v0.13.5

  • Updated package in readiness for CRAN release based on CanvasXpress v13.5
    • Testing Added
    • Documentation Added
    • Rearrangement of files
    • CRAN cleanup and all checks passing with no notes/warnings/errors
    • Shiny examples streamlined and put into cxShinyExamples function

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("canvasXpress")

1.24.8 by Connie Brett, 3 months ago


https://github.com/neuhausi/canvasXpress.git


Report a bug at https://github.com/neuhausi/canvasXpress/issues


Browse source code at https://github.com/cran/canvasXpress


Authors: Isaac Neuhaus [aut] , Connie Brett [aut, cre]


Documentation:   PDF Manual  


GPL-3 license


Imports htmlwidgets, httr

Suggests shiny, knitr, rmarkdown, dplyr, testthat, webshot, png, limma, grDevices, covr, magrittr


See at CRAN