Skip to content
Snippets Groups Projects
Commit 799e19c5 authored by omaus's avatar omaus
Browse files

Add ARC

parent 0034b030
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env cwl-runner
cwlVersion: v1.2
class: CommandLineTool
hints:
DockerRequirement:
dockerPull: rocker/tidyverse:4.1
requirements:
- class: NetworkAccess
networkAccess: true
- class: InlineJavascriptRequirement
- class: InitialWorkDirRequirement
listing:
- entry: "$({class: 'Directory', listing: []})"
entryname: "./lib"
writable: true
baseCommand: Rscript
inputs:
rScript:
type: File
inputBinding:
position: 1
kallistoResults:
type: File
inputBinding:
position: 2
outputs:
outFile:
type: File
outputBinding:
glob: "*05_shinyPrep.RData"
\ No newline at end of file
rScript:
class: File
path: ./05_plot_shinyPrep.R
kallistoResults:
class: File
path: ./../../runs/run1/03_kallisto_df.csv
\ No newline at end of file
---
title: "Plot RNASeq data mapped against Talinum genome"
output: html_document
runtime: shiny
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
```{r load_data, include=FALSE}
# Load data
ARC_root="~/Hackathon_ARCexample_rnaseq/"
load(file = paste0(ARC_root, 'runs/05_shinyPrep.RData'))
```
```{r plot_setup, message=TRUE, warning=TRUE, include=FALSE}
# Setup plot environment
required.packages <- c('knitr', 'kableExtra', ## RMarkdown,
"shiny", "tidyverse", ## data loading and shaping
"RColorBrewer", "shiny" ## plotting
)
for(package in required.packages)
{
print(package)
## Check if package is installed. If not, install
if(!package %in% row.names(installed.packages()))
{install.packages(package, repos ="https://cran.uni-muenster.de/")}
## Load package
library(package, character.only = T)
}
```
```{r, eval=F, echo=FALSE}
# Non-interactive test
current_selection <- sample(expression_data$target_id, 10)
plot_set <- subset(expression_data, target_id %in% current_selection)
ggplot(plot_set, aes(x = Group, y = tpm, group = Group)) +
stat_summary(fun = 'mean', geom = 'bar') +
geom_point(size = 0.5) +
facet_wrap(~ target_id , scales = "free") +
theme_minimal()
```
# Let it shine
```{r shiny_part, echo=FALSE}
sidebarLayout(
sidebarPanel(
selectizeInput(multiple = T, "target", label = "Select Gene by target id",
choices = available_genes,
selected = sample(available_genes, size = 1),
options = list(delimiter = ' ',
create = I("function(input, callback){return {value: input, text: input};}"))
),
helpText("You can copy/paste target ids from excel")
),
mainPanel(
renderPlot({
plot_set <- subset(expression_data, target_id %in% input$target)
## Facetted by gene only
ggplot(plot_set, aes(x = Group, y = tpm)) +
stat_summary(fun = 'mean', geom = 'bar') +
geom_point(size = 0.5) +
facet_wrap( ~ target_id, scales = "free") +
theme_minimal() +
theme(aspect.ratio = 1)
}),
)
)
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment