From 9fda69ff0ac3eada04d41d464737d33c0bb1ad22 Mon Sep 17 00:00:00 2001
From: Dominik <dominik.brilhaus@hhu.de>
Date: Fri, 24 Mar 2023 12:47:13 +0100
Subject: [PATCH] docker-free kallisto index

---
 runs/kallisto_index/run.cwl                | 42 ++++++++++++---------
 runs/kallisto_index/run.yml                |  3 ++
 workflows/kallisto_collect/workflow.cwl    | 44 ----------------------
 workflows/kallisto_index/kallisto_index.sh | 10 -----
 workflows/kallisto_index/workflow.cwl      | 32 ----------------
 5 files changed, 28 insertions(+), 103 deletions(-)
 delete mode 100644 workflows/kallisto_collect/workflow.cwl
 delete mode 100644 workflows/kallisto_index/workflow.cwl

diff --git a/runs/kallisto_index/run.cwl b/runs/kallisto_index/run.cwl
index a115ab7..a8665ac 100644
--- a/runs/kallisto_index/run.cwl
+++ b/runs/kallisto_index/run.cwl
@@ -1,21 +1,29 @@
 #!/usr/bin/env cwl-runner
+
 cwlVersion: v1.2
-class: Workflow
+class: CommandLineTool
+
 inputs:
-  in_genome_ref:
-    type: File
-  out_folder:
-    type: string
+- id: sh_script
+  type: File
+  inputBinding:
+    position: 0
+- id: in_genome_ref
+  type: File
+  inputBinding:
+    position: 2
+- id: out_folder
+  type: string
+  inputBinding:
+    position: 3
+
 outputs:
-  out_dir:
-    type:
-      type: array
-      items: Directory
-    outputSource: kallisto_index/outdir
-steps:
-  kallisto_index:
-    run: ../../workflows/kallisto_index/workflow.cwl
-    in:
-      in_genome_ref: in_genome_ref
-      out_folder: out_folder
-    out: [outdir]
+- id: outdir
+  type:
+    type: array
+    items: Directory
+  outputBinding:
+    glob: $(runtime.outdir)/$(inputs.out_folder)
+
+baseCommand:
+- bash
diff --git a/runs/kallisto_index/run.yml b/runs/kallisto_index/run.yml
index 37c6681..df0c070 100644
--- a/runs/kallisto_index/run.yml
+++ b/runs/kallisto_index/run.yml
@@ -1,4 +1,7 @@
 cores: 1
+sh_script:
+  class: File
+  path: ../../workflows/kallisto_index/kallisto_index.sh
 in_genome_ref:
   class: File
   path: ../../studies/TalinumGenomeDraft/resources/Talinum.gm.CDS.nt.fa
diff --git a/workflows/kallisto_collect/workflow.cwl b/workflows/kallisto_collect/workflow.cwl
deleted file mode 100644
index b5ed0f7..0000000
--- a/workflows/kallisto_collect/workflow.cwl
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/usr/bin/env cwl-runner
-cwlVersion: v1.2
-class: CommandLineTool
-hints:
-  DockerRequirement:
-    dockerPull: zimmera95/rnaseq:latest
-requirements:
-  - class: InitialWorkDirRequirement
-    listing:
-      - class: File
-        location: kallisto_collect.R
-baseCommand:
-- Rscript
-arguments:
-  - position: 0
-    valueFrom: kallisto_collect.R
-inputs:
-- id: in_kallisto_results
-  type: Directory
-  inputBinding:
-    position: 1
-- id: in_metadata_file
-  type: File
-  inputBinding:
-    position: 2
-- id: in_metadata_sample
-  type: string
-  inputBinding:
-    position: 3
-- id: in_metadata_factor
-  type: string
-  inputBinding:
-    position: 4
-- id: out_folder
-  type: string
-  inputBinding:
-    position: 5
-outputs:
-- id: outdir
-  type:
-    type: array
-    items: Directory
-  outputBinding:
-    glob: $(runtime.outdir)/$(inputs.out_folder)
diff --git a/workflows/kallisto_index/kallisto_index.sh b/workflows/kallisto_index/kallisto_index.sh
index c7cb12d..c346206 100644
--- a/workflows/kallisto_index/kallisto_index.sh
+++ b/workflows/kallisto_index/kallisto_index.sh
@@ -2,16 +2,6 @@
 
 ### Build kallisto index
 
-
-################################################
-#### CWL-independent tests
-################################################
-
-# in_genome_ref=studies/TalinumGenomeDraft/resources/Talinum.gm.CDS.nt.fa
-# out_folder=runs/kallisto_index
-# arc_root=/Users/dominikbrilhaus/gitlab_dataplant/samplearc_rnaseq
-
-
 ################################################
 #### Read arguments from CLI
 ################################################
diff --git a/workflows/kallisto_index/workflow.cwl b/workflows/kallisto_index/workflow.cwl
deleted file mode 100644
index 32635f7..0000000
--- a/workflows/kallisto_index/workflow.cwl
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/usr/bin/env cwl-runner
-cwlVersion: v1.2
-class: CommandLineTool
-hints:
-  DockerRequirement:
-    dockerPull: zlskidmore/kallisto:0.48.0
-requirements:
-  - class: InitialWorkDirRequirement
-    listing:
-      - class: File
-        location: kallisto_index.sh
-baseCommand:
-- bash
-arguments:
-  - position: 0
-    valueFrom: ./kallisto_index.sh
-inputs:
-- id: in_genome_ref
-  type: File
-  inputBinding:
-    position: 1
-- id: out_folder
-  type: string
-  inputBinding:
-    position: 2
-outputs:
-- id: outdir
-  type:
-    type: array
-    items: Directory
-  outputBinding:
-    glob: $(runtime.outdir)/$(inputs.out_folder)
-- 
GitLab