diff --git a/.gitattributes b/.gitattributes index 9992776affeb3d3878119e09bd8176a7fd14fcb0..7c3cf7781734b30a8e0cfccc6bdf9857f38f05a5 100644 --- a/.gitattributes +++ b/.gitattributes @@ -5,4 +5,4 @@ /assays/Talinum_RNASeq_minimal/dataset/DB_103_CAMMD_AGTCAA_L001_R1_001.fastq.gz filter=lfs diff=lfs merge=lfs -text /assays/Talinum_RNASeq_minimal/dataset/DB_161_reC3MD_GTCCGC_L001_R1_001.fastq.gz filter=lfs diff=lfs merge=lfs -text /assays/Talinum_RNASeq_minimal/dataset/DB_165_re-C3MD_GTGAAA_L002_R1_001.fastq.gz filter=lfs diff=lfs merge=lfs -text -/runs/kallisto_index/kallisto_index filter=lfs diff=lfs merge=lfs -text +/runs/kallisto_index/out/kallisto_index filter=lfs diff=lfs merge=lfs -text diff --git a/runs/kallisto_index/README.md b/runs/kallisto_index/README.md index 16475f8b77405c2dbb0e3b86c84bda9db3d4ccdd..577a1e43c503dd13674c74a04fe3a6eb6eb03181 100644 --- a/runs/kallisto_index/README.md +++ b/runs/kallisto_index/README.md @@ -8,14 +8,6 @@ cd /Users/dominikbrilhaus/gitlab_dataplant/samplearc_rnaseq/runs/kallisto_index ## Let it flow ```bash -### store arc root (two levels up from here) as variable -arc_root=$(echo ${PWD%/*/*}) - -### replace arc root line in yml (specific to the machine from where this is run) -### not sure, if this works on linux... -sed -i '' "s|^arc_root:.*|arc_root: $arc_root|g" kallisto_index.yml - ### run with cwltool -cwltool ../../workflows/kallisto_index.cwl kallisto_index.yml - +cwltool --enable-dev run.cwl kallisto_index.yml ``` diff --git a/runs/kallisto_index/kallisto_index.yml b/runs/kallisto_index/kallisto_index.yml index 60f3a27f69a426983d158a83029b18693cf30c0c..37c668126ba083e52faee307fecd8ce59af2c0ba 100644 --- a/runs/kallisto_index/kallisto_index.yml +++ b/runs/kallisto_index/kallisto_index.yml @@ -1,7 +1,5 @@ cores: 1 -sh_script: +in_genome_ref: class: File - path: ../../workflows/kallisto_index.sh -in_genome_ref: studies/TalinumGenomeDraft/resources/Talinum.gm.CDS.nt.fa -out_folder: runs/kallisto_index -arc_root: /Users/dominikbrilhaus/gitlab_dataplant/samplearc_rnaseq + path: ../../studies/TalinumGenomeDraft/resources/Talinum.gm.CDS.nt.fa +out_folder: ./out diff --git a/runs/kallisto_index/kallisto_index b/runs/kallisto_index/out/kallisto_index similarity index 100% rename from runs/kallisto_index/kallisto_index rename to runs/kallisto_index/out/kallisto_index diff --git a/runs/kallisto_index/run.cwl b/runs/kallisto_index/run.cwl new file mode 100644 index 0000000000000000000000000000000000000000..efca83d8f86a30a9d59e30bcf250a8968b627deb --- /dev/null +++ b/runs/kallisto_index/run.cwl @@ -0,0 +1,21 @@ +#!/usr/bin/env cwl-runner +cwlVersion: v1.2.0-dev1 +class: Workflow +inputs: + in_genome_ref: + type: File + out_folder: + type: string +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] \ No newline at end of file diff --git a/workflows/kallisto_collect.R b/workflows/kallisto_collect/kallisto_collect.R similarity index 100% rename from workflows/kallisto_collect.R rename to workflows/kallisto_collect/kallisto_collect.R diff --git a/workflows/kallisto_collect.cwl b/workflows/kallisto_collect/workflow.cwl similarity index 100% rename from workflows/kallisto_collect.cwl rename to workflows/kallisto_collect/workflow.cwl diff --git a/workflows/kallisto_index.sh b/workflows/kallisto_index/kallisto_index.sh old mode 100755 new mode 100644 similarity index 85% rename from workflows/kallisto_index.sh rename to workflows/kallisto_index/kallisto_index.sh index 6cd3e178fa47e59af1e430a16e3def895dcefb37..c7cb12d292e64b8334a4cb1a80a833023c226dc6 --- a/workflows/kallisto_index.sh +++ b/workflows/kallisto_index/kallisto_index.sh @@ -16,9 +16,8 @@ #### Read arguments from CLI ################################################ -arc_root=$1 -in_genome_ref=$2 -out_folder=$3 +in_genome_ref=$1 +out_folder=$2 ################################################ #### Print version and citation to test kallisto @@ -31,11 +30,10 @@ kallisto cite #### If it does not exist, create out dir ################################################ -mkdir -p "$arc_root/$out_folder/" - +mkdir -p $out_folder ################################################ #### Build kallisto index ################################################ -kallisto index -i "$arc_root/$out_folder/kallisto_index" "$arc_root/$in_genome_ref" +kallisto index -i $out_folder/kallisto_index $in_genome_ref diff --git a/workflows/kallisto_index.cwl b/workflows/kallisto_index/workflow.cwl similarity index 55% rename from workflows/kallisto_index.cwl rename to workflows/kallisto_index/workflow.cwl index a6389de36bedc4d46d297b71c7dabd50ed07e200..a91a17c6b4672f6ea484a0f7247a5e917e38a91d 100644 --- a/workflows/kallisto_index.cwl +++ b/workflows/kallisto_index/workflow.cwl @@ -1,25 +1,27 @@ #!/usr/bin/env cwl-runner -cwlVersion: v1.2 +cwlVersion: v1.2.0-dev1 class: CommandLineTool - +hints: + DockerRequirement: + dockerPull: zlskidmore/kallisto:0.48.0 +requirements: + - class: InitialWorkDirRequirement + listing: + - class: File + location: kallisto_index.sh +arguments: + - position: 0 + valueFrom: ./kallisto_index.sh inputs: -- id: sh_script +- id: in_genome_ref type: File - inputBinding: - position: 0 -- id: arc_root - type: string inputBinding: position: 1 -- id: in_genome_ref - type: string - inputBinding: - position: 2 - id: out_folder type: string inputBinding: - position: 3 + position: 2 outputs: - id: outdir diff --git a/workflows/kallisto_quant.sh b/workflows/kallisto_quant/kallisto_quant.sh old mode 100755 new mode 100644 similarity index 100% rename from workflows/kallisto_quant.sh rename to workflows/kallisto_quant/kallisto_quant.sh diff --git a/workflows/kallisto_quant.cwl b/workflows/kallisto_quant/workflow.cwl similarity index 100% rename from workflows/kallisto_quant.cwl rename to workflows/kallisto_quant/workflow.cwl diff --git a/workflows/kallisto_sleuth.R b/workflows/kallisto_sleuth/kallisto_sleuth.R similarity index 100% rename from workflows/kallisto_sleuth.R rename to workflows/kallisto_sleuth/kallisto_sleuth.R diff --git a/workflows/kallisto_sleuth.cwl b/workflows/kallisto_sleuth/workflow.cwl similarity index 100% rename from workflows/kallisto_sleuth.cwl rename to workflows/kallisto_sleuth/workflow.cwl diff --git a/workflows/merge_isa_metadata.R b/workflows/merge_isa_metadata/merge_isa_metadata.R similarity index 100% rename from workflows/merge_isa_metadata.R rename to workflows/merge_isa_metadata/merge_isa_metadata.R diff --git a/workflows/merge_isa_metadata.cwl b/workflows/merge_isa_metadata/workflow.cwl similarity index 100% rename from workflows/merge_isa_metadata.cwl rename to workflows/merge_isa_metadata/workflow.cwl diff --git a/workflows/shiny_plots.Rmd b/workflows/shiny_prep/shiny_plots.Rmd similarity index 100% rename from workflows/shiny_plots.Rmd rename to workflows/shiny_prep/shiny_plots.Rmd diff --git a/workflows/shiny_prep.R b/workflows/shiny_prep/shiny_prep.R similarity index 100% rename from workflows/shiny_prep.R rename to workflows/shiny_prep/shiny_prep.R diff --git a/workflows/shiny_prep.cwl b/workflows/shiny_prep/workflow.cwl similarity index 100% rename from workflows/shiny_prep.cwl rename to workflows/shiny_prep/workflow.cwl