From ec55b2ebf7ffcfebadb08b15dd400bf7c2ae59e4 Mon Sep 17 00:00:00 2001
From: Dominik Brilhaus <brilhaus@nfdi4plants.org>
Date: Tue, 18 Mar 2025 17:19:32 +0100
Subject: [PATCH 1/3] try fix docker for shiny

---
 workflows/shiny/Dockerfile   | 13 +++++++++++++
 workflows/shiny/shiny-app.R  |  4 ++--
 workflows/shiny/workflow.cwl |  5 +++--
 3 files changed, 18 insertions(+), 4 deletions(-)
 create mode 100644 workflows/shiny/Dockerfile

diff --git a/workflows/shiny/Dockerfile b/workflows/shiny/Dockerfile
new file mode 100644
index 0000000..01b85ff
--- /dev/null
+++ b/workflows/shiny/Dockerfile
@@ -0,0 +1,13 @@
+# Use an official R base image
+FROM rocker/shiny:4.4
+
+# Install R packages
+RUN R -q -e 'install.packages("ggplot2")'
+
+EXPOSE 3838
+
+# Set the working directory to /app
+WORKDIR /app
+
+# Default command to run when the container starts
+CMD ["R"]
diff --git a/workflows/shiny/shiny-app.R b/workflows/shiny/shiny-app.R
index 4c02024..4d4275f 100644
--- a/workflows/shiny/shiny-app.R
+++ b/workflows/shiny/shiny-app.R
@@ -3,7 +3,6 @@
 # Load libraries
 
 library(shiny)
-library(RColorBrewer)
 library(ggplot2)
 
 # CLI arguments
