Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save philippmuench/46edf41b389da1882d5fa9338648ec51 to your computer and use it in GitHub Desktop.
Save philippmuench/46edf41b389da1882d5fa9338648ec51 to your computer and use it in GitHub Desktop.
flexdashboard hd5
---
title: "GenomeNet Viewer"
output:
flexdashboard::flex_dashboard:
orientation: rows
social: menu
theme: united #cerulean
source_code: embed
runtime: shiny
---
```{r setup, include=FALSE}
library(knitr)
library(d3heatmap)
library(flexdashboard)
url <- "http://datasets.flowingdata.com/ppg2008.csv"
nba_players <- read.csv(url, row.names = 1)
```
```{r}
library(keras)
library(deepG)
library(ggplot2)
library(plotly)
```
```{r}
rv <- reactiveValues(data = NULL)
observe( {
req(input$file1)
inFile <- input$file1
data <- as.data.frame(deepG::readRowsFromH5(h5_path = inFile$datapath, complete = TRUE))
colnames(data) <- c("class1", "class2")
rv$data <- data
})
```
# Column {.sidebar}
```{r, echo = FALSE}
fileInput("file1", "Choose h5 File",
accept = c("h5", "hdf5"))
```
```{r, echo = FALSE}
fileInput("file2", "Choose gff File",
accept = c("gff", "gff3"))
```
# Data
## Test
### Table
```{r}
DT::renderDataTable({
req(rv$data)
rv$data
})
```
### Figure
```{r}
renderPlotly({
req(rv$data)
p <- ggplot(rv$data, aes(x = 1:nrow(rv$data), y =class1)) + geom_line()
ggplotly()
})
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment