Skip to content
Snippets Groups Projects
Commit f099f06d authored by Dominik Brilhaus's avatar Dominik Brilhaus
Browse files

convert shiny to single-step cwl

parent 0f5de5cb
No related branches found
No related tags found
1 merge request!13Cwl shiny
Pipeline #9364 passed
This diff is collapsed.
File deleted
#!/usr/bin/env cwl-runner
cwlVersion: v1.2
class: Workflow
inputs:
in_kallisto_df: File
exp_factor: string
steps:
run_shiny:
run: ../../workflows/shiny/workflow.cwl
in:
in_kallisto_df: in_kallisto_df
exp_factor: exp_factor
out: []
outputs: []
in_kallisto_df: in_kallisto_df:
class: File class: File
path: ../sleuth/out/kallisto_df.csv path: ../../runs/sleuth/results/kallisto_df.csv
\ No newline at end of file exp_factor: "Factor..Photosynthesis.mode."
\ No newline at end of file
#!/usr/bin/env Rscript
args <- commandArgs(trailingOnly = T)
in_kallisto_df <- args[1]
expression_data <- read.csv(file = in_kallisto_df)
available_genes <- unique(expression_data$target_id)
save(expression_data, available_genes, file = "01-shiny-prep.RData")
File deleted
in_kallisto_df:
class: File
path: ../../runs/sleuth/results/kallisto_df.csv
\ No newline at end of file
#!/usr/bin/env Rscript #!/usr/bin/env Rscript
args <- commandArgs(trailingOnly = T)
shiny_prep_data <- args[1]
# Load libraries # Load libraries
library(shiny) library(shiny)
library(RColorBrewer) library(RColorBrewer)
library(ggplot2)
# CLI arguments
args <- commandArgs(trailingOnly = T)
in_kallisto_df <- args[1]
exp_factor <- args[2]
# Load data # Load data
load(file = shiny_prep_data) expression_data <- read.csv(file = in_kallisto_df)
available_genes <- unique(expression_data$target_id)
expression_data$condition = expression_data[,exp_factor]
# Design app # Design app
......
...@@ -10,22 +10,22 @@ class: CommandLineTool ...@@ -10,22 +10,22 @@ class: CommandLineTool
requirements: requirements:
- class: InitialWorkDirRequirement - class: InitialWorkDirRequirement
listing: listing:
- entryname: 01-shiny-prep.R - entryname: shiny-app.R
entry: entry:
$include: 01-shiny-prep.R $include: shiny-app.R
- class: NetworkAccess - class: NetworkAccess
networkAccess: true networkAccess: true
baseCommand: [Rscript, 01-shiny-prep.R] baseCommand: [Rscript, shiny-app.R]
inputs: inputs:
in_kallisto_df: in_kallisto_df:
type: File type: File
inputBinding: inputBinding:
position: 1 position: 1
exp_factor:
type: string
inputBinding:
position: 2
outputs: outputs: []
outdir: \ No newline at end of file
type: File
outputBinding:
glob: "01-shiny-prep.RData"
\ No newline at end of file
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