diff --git a/renv.Rmd b/renv.Rmd new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/runs/kallisto/README.md b/runs/kallisto/README.md index 2f01d0737e9a9013e5c7b90cad4996e978a603ea..e3c73f34783ecbe96fe58e4044df92be08372cf9 100644 --- a/runs/kallisto/README.md +++ b/runs/kallisto/README.md @@ -1,6 +1,6 @@ # Kallisto Workflow -## Executing individual steps +## Executing the multi-step workflow ```bash cd runs/kallisto/ diff --git a/runs/kallisto_collect/README.md b/runs/kallisto_collect/README.md new file mode 100644 index 0000000000000000000000000000000000000000..a680462d2b59efc28e5f8ca5373093ba2b984b2c --- /dev/null +++ b/runs/kallisto_collect/README.md @@ -0,0 +1,6 @@ + + +```bash +cd runs/kallisto_collect/ +cwltool ../../workflows/kallisto_collect/kallisto_collect.cwl run.yml > $(date +"%Y-%m-%d_%H-%M").log 2>&1 & +``` diff --git a/runs/kallisto_collect/run.yml b/runs/kallisto_collect/run.yml index 2a4197c55b150b9c73030aac479a6ecbc2ec0edf..ba0dd1857cb36cc3dcaa5bafdd83b4ad55c0b3fb 100644 --- a/runs/kallisto_collect/run.yml +++ b/runs/kallisto_collect/run.yml @@ -1,10 +1,6 @@ -cores: 1 -r_script: - class: File - path: ../../workflows/kallisto_collect/kallisto_collect.R -in_kallisto_results: +in_kallisto_results: class: Directory - path: ../kallisto_sleuth/out + path: ../runs/kallisto/kallisto_results in_metadata_file: class: File path: ../merged_isa_metadata/out/merged_isa.tsv diff --git a/workflows/kallisto_collect/kallisto_collect.R b/workflows/kallisto_collect/kallisto_collect.R index 6a24e7ee2b4cd5711ec8603ec9f19828a15565cb..b2023ffd7fdc45584c9dc8ae05b80466da3dbe53 100644 --- a/workflows/kallisto_collect/kallisto_collect.R +++ b/workflows/kallisto_collect/kallisto_collect.R @@ -4,9 +4,14 @@ #### Load required library ################################################ -library(sleuth) -library(tidyverse) -library(jsonlite) +if(!"BiocManager" %in% row.names(installed.packages())){install.packages('BiocManager')} + +if(!"sleuth" %in% row.names(installed.packages())){ + BiocManager::install('pachterlab/sleuth') +} +if(!"tidyverse" %in% row.names(installed.packages())){install.packages("tidyverse")} +if(!"openxlsx" %in% row.names(installed.packages())){install.packages("openxlsx")} +if(!"jsonlite" %in% row.names(installed.packages())){install.packages("jsonlite")} ################################################ #### Read arguments from CLI diff --git a/runs/kallisto_collect/run.cwl b/workflows/kallisto_collect/kallisto_collect.cwl similarity index 69% rename from runs/kallisto_collect/run.cwl rename to workflows/kallisto_collect/kallisto_collect.cwl index eaee053d15b5358ec2e125861995edda2004e684..64283103d8bd3474c239a41643bef2242d73c245 100644 --- a/runs/kallisto_collect/run.cwl +++ b/workflows/kallisto_collect/kallisto_collect.cwl @@ -3,11 +3,19 @@ cwlVersion: v1.2 class: CommandLineTool +requirements: + - class: InitialWorkDirRequirement + listing: + - entryname: kallisto_collect.R + entry: + $include: kallisto_collect.R + - class: NetworkAccess + networkAccess: true + +baseCommand: [Rscript, kallisto_collect.R] + inputs: -- id: r_script - type: File - inputBinding: - position: 0 + - id: in_kallisto_results type: Directory inputBinding: @@ -36,6 +44,3 @@ outputs: items: Directory outputBinding: glob: $(runtime.outdir)/$(inputs.out_folder) - -baseCommand: -- Rscript diff --git a/runs/kallisto_sleuth/run.cwl b/workflows/kallisto_sleuth/kallisto_sleuth.cwl similarity index 100% rename from runs/kallisto_sleuth/run.cwl rename to workflows/kallisto_sleuth/kallisto_sleuth.cwl