R interface to morpheus.js heatmap widget
Switch branches/tags
Nothing to show
Clone or download
Latest commit b07e6dd Jun 5, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
R Convert to JSON Dec 22, 2017
inst/htmlwidgets updated Jun 5, 2018
man updated example Mar 3, 2018
.Rbuildignore doc update May 30, 2017
.gitignore Initial commit May 23, 2017
DESCRIPTION license May 30, 2017
LICENSE Initial commit May 23, 2017
NAMESPACE read gct from clipboard Jun 22, 2017
README.md removed copy Jun 5, 2018
morpheus.Rproj Initial commit May 23, 2017

README.md

Morpheus

Morpheus.js-based heat map widget in R.

Install

devtools::install_github('cmap/morpheus.R')

Example

library(morpheus)
rowAnnotations <- data.frame(annotation1=1:32, annotation2=sample(LETTERS[1:3], nrow(mtcars), replace = TRUE))
morpheus(mtcars, colorScheme=list(scalingMode="fixed", colors=heat.colors(3)), rowAnnotations=rowAnnotations, overrideRowDefaults=FALSE, rows=list(list(field='annotation2', highlightMatchingValues=TRUE, display=list('color'))))

Shiny Example

library(morpheus)
library(shiny)
ui <- fluidPage(
  titlePanel(h3("Example")),
  mainPanel(
    morpheusOutput("heatmap")
  )
)

server <- function(input, output) {
  output$heatmap <- renderMorpheus({
    x <- matrix(rnorm(200), 20)
    y <- data.frame(a=letters[1:10], b=rep(c("g","h"),5), stringsAsFactors = F)
    morpheus(x, columnAnnotations = y)
  })
}

shinyApp(ui, server)