@@ -65,4 +64,5 @@ server <- function(input, output, session) {
 
 # Launch app
 
-shinyApp(ui, server)
+sa <- shinyApp(ui, server)
+runApp(sa, port = 3838)
diff --git a/workflows/shiny/workflow.cwl b/workflows/shiny/workflow.cwl
index 2e80423..00d0f26 100644
--- a/workflows/shiny/workflow.cwl
+++ b/workflows/shiny/workflow.cwl
@@ -4,8 +4,9 @@ cwlVersion: v1.2
 class: CommandLineTool
 
 # hints:
-#   DockerRequirement: 
-#     dockerPull: 
+#   DockerRequirement:
+#     dockerImageId: "shiny"
+#     dockerFile: {$include: "Dockerfile"}
 
 requirements:
   - class: InitialWorkDirRequirement
-- 
GitLab


From bd465bfd4304930dc5734b5df5cc2bd84f28db47 Mon Sep 17 00:00:00 2001
From: Dominik Brilhaus <brilhaus@nfdi4plants.org>
Date: Tue, 18 Mar 2025 17:19:43 +0100
Subject: [PATCH 2/3] rm dockerfile sleuth

---
 workflows/sleuth/Dockerfile   | 29 -----------------------------
 workflows/sleuth/workflow.cwl |  3 ---
 2 files changed, 32 deletions(-)
 delete mode 100644 workflows/sleuth/Dockerfile

diff --git a/workflows/sleuth/Dockerfile b/workflows/sleuth/Dockerfile
deleted file mode 100644
index 39a6609..0000000
--- a/workflows/sleuth/Dockerfile
+++ /dev/null
@@ -1,29 +0,0 @@
-# Use an official R base image
-FROM rocker/r-ver:4.1.3
-
-# Install system dependencies for R packages and other utilities
-RUN apt-get update && apt-get install -y \
-    libcurl4-openssl-dev \
-    libssl-dev \
-    libxml2-dev \
-    git \
-    build-essential \
-    && rm -rf /var/lib/apt/lists/*
-
-# Install BiocManager
-RUN R -e "install.packages('BiocManager')"
-
-# Install Bioconductor version 3.14
-RUN R -e "BiocManager::install(version = '3.11')"
-
-# Install sleuth from Bioconductor
-RUN R -e "BiocManager::install('sleuth')"
-
-# Install other necessary CRAN packages
-RUN R -e "install.packages('jsonlite', repos='https://cran.r-project.org')"
-
-# Set the working directory to /app
-WORKDIR /app
-
-# Default command to run when the container starts
-CMD ["R"]
diff --git a/workflows/sleuth/workflow.cwl b/workflows/sleuth/workflow.cwl
index 8163e27..4a8add0 100644
--- a/workflows/sleuth/workflow.cwl
+++ b/workflows/sleuth/workflow.cwl
@@ -4,9 +4,6 @@ cwlVersion: v1.2
 class: CommandLineTool
 
 hints:
-  # DockerRequirement:
-  #   dockerImageId: "sleuth"
-  #   dockerFile: {$include: "Dockerfile"}
   DockerRequirement: 
     dockerPull: quay.io/biocontainers/mulled-v2-fdd016122f200fdc6dc30f6ea2fd0000e8067dff:f9531f6ac1f44332eff70b5912d7d5f3ebe8df38-0
 
-- 
GitLab


From 1a41155e6f7fab279f2ef4c7ebeeef6887e76bdd Mon Sep 17 00:00:00 2001
From: Dominik Brilhaus <brilhaus@nfdi4plants.org>
Date: Tue, 18 Mar 2025 17:23:11 +0100
Subject: [PATCH 3/3] move deseq readme to cwl docs section

---
 workflows/deseq2/README.md    | 35 -----------------------------------
 workflows/deseq2/workflow.cwl | 14 +++++++++++++-
 2 files changed, 13 insertions(+), 36 deletions(-)
 delete mode 100644 workflows/deseq2/README.md

diff --git a/workflows/deseq2/README.md b/workflows/deseq2/README.md
deleted file mode 100644
index 8b68f05..0000000
--- a/workflows/deseq2/README.md
+++ /dev/null
@@ -1,35 +0,0 @@
-# DESeq2
-
-Workflow used for **differential gene expression analysis**
-
-## DESeq2 docs
-
-- https://bioconductor.org/packages/release/bioc/html/DESeq2.html
-
-## Importing kallisto output with tximport
-
-- https://bioconductor.org/packages/release/bioc/vignettes/tximport/inst/doc/tximport.html#kallisto
-
-## Run pure script (to test)
-
-### Install R dependencies for deseq2
-
-```R
-if (!require("BiocManager", quietly = TRUE))
-    install.packages("BiocManager")
-
-BiocManager::install("DESeq2")
-library("DESeq2")
-
-BiocManager::install("tximport")
-library("tximport")
-
-BiocManager::install("rhdf5")
-library("rhdf5")
-```
-
-## Multi-package containers
-
-- R and combinations of library dependencies are available as multi-package containers from [BioContainers](https://github.com/BioContainers/multi-package-containers)
-- Searched for `repo:BioContainers/multi-package-containers deseq2 tximport rhdf5`
-- and found `quay.io/biocontainers/mulled-v2-05fd88b9ac812a9149da2f2d881d62f01cc49835:a10f0e3a7a70fc45494f8781d33901086d2214d0-0` :tada:
diff --git a/workflows/deseq2/workflow.cwl b/workflows/deseq2/workflow.cwl
index 9933719..0f1d68d 100644
--- a/workflows/deseq2/workflow.cwl
+++ b/workflows/deseq2/workflow.cwl
@@ -1,7 +1,8 @@
 #!/usr/bin/env cwl-runner
 
 doc: |
-  DESeq2 example workflow
+  DESeq2 example workflow for **differential gene expression analysis**
+  
   This workflow runs DESeq2 on the output of the kallisto workflow
   and the metadata file.
   It runs an R script, deseq2.R, which ideally should be split into three sub scripts and accordingly three workflow steps
@@ -9,6 +10,17 @@ doc: |
     2. Prep / run deseq2
     3. Plot results
 
+  ## DESeq2 docs:
+    https://bioconductor.org/packages/release/bioc/html/DESeq2.html
+
+  ## Importing kallisto output with tximport
+    https://bioconductor.org/packages/release/bioc/vignettes/tximport/inst/doc/tximport.html#kallisto
+
+  ## Multi-package containers
+  - R and combinations of library dependencies are available as multi-package containers from [BioContainers](https://github.com/BioContainers/multi-package-containers)
+  - Searched for `repo:BioContainers/multi-package-containers deseq2 tximport rhdf5`
+  - and found `quay.io/biocontainers/mulled-v2-05fd88b9ac812a9149da2f2d881d62f01cc49835:a10f0e3a7a70fc45494f8781d33901086d2214d0-0` :tada:
+
 cwlVersion: v1.2
 class: CommandLineTool
 hints:
-- 
GitLab