diff --git a/.Rhistory b/.Rhistory new file mode 100644 index 0000000..d2f8e44 --- /dev/null +++ b/.Rhistory @@ -0,0 +1,6 @@ +p +stepInputs +stepInput +devtools::load_all("../Rcwl") +q() +n diff --git a/.github/.gitignore b/.github/.gitignore new file mode 100644 index 0000000..d3fc626 --- /dev/null +++ b/.github/.gitignore @@ -0,0 +1 @@ +*.html diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml new file mode 100644 index 0000000..43009d0 --- /dev/null +++ b/.github/workflows/check.yaml @@ -0,0 +1,55 @@ +<<<<<<< HEAD +on: [push, pull_request] + +name: cwltool-validate + +jobs: + cwltool-validate: + runs-on: ubuntu-latest + container: hubentu/rcwl:latest + + steps: + - uses: actions/checkout@v2 + - name: Rcwl-to-cwl-validate + run: | + library(RcwlPipelines) + rfiles <- list.files("Rcwl", "*.R", full.names = TRUE) + for(f in rfiles){ + tl <- cwlLoad(f) + tl_n <- sub(".R$", "", basename(f)) + message("checking ", tl_n) + tdir <- tempfile() + writeCWL(tl, prefix = tl_n, outdir = tdir) + re <- system(paste("cwltool --validate", file.path(tdir, paste0(tl_n, ".cwl"))), intern = TRUE) + if(grepl("is valid CWL", re))message(paste(f, "is validated")) + } + shell: Rscript {0} +======= +on: [push, pull_request] + +name: cwltool-validate + +jobs: + cwltool-validate: + runs-on: ubuntu-latest + container: + image: hubentu/rcwl:latest + options: --user root + + steps: + - uses: actions/checkout@v2 + - name: Rcwl-to-cwl-validate + run: | + library(RcwlPipelines) + rfiles <- list.files("Rcwl", "tl*.R", full.names = TRUE) + for(f in rfiles){ + tl <- cwlLoad(f) + tl_n <- sub(".R$", "", basename(f)) + message("checking ", tl_n) + tdir <- tempfile() + writeCWL(tl, prefix = tl_n, outdir = tdir) + re <- system(paste("cwltool --validate", file.path(tdir, paste0(tl_n, ".cwl"))), intern = TRUE) + if(grepl("is valid CWL", re))message(paste(f, "is validated")) + } + shell: Rscript {0} +>>>>>>> c7c6ca1ff5298732610594b56bbc581a86140ca6 diff --git a/.util.R.swp b/.util.R.swp new file mode 100644 index 0000000..3e0d915 Binary files /dev/null and b/.util.R.swp differ diff --git a/README.md b/README.md index 8d32f2f..87a943a 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,12 @@ - -A repository of tools and pipelines recipes described with Common Workflow Language (CWL) and Rcwl. - -## cwl Directory -A collection of CWL tools. The pipelines are in its sub-directories. - -## Rcwl Directory -Tools are prefixed by `"tl_"` and pipelines start with `"pl_"`. - -## util.R -The script to convert Rcwl recipes to CWL descriptions. +[![cwltool-validate](https://github.com/rworkflow/RcwlRecipes/actions/workflows/check.yaml/badge.svg)](https://github.com/rworkflow/RcwlRecipes/actions/workflows/check.yaml) + +A repository of tools and pipelines recipes described with Common Workflow Language (CWL) and Rcwl. + +## cwl Directory +A collection of CWL tools. The pipelines are in its sub-directories. + +## Rcwl Directory +Tools are prefixed by `"tl_"` for command line tools and `"pl_"` for pipelines. + +## util.R +The script to convert Rcwl recipes to CWL descriptions. diff --git a/Rcwl/pl_AnnPhaseVcf.R b/Rcwl/pl_AnnPhaseVcf.R index 5105fc3..47117b0 100644 --- a/Rcwl/pl_AnnPhaseVcf.R +++ b/Rcwl/pl_AnnPhaseVcf.R @@ -1,62 +1,65 @@ -## https://pvactools.readthedocs.io/en/latest/pvacseq/input_file_prep.html - -p1 <- InputParam(id = "svcf", type = "File") -p2 <- InputParam(id = "gvcf", type = "File", secondaryFile = ".tbi") -p3 <- InputParam(id = "ref", type = "File", - secondaryFiles = c(".fai", "$(self.nameroot).dict")) -p4 <- InputParam(id = "VepDir", type = "Directory") -p5a <- InputParam(id = "tbam", type = "File", secondaryFile = ".bai") -p5b <- InputParam(id = "rbam", type = "File", secondaryFile = ".bai") -p6 <- InputParam(id = "tsample", type = "string") -p7 <- InputParam(id = "nsample", type = "string") -p8 <- InputParam(id = "rnaseqs", type = "File[]") -p9 <- InputParam(id = "kallistoIdx", type = "File") -p10 <- InputParam(id = "threads", type = "int", default = 16L) -#' @include tl_vep.R -s1 <- Step(id = "VCFvep", run = vep, - In = list(ivcf = "svcf", - ref = "ref", - cacheDir = "VepDir", - ovcf = list(valueFrom = "$(inputs.ivcf.nameroot)_vep.vcf"))) -#' @include pl_vcfCoverage.R -s2a <- Step(id = "dVCFcoverage", run = vcfCoverage, - In = list(vcf = "VCFvep/oVcf", - bam = "tbam", - sample = list(valueFrom = "SAMPLE"), - ref = "ref")) -s2b <- Step(id = "rVCFcoverage", run = vcfCoverage, - In = list(vcf = "dVCFcoverage/outvcf", - bam = "rbam", - sample = list(valueFrom = "SAMPLE"), - ntype = list(valueFrom = "RNA"), - ref = "ref")) -#' @include pl_vcfExpression.R -s3 <- Step(id = "VCFexpression", run = vcfExpression, - In = list(rnafqs = "rnaseqs", - kallistoIdx = "kallistoIdx", - svcf = "rVCFcoverage/outvcf", - threads = "threads")) -#' @include pl_phaseVcf.R -s4 <- Step(id = "PhaseVcf", run = phaseVcf, - In = list(gvariant = "gvcf", - svariant = "VCFexpression/ExpVcf", - bam = "tbam", - outvcf = list(valueFrom = "$(inputs.tsample)_phased.vcf"), - nsample = "nsample", - tsample = "tsample", - ref = "ref")) -o1 <- OutputParam(id = "annVcf", type = "File", outputSource = "VCFexpression/ExpVcf") -o2 <- OutputParam(id = "phasedVCF", type = "File", outputSource = "PhaseVcf/pvcf") -req1 <- list(class = "InlineJavascriptRequirement") -req2 <- list(class = "StepInputExpressionRequirement") -req3 <- list(class = "SubworkflowFeatureRequirement") -ht1 <- list("cwltool:LoadListingRequirement"= - list(loadListing = "no_listing")) -ext <- list("$namespaces" = list(cwltool = "http://commonwl.org/cwltool#")) -AnnPhaseVcf <- cwlStepParam(requirements = list(req1, req2, req3), - inputs = InputParamList(p1, p2, p3, p4, p5a, p5b, - p6, p7, p8, p9, p10), - outputs = OutputParamList(o1, o2), - hints = ht1, - extensions = ext) -AnnPhaseVcf <- AnnPhaseVcf + s1 + s2a + s2b + s3 + s4 +## https://pvactools.readthedocs.io/en/latest/pvacseq/input_file_prep.html + +p1 <- InputParam(id = "svcf", type = "File") +p2 <- InputParam(id = "gvcf", type = "File", secondaryFile = ".tbi") +p3 <- InputParam(id = "ref", type = "File", + secondaryFiles = c(".fai", "$(self.nameroot).dict")) +p4 <- InputParam(id = "VepDir", type = "Directory") +p5a <- InputParam(id = "tbam", type = "File", secondaryFile = ".bai") +p5b <- InputParam(id = "rbam", type = "File", secondaryFile = ".bai") +p6 <- InputParam(id = "tsample", type = "string") +p7 <- InputParam(id = "nsample", type = "string") +p8 <- InputParam(id = "rnaseqs", type = "File[]") +p9 <- InputParam(id = "kallistoIdx", type = "File") +p10 <- InputParam(id = "threads", type = "int", default = 16L) +#' @include tl_vep_plugin.R +s1 <- cwlStep(id = "VCFvep", run = vep_plugin, + In = list(ivcf = "svcf", + ref = "ref", + cacheDir = "VepDir", + ovcf = list(valueFrom = "$(inputs.ivcf.nameroot)_vep.vcf"))) +#' @include pl_vcfCoverage.R +s2a <- cwlStep(id = "dVCFcoverage", run = vcfCoverage, + In = list(vcf = "VCFvep/oVcf", + bam = "tbam", + sample = list(valueFrom = "SAMPLE"), + ref = "ref")) +s2b <- cwlStep(id = "rVCFcoverage", run = vcfCoverage, + In = list(vcf = "dVCFcoverage/outvcf", + bam = "rbam", + sample = list(valueFrom = "SAMPLE"), + ntype = list(valueFrom = "RNA"), + ref = "ref")) +#' @include pl_vcfExpression.R +s3 <- cwlStep(id = "VCFexpression", run = vcfExpression, + In = list(rnafqs = "rnaseqs", + kallistoIdx = "kallistoIdx", + svcf = "rVCFcoverage/outvcf", + threads = "threads")) +#' @include pl_phaseVcf.R +s4 <- cwlStep(id = "PhaseVcf", run = phaseVcf, + In = list(gvariant = "gvcf", + svariant = "VCFexpression/ExpVcf", + bam = "tbam", + outvcf = list(valueFrom = "$(inputs.tsample)_phased.vcf"), + nsample = "nsample", + tsample = "tsample", + ref = "ref")) +o1 <- OutputParam(id = "annVcf", type = "File", outputSource = "VCFexpression/ExpVcf") +o2 <- OutputParam(id = "phasedVCF", type = "File", outputSource = "PhaseVcf/pvcf") +req1 <- list(class = "InlineJavascriptRequirement") +req2 <- list(class = "StepInputExpressionRequirement") +req3 <- list(class = "SubworkflowFeatureRequirement") +## req4 <- list(class = "LoadListingRequirement", +## loadListing = "no_listing") +ht1 <- list("cwltool:LoadListingRequirement"= + list(loadListing = "no_listing")) +ext <- list("$namespaces" = list(cwltool = "http://commonwl.org/cwltool#")) +AnnPhaseVcf <- cwlWorkflow(cwlVersion = "v1.0", + requirements = list(req1, req2, req3), + inputs = InputParamList(p1, p2, p3, p4, p5a, p5b, + p6, p7, p8, p9, p10), + outputs = OutputParamList(o1, o2), + hints = ht1, + extensions = ext) +AnnPhaseVcf <- AnnPhaseVcf + s1 + s2a + s2b + s3 + s4 diff --git a/Rcwl/pl_BaseRecal.R b/Rcwl/pl_BaseRecal.R index 2f650ee..506187e 100644 --- a/Rcwl/pl_BaseRecal.R +++ b/Rcwl/pl_BaseRecal.R @@ -1,40 +1,42 @@ -## BAM + BaseRecalibrator + ApplyBQSR + index + stats -#' @include tl_BaseRecalibrator.R tl_ApplyBQSR.R tl_samtools_index.R tl_samtools_flagstat.R tl_samtools_stats.R -p1 <- InputParam(id = "bam", type = "File") -p2 <- InputParam(id = "ref", type = "File", secondaryFiles = c(".fai", - "$(self.nameroot).dict")) -p3 <- InputParam(id = "knowSites", type = InputArrayParam(items = "File"), - secondaryFiles = ".idx") -p4 <- InputParam(id = "oBam", type = "string") - -s1 <- Step(id = "BaseRecalibrator", run = BaseRecalibrator, - In = list(bam = "bam", - ref = "ref", - knowSites = "knowSites", - recal = list( - valueFrom="$(inputs.bam.nameroot).recal.txt"))) -s2 <- Step(id = "ApplyBQSR", run = ApplyBQSR, - In = list(bam = "bam", - ref = "ref", - rtable = "BaseRecalibrator/rtable", - oBam = "oBam")) -s3 <- Step(id = "samtools_index", run = samtools_index, - In = list(bam = "ApplyBQSR/Bam")) -s4 <- Step(id = "samtools_flagstat", run = samtools_flagstat, - In = list(bam = "ApplyBQSR/Bam")) -s5 <- Step(id = "samtools_stats", run = samtools_stats, - In = list(bam = "ApplyBQSR/Bam")) - -o1 <- OutputParam(id = "rcBam", type = "File", outputSource = "samtools_index/idx", - secondaryFiles = ".bai") -o2 <- OutputParam(id = "flagstat", type = "File", - outputSource = "samtools_flagstat/flagstat") -o3 <- OutputParam(id = "stats", type = "File", - outputSource = "samtools_stats/stats") - -req1 <- list(class = "StepInputExpressionRequirement") -req2 <- list(class = "InlineJavascriptRequirement") -BaseRecal <- cwlStepParam(requirements = list(req1, req2), - inputs = InputParamList(p1, p2, p3, p4), - outputs = OutputParamList(o1, o2, o3)) -BaseRecal <- BaseRecal + s1 + s2 + s3 + s4 + s5 +## BAM + BaseRecalibrator + ApplyBQSR + index + stats +#' @include tl_BaseRecalibrator.R tl_ApplyBQSR.R tl_samtools_index.R tl_samtools_flagstat.R tl_samtools_stats.R +p1 <- InputParam(id = "bam", type = "File") +p2 <- InputParam(id = "ref", type = "File", secondaryFiles = c(".fai", + "$(self.nameroot).dict")) +p3 <- InputParam(id = "knowSites", type = InputArrayParam(items = "File"), + secondaryFiles = "$(self.nameext == '.gz' ? self.basename+'.tbi' : self.basename+'.idx')") +p4 <- InputParam(id = "oBam", type = "string") + +s1 <- cwlStep(id = "BaseRecalibrator", run = BaseRecalibrator, + In = list(bam = "bam", + ref = "ref", + knowSites = "knowSites", + recal = list( + valueFrom="$(inputs.bam.nameroot).recal.txt"))) +s2 <- cwlStep(id = "ApplyBQSR", run = ApplyBQSR, + In = list(bam = "bam", + ref = "ref", + rtable = "BaseRecalibrator/rtable", + oBam = "oBam")) +s3 <- cwlStep(id = "samtools_index", run = samtools_index, + In = list(bam = "ApplyBQSR/Bam")) +s4 <- cwlStep(id = "samtools_flagstat", run = samtools_flagstat, + In = list(bam = "ApplyBQSR/Bam")) +s5 <- cwlStep(id = "samtools_stats", run = samtools_stats, + In = list(bam = "ApplyBQSR/Bam")) + +o1 <- OutputParam(id = "rcBam", type = "File", outputSource = "samtools_index/idx", + secondaryFiles = ".bai") +o2 <- OutputParam(id = "flagstat", type = "File", + outputSource = "samtools_flagstat/flagstat") +o3 <- OutputParam(id = "stats", type = "File", + outputSource = "samtools_stats/stats") + +req1 <- list(class = "StepInputExpressionRequirement") +req2 <- list(class = "InlineJavascriptRequirement") +req3 <- requireJS() +BaseRecal <- cwlWorkflow(cwlVersion = "v1.0", + requirements = list(req1, req2, req3), + inputs = InputParamList(p1, p2, p3, p4), + outputs = OutputParamList(o1, o2, o3)) +BaseRecal <- BaseRecal + s1 + s2 + s3 + s4 + s5 diff --git a/Rcwl/pl_COMPSRA_rn.R b/Rcwl/pl_COMPSRA_rn.R new file mode 100644 index 0000000..022c5fe --- /dev/null +++ b/Rcwl/pl_COMPSRA_rn.R @@ -0,0 +1,19 @@ +#' @include tl_cp.R tl_COMPSRA.R +p0 <- InputParam(id = "samplefq", type = "string") +p1 <- InputParam(id = "fq", type = "File") +p2 <- InputParam(id = "adapt", type = "string") +p3 <- InputParam(id = "ref", type = "string") +p4 <- InputParam(id = "DB", type = "Directory") + +s1 <- cwlStep(id = "copy", run = cp, + In = list(file1 = "fq", + file2 = "samplefq")) +s2 <- cwlStep(id = "compsra", run = COMPSRA, + In = list(fq = "copy/cpfile", + adapt = "adapt", + ref = "ref", + DB = "DB")) +o1 <- OutputParam(id = "out", type = "Directory", outputSource = "compsra/outdir") +COMPSRA_rn <- cwlWorkflow(inputs = InputParamList(p0, p1, p2, p3, p4), + outputs = OutputParamList(o1)) +COMPSRA_rn <- COMPSRA_rn + s1 + s2 diff --git a/Rcwl/pl_CombineGenotypeGVCFs.R b/Rcwl/pl_CombineGenotypeGVCFs.R index 2f8f6cc..5479762 100644 --- a/Rcwl/pl_CombineGenotypeGVCFs.R +++ b/Rcwl/pl_CombineGenotypeGVCFs.R @@ -1,24 +1,24 @@ -## CombineGenotypeGVCFs -p1 <- InputParam(id = "vcfs", type = InputArrayParam(items = "File"), secondaryFiles = ".idx") -p2 <- InputParam(id = "Ref", type = "File", secondaryFiles = c(".fai", "$(self.nameroot).dict")) -p3 <- InputParam(id = "out", type = "string") - -#' @include tl_CombineGVCFs.R -s1 <- Step(id = "CombineGVCFs", run = CombineGVCFs, - In = list(vcfs = "vcfs", - Ref = "Ref", - ovcf = list(source = "out", - valueFrom = "$(self).g.vcf"))) -#' @include tl_GenotypeGVCFs.R -s2 <- Step(id = "GenotypeGVCFs", run = GenotypeGVCFs, - In = list(variant = "CombineGVCFs/cvcf", - ref = "Ref", - vout = "out")) -o1 <- OutputParam(id = "VCF", type = "File", - outputSource = "GenotypeGVCFs/vcf", secondaryFiles = ".idx") -req1 <- list(class = "StepInputExpressionRequirement") -req2 <- list(class = "InlineJavascriptRequirement") -CombineGenotypeGVCFs <- cwlStepParam(requirements = list(req1, req2), - inputs = InputParamList(p1, p2, p3), - outputs = OutputParamList(o1)) -CombineGenotypeGVCFs <- CombineGenotypeGVCFs + s1 + s2 +## CombineGenotypeGVCFs +p1 <- InputParam(id = "vcfs", type = InputArrayParam(items = "File"), secondaryFiles = ".tbi") +p2 <- InputParam(id = "Ref", type = "File", secondaryFiles = c(".fai", "$(self.nameroot).dict")) +p3 <- InputParam(id = "out", type = "string") + +#' @include tl_CombineGVCFs.R +s1 <- cwlStep(id = "CombineGVCFs", run = CombineGVCFs, + In = list(vcfs = "vcfs", + Ref = "Ref", + ovcf = list(source = "out", + valueFrom = "$(self).g.vcf"))) +#' @include tl_GenotypeGVCFs.R +s2 <- cwlStep(id = "GenotypeGVCFs", run = GenotypeGVCFs, + In = list(variant = "CombineGVCFs/vcf", + ref = "Ref", + vout = "out")) +o1 <- OutputParam(id = "VCF", type = "File", + outputSource = "GenotypeGVCFs/vcf", secondaryFiles = ".idx") +req1 <- list(class = "StepInputExpressionRequirement") +req2 <- list(class = "InlineJavascriptRequirement") +CombineGenotypeGVCFs <- cwlWorkflow(requirements = list(req1, req2), + inputs = InputParamList(p1, p2, p3), + outputs = OutputParamList(o1)) +CombineGenotypeGVCFs <- CombineGenotypeGVCFs + s1 + s2 diff --git a/Rcwl/pl_GAlign.R b/Rcwl/pl_GAlign.R index 949206f..54a6917 100644 --- a/Rcwl/pl_GAlign.R +++ b/Rcwl/pl_GAlign.R @@ -1,102 +1,102 @@ -##source(system.file("tools", "runWDL.R", package = "RcwlPipelines")) -#' @include tl_mvOut.R tl_runWDL.R -## prepare Json for fq2ubam -rscripts <- "args <- commandArgs(TRUE) -splitList <- function(s)as.list(unlist(strsplit(s, split = ','))) -template <- args[1] -input1 <- jsonlite::fromJSON(template, simplifyVector=FALSE) -input1$ConvertPairedFastQsToUnmappedBamWf.readgroup_name <- splitList(args[2]) -input1$ConvertPairedFastQsToUnmappedBamWf.sample_name <- splitList(args[3]) -input1$ConvertPairedFastQsToUnmappedBamWf.fastq_1 <- splitList(args[4]) -input1$ConvertPairedFastQsToUnmappedBamWf.fastq_2 <- splitList(args[5]) -input1$ConvertPairedFastQsToUnmappedBamWf.ubam_list_name <- splitList(args[3])[[1]][1] -input1$ConvertPairedFastQsToUnmappedBamWf.library_name <- splitList(args[6]) -input1$ConvertPairedFastQsToUnmappedBamWf.platform_unit <- splitList(args[7]) -input1$ConvertPairedFastQsToUnmappedBamWf.run_date <- list(rep(as.character(Sys.Date()), lengths(splitList(args[2])))) -input1$ConvertPairedFastQsToUnmappedBamWf.platform_name <- splitList(args[8]) -input1$ConvertPairedFastQsToUnmappedBamWf.sequencing_center <- splitList(args[9]) -cat(jsonlite::toJSON(input1, pretty = TRUE, auto_unbox = T))" -rscripts <- gsub("\n", "; ", rscripts) - -p1 <- InputParam(id = "tmpl", type = "File", position = 1) -p2 <- InputParam(id = "fastq1", type = "string", position = 4) -p3 <- InputParam(id = "fastq2", type = "string", position = 5) -p4 <- InputParam(id = "readGroup", type = "string", position = 2) -p5 <- InputParam(id = "sampleName", type = "string", position = 3) -p6 <- InputParam(id = "library", type = "string", position = 6) -p7 <- InputParam(id = "platunit", type = "string", position = 7) -p8 <- InputParam(id = "platform", type = "string", position = 8) -p9 <- InputParam(id = "center", type = "string", position = 9) -o1 <- OutputParam(id = "jsonOut", type = "File", glob = "tmpl1.json") -fq2ubamJson <- cwlParam(baseCommand = c("Rscript", "-e", rscripts), - inputs = InputParamList(p1, p2, p3, p4, p5, p6, p7, p8, p9), - outputs = OutputParamList(o1), - stdout = "tmpl1.json") - -## prepare json for ubam to bam -rscripts <- "args <- commandArgs(TRUE) -fqlog <- args[1] -tmpl <- args[2] -log1 <- readLines(fqlog) -startn <- grep('Final Outputs:', log1)+1 -endn <- grep('}$', log1)[1] -ubamOut <- jsonlite::fromJSON(log1[startn:endn]) -sampleName <- sub('.list', '', basename(ubamOut$ConvertPairedFastQsToUnmappedBamWf.unmapped_bam_list)) -json1 <- jsonlite::fromJSON(tmpl) -json1$PreProcessingForVariantDiscovery_GATK4.sample_name <- sampleName -json1$PreProcessingForVariantDiscovery_GATK4.flowcell_unmapped_bams_list <- ubamOut$ConvertPairedFastQsToUnmappedBamWf.unmapped_bam_list -cat(jsonlite::toJSON(json1, pretty = TRUE, auto_unbox = T))" -rscripts <- gsub("\n", "; ", rscripts) - -p1 <- InputParam(id = "fqlog", type = "File", position = 1) -p2 <- InputParam(id = "template", type = "File", position = 2) -o1 <- OutputParam(id = "json", type = "File", glob = "temp2.json") -ubam2bamJson <- cwlParam(baseCommand = c("Rscript", "-e", rscripts), - inputs = InputParamList(p1, p2), - outputs = OutputParamList(o1), - stdout = "temp2.json") - -## GATK alignment pipeline -p1 <- InputParam(id = "fastq1", type = "string") -p2 <- InputParam(id = "fastq2", type = "string") -p3 <- InputParam(id = "readGroup", type = "string") -p4 <- InputParam(id = "sampleName", type = "string") -p5 <- InputParam(id = "library", type = "string") -p6 <- InputParam(id = "platunit", type = "string") -p7 <- InputParam(id = "platform", type = "string") -p8 <- InputParam(id = "center", type = "string") -p9 <- InputParam(id = "tmpl1", type = "File") -p10 <- InputParam(id = "wdl1", type = "File") -p11 <- InputParam(id = "tmpl2", type = "File") -p12 <- InputParam(id = "wdl2", type = "File") -p13 <- InputParam(id = "cromwell", type = "File") -o1 <- OutputParam(id = "bamlog", type = "File", outputSource = "align/log") -o2 <- OutputParam(id = "outdir", type = "Directory", outputSource = "mvOut/OutDir") - -GAlign <- cwlStepParam(inputs = InputParamList(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13), - outputs = OutputParamList(o1, o2)) -s1 <- Step(id = "fqJson", run = fq2ubamJson, - In = list(tmpl = "tmpl1", - fastq1 = "fastq1", - fastq2 = "fastq2", - readGroup = "readGroup", - sampleName = "sampleName", - library = "library", - platunit = "platunit", - platform = "platform", - center = "center")) -s2 <- Step(id = "fq2ubam", run = runWDL, - In = list(cromwell = "cromwell", - wdl = "wdl1", - json = "fqJson/jsonOut")) -s3 <- Step(id = "ubam2bamJson", run = ubam2bamJson, - In = list(fqlog = "fq2ubam/log", - template = "tmpl2")) -s4 <- Step(id = "align", run = runWDL, - In = list(cromwell = "cromwell", - wdl = "wdl2", - json = "ubam2bamJson/json")) -s5 <- Step(id = "mvOut", run = mvOut, - In = list(logFile = "align/log")) - -GAlign <- GAlign + s1 + s2 + s3 + s4 + s5 +##source(system.file("tools", "runWDL.R", package = "RcwlPipelines")) +#' @include tl_mvOut.R tl_runWDL.R +## prepare Json for fq2ubam +rscripts <- "args <- commandArgs(TRUE) +splitList <- function(s)as.list(unlist(strsplit(s, split = ','))) +template <- args[1] +input1 <- jsonlite::fromJSON(template, simplifyVector=FALSE) +input1$ConvertPairedFastQsToUnmappedBamWf.readgroup_name <- splitList(args[2]) +input1$ConvertPairedFastQsToUnmappedBamWf.sample_name <- splitList(args[3]) +input1$ConvertPairedFastQsToUnmappedBamWf.fastq_1 <- splitList(args[4]) +input1$ConvertPairedFastQsToUnmappedBamWf.fastq_2 <- splitList(args[5]) +input1$ConvertPairedFastQsToUnmappedBamWf.ubam_list_name <- splitList(args[3])[[1]][1] +input1$ConvertPairedFastQsToUnmappedBamWf.library_name <- splitList(args[6]) +input1$ConvertPairedFastQsToUnmappedBamWf.platform_unit <- splitList(args[7]) +input1$ConvertPairedFastQsToUnmappedBamWf.run_date <- list(rep(as.character(Sys.Date()), lengths(splitList(args[2])))) +input1$ConvertPairedFastQsToUnmappedBamWf.platform_name <- splitList(args[8]) +input1$ConvertPairedFastQsToUnmappedBamWf.sequencing_center <- splitList(args[9]) +cat(jsonlite::toJSON(input1, pretty = TRUE, auto_unbox = T))" +rscripts <- gsub("\n", "; ", rscripts) + +p1 <- InputParam(id = "tmpl", type = "File", position = 1) +p2 <- InputParam(id = "fastq1", type = "string", position = 4) +p3 <- InputParam(id = "fastq2", type = "string", position = 5) +p4 <- InputParam(id = "readGroup", type = "string", position = 2) +p5 <- InputParam(id = "sampleName", type = "string", position = 3) +p6 <- InputParam(id = "library", type = "string", position = 6) +p7 <- InputParam(id = "platunit", type = "string", position = 7) +p8 <- InputParam(id = "platform", type = "string", position = 8) +p9 <- InputParam(id = "center", type = "string", position = 9) +o1 <- OutputParam(id = "jsonOut", type = "File", glob = "tmpl1.json") +fq2ubamJson <- cwlProcess(baseCommand = c("Rscript", "-e", rscripts), + inputs = InputParamList(p1, p2, p3, p4, p5, p6, p7, p8, p9), + outputs = OutputParamList(o1), + stdout = "tmpl1.json") + +## prepare json for ubam to bam +rscripts <- "args <- commandArgs(TRUE) +fqlog <- args[1] +tmpl <- args[2] +log1 <- readLines(fqlog) +startn <- grep('Final Outputs:', log1)+1 +endn <- grep('}$', log1)[1] +ubamOut <- jsonlite::fromJSON(log1[startn:endn]) +sampleName <- sub('.list', '', basename(ubamOut$ConvertPairedFastQsToUnmappedBamWf.unmapped_bam_list)) +json1 <- jsonlite::fromJSON(tmpl) +json1$PreProcessingForVariantDiscovery_GATK4.sample_name <- sampleName +json1$PreProcessingForVariantDiscovery_GATK4.flowcell_unmapped_bams_list <- ubamOut$ConvertPairedFastQsToUnmappedBamWf.unmapped_bam_list +cat(jsonlite::toJSON(json1, pretty = TRUE, auto_unbox = T))" +rscripts <- gsub("\n", "; ", rscripts) + +p1 <- InputParam(id = "fqlog", type = "File", position = 1) +p2 <- InputParam(id = "template", type = "File", position = 2) +o1 <- OutputParam(id = "json", type = "File", glob = "temp2.json") +ubam2bamJson <- cwlProcess(baseCommand = c("Rscript", "-e", rscripts), + inputs = InputParamList(p1, p2), + outputs = OutputParamList(o1), + stdout = "temp2.json") + +## GATK alignment pipeline +p1 <- InputParam(id = "fastq1", type = "string") +p2 <- InputParam(id = "fastq2", type = "string") +p3 <- InputParam(id = "readGroup", type = "string") +p4 <- InputParam(id = "sampleName", type = "string") +p5 <- InputParam(id = "library", type = "string") +p6 <- InputParam(id = "platunit", type = "string") +p7 <- InputParam(id = "platform", type = "string") +p8 <- InputParam(id = "center", type = "string") +p9 <- InputParam(id = "tmpl1", type = "File") +p10 <- InputParam(id = "wdl1", type = "File") +p11 <- InputParam(id = "tmpl2", type = "File") +p12 <- InputParam(id = "wdl2", type = "File") +p13 <- InputParam(id = "cromwell", type = "File") +o1 <- OutputParam(id = "bamlog", type = "File", outputSource = "align/log") +o2 <- OutputParam(id = "outdir", type = "Directory", outputSource = "mvOut/OutDir") + +GAlign <- cwlWorkflow(inputs = InputParamList(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13), + outputs = OutputParamList(o1, o2)) +s1 <- cwlStep(id = "fqJson", run = fq2ubamJson, + In = list(tmpl = "tmpl1", + fastq1 = "fastq1", + fastq2 = "fastq2", + readGroup = "readGroup", + sampleName = "sampleName", + library = "library", + platunit = "platunit", + platform = "platform", + center = "center")) +s2 <- cwlStep(id = "fq2ubam", run = runWDL, + In = list(cromwell = "cromwell", + wdl = "wdl1", + json = "fqJson/jsonOut")) +s3 <- cwlStep(id = "ubam2bamJson", run = ubam2bamJson, + In = list(fqlog = "fq2ubam/log", + template = "tmpl2")) +s4 <- cwlStep(id = "align", run = runWDL, + In = list(cromwell = "cromwell", + wdl = "wdl2", + json = "ubam2bamJson/json")) +s5 <- cwlStep(id = "mvOut", run = mvOut, + In = list(logFile = "align/log")) + +GAlign <- GAlign + s1 + s2 + s3 + s4 + s5 diff --git a/Rcwl/pl_GPoN.R b/Rcwl/pl_GPoN.R index 0b2eba1..f9e793b 100644 --- a/Rcwl/pl_GPoN.R +++ b/Rcwl/pl_GPoN.R @@ -1,24 +1,26 @@ -##2. GenomicsDB + PoN, run with cwltool argument: --relax-path-checks -#' @include tl_GenomicsDB.R tl_PoN.R -p1 <- InputParam(id = "nvcf", type = InputArrayParam(items = "File"), secondaryFiles = ".idx") -p2 <- InputParam(id = "Ref", type = "File", - secondaryFiles = c(".fai", "$(self.nameroot).dict")) -p3 <- InputParam(id = "interval", type = "File") -p4 <- InputParam(id = "pvcf", type = "string") -p5 <- InputParam(id = "gresource", type = "File?", secondaryFiles = ".idx") - -s1 <- Step(id = "GenomicsDB", run = GenomicsDB, - In = list(vcf = "nvcf", - Ref = "Ref", - intervals = "interval")) -s2 <- Step(id = "PoN", run = PoN, - In = list(db = "GenomicsDB/dbout", - Ref = "Ref", - pon = "pvcf", - gresource = "gresource")) - -o1 <- OutputParam(id = "Pvcf", type = "File", outputSource = "PoN/pout") - -GPoN <- cwlStepParam(inputs = InputParamList(p1, p2, p3, p4, p5), - outputs = OutputParamList(o1)) -GPoN <- GPoN + s1 + s2 +##2. GenomicsDB + PoN, run with cwltool argument: --relax-path-checks +#' @include tl_GenomicsDB.R tl_PoN.R +p1 <- InputParam(id = "nvcf", type = InputArrayParam(items = "File"), secondaryFiles = ".idx") +p2 <- InputParam(id = "Ref", type = "File", + secondaryFiles = c(".fai", "^.dict")) +p3 <- InputParam(id = "interval", type = "File") +p4 <- InputParam(id = "pvcf", type = "string") +p5 <- InputParam(id = "gresource", type = "File?", + secondaryFiles = "$(self.nameext == '.gz' ? self.basename+'.tbi' : self.basename+'.idx')") + +s1 <- cwlStep(id = "GenomicsDB", run = GenomicsDB, + In = list(vcf = "nvcf", + Ref = "Ref", + intervals = "interval")) +s2 <- cwlStep(id = "PoN", run = PoN, + In = list(db = "GenomicsDB/dbout", + Ref = "Ref", + pon = "pvcf", + gresource = "gresource")) + +o1 <- OutputParam(id = "Pvcf", type = "File", outputSource = "PoN/pout") + +GPoN <- cwlWorkflow(requirements = list(requireJS()), + inputs = InputParamList(p1, p2, p3, p4, p5), + outputs = OutputParamList(o1)) +GPoN <- GPoN + s1 + s2 diff --git a/Rcwl/pl_LoFreqPL.R b/Rcwl/pl_LoFreqPL.R new file mode 100644 index 0000000..471e3d0 --- /dev/null +++ b/Rcwl/pl_LoFreqPL.R @@ -0,0 +1,34 @@ +## LoFreq PL +#' @include pl_lofreq_realign.R tl_LoFreq.R +p1 <- InputParam(id = "tbam", type = "File", secondaryFiles = ".bai") +p2 <- InputParam(id = "nbam", type = "File", secondaryFiles = ".bai") +p3 <- InputParam(id = "ref", type = "File", secondaryFiles = ".fai") +p4 <- InputParam(id = "region", type = "File") +p5 <- InputParam(id = "dbsnp", type = "File", + secondaryFiles = "$(self.nameext == '.gz' ? self.basename+'.tbi' : self.basename+'.idx')") +p6 <- InputParam(id = "out", type = "string") +p7 <- InputParam(id = "threads", type = "int") + +s1 <- cwlStep(id = "tbamR", run = lofreq_realign, + In = list(ref = "ref", + bam = "tbam")) +s2 <- cwlStep(id = "nbamR", run = lofreq_realign, + In = list(ref = "ref", + bam = "nbam")) +s3 <- cwlStep(id = "lofreqCall", run = LoFreq, + In = list(tbam = "tbamR/ibam", + nbam = "nbamR/ibam", + ref = "ref", + region = "region", + dbsnp = "dbsnp", + out = "out", + threads = "threads")) +o1 <- OutputParam(id = "snp", type = "File", outputSource = "lofreqCall/snp") +o2 <- OutputParam(id = "snpdb", type = "File", outputSource = "lofreqCall/snpdb") +o3 <- OutputParam(id = "indel", type = "File", outputSource = "lofreqCall/indel") +o4 <- OutputParam(id = "indeldb", type = "File", outputSource = "lofreqCall/indeldb") + +LoFreqPL <- cwlWorkflow(requirements = list(requireSubworkflow()), + inputs = InputParamList(p1, p2, p3, p4, p5, p6, p7), + outputs = OutputParamList(o1, o2, o3, o4)) +LoFreqPL <- LoFreqPL + s1 + s2 + s3 diff --git a/Rcwl/pl_LoFreqSI.R b/Rcwl/pl_LoFreqSI.R new file mode 100644 index 0000000..f9d88d4 --- /dev/null +++ b/Rcwl/pl_LoFreqSI.R @@ -0,0 +1,34 @@ +## LoFreq PL +#' @include pl_lofreq_indel.R tl_LoFreq.R +p1 <- InputParam(id = "tbam", type = "File", secondaryFiles = ".bai") +p2 <- InputParam(id = "nbam", type = "File", secondaryFiles = ".bai") +p3 <- InputParam(id = "ref", type = "File", secondaryFiles = ".fai") +p4 <- InputParam(id = "region", type = "File") +p5 <- InputParam(id = "dbsnp", type = "File", + secondaryFiles = "$(self.nameext == '.gz' ? self.basename+'.tbi' : self.basename+'.idx')") +p6 <- InputParam(id = "out", type = "string") +p7 <- InputParam(id = "threads", type = "int") + +s1 <- cwlStep(id = "tbamR", run = lofreq_indel, + In = list(ref = "ref", + bam = "tbam")) +s2 <- cwlStep(id = "nbamR", run = lofreq_indel, + In = list(ref = "ref", + bam = "nbam")) +s3 <- cwlStep(id = "lofreqCall", run = LoFreq, + In = list(tbam = "tbamR/ibam", + nbam = "nbamR/ibam", + ref = "ref", + region = "region", + dbsnp = "dbsnp", + out = "out", + threads = "threads")) +o1 <- OutputParam(id = "snp", type = "File", outputSource = "lofreqCall/snp") +o2 <- OutputParam(id = "snpdb", type = "File", outputSource = "lofreqCall/snpdb") +o3 <- OutputParam(id = "indel", type = "File", outputSource = "lofreqCall/indel") +o4 <- OutputParam(id = "indeldb", type = "File", outputSource = "lofreqCall/indeldb") + +LoFreqSI <- cwlWorkflow(requirements = list(requireSubworkflow()), + inputs = InputParamList(p1, p2, p3, p4, p5, p6, p7), + outputs = OutputParamList(o1, o2, o3, o4)) +LoFreqSI <- LoFreqSI + s1 + s2 + s3 diff --git a/Rcwl/pl_MuSE_scatter.R b/Rcwl/pl_MuSE_scatter.R new file mode 100644 index 0000000..087a2d9 --- /dev/null +++ b/Rcwl/pl_MuSE_scatter.R @@ -0,0 +1,37 @@ +#' @include tl_MuSEv2.R tl_bcftools_concat.R tl_bcftools_norm.R tl_bcftools_sort.R +p1 <- InputParam(id = "tbam", type = "File", secondaryFiles = list(".bai?", "^.bai?")) +p2 <- InputParam(id = "nbam", type = "File", secondaryFiles = list(".bai?", "^.bai?")) +p3 <- InputParam(id = "region", type = "File[]") +p4 <- InputParam(id = "dbsnp", type = "File", + secondaryFiles = "$(self.nameext == '.gz' ? self.basename+'.tbi' : self.basename+'.idx')") +p5 <- InputParam(id = "ref", type = "File", secondaryFiles = ".fai") +p6 <- InputParam(id = "vcf", type = "string") +s1 <- cwlStep(id = "MuSEchr", MuSE, + In = list(tbam = "tbam", + nbam = "nbam", + dbsnp = "dbsnp", + vcf = "vcf", + ref = "ref", + exome = list(valueFrom = "$(false)"), + genome = list(valueFrom = "$(true)"), + region = "region"), + scatter = "region", + scatterMethod = "dotproduct") +s2 <- cwlStep(id = "mergeVcf", bcftools_concat, + In = list(ovcf = "vcf", + vcfs = "MuSEchr/outVcf")) +s3 <- cwlStep(id = "sortVcf", bcftools_sort, + In = list(ovcf = "vcf", + vcf = "mergeVcf/Fout")) +s4 <- cwlStep(id = "normVcf", bcftools_norm, + In = list(ovcf = "vcf", + vcf = "sortVcf/Fout", + dup = list(valueFrom = "none"))) +o1 <- OutputParam(id = "ovcf", type = "File", outputSource = "normVcf/Fout") +MuSE_scatter <- cwlWorkflow(cwlVersion = "v1.2", + requirements = list(requireScatter(), + requireStepInputExpression(), + requireJS()), + inputs = InputParamList(p1, p2, p3, p4, p5, p6), + outputs = OutputParamList(o1)) +MuSE_scatter <- MuSE_scatter + s1 + s2 + s3 + s4 diff --git a/Rcwl/pl_Mutect2PL.R b/Rcwl/pl_Mutect2PL.R index 167c9d1..239ea4f 100644 --- a/Rcwl/pl_Mutect2PL.R +++ b/Rcwl/pl_Mutect2PL.R @@ -1,97 +1,82 @@ -## source(system.file("tools", "gatk_CalculateContamination.R", package = "RcwlPipelines")) -## source(system.file("tools", "gatk_ColSeqArtifact.R", package = "RcwlPipelines")) -## source(system.file("tools", "gatk_FilterMutectCalls.R", package = "RcwlPipelines")) -## source(system.file("tools", "gatk_FilterOBias.R", package = "RcwlPipelines")) -## source(system.file("tools", "gatk_Funcotator.R", package = "RcwlPipelines")) -## source(system.file("tools", "gatk_GenomicsDBImport.R", package = "RcwlPipelines")) -## source(system.file("tools", "gatk_GetPileupSummaries.R", package = "RcwlPipelines")) -## source(system.file("tools", "gatk_mutect2.R", package = "RcwlPipelines")) -## source(system.file("tools", "gatk_PoN.R", package = "RcwlPipelines")) -## source(system.file("tools", "bcftools_filter.R", package = "RcwlPipelines")) - -##1. Mutect2: Call variant on normal samples, with arguments: --max-mnp-distance 0. - -##2. GenomicsDB + PoN, run with cwltool argument: --relax-path-checks - -##3. Mutect2 + GetPileupSummaries + CalculateContamination + FilterMutectCalls + CollectSequencingArtifactMetrics + FilterByOrientationBias - -p1a <- InputParam(id = "tbam", type = "File", secondaryFiles = ".bai") -p1b <- InputParam(id = "nbam", type = "File", secondaryFiles = ".bai") -p2 <- InputParam(id = "Ref", type = "File", - secondaryFiles = c(".fai", "$(self.nameroot).dict")) -p3 <- InputParam(id = "normal", type = "string") -p4 <- InputParam(id = "tumor", type = "string") -p5 <- InputParam(id = "gresource", type = "File", secondaryFiles = ".idx") -p6 <- InputParam(id = "pon", type = "File", secondaryFiles = ".idx") -p7 <- InputParam(id = "interval", type = "File") -p8 <- InputParam(id = "comvcf", type = "File", secondaryFiles = ".idx") -p9 <- InputParam(id = "artMode", type = InputArrayParam(items = "string"), - default = list("G/T", "C/T")) -p10 <- InputParam(id = "filter", type = "string", default = "PASS") -#' @include tl_Mutect2.R -s1 <- Step(id = "Mutect2", run = Mutect2, - In = list(tbam = "tbam", - nbam = "nbam", - Ref = "Ref", - normal = "normal", - germline = "gresource", - pon = "pon", - interval = "interval", - out = list(source = list("normal", "tumor"), - valueFrom = "$(self[0]).$(self[1])"))) -#' @include tl_GetPileupSummaries.R -s2a <- Step(id = "GetPileupSummariesT", run = GetPileupSummaries, - In = list(bam = "tbam", - vcf = "comvcf", - interval = "comvcf", - pileup = list(valueFrom = "$(inputs.bam.nameroot).ptable"))) -s2b <- Step(id = "GetPileupSummariesN", run = GetPileupSummaries, - In = list(bam = "nbam", - vcf = "comvcf", - interval = "comvcf", - pileup = list(valueFrom = "$(inputs.bam.nameroot).ptable"))) -#' @include tl_CalculateContamination.R -s3 <- Step(id = "CalculateContamination", run = CalculateContamination, - In = list(ttable = "GetPileupSummariesT/pout", - ntable = "GetPileupSummariesN/pout", - cont = list(source = list("tumor"), - valueFrom = "$(self[0]).contamination.table"))) -#' @include tl_FilterMutectCalls.R -s4 <- Step(id = "FilterMutectCalls", run = FilterMutectCalls, - In = list(vcf = "Mutect2/vout", - cont = "CalculateContamination/cout", - ref = "Ref", - fvcf = list(source = list("normal", "tumor"), - valueFrom = "$(self[0]).$(self[1]).ctfiltered.vcf"))) -#' @include tl_ColSeqArtifact.R -s5 <- Step(id = "ColSeqArtifact", run = ColSeqArtifact, - In = list(bam = "tbam", - ref = "Ref", - art = list(valueFrom = "$(inputs.bam.nameroot).art"))) -#' @include tl_FilterOBias.R -s6 <- Step(id = "FilterOBias", run = FilterOBias, - In = list(vcf = "FilterMutectCalls/fout", - art = "ColSeqArtifact/aout", - mode = "artMode", - avcf = list(source = list("normal", "tumor"), - valueFrom = "$(self[0]).$(self[1]).ctfiltered.obfiltered.vcf"))) -#' @include tl_bcfview.R -s7 <- Step(id = "bcfview", run = bcfview, - In = list(vcf = "FilterOBias/fout", - filter = "filter", - fout = list(valueFrom = "$(inputs.vcf.nameroot).PASS.vcf"))) - -o1 <- OutputParam(id = "filterVCF", type = "File", outputSource = "FilterOBias/fout") -o2 <- OutputParam(id = "passVCF", type = "File", outputSource = "bcfview/Fout") -o3 <- OutputParam(id = "conTable", type = "File", outputSource = "CalculateContamination/cout") -o4 <- OutputParam(id = "artTable", type = "File", outputSource = "ColSeqArtifact/aout") - -req1 <- list(class = "InlineJavascriptRequirement") -req2 <- list(class = "StepInputExpressionRequirement") -req3 <- list(class = "MultipleInputFeatureRequirement") -Mutect2PL <- cwlStepParam(requirements = list(req1, req2, req3), - inputs = InputParamList(p1a, p1b, p2, p3, p4, - p5, p6, p7, p8, p9, p10), - outputs = OutputParamList(o1, o2, o3, o4)) - -Mutect2PL <- Mutect2PL + s1 + s2a + s2b + s3 + s4 +s5 + s6 + s7 +## https://gatk.broadinstitute.org/hc/en-us/articles/360035531132--How-to-Call-somatic-mutations-using-GATK4-Mutect2 +p1a <- InputParam(id = "tbam", type = "File", secondaryFiles = ".bai") +p1b <- InputParam(id = "nbam", type = "File", secondaryFiles = ".bai") +p2 <- InputParam(id = "Ref", type = "File", + secondaryFiles = list(".fai", "^.dict")) +p3 <- InputParam(id = "normal", type = "string") +p4 <- InputParam(id = "tumor", type = "string") +p5 <- InputParam(id = "gresource", type = "File", + secondaryFiles = "$(self.nameext == '.gz' ? self.basename+'.tbi' : self.basename+'.idx')") +p6 <- InputParam(id = "pon", type = "File", + secondaryFiles = "$(self.nameext == '.gz' ? self.basename+'.tbi' : self.basename+'.idx')") +p7 <- InputParam(id = "interval", type = "File") +p8 <- InputParam(id = "comvcf", type = "File", + secondaryFiles = "$(self.nameext == '.gz' ? self.basename+'.tbi' : self.basename+'.idx')") +p9 <- InputParam(id = "filter", type = "string", default = "PASS") +p10 <- InputParam(id = "threads", type = "int?") +#' @include tl_Mutect2.R +s1 <- cwlStep(id = "Mutect2", run = Mutect2, + In = list(tbam = "tbam", + nbam = "nbam", + Ref = "Ref", + normal = "normal", + germline = "gresource", + pon = "pon", + interval = "interval", + threads = "threads", + out = list(source = list("normal", "tumor"), + valueFrom = "$(self[0]).$(self[1])"))) +#' @include tl_GetPileupSummaries.R +s2a <- cwlStep(id = "GetPileupSummariesT", run = GetPileupSummaries, + In = list(bam = "tbam", + vcf = "comvcf", + interval = "comvcf", + pileup = list(valueFrom = "$(inputs.bam.nameroot).ptable"))) +s2b <- cwlStep(id = "GetPileupSummariesN", run = GetPileupSummaries, + In = list(bam = "nbam", + vcf = "comvcf", + interval = "comvcf", + pileup = list(valueFrom = "$(inputs.bam.nameroot).ptable"))) +#' @include tl_CalculateContamination.R +s3 <- cwlStep(id = "CalculateContamination", run = CalculateContamination, + In = list(ttable = "GetPileupSummariesT/pout", + ntable = "GetPileupSummariesN/pout", + cont = list(source = list("tumor"), + valueFrom = "$(self).contamination.table"), + seg = list(source = list("tumor"), + valueFrom = "$(self).segments"))) +#' @include tl_LearnReadOrientationModel.R +s4 <- cwlStep(id = "LearnReadOrientationModel", run = LearnReadOrientationModel, + In = list(f1r2 = "Mutect2/F1r2")) + +#' @include tl_FilterMutectCalls.R +s5 <- cwlStep(id = "FilterMutectCalls", run = FilterMutectCalls, + In = list(vcf = "Mutect2/vout", + cont = "CalculateContamination/Cout", + seg = "CalculateContamination/Seg", + lro = "LearnReadOrientationModel/rofile", + ref = "Ref", + fvcf = list(source = list("normal", "tumor"), + valueFrom = "$(self[0]).$(self[1]).filtered.vcf"))) + +#' @include tl_bcfview.R +s6 <- cwlStep(id = "bcfview", run = bcfview, + In = list(vcf = "FilterMutectCalls/fout", + filter = "filter", + fout = list(valueFrom = "$(inputs.vcf.nameroot).PASS.vcf"))) + +o1 <- OutputParam(id = "filterVCF", type = "File", outputSource = "FilterMutectCalls/fout") +o2 <- OutputParam(id = "passVCF", type = "File", outputSource = "bcfview/Fout") +o3 <- OutputParam(id = "conTable", type = "File", outputSource = "CalculateContamination/Cout") +o4 <- OutputParam(id = "segment", type = "File", outputSource = "CalculateContamination/Seg") + +req1 <- list(class = "InlineJavascriptRequirement") +req2 <- list(class = "StepInputExpressionRequirement") +req3 <- list(class = "MultipleInputFeatureRequirement") +Mutect2PL <- cwlWorkflow(cwlVersion = "v1.0", + requirements = list(req1, req2, req3), + inputs = InputParamList(p1a, p1b, p2, p3, p4, + p5, p6, p7, p8, p9, p10), + outputs = OutputParamList(o1, o2, o3, o4)) + +Mutect2PL <- Mutect2PL + s1 + s2a + s2b + s3 + s4 + s5 + s6 diff --git a/Rcwl/pl_RSeQC.R b/Rcwl/pl_RSeQC.R index 951e8f9..3025391 100644 --- a/Rcwl/pl_RSeQC.R +++ b/Rcwl/pl_RSeQC.R @@ -1,34 +1,34 @@ -##source(system.file("tools", "gtfToGenePred.R", package = "RcwlPipelines")) -##source(system.file("tools", "genePredToBed.R", package = "RcwlPipelines")) -##source(system.file("tools", "read_distribution.R", package = "RcwlPipelines")) -##source(system.file("tools", "geneBody_coverage.R", package = "RcwlPipelines")) - -## RSeQC Pipeline -#' @include tl_gtfToGenePred.R tl_genePredToBed.R tl_read_distribution.R tl_geneBody_coverage.R -p1 <- InputParam(id = "bam", type = "File", secondaryFiles = ".bai") -p2 <- InputParam(id = "gtf", type = "File") -o1 <- OutputParam(id = "distribution", type = "File", outputSource = "r_distribution/distOut") -o2 <- OutputParam(id = "gCovP", type = "File", outputSource = "gCoverage/gCovPDF") -o3 <- OutputParam(id = "gCovT", type = "File", outputSource = "gCoverage/gCovTXT") -req1 <- list(class = "StepInputExpressionRequirement") -RSeQC <- cwlStepParam(requirements = list(req1), - inputs = InputParamList(p1, p2), - outputs = OutputParamList(o1, o2, o3)) - -s1 <- Step(id = "gtfToGenePred", run = gtfToGenePred, - In = list(gtf = "gtf", - gPred = list(valueFrom = "$(inputs.gtf.nameroot).genePred"))) - -s2 <- Step(id = "genePredToBed", run = genePredToBed, - In = list(genePred = "gtfToGenePred/genePred", - Bed = list(valueFrom = "$(inputs.genePred.nameroot).bed"))) - -s3 <- Step(id = "r_distribution", run = read_distribution, - In = list(bam = "bam", - bed = "genePredToBed/bed")) -s4 <- Step(id = "gCoverage", run = geneBody_coverage, - In = list(bam = "bam", - bed = "genePredToBed/bed", - prefix = list(valueFrom = "$(inputs.bam.nameroot)"))) - -RSeQC <- RSeQC + s1 + s2 + s3 + s4 +##source(system.file("tools", "gtfToGenePred.R", package = "RcwlPipelines")) +##source(system.file("tools", "genePredToBed.R", package = "RcwlPipelines")) +##source(system.file("tools", "read_distribution.R", package = "RcwlPipelines")) +##source(system.file("tools", "geneBody_coverage.R", package = "RcwlPipelines")) + +## RSeQC Pipeline +#' @include tl_gtfToGenePred.R tl_genePredToBed.R tl_read_distribution.R tl_geneBody_coverage.R +p1 <- InputParam(id = "bam", type = "File", secondaryFiles = ".bai") +p2 <- InputParam(id = "gtf", type = "File") +o1 <- OutputParam(id = "distribution", type = "File", outputSource = "r_distribution/distOut") +o2 <- OutputParam(id = "gCovP", type = "File", outputSource = "gCoverage/gCovPDF") +o3 <- OutputParam(id = "gCovT", type = "File", outputSource = "gCoverage/gCovTXT") +req1 <- list(class = "StepInputExpressionRequirement") +RSeQC <- cwlWorkflow(requirements = list(req1), + inputs = InputParamList(p1, p2), + outputs = OutputParamList(o1, o2, o3)) + +s1 <- cwlStep(id = "gtfToGenePred", run = gtfToGenePred, + In = list(gtf = "gtf", + gPred = list(valueFrom = "$(inputs.gtf.nameroot).genePred"))) + +s2 <- cwlStep(id = "genePredToBed", run = genePredToBed, + In = list(genePred = "gtfToGenePred/genePred", + Bed = list(valueFrom = "$(inputs.genePred.nameroot).bed"))) + +s3 <- cwlStep(id = "r_distribution", run = read_distribution, + In = list(bam = "bam", + bed = "genePredToBed/bed")) +s4 <- cwlStep(id = "gCoverage", run = geneBody_coverage, + In = list(bam = "bam", + bed = "genePredToBed/bed", + prefix = list(valueFrom = "$(inputs.bam.nameroot)"))) + +RSeQC <- RSeQC + s1 + s2 + s3 + s4 diff --git a/Rcwl/pl_STARsolo2sce.R b/Rcwl/pl_STARsolo2sce.R new file mode 100644 index 0000000..3564b8f --- /dev/null +++ b/Rcwl/pl_STARsolo2sce.R @@ -0,0 +1,36 @@ +p1 <- InputParam(id = "fastq_cdna", type = "File[]") ## only "id" names will be used for "cwlStep". +p2 <- InputParam(id = "fastq_cb", type = "File[]") +p3 <- InputParam(id = "genomeDir", type = "Directory") +p4 <- InputParam(id = "whiteList", type = "File") +p5 <- InputParam(id = "runThreadN", type = "int") +p6 <- InputParam(id = "soloCellFilter", type = "string") +#' @include tl_STARsolo.R tl_counts2sce.R +## STARsolo +s1 <- cwlStep(id = "STARsolo", run = STARsolo, + In = list(readFilesIn_cdna = "fastq_cdna", + readFilesIn_cb = "fastq_cb", + genomeDir = "genomeDir", + whiteList = "whiteList", + soloCellFilter = "soloCellFilter", + runThreadN = "runThreadN")) + +## counts2sce +s2 <- cwlStep(id = "counts2sce", run = counts2sce, + In = list(dirname = "STARsolo/Solo")) + +## outputs +o1 <- OutputParam(id = "sam", type = "File", outputSource = "STARsolo/outAlign") +o2 <- OutputParam(id = "Solo", type = "Directory", outputSource = "STARsolo/Solo") +o3 <- OutputParam(id = "sce", type = "File", outputSource = "counts2sce/outsce") + +## stepParam +STARsolo2sce <- cwlWorkflow(inputs = InputParamList(p1, p2, p3, p4, p5, p6), + outputs = OutputParamList(o1, o2, o3)) +## pipeline +STARsolo2sce <- STARsolo2sce + s1 + s2 + + + + + + diff --git a/Rcwl/pl_STARsoloDropletUtils.R b/Rcwl/pl_STARsoloDropletUtils.R index 9f6a91e..0e3f2fa 100644 --- a/Rcwl/pl_STARsoloDropletUtils.R +++ b/Rcwl/pl_STARsoloDropletUtils.R @@ -1,36 +1,37 @@ -p1 <- InputParam(id = "fastq_cdna", type = "File[]") ## only "id" names will be used for "Step". -p2 <- InputParam(id = "fastq_cb", type = "File[]") -p3 <- InputParam(id = "genomeDir", type = "Directory") -p4 <- InputParam(id = "whiteList", type = "File") -p5 <- InputParam(id = "runThreadN", type = "int") - -#' @include tl_STARsolo.R tl_DropletUtils.R -## STARsolo -s1 <- Step(id = "STARsolo", run = STARsolo, - In = list(readFilesIn_cdna = "fastq_cdna", - readFilesIn_cb = "fastq_cb", - genomeDir = "genomeDir", - whiteList = "whiteList", - runThreadN = "runThreadN")) - -## DropletUtils -s2 <- Step(id = "DropletUtils", run = DropletUtils, - In = list(dirname = "STARsolo/Solo")) - -## outputs -o1 <- OutputParam(id = "sam", type = "File", outputSource = "STARsolo/outAlign") -o2 <- OutputParam(id = "Solo", type = "Directory", outputSource = "STARsolo/Solo") -o3 <- OutputParam(id = "sce", type = "File", outputSource = "DropletUtils/outsce") -o4 <- OutputParam(id = "plots", type = "File", outputSource = "DropletUtils/plots") - -## stepParam -STARsoloDropletUtils <- cwlStepParam(inputs = InputParamList(p1, p2, p3, p4, p5), - outputs = OutputParamList(o1, o2, o3, o4)) -## pipeline -STARsoloDropletUtils <- STARsoloDropletUtils + s1 + s2 - - - - - - +p1 <- InputParam(id = "fastq_cdna", type = "File[]") ## only "id" names will be used for "cwlStep". +p2 <- InputParam(id = "fastq_cb", type = "File[]") +p3 <- InputParam(id = "genomeDir", type = "Directory") +p4 <- InputParam(id = "whiteList", type = "File") +p5 <- InputParam(id = "runThreadN", type = "int") +p6 <- InputParam(id = "soloCellFilter", type = "string") +#' @include tl_STARsolo.R tl_DropletUtils.R +## STARsolo +s1 <- cwlStep(id = "STARsolo", run = STARsolo, + In = list(readFilesIn_cdna = "fastq_cdna", + readFilesIn_cb = "fastq_cb", + genomeDir = "genomeDir", + whiteList = "whiteList", + soloCellFilter = "soloCellFilter", + runThreadN = "runThreadN")) + +## DropletUtils +s2 <- cwlStep(id = "DropletUtils", run = DropletUtils, + In = list(dirname = "STARsolo/Solo")) + +## outputs +o1 <- OutputParam(id = "sam", type = "File", outputSource = "STARsolo/outAlign") +o2 <- OutputParam(id = "Solo", type = "Directory", outputSource = "STARsolo/Solo") +o3 <- OutputParam(id = "sce", type = "File", outputSource = "DropletUtils/outsce") +o4 <- OutputParam(id = "plots", type = "File", outputSource = "DropletUtils/plots") + +## stepParam +STARsoloDropletUtils <- cwlWorkflow(inputs = InputParamList(p1, p2, p3, p4, p5, p6), + outputs = OutputParamList(o1, o2, o3, o4)) +## pipeline +STARsoloDropletUtils <- STARsoloDropletUtils + s1 + s2 + + + + + + diff --git a/Rcwl/pl_SUPPA.R b/Rcwl/pl_SUPPA.R index b5036e6..32b9027 100644 --- a/Rcwl/pl_SUPPA.R +++ b/Rcwl/pl_SUPPA.R @@ -1,78 +1,78 @@ -p1a <- InputParam(id = "quant", type = "File[]") -p1b <- InputParam(id = "qcolumn", type = "string", default = "TPM") -p1c <- InputParam(id = "qcnames", type = "string") -p2 <- InputParam(id = "gtf", type = "File") -p3 <- InputParam(id = "group1", type = "string") -p4 <- InputParam(id = "group2", type = "string") -p5 <- InputParam(id = "method", type = "string", default = "empirical") - -#' quant merge -#' @include tl_Rsplit.R -s1 <- Step(id = "quantMerge", run = Rsplit, - In = list(files = "quant", - columns = "qcolumn", - cnames = "qcnames", - outfile = list(valueFrom = "iso_tpm.txt"))) - -#' event calculation -#' @include tl_SUPPA_generateEvents.R tl_awk_merge.R -s2 <- Step(id = "genEvents", run = SUPPA_generateEvents, - In = list(gtf = "gtf", - outfile = list(valueFrom = "events"))) - -s3 <- Step(id = "mergeEvents", run = awk_merge, - In = list(files = "genEvents/outIOE", - outfile = list(valueFrom = "merged.ioe"))) - -#' psi -#' @include tl_SUPPA_psiPerEvent.R -s4 <- Step(id = "psiPerEvent", run = SUPPA_psiPerEvent, - In = list(ioe = "mergeEvents/out", - exp = "quantMerge/outFile", - outfile = list(valueFrom = "events"))) - -#' split by groups -s5a <- Step(id = "splitEventsG1", run = Rsplit, - In = list(files = list(source = list("psiPerEvent/outFile"), - linkMerge = "merge_flattened"), - outfile = list(valueFrom = "group1.psi"), - columns = "group1")) -s5b <- Step(id = "splitEventsG2", run = Rsplit, - In = list(files = list(source = list("psiPerEvent/outFile"), - linkMerge = "merge_flattened"), - outfile = list(valueFrom = "group2.psi"), - columns = "group2")) -s5c <- Step(id = "splitExpG1", run = Rsplit, - In = list(files = list(source = list("quantMerge/outFile"), - linkMerge = "merge_flattened"), - outfile = list(valueFrom = "group1.tpm"), - columns = "group1")) -s5d <- Step(id = "splitExpG2", run = Rsplit, - In = list(files = list(source = list("quantMerge/outFile"), - linkMerge = "merge_flattened"), - outfile = list(valueFrom = "group2.tpm"), - columns = "group2")) - -#' diffSplice -#' @include tl_SUPPA_diffSplice.R -s6 <- Step(id = "diffSplice", run = SUPPA_diffSplice, - In = list(iox = "mergeEvents/out", - method = "method", - psi = list(source = list("splitEventsG1/outFile", - "splitEventsG2/outFile"), - linkMerge = "merge_flattened"), - exp = list(source = list("splitExpG1/outFile", - "splitExpG2/outFile"), - linkMerge = "merge_flattened"), - output = list(valueFrom = "diffSplice"))) - -o1 <- OutputParam(id = "res", type = "File[]", outputSource = "diffSplice/outFile") - -req1 <- list(class = "MultipleInputFeatureRequirement") -req2 <- list(class = "InlineJavascriptRequirement") -req3 <- list(class = "StepInputExpressionRequirement") -SUPPA <- cwlStepParam(requirements = list(req1, req2, req3), - inputs = InputParamList(p1a, p1b, p1c, p2, p3, p4, p5), - outputs = OutputParamList(o1)) -SUPPA <- SUPPA + s1 + s2 + s3 + s4 + s5a + s5b + s5c + s5d + s6 - +p1a <- InputParam(id = "quant", type = "File[]") +p1b <- InputParam(id = "qcolumn", type = "string", default = "TPM") +p1c <- InputParam(id = "qcnames", type = "string") +p2 <- InputParam(id = "gtf", type = "File") +p3 <- InputParam(id = "group1", type = "string") +p4 <- InputParam(id = "group2", type = "string") +p5 <- InputParam(id = "method", type = "string", default = "empirical") + +#' quant merge +#' @include tl_Rsplit.R +s1 <- cwlStep(id = "quantMerge", run = Rsplit, + In = list(files = "quant", + columns = "qcolumn", + cnames = "qcnames", + outfile = list(valueFrom = "iso_tpm.txt"))) + +#' event calculation +#' @include tl_SUPPA_generateEvents.R tl_awk_merge.R +s2 <- cwlStep(id = "genEvents", run = SUPPA_generateEvents, + In = list(gtf = "gtf", + outfile = list(valueFrom = "events"))) + +s3 <- cwlStep(id = "mergeEvents", run = awk_merge, + In = list(files = "genEvents/outIOE", + outfile = list(valueFrom = "merged.ioe"))) + +#' psi +#' @include tl_SUPPA_psiPerEvent.R +s4 <- cwlStep(id = "psiPerEvent", run = SUPPA_psiPerEvent, + In = list(ioe = "mergeEvents/out", + exp = "quantMerge/outFile", + outfile = list(valueFrom = "events"))) + +#' split by groups +s5a <- cwlStep(id = "splitEventsG1", run = Rsplit, + In = list(files = list(source = list("psiPerEvent/outFile"), + linkMerge = "merge_flattened"), + outfile = list(valueFrom = "group1.psi"), + columns = "group1")) +s5b <- cwlStep(id = "splitEventsG2", run = Rsplit, + In = list(files = list(source = list("psiPerEvent/outFile"), + linkMerge = "merge_flattened"), + outfile = list(valueFrom = "group2.psi"), + columns = "group2")) +s5c <- cwlStep(id = "splitExpG1", run = Rsplit, + In = list(files = list(source = list("quantMerge/outFile"), + linkMerge = "merge_flattened"), + outfile = list(valueFrom = "group1.tpm"), + columns = "group1")) +s5d <- cwlStep(id = "splitExpG2", run = Rsplit, + In = list(files = list(source = list("quantMerge/outFile"), + linkMerge = "merge_flattened"), + outfile = list(valueFrom = "group2.tpm"), + columns = "group2")) + +#' diffSplice +#' @include tl_SUPPA_diffSplice.R +s6 <- cwlStep(id = "diffSplice", run = SUPPA_diffSplice, + In = list(iox = "mergeEvents/out", + method = "method", + psi = list(source = list("splitEventsG1/outFile", + "splitEventsG2/outFile"), + linkMerge = "merge_flattened"), + exp = list(source = list("splitExpG1/outFile", + "splitExpG2/outFile"), + linkMerge = "merge_flattened"), + output = list(valueFrom = "diffSplice"))) + +o1 <- OutputParam(id = "res", type = "File[]", outputSource = "diffSplice/outFile") + +req1 <- list(class = "MultipleInputFeatureRequirement") +req2 <- list(class = "InlineJavascriptRequirement") +req3 <- list(class = "StepInputExpressionRequirement") +SUPPA <- cwlWorkflow(requirements = list(req1, req2, req3), + inputs = InputParamList(p1a, p1b, p1c, p2, p3, p4, p5), + outputs = OutputParamList(o1)) +SUPPA <- SUPPA + s1 + s2 + s3 + s4 + s5a + s5b + s5c + s5d + s6 + diff --git a/Rcwl/pl_ScarHRD.R b/Rcwl/pl_ScarHRD.R new file mode 100644 index 0000000..ecf49da --- /dev/null +++ b/Rcwl/pl_ScarHRD.R @@ -0,0 +1,26 @@ +#' @include tl_bam2seqz.R tl_seqz_binning.R tl_scar_HRD.R +p1 <- InputParam(id = "normal", type = "File", secondaryFiles = ".bai") +p2 <- InputParam(id = "tumor", type = "File", secondaryFiles = ".bai") +p3 <- InputParam(id = "ref", type = "File", secondaryFiles = ".fai") +p4 <- InputParam(id = "gc", type = "File") +p5 <- InputParam(id = "out", type = "string") +p6 <- InputParam(id = "window", type = "int", default = 50L) +p7 <- InputParam(id = "build", type = "string", default = "grch37") +s1 <- cwlStep(id = "bam2seqz", run = bam2seqz, + In = list(normal = "normal", + tumor = "tumor", + ref = "ref", + gc = "gc", + out = "out")) +s2 <- cwlStep(id = "seqz_binning", run = seqz_binning, + In = list(seqz = "bam2seqz/seqz", + window = "window", + out = "out")) +s3 <- cwlStep(id = "hrd", run = scar_HRD, + In = list(seg = "seqz_binning/seqzs", + reference = "build")) +o1 <- OutputParam(id = "segs", type = "File", outputSource = "seqz_binning/seqzs") +o2 <- OutputParam(id = "score", type = "File", outputSource = "hrd/HRD") +ScarHRD <- cwlWorkflow(inputs = InputParamList(p1, p2 , p3, p4, p5, p6, p7), + outputs = OutputParamList(o1, o2)) +ScarHRD <- ScarHRD + s1 + s2 + s3 diff --git a/Rcwl/pl_SomaticCaller4.R b/Rcwl/pl_SomaticCaller4.R new file mode 100644 index 0000000..243e4c9 --- /dev/null +++ b/Rcwl/pl_SomaticCaller4.R @@ -0,0 +1,142 @@ + +p1 <- InputParam(id = "tbam", type = "File", secondaryFiles = ".bai") +p2 <- InputParam(id = "nbam", type = "File", secondaryFiles = ".bai") +p3 <- InputParam(id = "Ref", type = "File", + secondaryFiles = c(".fai", "^.dict")) +p4 <- InputParam(id = "normal", type = "string") +p5 <- InputParam(id = "tumor", type = "string") +p6 <- InputParam(id = "dbsnp", type = "File", + secondaryFiles = "$(self.nameext == '.gz' ? self.basename+'.tbi' : self.basename+'.idx')") +p7 <- InputParam(id = "gresource", type = "File", + secondaryFiles = "$(self.nameext == '.gz' ? self.basename+'.tbi' : self.basename+'.idx')") +p8 <- InputParam(id = "pon", type = "File", + secondaryFiles = "$(self.nameext == '.gz' ? self.basename+'.tbi' : self.basename+'.idx')") +p9 <- InputParam(id = "interval", type = "File") +p10 <- InputParam(id = "comvcf", type = "File", + secondaryFiles = "$(self.nameext == '.gz' ? self.basename+'.tbi' : self.basename+'.idx')") +p11 <- InputParam(id = "filter", type = "string", default = "PASS") +p12 <- InputParam(id = "threads", type = "int", default = 8L) + +#' @include pl_Mutect2PL.R +s1 <- cwlStep(id = "Mutect2PL", run = Mutect2PL, + In = list(tbam = "tbam", + nbam = "nbam", + Ref = "Ref", + normal = "normal", + tumor = "tumor", + gresource = "gresource", + pon = "pon", + interval = "interval", + comvcf = "comvcf")) +#' @include tl_MuSE.R +s2 <- cwlStep(id = "MuSE", run = MuSE, + In = list(tbam = "tbam", + nbam = "nbam", + ref = "Ref", + region = "interval", + dbsnp = "dbsnp", + vcf = list(source = list("tumor", "normal"), + valueFrom = "$(self[0])_$(self[1])_MuSE.vcf"))) +#' @include pl_mantaStrelka.R tl_bgzip.R tl_tabix_index.R +s3a <- cwlStep(id = "bgzip", run = bgzip, + In = list(ifile = "interval")) +s3b <- cwlStep(id = "tabixIndex", run = tabix_index, + In = list(tfile = "bgzip/zfile", + type = list(valueFrom = "bed"))) +s3 <- cwlStep(id = "mantaStrelka", run = mantaStrelka, + In = list(tbam = "tbam", + nbam = "nbam", + ref = "Ref", + region = "tabixIndex/idx")) + +#' @include tl_VarDict.R +s4 <- cwlStep(id = "VarDict", run = VarDict, + In = list(tbam = "tbam", + nbam = "nbam", + ref = "Ref", + region = "interval", + threads = "threads", + vcf = list(source = list("tumor", "normal"), + valueFrom = "$(self[0])_$(self[1])_VarDict.vcf"), + af = list(valueFrom = "0.05"))) + +varcombiner <- function(ss, si, m2, mu, vd, id_t, id_n){ + ## combine + library(VariantCombiner) + + v1a <- readVcf(ss) + v1a <- v1a[fixed(v1a)$FILTER == "PASS"] + v1b <- readVcf(si) + v1b <- v1b[fixed(v1b)$FILTER == "PASS"] + s1a <- strelka_snv(v1a) + s1b <- strelka_indel(v1b) + ## strelka2 + v_s <- SomaticCombiner(s1a, s1b, sources = c("strelka2", "strelka2"), + GENO = c(GT = 1, DP = 1, AD = 1), + id_t = id_t, id_n = id_n) + ## mutect2 + m2v <- readVcf(m2) + m2v <- m2v[fixed(m2v)$FILTER %in% c("PASS", "multiallelic")] + v_m <- SomaticCombiner(m2v, v_s, source = c("mutect2", "strelka2"), + GENO = c(GT = 1, DP = 1, AD = 1), + id_t = id_t, id_n = id_n) + + ## muse + mu1 <- readVcf(mu) + mu1 <- mu1[fixed(mu1)$FILTER == "PASS"] + v_m <- SomaticCombiner(v_m, mu1, source = c("", "muse"), + GENO = c(GT = 1, DP = 1, AD = 1), + id_t = id_t, id_n = id_n) + ## vardict + vd1 <- readVcf(vd) + vd1 <- vd1[info(vd1)$STATUS == "StrongSomatic" & fixed(vd1)$FILTER == "PASS"] + vd1 <- vd1[!info(vd1)$TYPE %in% c("DEL", "DUP", "INV")] + v_m <- SomaticCombiner(v_m, vd1, source = c("", "vardict"), + GENO = c(GT = 1, DP = 1, AD = 1), + id_t = id_t, id_n = id_n) + writeVcf(v_m, paste0(id_t, "_", id_n, "_strelka2_mutect2_muse_vardict.vcf")) +} + +v1 <- InputParam(id = "ss", type = "File", prefix = "ss=", separate = FALSE) +v2 <- InputParam(id = "si", type = "File", prefix = "si=", separate = FALSE) +v3 <- InputParam(id = "m2", type = "File", prefix = "m2=", separate = FALSE) +v4 <- InputParam(id = "mu", type = "File", prefix = "mu=", separate = FALSE) +v5 <- InputParam(id = "vd", type = "File", prefix = "vd=", separate = FALSE) +v6 <- InputParam(id = "tid", type = "string", prefix = "id_t=", separate = FALSE) +v7 <- InputParam(id = "nid", type = "string", prefix = "id_n=", separate = FALSE) +vo1 <- OutputParam(id = "cvcf", type = "File", glob = "*_strelka2_mutect2_muse_vardict.vcf") +Var4Combiner <- cwlProcess(baseCommand = varcombiner, + inputs = InputParamList(v1, v2, v3, v4, v5, v6, v7), + outputs = OutputParamList(vo1)) + +s5 <- cwlStep(id = "combine", run = Var4Combiner, + In = list(m2 = "Mutect2PL/filterVCF", + vd = "VarDict/outVcf", + mu = "MuSE/outVcf", + ss = "mantaStrelka/snvs", + si = "mantaStrelka/indels", + tid = "tumor", + nid = "normal")) + +o1a <- OutputParam(id = "mutect2filterVCF", type = "File", outputSource = "Mutect2PL/filterVCF") +o1b <- OutputParam(id = "mutect2passVCF", type = "File", outputSource = "Mutect2PL/passVCF") +o1c <- OutputParam(id = "mutect2conTable", type = "File", outputSource = "Mutect2PL/conTable") +o1d <- OutputParam(id = "mutect2segment", type = "File", outputSource = "Mutect2PL/segment") +o2 <- OutputParam(id = "MuSEout", type = "File", outputSource = "MuSE/outVcf") +o3a <- OutputParam(id = "strelka2snv", type = "File", outputSource = "mantaStrelka/snvs") +o3b <- OutputParam(id = "strelka2indel", type = "File", outputSource = "mantaStrelka/indels") +o4 <- OutputParam(id = "VarDictout", type = "File", outputSource = "VarDict/outVcf") +o5 <- OutputParam(id = "combineVcf", type = "File", outputSource = "combine/cvcf") + +req1 <- list(class = "InlineJavascriptRequirement") +req2 <- list(class = "StepInputExpressionRequirement") +req3 <- list(class = "SubworkflowFeatureRequirement") +req4 <- list(class = "MultipleInputFeatureRequirement") +SomaticCaller4 <- cwlWorkflow(requirements = list(req1, req2, req3, req4), + inputs = InputParamList(p1, p2, p3, p4, p5, p6, p7, + p8, p9, p10, p11, p12), + outputs = OutputParamList(o1a, o1b, o1c, o1d, o2, + o3a, o3b, o4, o5)) + +SomaticCaller4 <- SomaticCaller4 + s1 + s2 + s3a + s3b + s3 + s4 +s5 + diff --git a/Rcwl/pl_SomaticCaller_mouse.R b/Rcwl/pl_SomaticCaller_mouse.R new file mode 100644 index 0000000..5353c03 --- /dev/null +++ b/Rcwl/pl_SomaticCaller_mouse.R @@ -0,0 +1,143 @@ + +p1 <- InputParam(id = "tbam", type = "File", secondaryFiles = ".bai") +p2 <- InputParam(id = "nbam", type = "File", secondaryFiles = ".bai") +p3 <- InputParam(id = "Ref", type = "File", + secondaryFiles = c(".fai", "^.dict")) +p4 <- InputParam(id = "normal", type = "string") +p5 <- InputParam(id = "tumor", type = "string") +p6 <- InputParam(id = "dbsnp", type = "File", + secondaryFiles = "$(self.nameext == '.gz' ? self.basename+'.tbi' : self.basename+'.idx')") +## p7 <- InputParam(id = "gresource", type = "File", +## secondaryFiles = "$(self.nameext == '.gz' ? self.basename+'.tbi' : self.basename+'.idx')") +## p8 <- InputParam(id = "pon", type = "File", +## secondaryFiles = "$(self.nameext == '.gz' ? self.basename+'.tbi' : self.basename+'.idx')") +p9 <- InputParam(id = "interval", type = "File") +## p10 <- InputParam(id = "comvcf", type = "File", +## secondaryFiles = "$(self.nameext == '.gz' ? self.basename+'.tbi' : self.basename+'.idx')") +## p11 <- InputParam(id = "filter", type = "string", default = "PASS") +p12 <- InputParam(id = "threads", type = "int", default = 8) + +#' @include tl_Mutect2.R +s1 <- cwlStep(id = "Mutect2", run = Mutect2, + In = list(tbam = "tbam", + nbam = "nbam", + Ref = "Ref", + normal = "normal", + ##tumor = "tumor", + out = list(source = list("tumor", "normal"), + valueFrom = "$(self[0])_$(self[1])_mutect2.vcf"), + threads = "threads", + interval = "interval")) + +#' @include tl_MuSE.R +s2 <- cwlStep(id = "MuSE", run = MuSE, + In = list(tbam = "tbam", + nbam = "nbam", + ref = "Ref", + region = "interval", + dbsnp = "dbsnp", + vcf = list(source = list("tumor", "normal"), + valueFrom = "$(self[0])_$(self[1])_MuSE.vcf"))) +#' @include pl_mantaStrelka.R tl_bgzip.R tl_tabix_index.R +s3a <- cwlStep(id = "bgzip", run = bgzip, + In = list(ifile = "interval")) +s3b <- cwlStep(id = "tabixIndex", run = tabix_index, + In = list(tfile = "bgzip/zfile", + type = list(valueFrom = "bed"))) +s3 <- cwlStep(id = "mantaStrelka", run = mantaStrelka, + In = list(tbam = "tbam", + nbam = "nbam", + ref = "Ref", + region = "tabixIndex/idx")) + +#' @include tl_VarDict.R +s4 <- cwlStep(id = "VarDict", run = VarDict, + In = list(tbam = "tbam", + nbam = "nbam", + ref = "Ref", + region = "interval", + threads = "threads", + vcf = list(source = list("tumor", "normal"), + valueFrom = "$(self[0])_$(self[1])_VarDict.vcf"), + af = list(valueFrom = "0.05"))) + +varcombiner <- function(ss, si, m2, mu, vd, id_t, id_n){ + ## combine + library(VariantCombiner) + + v1a <- readVcf(ss) + v1a <- v1a[fixed(v1a)$FILTER == "PASS"] + v1b <- readVcf(si) + v1b <- v1b[fixed(v1b)$FILTER == "PASS"] + s1a <- strelka_snv(v1a) + s1b <- strelka_indel(v1b) + ## strelka2 + v_s <- SomaticCombiner(s1a, s1b, sources = c("strelka2", "strelka2"), + GENO = c(GT = 1, DP = 1, AD = 1), + id_t = id_t, id_n = id_n) + ## mutect2 + m2v <- readVcf(m2) + ## m2v <- m2v[fixed(m2v)$FILTER == "PASS"] + v_m <- SomaticCombiner(m2v, v_s, source = c("mutect2", "strelka2"), + GENO = c(GT = 1, DP = 1, AD = 1), + id_t = id_t, id_n = id_n) + + ## muse + mu1 <- readVcf(mu) + mu1 <- mu1[fixed(mu1)$FILTER == "PASS"] + v_m <- SomaticCombiner(v_m, mu1, source = c("", "muse"), + GENO = c(GT = 1, DP = 1, AD = 1), + id_t = id_t, id_n = id_n) + ## vardict + vd1 <- readVcf(vd) + vd1 <- vd1[info(vd1)$STATUS == "StrongSomatic" & fixed(vd1)$FILTER == "PASS"] + vd1 <- vd1[!info(vd1)$TYPE %in% c("DEL", "DUP", "INV")] + v_m <- SomaticCombiner(v_m, vd1, source = c("", "vardict"), + GENO = c(GT = 1, DP = 1, AD = 1), + id_t = id_t, id_n = id_n) + writeVcf(v_m, paste0(id_t, "_", id_n, "_strelka2_mutect2_muse_vardict.vcf")) +} + +v1 <- InputParam(id = "ss", type = "File", prefix = "ss=", separate = FALSE) +v2 <- InputParam(id = "si", type = "File", prefix = "si=", separate = FALSE) +v3 <- InputParam(id = "m2", type = "File", prefix = "m2=", separate = FALSE) +v4 <- InputParam(id = "mu", type = "File", prefix = "mu=", separate = FALSE) +v5 <- InputParam(id = "vd", type = "File", prefix = "vd=", separate = FALSE) +v6 <- InputParam(id = "tid", type = "string", prefix = "id_t=", separate = FALSE) +v7 <- InputParam(id = "nid", type = "string", prefix = "id_n=", separate = FALSE) +vo1 <- OutputParam(id = "cvcf", type = "File", glob = "*_strelka2_mutect2_muse_vardict.vcf") +Var4Combiner <- cwlProcess(baseCommand = varcombiner, + inputs = InputParamList(v1, v2, v3, v4, v5, v6, v7), + outputs = OutputParamList(vo1)) + +s5 <- cwlStep(id = "combine", run = Var4Combiner, + In = list(m2 = "Mutect2/vout", + vd = "VarDict/outVcf", + mu = "MuSE/outVcf", + ss = "mantaStrelka/snvs", + si = "mantaStrelka/indels", + tid = "tumor", + nid = "normal")) + +## o1a <- OutputParam(id = "mutect2filterVCF", type = "File", outputSource = "Mutect2PL/filterVCF") +## o1b <- OutputParam(id = "mutect2passVCF", type = "File", outputSource = "Mutect2PL/passVCF") +## o1c <- OutputParam(id = "mutect2conTable", type = "File", outputSource = "Mutect2PL/conTable") +## o1d <- OutputParam(id = "mutect2segment", type = "File", outputSource = "Mutect2PL/segment") +o1 <- OutputParam(id = "mutect2out", type = "File", outputSource = "Mutect2/vout") +o2 <- OutputParam(id = "MuSEout", type = "File", outputSource = "MuSE/outVcf") +o3a <- OutputParam(id = "strelka2snv", type = "File", outputSource = "mantaStrelka/snvs") +o3b <- OutputParam(id = "strelka2indel", type = "File", outputSource = "mantaStrelka/indels") +o4 <- OutputParam(id = "VarDictout", type = "File", outputSource = "VarDict/outVcf") +o5 <- OutputParam(id = "combineVcf", type = "File", outputSource = "combine/cvcf") + +req1 <- list(class = "InlineJavascriptRequirement") +req2 <- list(class = "StepInputExpressionRequirement") +req3 <- list(class = "SubworkflowFeatureRequirement") +req4 <- list(class = "MultipleInputFeatureRequirement") +SomaticCaller_mouse <- cwlWorkflow(requirements = list(req1, req2, req3, req4), + inputs = InputParamList(p1, p2, p3, p4, p5, p6, p9, p12), + outputs = OutputParamList(o1, o2, + o3a, o3b, o4, o5)) + +SomaticCaller_mouse <- SomaticCaller_mouse + s1 + s2 + s3a + s3b + s3 + s4 +s5 + diff --git a/Rcwl/pl_SomaticCallers.R b/Rcwl/pl_SomaticCallers.R index ef94282..a53ce8c 100644 --- a/Rcwl/pl_SomaticCallers.R +++ b/Rcwl/pl_SomaticCallers.R @@ -1,161 +1,165 @@ - -p1 <- InputParam(id = "tbam", type = "File", secondaryFiles = ".bai") -p2 <- InputParam(id = "nbam", type = "File", secondaryFiles = ".bai") -p3 <- InputParam(id = "Ref", type = "File", - secondaryFiles = c(".fai", "$(self.nameroot).dict")) -## p4 <- InputParam(id = "normal", type = "string") -## p5 <- InputParam(id = "tumor", type = "string") -p6 <- InputParam(id = "dbsnp", type = "File", secondaryFiles = ".tbi") -p7 <- InputParam(id = "gresource", type = "File", secondaryFiles = ".idx") -p8 <- InputParam(id = "pon", type = "File", secondaryFiles = ".idx") -p9 <- InputParam(id = "interval", type = "File") -p10 <- InputParam(id = "comvcf", type = "File", secondaryFiles = ".idx") -p11 <- InputParam(id = "artMode", type = InputArrayParam(items = "string"), - default = list("G/T", "C/T")) -p12 <- InputParam(id = "filter", type = "string", default = "PASS") -p13 <- InputParam(id = "threads", type = "int", default = 8) - -#' @include pl_Mutect2PL.R -s1 <- Step(id = "Mutect2PL", run = Mutect2PL, - In = list(tbam = "tbam", - nbam = "nbam", - Ref = "Ref", - normal = list(valueFrom = "$(inputs.nbam.nameroot.split('_')[0])"), - tumor = list(valueFrom = "$(inputs.tbam.nameroot.split('_')[0])"), - gresource = "gresource", - pon = "pon", - interval = "interval", - comvcf = "comvcf")) -#' @include tl_MuSE.R -s2 <- Step(id = "MuSE", run = MuSE, - In = list(tbam = "tbam", - nbam = "nbam", - ref = "Ref", - region = "interval", - dbsnp = "dbsnp", - vcf = list(valueFrom = "$(inputs.tbam.nameroot.split('_')[0])_MuSE.vcf"))) -#' @include pl_mantaStrelka.R -s3a <- Step(id = "bgzip", run = bgzip, - In = list(ifile = "interval")) -s3b <- Step(id = "tabixIndex", run = tabix_index, - In = list(tfile = "bgzip/zfile", - type = list(valueFrom = "bed"))) -s3 <- Step(id = "mantaStrelka", run = mantaStrelka, - In = list(tbam = "tbam", - nbam = "nbam", - ref = "Ref", - region = "tabixIndex/idx")) -#' @include tl_SomaticSniper.R -s4 <- Step(id = "SomaticSniper", run = SomaticSniper, - In = list(tbam = "tbam", - nbam = "nbam", - ref = "Ref", - vcf = list(valueFrom = "$(inputs.tbam.nameroot.split('_')[0])_SomaticSniper.vcf"))) -#' @include tl_VarDict.R -s5 <- Step(id = "VarDict", run = VarDict, - In = list(tbam = "tbam", - nbam = "nbam", - ref = "Ref", - region = "interval", - vcf = list(valueFrom = "$(inputs.tbam.nameroot.split('_')[0])_VarDict.vcf"))) -#' @include tl_LoFreq.R -s6 <- Step(id = "LoFreq", run = LoFreq, - In = list(tbam = "tbam", - nbam = "nbam", - ref = "Ref", - region = "interval", - dbsnp = "dbsnp", - threads = "threads", - out = list(valueFrom = "$(inputs.tbam.nameroot.split('_')[0])_LoFreq.vcf"))) -#' @include pl_VarScan2Somatic.R -s7 <- Step(id = "VarScanPL", run = VarScan2Somatic, - In = list(tbam = "tbam", - nbam = "nbam", - ref = "Ref", - region = "interval")) - -#' @include tl_SomaticSeq_Wrapper.R -s8 <- Step(id = "Wrapper", run = SomaticSeq_Wrapper, - In = list(tbam = "tbam", - nbam = "nbam", - ref = "Ref", - region = "interval", - dbsnp = "dbsnp", - mutect2 = "Mutect2PL/filterVCF", - varscanSnv = "VarScanPL/sSnp", - varscanIndel = "VarScanPL/sIndel", - sniper = "SomaticSniper/outVcf", - vardict = "VarDict/outVcf", - muse = "MuSE/outVcf", - strelkaSnv = "mantaStrelka/snvs", - strelkaIndel = "mantaStrelka/indels", - lofreqSnv = "LoFreq/snp", - lofreqIndel = "LoFreq/indel")) - -mergeTSV <- function(esnv, eindel){ - snv1 <- read.table(esnv, header = TRUE) - indel1 <- read.table(eindel, header = TRUE) - var1 <- rbind(snv1, indel1) - var1[is.na(var1)] <- 0 - write.table(var1, file = "Ensemble.sVar.tsv", - row.names = FALSE, sep = "\t", quote = FALSE) -} - -m1 <- InputParam(id = "esnv", type = "File", prefix = "esnv=", separate = FALSE) -m2 <- InputParam(id = "eindel", type = "File", prefix = "eindel=", separate = FALSE) -out1 <- OutputParam(id = "tsv", type = "File", glob = "Ensemble.sVar.tsv") -mTSV <- cwlParam(baseCommand = mergeTSV, - inputs = InputParamList(m1, m2), - outputs = OutputParamList(out1)) - -s9 <- Step(id = "mergeTSV", run = mTSV, - In = list(esnv = "Wrapper/EnsSNV", - eindel = "Wrapper/EnsINDEL")) -#' @include pl_neusomatic.R -s10 <- Step(id = "neusomaticPL", run = neusomatic, - In = list(tbam = "tbam", - nbam = "nbam", - ref = "Ref", - region = "interval", - ensemble = "mergeTSV/tsv", - threads = "threads", - ovcf = list(valueFrom = "$(inputs.tbam.nameroot.split('_')[0])_neusomatic.vcf"))) - -o1a <- OutputParam(id = "mutect2filterVCF", type = "File", outputSource = "Mutect2PL/filterVCF") -o1b <- OutputParam(id = "mutect2passVCF", type = "File", outputSource = "Mutect2PL/passVCF") -o1c <- OutputParam(id = "mutect2conTable", type = "File", outputSource = "Mutect2PL/conTable") -o1d <- OutputParam(id = "mutect2artTable", type = "File", outputSource = "Mutect2PL/artTable") -o2 <- OutputParam(id = "MuSEout", type = "File", outputSource = "MuSE/outVcf") -o3a <- OutputParam(id = "strelka2snv", type = "File", outputSource = "mantaStrelka/snvs") -o3b <- OutputParam(id = "strelka2indel", type = "File", outputSource = "mantaStrelka/indels") -o4 <- OutputParam(id = "SomaticSniperout", type = "File", outputSource = "SomaticSniper/outVcf") -o5 <- OutputParam(id = "VarDictout", type = "File", outputSource = "VarDict/outVcf") -o6a <- OutputParam(id = "LoFreqsnp", type = "File", outputSource = "LoFreq/snp") -o6b <- OutputParam(id = "LoFreqindel", type = "File", outputSource = "LoFreq/indel") -o6c <- OutputParam(id = "LoFreqsnpdb", type = "File", outputSource = "LoFreq/snpdb") -o6d <- OutputParam(id = "LoFreqindeldb", type = "File", outputSource = "LoFreq/indeldb") -o7a <- OutputParam(id = "VarScanSnp", type = "File", outputSource = "VarScanPL/sSnp") -o7b <- OutputParam(id = "VarScanIndel", type = "File", outputSource = "VarScanPL/sIndel") -o7c <- OutputParam(id = "VarScansVcf", type = "File", outputSource = "VarScanPL/sVcf") -o8a <- OutputParam(id = "mergeTSVout", type = "File", outputSource = "mergeTSV/tsv") -o8b <- OutputParam(id = "WrapperSNV", type = "File", outputSource = "Wrapper/conSNV") -o8c <- OutputParam(id = "WrapperINDEL", type = "File", outputSource = "Wrapper/conINDEL") -o8d <- OutputParam(id = "WrapperESNV", type = "File", outputSource = "Wrapper/EnsSNV") -o8e <- OutputParam(id = "WrapperEINDEL", type = "File", outputSource = "Wrapper/EnsINDEL") -o9 <- OutputParam(id = "neusomaticVCF", type = "File", outputSource = "neusomaticPL/outVcf") - -req1 <- list(class = "InlineJavascriptRequirement") -req2 <- list(class = "StepInputExpressionRequirement") -req3 <- list(class = "SubworkflowFeatureRequirement") -SomaticCallers <- cwlStepParam(requirements = list(req1, req2, req3), - inputs = InputParamList(p1, p2, p3, p6, p7, - p8, p9, p10, p11, p12, p13), - outputs = OutputParamList(o1a, o1b, o1c, o1d, o2, - o3a, o3b, o4, o5, - o6a, o6b, o6c, o6d, - o7a, o7b, o7c, - o8a, o8b, o8c, o8d, o8e, - o9)) - -SomaticCallers <- SomaticCallers + s1 + s2 + s3a + s3b + s3 + s4 +s5 + s6 + s7 + s8 + s9 + s10 - + +p1 <- InputParam(id = "tbam", type = "File", secondaryFiles = ".bai") +p2 <- InputParam(id = "nbam", type = "File", secondaryFiles = ".bai") +p3 <- InputParam(id = "Ref", type = "File", + secondaryFiles = c(".fai", "^.dict")) +## p4 <- InputParam(id = "normal", type = "string") +## p5 <- InputParam(id = "tumor", type = "string") +p6 <- InputParam(id = "dbsnp", type = "File", + secondaryFiles = "$(self.nameext == '.gz' ? self.basename+'.tbi' : self.basename+'.idx')") +p7 <- InputParam(id = "gresource", type = "File", + secondaryFiles = "$(self.nameext == '.gz' ? self.basename+'.tbi' : self.basename+'.idx')") +p8 <- InputParam(id = "pon", type = "File", + secondaryFiles = "$(self.nameext == '.gz' ? self.basename+'.tbi' : self.basename+'.idx')") +p9 <- InputParam(id = "interval", type = "File") +p10 <- InputParam(id = "comvcf", type = "File", + secondaryFiles = "$(self.nameext == '.gz' ? self.basename+'.tbi' : self.basename+'.idx')") +## p11 <- InputParam(id = "artMode", type = InputArrayParam(items = "string"), +## default = list("G/T", "C/T")) +p12 <- InputParam(id = "filter", type = "string", default = "PASS") +p13 <- InputParam(id = "threads", type = "int", default = 8) + +#' @include pl_Mutect2PL.R +s1 <- cwlStep(id = "Mutect2PL", run = Mutect2PL, + In = list(tbam = "tbam", + nbam = "nbam", + Ref = "Ref", + normal = list(valueFrom = "$(inputs.nbam.nameroot.split('_')[0])"), + tumor = list(valueFrom = "$(inputs.tbam.nameroot.split('_')[0])"), + gresource = "gresource", + pon = "pon", + interval = "interval", + comvcf = "comvcf")) +#' @include tl_MuSE.R +s2 <- cwlStep(id = "MuSE", run = MuSE, + In = list(tbam = "tbam", + nbam = "nbam", + ref = "Ref", + region = "interval", + dbsnp = "dbsnp", + vcf = list(valueFrom = "$(inputs.tbam.nameroot.split('_')[0])_MuSE.vcf"))) +#' @include pl_mantaStrelka.R tl_bgzip.R tl_tabix_index.R +s3a <- cwlStep(id = "bgzip", run = bgzip, + In = list(ifile = "interval")) +s3b <- cwlStep(id = "tabixIndex", run = tabix_index, + In = list(tfile = "bgzip/zfile", + type = list(valueFrom = "bed"))) +s3 <- cwlStep(id = "mantaStrelka", run = mantaStrelka, + In = list(tbam = "tbam", + nbam = "nbam", + ref = "Ref", + region = "tabixIndex/idx")) +#' @include tl_SomaticSniper.R +s4 <- cwlStep(id = "SomaticSniper", run = SomaticSniper, + In = list(tbam = "tbam", + nbam = "nbam", + ref = "Ref", + vcf = list(valueFrom = "$(inputs.tbam.nameroot.split('_')[0])_SomaticSniper.vcf"))) +#' @include tl_VarDict.R +s5 <- cwlStep(id = "VarDict", run = VarDict, + In = list(tbam = "tbam", + nbam = "nbam", + ref = "Ref", + region = "interval", + vcf = list(valueFrom = "$(inputs.tbam.nameroot.split('_')[0])_VarDict.vcf"))) +## #' @include tl_LoFreq.R +## s6 <- cwlStep(id = "LoFreq", run = LoFreq, +## In = list(tbam = "tbam", +## nbam = "nbam", +## ref = "Ref", +## region = "interval", +## dbsnp = "dbsnp", +## threads = "threads", +## out = list(valueFrom = "$(inputs.tbam.nameroot.split('_')[0])_LoFreq.vcf"))) +#' @include pl_VarScan2Somatic.R +s7 <- cwlStep(id = "VarScanPL", run = VarScan2Somatic, + In = list(tbam = "tbam", + nbam = "nbam", + ref = "Ref", + region = "interval")) + +#' @include tl_SomaticSeq_Wrapper.R +s8 <- cwlStep(id = "Wrapper", run = SomaticSeq_Wrapper, + In = list(tbam = "tbam", + nbam = "nbam", + ref = "Ref", + region = "interval", + dbsnp = "dbsnp", + mutect2 = "Mutect2PL/filterVCF", + varscanSnv = "VarScanPL/sSnp", + varscanIndel = "VarScanPL/sIndel", + sniper = "SomaticSniper/outVcf", + vardict = "VarDict/outVcf", + muse = "MuSE/outVcf", + strelkaSnv = "mantaStrelka/snvs", + strelkaIndel = "mantaStrelka/indels")) + ##lofreqSnv = "LoFreq/snp", + ##lofreqIndel = "LoFreq/indel")) + +mergeTSV <- function(esnv, eindel){ + snv1 <- read.table(esnv, header = TRUE) + indel1 <- read.table(eindel, header = TRUE) + var1 <- rbind(snv1, indel1) + var1[is.na(var1)] <- 0 + write.table(var1, file = "Ensemble.sVar.tsv", + row.names = FALSE, sep = "\t", quote = FALSE) +} + +m1 <- InputParam(id = "esnv", type = "File", prefix = "esnv=", separate = FALSE) +m2 <- InputParam(id = "eindel", type = "File", prefix = "eindel=", separate = FALSE) +out1 <- OutputParam(id = "tsv", type = "File", glob = "Ensemble.sVar.tsv") +mTSV <- cwlProcess(baseCommand = mergeTSV, + inputs = InputParamList(m1, m2), + outputs = OutputParamList(out1)) + +s9 <- cwlStep(id = "mergeTSV", run = mTSV, + In = list(esnv = "Wrapper/EnsSNV", + eindel = "Wrapper/EnsINDEL")) +#' @include pl_neusomatic.R +s10 <- cwlStep(id = "neusomaticPL", run = neusomatic, + In = list(tbam = "tbam", + nbam = "nbam", + ref = "Ref", + region = "interval", + ensemble = "mergeTSV/tsv", + threads = "threads", + ovcf = list(valueFrom = "$(inputs.tbam.nameroot.split('_')[0])_neusomatic.vcf"))) + +o1a <- OutputParam(id = "mutect2filterVCF", type = "File", outputSource = "Mutect2PL/filterVCF") +o1b <- OutputParam(id = "mutect2passVCF", type = "File", outputSource = "Mutect2PL/passVCF") +o1c <- OutputParam(id = "mutect2conTable", type = "File", outputSource = "Mutect2PL/conTable") +o1d <- OutputParam(id = "mutect2segment", type = "File", outputSource = "Mutect2PL/segment") +o2 <- OutputParam(id = "MuSEout", type = "File", outputSource = "MuSE/outVcf") +o3a <- OutputParam(id = "strelka2snv", type = "File", outputSource = "mantaStrelka/snvs") +o3b <- OutputParam(id = "strelka2indel", type = "File", outputSource = "mantaStrelka/indels") +o4 <- OutputParam(id = "SomaticSniperout", type = "File", outputSource = "SomaticSniper/outVcf") +o5 <- OutputParam(id = "VarDictout", type = "File", outputSource = "VarDict/outVcf") +## o6a <- OutputParam(id = "LoFreqsnp", type = "File", outputSource = "LoFreq/snp") +## o6b <- OutputParam(id = "LoFreqindel", type = "File", outputSource = "LoFreq/indel") +## o6c <- OutputParam(id = "LoFreqsnpdb", type = "File", outputSource = "LoFreq/snpdb") +## o6d <- OutputParam(id = "LoFreqindeldb", type = "File", outputSource = "LoFreq/indeldb") +o7a <- OutputParam(id = "VarScanSnp", type = "File", outputSource = "VarScanPL/sSnp") +o7b <- OutputParam(id = "VarScanIndel", type = "File", outputSource = "VarScanPL/sIndel") +o7c <- OutputParam(id = "VarScansVcf", type = "File", outputSource = "VarScanPL/sVcf") +o8a <- OutputParam(id = "mergeTSVout", type = "File", outputSource = "mergeTSV/tsv") +o8b <- OutputParam(id = "WrapperSNV", type = "File", outputSource = "Wrapper/conSNV") +o8c <- OutputParam(id = "WrapperINDEL", type = "File", outputSource = "Wrapper/conINDEL") +o8d <- OutputParam(id = "WrapperESNV", type = "File", outputSource = "Wrapper/EnsSNV") +o8e <- OutputParam(id = "WrapperEINDEL", type = "File", outputSource = "Wrapper/EnsINDEL") +o9 <- OutputParam(id = "neusomaticVCF", type = "File", outputSource = "neusomaticPL/outVcf") + +req1 <- list(class = "InlineJavascriptRequirement") +req2 <- list(class = "StepInputExpressionRequirement") +req3 <- list(class = "SubworkflowFeatureRequirement") +SomaticCallers <- cwlWorkflow(requirements = list(req1, req2, req3), + inputs = InputParamList(p1, p2, p3, p6, p7, + p8, p9, p10, p12, p13), + outputs = OutputParamList(o1a, o1b, o1c, o1d, o2, + o3a, o3b, o4, o5, + ##o6a, o6b, o6c, o6d, + o7a, o7b, o7c, + o8a, o8b, o8c, o8d, o8e, + o9)) + +SomaticCallers <- SomaticCallers + s1 + s2 + s3a + s3b + s3 + s4 +s5 + s7 + s8 + s9 + s10 + diff --git a/Rcwl/pl_VarScan2Somatic.R b/Rcwl/pl_VarScan2Somatic.R index 9dd95bf..5b20f69 100644 --- a/Rcwl/pl_VarScan2Somatic.R +++ b/Rcwl/pl_VarScan2Somatic.R @@ -1,37 +1,37 @@ - -#' @include tl_samtools_mpileup.R tl_VarScan2_somatic.R tl_VarScan2_processSomatic.R tl_VarScan2_somaticFilter.R - -p1 <- InputParam(id = "tbam", type = "File") -p2 <- InputParam(id = "nbam", type = "File") -p3 <- InputParam(id = "ref", type = "File", secondaryFiles = ".fai") -p4 <- InputParam(id = "region", type = "File") - -s1 <- Step(id = "mpileupT", run = samtools_mpileup, - In = list(bam = "tbam", - ref = "ref", - region = "region")) -s2 <- Step(id = "mpileupN", run = samtools_mpileup, - In = list(bam = "nbam", - ref = "ref", - region = "region")) -s3 <- Step(id = "somatic", run = VarScan2_somatic, - In = list(npileup = "mpileupN/pileup", - tpileup = "mpileupT/pileup", - bname = list(valueFrom = "$(inputs.tpileup.nameroot)"))) -s4 <- Step(id = "processSomatic", run = VarScan2_processSomatic, - In = list(vcf = "somatic/snp")) -s5 <- Step(id = "somaticFilter", run = VarScan2_somaticFilter, - In = list(vcf = "processSomatic/somaticHC", - indel = "somatic/indel", - outvcf = list(source = list("tbam", "nbam"), - valueFrom = "$(self[0].nameroot).$(self[1].nameroot).somatic.vcf"))) -o1 <- OutputParam(id = "sSnp", type = "File", outputSource = "somatic/snp") -o2 <- OutputParam(id = "sIndel", type = "File", outputSource = "somatic/indel") -o3 <- OutputParam(id = "sVcf", type = "File", outputSource = "somaticFilter/outVcf") - -req1 <- list(class = "StepInputExpressionRequirement") -req2 <- list(class = "MultipleInputFeatureRequirement") -VarScan2Somatic <- cwlStepParam(requirements = list(req1, req2), - inputs = InputParamList(p1, p2, p3, p4), - outputs = OutputParamList(o1, o2, o3)) -VarScan2Somatic <- VarScan2Somatic + s1 + s2 + s3 + s4 + s5 + +#' @include tl_samtools_mpileup.R tl_VarScan2_somatic.R tl_VarScan2_processSomatic.R tl_VarScan2_somaticFilter.R + +p1 <- InputParam(id = "tbam", type = "File") +p2 <- InputParam(id = "nbam", type = "File") +p3 <- InputParam(id = "ref", type = "File", secondaryFiles = ".fai") +p4 <- InputParam(id = "region", type = "File") + +s1 <- cwlStep(id = "mpileupT", run = samtools_mpileup, + In = list(bam = "tbam", + ref = "ref", + region = "region")) +s2 <- cwlStep(id = "mpileupN", run = samtools_mpileup, + In = list(bam = "nbam", + ref = "ref", + region = "region")) +s3 <- cwlStep(id = "somatic", run = VarScan2_somatic, + In = list(npileup = "mpileupN/pileup", + tpileup = "mpileupT/pileup", + bname = list(valueFrom = "$(inputs.tpileup.nameroot)"))) +s4 <- cwlStep(id = "processSomatic", run = VarScan2_processSomatic, + In = list(vcf = "somatic/snp")) +s5 <- cwlStep(id = "somaticFilter", run = VarScan2_somaticFilter, + In = list(vcf = "processSomatic/somaticHC", + indel = "somatic/indel", + outvcf = list(source = list("tbam", "nbam"), + valueFrom = "$(self[0].nameroot).$(self[1].nameroot).somatic.vcf"))) +o1 <- OutputParam(id = "sSnp", type = "File", outputSource = "somatic/snp") +o2 <- OutputParam(id = "sIndel", type = "File", outputSource = "somatic/indel") +o3 <- OutputParam(id = "sVcf", type = "File", outputSource = "somaticFilter/outVcf") + +req1 <- list(class = "StepInputExpressionRequirement") +req2 <- list(class = "MultipleInputFeatureRequirement") +VarScan2Somatic <- cwlWorkflow(requirements = list(req1, req2), + inputs = InputParamList(p1, p2, p3, p4), + outputs = OutputParamList(o1, o2, o3)) +VarScan2Somatic <- VarScan2Somatic + s1 + s2 + s3 + s4 + s5 diff --git a/Rcwl/pl_alignMerge.R b/Rcwl/pl_alignMerge.R index 0ea924e..7d7db4e 100644 --- a/Rcwl/pl_alignMerge.R +++ b/Rcwl/pl_alignMerge.R @@ -1,39 +1,39 @@ -##source(system.file("pipelines", "DNASeq_bwa.R", package = "RcwlPipelines")) -##source(system.file("pipelines", "DNASeq_merge.R", package = "RcwlPipelines")) - -## bwaAlign + mergeBamDup -#' @include pl_bwaAlign.R pl_mergeBamDup.R -p1 <- InputParam(id = "idBam", type = "string") -p2 <- InputParam(id = "RG", type = "string[]") -p3 <- InputParam(id = "threads", type = "int") -p4 <- InputParam(id = "Ref", type = "File", - secondaryFiles = c(".amb", ".ann", ".bwt", ".pac", ".sa")) -p5 <- InputParam(id = "FQ1s", type = "File[]") -p6 <- InputParam(id = "FQ2s", type = "File[]") - -o1 <- OutputParam(id = "oBam", type = "File", outputSource = "mergeBamDup/oBam") -o2 <- OutputParam(id = "matrix", type = "File", outputSource = "mergeBamDup/matrix") -o3 <- OutputParam(id = "Idx", type = "File", outputSource = "mergeBamDup/Idx") -o4 <- OutputParam(id = "stat", type = "File", outputSource = "mergeBamDup/stat") - -req1 <- list(class = "SubworkflowFeatureRequirement") -req2 <- list(class = "ScatterFeatureRequirement") -alignMerge <- cwlStepParam(requirements = list(req1, req2), - inputs = InputParamList(p1, p2, p3, p4, p5, p6), - outputs = OutputParamList(o1, o2, o3, o4) - ) - -s1 <- Step(id = "bwaAlign", run = bwaAlign, - In = list(threads = "threads", - RG = "RG", - Ref = "Ref", - FQ1 = "FQ1s", - FQ2 = "FQ2s"), - scatter = list("RG", "FQ1", "FQ2"), - scatterMethod = "dotproduct") - -s2 <- Step(id = "mergeBamDup", run = mergeBamDup, - In = list(ibam = "bwaAlign/Bam", - obam = "idBam")) - -alignMerge <- alignMerge + s1 + s2 +##source(system.file("pipelines", "DNASeq_bwa.R", package = "RcwlPipelines")) +##source(system.file("pipelines", "DNASeq_merge.R", package = "RcwlPipelines")) + +## bwaAlign + mergeBamDup +#' @include pl_bwaAlign.R pl_mergeBamDup.R +p1 <- InputParam(id = "idBam", type = "string") +p2 <- InputParam(id = "RG", type = "string[]") +p3 <- InputParam(id = "threads", type = "int") +p4 <- InputParam(id = "Ref", type = "File", + secondaryFiles = c(".amb", ".ann", ".bwt", ".pac", ".sa")) +p5 <- InputParam(id = "FQ1s", type = "File[]") +p6 <- InputParam(id = "FQ2s", type = "File[]") + +o1 <- OutputParam(id = "oBam", type = "File", outputSource = "mergeBamDup/oBam") +o2 <- OutputParam(id = "matrix", type = "File", outputSource = "mergeBamDup/matrix") +o3 <- OutputParam(id = "Idx", type = "File", outputSource = "mergeBamDup/Idx") +o4 <- OutputParam(id = "stat", type = "File", outputSource = "mergeBamDup/stat") + +req1 <- list(class = "SubworkflowFeatureRequirement") +req2 <- list(class = "ScatterFeatureRequirement") +alignMerge <- cwlWorkflow(requirements = list(req1, req2), + inputs = InputParamList(p1, p2, p3, p4, p5, p6), + outputs = OutputParamList(o1, o2, o3, o4) + ) + +s1 <- cwlStep(id = "bwaAlign", run = bwaAlign, + In = list(threads = "threads", + RG = "RG", + Ref = "Ref", + FQ1 = "FQ1s", + FQ2 = "FQ2s"), + scatter = list("RG", "FQ1", "FQ2"), + scatterMethod = "dotproduct") + +s2 <- cwlStep(id = "mergeBamDup", run = mergeBamDup, + In = list(ibam = "bwaAlign/Bam", + obam = "idBam")) + +alignMerge <- alignMerge + s1 + s2 diff --git a/Rcwl/pl_arcasHLA_pl.R b/Rcwl/pl_arcasHLA_pl.R new file mode 100644 index 0000000..89b472e --- /dev/null +++ b/Rcwl/pl_arcasHLA_pl.R @@ -0,0 +1,21 @@ +#' @include tl_arcasHLA_extract.R +#' @include tl_arcasHLA_genotype.R +#' @include tl_arcasHLA_partial.R +p1 <- InputParam(id = "bam", type = "File", position = 1L, secondaryFiles = ".bai") +p2 <- InputParam(id = "threads", type = "int", default=4L) + +s1 <- cwlStep(id = "Extract", run = arcasHLA_extract, + In = list(bam = "bam", + threads = "threads")) +s2 <- cwlStep(id = "Genotype", run = arcasHLA_genotype, + In = list(fqs = "Extract/fqs", + threads = "threads")) +s3 <- cwlStep(id = "Partial", run = arcasHLA_partial, + In = list(fqs = "Extract/fqs", + genotype = "Genotype/genotype", + threads = "threads")) +o1 <- OutputParam(id = "gout", type = "File", outputSource = "Genotype/genotype") +o2 <- OutputParam(id = "pout", type = "File", outputSource = "Partial/pg") +arcasHLA_pl <- cwlWorkflow(inputs = InputParamList(p1, p2), + outputs = OutputParamList(o1, o2)) +arcasHLA_pl <- arcasHLA_pl + s1 + s2 + s3 diff --git a/Rcwl/pl_arriba_pl.R b/Rcwl/pl_arriba_pl.R new file mode 100644 index 0000000..ed49ad4 --- /dev/null +++ b/Rcwl/pl_arriba_pl.R @@ -0,0 +1,31 @@ +#' @include tl_STAR.R +arguments(STAR) <- list("--outFilterMultimapNmax 50", +"--peOverlapNbasesMin 10", +"--alignSplicedMateMapLminOverLmate 0.5", +"--alignSJstitchMismatchNmax 5 -1 5 5", +"--chimSegmentMin 10", +"--chimOutType WithinBAM HardClip", +"--chimJunctionOverhangMin 10", +"--chimScoreDropMax 30", +"--chimScoreJunctionNonGTAG 0", +"--chimScoreSeparation 1", +"--chimSegmentReadGapMax 3", +"--chimMultimapNmax 50", +"--outSAMtype BAM Unsorted", +"--outSAMunmapped Within", +"--outBAMcompression 0 ") +STAR@outputs <- OutputParamList(STAR@outputs[[1]]) + +#' @include tl_arriba.R +s1 <- cwlStep(id = "STAR", run = STAR) +s2 <- cwlStep(id = "arriba", run = arriba, + In = list(align = "STAR/outBAM", + gtf = "STAR_sjdbGTFfile")) + +o1 <- OutputParam(id = "Fout", type = "File", outputSource = "arriba/fout") +o2 <- OutputParam(id = "FOut", type = "File", outputSource = "arriba/fOut") +o3 <- OutputParam(id = "bam", type = "File", outputSource = "STAR/outBAM") + +arriba_pl <- cwlWorkflow(inputs = stepInputs(list(s1, s2)), + outputs = OutputParamList(o1, o2, o3)) +arriba_pl <- arriba_pl + s1 + s2 diff --git a/Rcwl/pl_bismarkPL.R b/Rcwl/pl_bismarkPL.R new file mode 100644 index 0000000..a9fad65 --- /dev/null +++ b/Rcwl/pl_bismarkPL.R @@ -0,0 +1,26 @@ +#' @include tl_bismark.R +#' @include tl_deduplicate_bismark.R +#' @include tl_bismark_methylation_extractor.R +p1 <- InputParam(id = "fq1", type = "File") +p2 <- InputParam(id = "fq2", type = "File") +p3 <- InputParam(id = "genome", type = "Directory") +p4 <- InputParam(id = "threads", type = "int") +s1 <- cwlStep(id = "bismark_align", run = bismark, + In = list(fq1 = "fq1", + fq2 = "fq2", + genome = "genome", + threads = "threads")) +s2 <- cwlStep(id = "deduplicate", run = deduplicate_bismark, + In = list(bam = "bismark_align/align")) +s3 <- cwlStep(id = "meth", run = bismark_methylation_extractor, + In = list(bam = "deduplicate/dbam", + core = "threads")) +o1 <- OutputParam(id = "Align", type = "File", outputSource = "bismark_align/align") +o2 <- OutputParam(id = "AReport", type = "File", outputSource = "bismark_align/report") +o3 <- OutputParam(id = "DBam", type = "File", outputSource = "deduplicate/dbam") +o4 <- OutputParam(id = "mcov", type = "File", outputSource = "meth/cov") +o5 <- OutputParam(id = "mbed", type = "File?", outputSource = "meth/Bed") +o6 <- OutputParam(id = "mreport", type = "File[]", outputSource = "meth/report") +bismarkPL <- cwlWorkflow(inputs = InputParamList(p1, p2, p3, p4), + outputs = OutputParamList(o1, o2, o3, o4, o5, o6)) +bismarkPL <- bismarkPL + s1 + s2 + s3 diff --git a/Rcwl/pl_bwaAlign.R b/Rcwl/pl_bwaAlign.R index 8849d4d..fb3284f 100644 --- a/Rcwl/pl_bwaAlign.R +++ b/Rcwl/pl_bwaAlign.R @@ -1,43 +1,47 @@ -##source(system.file("tools", "bwa.R", package = "RcwlPipelines")) -##source(system.file("tools", "samtools_samTobam.R", package = "RcwlPipelines")) -##source(system.file("tools", "samtools_sortBam.R", package = "RcwlPipelines")) -##source(system.file("tools", "samtools_index.R", package = "RcwlPipelines")) - -## params -#' @include tl_bwa.R tl_sam2bam.R tl_sortBam.R tl_samtools_index.R -p1 <- InputParam(id = "threads", type = "int") -p2 <- InputParam(id = "RG", type = "string") -p3 <- InputParam(id = "Ref", type = "File", - secondaryFiles = c(".amb", ".ann", ".bwt", ".pac", ".sa")) -p4 <- InputParam(id = "FQ1", type = "File") -p5 <- InputParam(id = "FQ2", type = "File?") - -## bwa -s1 <- Step(id = "bwa", run = bwa, - In = list(threads = "threads", - RG = "RG", - Ref = "Ref", - FQ1 = "FQ1", - FQ2 = "FQ2")) - -## sam to bam -s2 <- Step(id = "sam2bam", run = sam2bam, - In = list(sam = "bwa/sam")) - -## sort bam -s3 <- Step(id = "sortBam", run = sortBam, - In = list(bam = "sam2bam/bam")) -## index bam -s4 <- Step(id = "idxBam", run = samtools_index, - In = list(bam = "sortBam/sbam")) - -## outputs -o1 <- OutputParam(id = "Bam", type = "File", outputSource = "sortBam/sbam") -o2 <- OutputParam(id = "Idx", type = "File", outputSource = "idxBam/idx") - -## stepParam -bwaAlign <- cwlStepParam(inputs = InputParamList(p1, p2, p3, p4, p5), - outputs = OutputParamList(o1, o2)) - -## pipeline -bwaAlign <- bwaAlign + s1 + s2 + s3 + s4 +##source(system.file("tools", "bwa.R", package = "RcwlPipelines")) +##source(system.file("tools", "samtools_samTobam.R", package = "RcwlPipelines")) +##source(system.file("tools", "samtools_sortBam.R", package = "RcwlPipelines")) +##source(system.file("tools", "samtools_index.R", package = "RcwlPipelines")) + +## params +#' @include tl_bwa.R tl_sam2bam.R tl_samtools_sort.R tl_samtools_index.R +p1 <- InputParam(id = "threads", type = "int") +p2 <- InputParam(id = "RG", type = "string") +p3 <- InputParam(id = "Ref", type = "File", + secondaryFiles = c(".amb", ".ann", ".bwt", ".pac", ".sa")) +p4 <- InputParam(id = "FQ1", type = "File") +p5 <- InputParam(id = "FQ2", type = "File?") + +## bwa +s1 <- cwlStep(id = "bwa", run = bwa, + In = list(threads = "threads", + RG = "RG", + Ref = "Ref", + FQ1 = "FQ1", + FQ2 = "FQ2")) + +## sam to bam +s2 <- cwlStep(id = "sam2bam", run = sam2bam, + In = list(sam = "bwa/sam")) + ##bam = list(valueFrom = "$(inputs.sam.nameroot).bam"))) + +## sort bam +s3 <- cwlStep(id = "sortBam", run = samtools_sort, + In = list(bam = "sam2bam/bam", + obam = list(valueFrom = "$(inputs.bam.nameroot)_sort.bam"))) +## index bam +s4 <- cwlStep(id = "idxBam", run = samtools_index, + In = list(bam = "sortBam/sbam")) + +## outputs +o1 <- OutputParam(id = "Bam", type = "File", outputSource = "sortBam/sbam") +o2 <- OutputParam(id = "Idx", type = "File", outputSource = "idxBam/idx") + +## stepParam +req1 <- requireStepInputExpression() +bwaAlign <- cwlWorkflow(requirements = list(req1), + inputs = InputParamList(p1, p2, p3, p4, p5), + outputs = OutputParamList(o1, o2)) + +## pipeline +bwaAlign <- bwaAlign + s1 + s2 + s3 + s4 diff --git a/Rcwl/pl_bwaDup.R b/Rcwl/pl_bwaDup.R new file mode 100644 index 0000000..8c730de --- /dev/null +++ b/Rcwl/pl_bwaDup.R @@ -0,0 +1,90 @@ +## bwaAlign + mergeBamDup +#' @include pl_bwa_align.R pl_mergeBamDup.R tl_markdup.R tl_mergeBam.R +p1 <- InputParam(id = "outBam", type = "string") +p2 <- InputParam(id = "RG", type = "string[]") +p3 <- InputParam(id = "threads", type = "int") +p4 <- InputParam(id = "Ref", type = "File", + secondaryFiles = c(".amb", ".ann", ".bwt", + ".pac", ".sa", ".fai")) +p5 <- InputParam(id = "FQ1s", type = "File[]") +p6 <- InputParam(id = "FQ2s", type = "File[]?") +##p7 <- InputParam(id = "mdup", type = "boolean", default = TRUE) + +s1 <- cwlStep(id = "bwaAlign", run = bwa_align, + In = list(threads = "threads", + RG = "RG", + Ref = "Ref", + FQ1 = "FQ1s", + FQ2 = "FQ2s", + outBam = "outBam"), + scatter = list("RG", "FQ1", "FQ2"), + scatterMethod = "dotproduct") + +s2 <- cwlStep(id = "mergeBam", run = mergeBam, + In = list(ibam = "bwaAlign/Bam", + obam = list(source = list("outBam"), + valueFrom="$(self).merge.bam")), + when = "$(inputs.ibam.length>1)") + +s3 <- cwlStep(id = "markdup", run = markdup, + In = list(ibam = list(source = list("mergeBam/oBam", "bwaAlign/Bam"), + pickValue = "first_non_null", + valueFrom = "$(self)", + linkMerge = "merge_flattened"), + obam = "outBam", + matrix = list(source = list("outBam"), + valueFrom="$(self).markdup.txt"))) + ## when = "$(self[1]==true)") + +#'@include tl_samtools_index.R tl_samtools_flagstat.R tl_samtools_stats.R tl_md5sum.R +s4 <- cwlStep(id = "samtools_index", run = samtools_index, + In = list(bam = list( + source = list("markdup/mBam", "mergeBam/oBam", "bwaAlign/Bam"), + pickValue = "first_non_null", + valueFrom = "$(self)", + linkMerge = "merge_flattened"))) +s5 <- cwlStep(id = "samtools_flagstat", run = samtools_flagstat, + In = list(bam = "samtools_index/idx")) +s6 <- cwlStep(id = "samtools_stats", run = samtools_stats, + In = list(bam = "samtools_index/idx")) +s7 <- cwlStep(id = "md5sum", run = md5sum, + In = list(file = "samtools_index/idx")) + + +o1 <- OutputParam(id = "BAM", type = "File", outputSource = "samtools_index/idx") +o2 <- OutputParam(id = "matrix", type = "File", outputSource = "markdup/Mat") +o3 <- OutputParam(id = "flagstat", type = "File", + outputSource = "samtools_flagstat/flagstat") +o4 <- OutputParam(id = "stats", type = "File", + outputSource = "samtools_stats/stats") +o5 <- OutputParam(id = "md5s", type = "File", outputSource = "md5sum/md5") + +req1 <- list(class = "SubworkflowFeatureRequirement") +req2 <- list(class = "ScatterFeatureRequirement") +req3 <- requireJS() +req4 <- list(class = "MultipleInputFeatureRequirement") +req5 <- list(class = "StepInputExpressionRequirement") +bwaDup <- cwlWorkflow(cwlVersion = "v1.2", + requirements = list(req1, req2, req3, req4, req5), + inputs = InputParamList(p1, p2, p3, p4, p5, p6), + outputs = OutputParamList(o1, o2, o3, o4, o5)) +bwaDup <- bwaDup + s1 + s2 + s3 + s4 + s5 + s6 + s7 + +## bwaDup$outBam <- "test.bam" +## bwaDup$RG <- list("@RG\\tID:L1\\tSM:test", "@RG\\tID:L2\\tSM:test") +## bwaDup$threads <- 2 +## bwaDup$Ref <- "~/qhu/references/hs37d5/hs37d5.fa" +## bwaDup$FQ1s <- list("~/qhu/projects/Rworkflow/testdata/test11_R1_L1.fq.gz", +## "~/qhu/projects/Rworkflow/testdata/test11_R1_L2.fq.gz") +## bwaDup$FQ2s <- list("~/qhu/projects/Rworkflow/testdata/test11_R2_L1.fq.gz", +## "~/qhu/projects/Rworkflow/testdata/test11_R2_L2.fq.gz") +## runCWL(bwaDup, outdir = "~/qhu/projects/Rworkflow/testdata/", showLog = TRUE, docker = "singularity") + +## bwaDup$outBam <- "test.bam" +## bwaDup$RG <- list("@RG\\tID:L1\\tSM:test") +## bwaDup$threads <- 2 +## bwaDup$Ref <- "~/qhu/references/hs37d5/hs37d5.fa" +## bwaDup$FQ1s <- list("~/qhu/projects/Rworkflow/testdata/test11_R1_L1.fq.gz") +## bwaDup$FQ2s <- list("~/qhu/projects/Rworkflow/testdata/test11_R2_L1.fq.gz") + +## runCWL(bwaDup, outdir = "~/qhu/projects/Rworkflow/testdata/", showLog = TRUE, docker = "singularity", cwlArgs = "--debug") diff --git a/Rcwl/pl_bwaMM.R b/Rcwl/pl_bwaMM.R new file mode 100644 index 0000000..a1c1d46 --- /dev/null +++ b/Rcwl/pl_bwaMM.R @@ -0,0 +1,42 @@ +## bwaAlign + mergeBamDup +#' @include pl_bwaAlign.R pl_mergeBamDup.R pl_BaseRecal.R +p1 <- InputParam(id = "outBam", type = "string") +p2 <- InputParam(id = "RG", type = "string[]") +p3 <- InputParam(id = "threads", type = "int") +p4 <- InputParam(id = "Ref", type = "File", + secondaryFiles = c(".amb", ".ann", ".bwt", ".pac", + ".sa", ".fai", + "$(self.nameroot).dict")) +p5 <- InputParam(id = "FQ1s", type = "File[]") +p6 <- InputParam(id = "FQ2s", type = "File[]") +## p7 <- InputParam(id = "knowSites", type = InputArrayParam(items = "File"), +## secondaryFiles = "$(self.nameext == '.gz' ? self.basename+'.tbi' : self.basename+'.idx')") + +## o1 <- OutputParam(id = "BAM", type = "File", outputSource = "BaseRecal/rcBam") +o1 <- OutputParam(id = "matrix", type = "File", outputSource = "mergeBamDup/matrix") +o2 <- OutputParam(id = "Idx", type = "File", outputSource = "mergeBamDup/Idx") +o3 <- OutputParam(id = "flagstat", type = "File", outputSource = "mergeBamDup/stat") +# o4 <- OutputParam(id = "stats", type = "File", outputSource = "BaseRecal/stats") + +s1 <- cwlStep(id = "bwaAlign", run = bwaAlign, + In = list(threads = "threads", + RG = "RG", + Ref = "Ref", + FQ1 = "FQ1s", + FQ2 = "FQ2s"), + scatter = list("RG", "FQ1", "FQ2"), + scatterMethod = "dotproduct") + +s2 <- cwlStep(id = "mergeBamDup", run = mergeBamDup, + In = list(ibam = "bwaAlign/Bam", + obam = "outBam")) + + +req1 <- list(class = "SubworkflowFeatureRequirement") +req2 <- list(class = "ScatterFeatureRequirement") +req3 <- requireJS() +bwaMM <- cwlWorkflow(requirements = list(req1, req2, req3), + inputs = InputParamList(p1, p2, p3, p4, p5, p6), + outputs = OutputParamList(o1, o2, o3)) + +bwaMM <- bwaMM + s1 + s2 diff --git a/Rcwl/pl_bwaMMRecal.R b/Rcwl/pl_bwaMMRecal.R index 0580280..346180c 100644 --- a/Rcwl/pl_bwaMMRecal.R +++ b/Rcwl/pl_bwaMMRecal.R @@ -1,46 +1,47 @@ -## bwaAlign + mergeBamDup -#' @include pl_bwaAlign.R pl_mergeBamDup.R pl_BaseRecal.R -p1 <- InputParam(id = "outBam", type = "string") -p2 <- InputParam(id = "RG", type = "string[]") -p3 <- InputParam(id = "threads", type = "int") -p4 <- InputParam(id = "Ref", type = "File", - secondaryFiles = c(".amb", ".ann", ".bwt", ".pac", - ".sa", ".fai", - "$(self.nameroot).dict")) -p5 <- InputParam(id = "FQ1s", type = "File[]") -p6 <- InputParam(id = "FQ2s", type = "File[]") -p7 <- InputParam(id = "knowSites", type = InputArrayParam(items = "File"), - secondaryFiles = ".idx") - -o1 <- OutputParam(id = "BAM", type = "File", outputSource = "BaseRecal/rcBam") -o2 <- OutputParam(id = "matrix", type = "File", outputSource = "mergeBamDup/matrix") -## o3 <- OutputParam(id = "Idx", type = "File", outputSource = "mergeBamDup/Idx") -o3 <- OutputParam(id = "flagstat", type = "File", outputSource = "BaseRecal/flagstat") -o4 <- OutputParam(id = "stats", type = "File", outputSource = "BaseRecal/stats") - -req1 <- list(class = "SubworkflowFeatureRequirement") -req2 <- list(class = "ScatterFeatureRequirement") -bwaMMRecal <- cwlStepParam(requirements = list(req1, req2), - inputs = InputParamList(p1, p2, p3, p4, p5, p6, p7), - outputs = OutputParamList(o1, o2, o3, o4)) - -s1 <- Step(id = "bwaAlign", run = bwaAlign, - In = list(threads = "threads", - RG = "RG", - Ref = "Ref", - FQ1 = "FQ1s", - FQ2 = "FQ2s"), - scatter = list("RG", "FQ1", "FQ2"), - scatterMethod = "dotproduct") - -s2 <- Step(id = "mergeBamDup", run = mergeBamDup, - In = list(ibam = "bwaAlign/Bam", - obam = "outBam")) - -s3 <- Step(id = "BaseRecal", run = BaseRecal, - In = list(bam = "mergeBamDup/Idx", - ref = "Ref", - knowSites = "knowSites", - oBam = "outBam")) - -bwaMMRecal <- bwaMMRecal + s1 + s2 + s3 +## bwaAlign + mergeBamDup +#' @include pl_bwaAlign.R pl_mergeBamDup.R pl_BaseRecal.R +p1 <- InputParam(id = "outBam", type = "string") +p2 <- InputParam(id = "RG", type = "string[]") +p3 <- InputParam(id = "threads", type = "int") +p4 <- InputParam(id = "Ref", type = "File", + secondaryFiles = c(".amb", ".ann", ".bwt", ".pac", + ".sa", ".fai", + "$(self.nameroot).dict")) +p5 <- InputParam(id = "FQ1s", type = "File[]") +p6 <- InputParam(id = "FQ2s", type = "File[]") +p7 <- InputParam(id = "knowSites", type = InputArrayParam(items = "File"), + secondaryFiles = "$(self.nameext == '.gz' ? self.basename+'.tbi' : self.basename+'.idx')") + +o1 <- OutputParam(id = "BAM", type = "File", outputSource = "BaseRecal/rcBam") +o2 <- OutputParam(id = "matrix", type = "File", outputSource = "mergeBamDup/matrix") +## o3 <- OutputParam(id = "Idx", type = "File", outputSource = "mergeBamDup/Idx") +o3 <- OutputParam(id = "flagstat", type = "File", outputSource = "BaseRecal/flagstat") +o4 <- OutputParam(id = "stats", type = "File", outputSource = "BaseRecal/stats") + +req1 <- list(class = "SubworkflowFeatureRequirement") +req2 <- list(class = "ScatterFeatureRequirement") +req3 <- requireJS() +bwaMMRecal <- cwlWorkflow(requirements = list(req1, req2, req3), + inputs = InputParamList(p1, p2, p3, p4, p5, p6, p7), + outputs = OutputParamList(o1, o2, o3, o4)) + +s1 <- cwlStep(id = "bwaAlign", run = bwaAlign, + In = list(threads = "threads", + RG = "RG", + Ref = "Ref", + FQ1 = "FQ1s", + FQ2 = "FQ2s"), + scatter = list("RG", "FQ1", "FQ2"), + scatterMethod = "dotproduct") + +s2 <- cwlStep(id = "mergeBamDup", run = mergeBamDup, + In = list(ibam = "bwaAlign/Bam", + obam = "outBam")) + +s3 <- cwlStep(id = "BaseRecal", run = BaseRecal, + In = list(bam = "mergeBamDup/Idx", + ref = "Ref", + knowSites = "knowSites", + oBam = "outBam")) + +bwaMMRecal <- bwaMMRecal + s1 + s2 + s3 diff --git a/Rcwl/pl_bwaMRecal.R b/Rcwl/pl_bwaMRecal.R index 7a456c9..faa732d 100644 --- a/Rcwl/pl_bwaMRecal.R +++ b/Rcwl/pl_bwaMRecal.R @@ -1,48 +1,49 @@ -## bwaAlign + mergeBamDup -#' @include pl_bwaAlign.R tl_markdup.R pl_BaseRecal.R -p1 <- InputParam(id = "outBam", type = "string") -p2 <- InputParam(id = "RG", type = "string") -p3 <- InputParam(id = "threads", type = "int") -p4 <- InputParam(id = "Ref", type = "File", - secondaryFiles = c(".amb", ".ann", ".bwt", ".pac", - ".sa", ".fai", - "$(self.nameroot).dict")) -p5 <- InputParam(id = "FQ1s", type = "File") -p6 <- InputParam(id = "FQ2s", type = "File") -p7 <- InputParam(id = "knowSites", type = InputArrayParam(items = "File"), - secondaryFiles = ".idx") - -o1 <- OutputParam(id = "BAM", type = "File", outputSource = "BaseRecal/rcBam") -o2 <- OutputParam(id = "matrix", type = "File", outputSource = "markdup/Mat") -## o3 <- OutputParam(id = "Idx", type = "File", outputSource = "mergeBamDup/Idx") -o3 <- OutputParam(id = "flagstat", type = "File", outputSource = "BaseRecal/flagstat") -o4 <- OutputParam(id = "stats", type = "File", outputSource = "BaseRecal/stats") - -req1 <- list(class = "SubworkflowFeatureRequirement") -req2 <- list(class = "StepInputExpressionRequirement") -## req3 <- list(class = "InlineJavascriptRequirement") -bwaMRecal <- cwlStepParam(requirements = list(req1, req2), - inputs = InputParamList(p1, p2, p3, p4, p5, p6, p7), - outputs = OutputParamList(o1, o2, o3, o4)) - -s1 <- Step(id = "bwaAlign", run = bwaAlign, - In = list(threads = "threads", - RG = "RG", - Ref = "Ref", - FQ1 = "FQ1s", - FQ2 = "FQ2s")) - -s2 <- Step(id = "markdup", run = markdup, - In = list(ibam = "bwaAlign/Idx", - obam = list(valueFrom="$(inputs.ibam.nameroot).mdup.bam"), - matrix = list( - source = list("outBam"), - valueFrom="$(self).markdup.txt"))) - -s3 <- Step(id = "BaseRecal", run = BaseRecal, - In = list(bam = "markdup/mBam", - ref = "Ref", - knowSites = "knowSites", - oBam = "outBam")) - -bwaMRecal <- bwaMRecal + s1 + s2 + s3 +## bwaAlign + mergeBamDup +#' @include pl_bwaAlign.R tl_markdup.R pl_BaseRecal.R +p1 <- InputParam(id = "outBam", type = "string") +p2 <- InputParam(id = "RG", type = "string") +p3 <- InputParam(id = "threads", type = "int") +p4 <- InputParam(id = "Ref", type = "File", + secondaryFiles = c(".amb", ".ann", ".bwt", ".pac", + ".sa", ".fai", + "$(self.nameroot).dict")) +p5 <- InputParam(id = "FQ1s", type = "File") +p6 <- InputParam(id = "FQ2s", type = "File?") +p7 <- InputParam(id = "knowSites", type = InputArrayParam(items = "File"), + secondaryFiles = "$(self.nameext == '.gz' ? self.basename+'.tbi' : self.basename+'.idx')") + +o1 <- OutputParam(id = "BAM", type = "File", outputSource = "BaseRecal/rcBam") +o2 <- OutputParam(id = "matrix", type = "File", outputSource = "markdup/Mat") +## o3 <- OutputParam(id = "Idx", type = "File", outputSource = "mergeBamDup/Idx") +o3 <- OutputParam(id = "flagstat", type = "File", outputSource = "BaseRecal/flagstat") +o4 <- OutputParam(id = "stats", type = "File", outputSource = "BaseRecal/stats") + +req1 <- list(class = "SubworkflowFeatureRequirement") +req2 <- list(class = "StepInputExpressionRequirement") +req3 <- list(class = "InlineJavascriptRequirement") +bwaMRecal <- cwlWorkflow(cwlVersion = "v1.0", + requirements = list(req1, req2, req3), + inputs = InputParamList(p1, p2, p3, p4, p5, p6, p7), + outputs = OutputParamList(o1, o2, o3, o4)) + +s1 <- cwlStep(id = "bwaAlign", run = bwaAlign, + In = list(threads = "threads", + RG = "RG", + Ref = "Ref", + FQ1 = "FQ1s", + FQ2 = "FQ2s")) + +s2 <- cwlStep(id = "markdup", run = markdup, + In = list(ibam = "bwaAlign/Idx", + obam = list(valueFrom="$(inputs.ibam.nameroot).mdup.bam"), + matrix = list( + source = list("outBam"), + valueFrom="$(self).markdup.txt"))) + +s3 <- cwlStep(id = "BaseRecal", run = BaseRecal, + In = list(bam = "markdup/mBam", + ref = "Ref", + knowSites = "knowSites", + oBam = "outBam")) + +bwaMRecal <- bwaMRecal + s1 + s2 + s3 diff --git a/Rcwl/pl_bwa_align.R b/Rcwl/pl_bwa_align.R new file mode 100644 index 0000000..afe9ccb --- /dev/null +++ b/Rcwl/pl_bwa_align.R @@ -0,0 +1,48 @@ +##source(system.file("tools", "bwa.R", package = "RcwlPipelines")) +##source(system.file("tools", "samtools_samTobam.R", package = "RcwlPipelines")) +##source(system.file("tools", "samtools_sortBam.R", package = "RcwlPipelines")) +##source(system.file("tools", "samtools_index.R", package = "RcwlPipelines")) + +## params +#' @include tl_bwa.R tl_sam2bam.R tl_samtools_sort.R tl_samtools_index.R +p1 <- InputParam(id = "threads", type = "int") +p2 <- InputParam(id = "RG", type = "string") +p3 <- InputParam(id = "Ref", type = "File", + secondaryFiles = c(".amb", ".ann", ".bwt", ".pac", ".sa")) +p4 <- InputParam(id = "FQ1", type = "File") +p5 <- InputParam(id = "FQ2", type = "File?") +p6 <- InputParam(id = "outBam", type = "string") + +## bwa +s1 <- cwlStep(id = "bwa", run = bwa, + In = list(threads = "threads", + RG = "RG", + Ref = "Ref", + FQ1 = "FQ1", + FQ2 = "FQ2")) + +## sam to bam +s2 <- cwlStep(id = "sam2bam", run = sam2bam, + In = list(sam = "bwa/sam")) + ## bam = list(valueFrom = "$(inputs.sam.nameroot).bam"))) + +## sort bam +s3 <- cwlStep(id = "sortBam", run = samtools_sort, + In = list(bam = "sam2bam/bam", + obam = "outBam")) +## index bam +s4 <- cwlStep(id = "idxBam", run = samtools_index, + In = list(bam = "sortBam/sbam")) + +## outputs +o1 <- OutputParam(id = "Bam", type = "File", outputSource = "sortBam/sbam") +o2 <- OutputParam(id = "Idx", type = "File", outputSource = "idxBam/idx") + +## stepParam +req1 <- requireStepInputExpression() +bwa_align <- cwlWorkflow(requirements = list(req1), + inputs = InputParamList(p1, p2, p3, p4, p5, p6), + outputs = OutputParamList(o1, o2)) + +## pipeline +bwa_align <- bwa_align + s1 + s2 + s3 + s4 diff --git a/Rcwl/pl_delly_somatic.R b/Rcwl/pl_delly_somatic.R new file mode 100644 index 0000000..0daaa65 --- /dev/null +++ b/Rcwl/pl_delly_somatic.R @@ -0,0 +1,34 @@ +## delly two samples +#' @include tl_delly_call.R tl_bcftools_query.R tl_echo.R tl_fpaste.R tl_delly_filter.R +p1 <- InputParam(id = "tbam", type = "File", secondaryFiles = ".bai") +p2 <- InputParam(id = "nbam", type = "File", secondaryFiles = ".bai") +p3 <- InputParam(id = "outbcf", type = "string") +p4 <- InputParam(id = "exclude", type = "File?") +p5 <- InputParam(id = "genome", type = "File", secondaryFiles = ".fai") + +s1 <- cwlStep(id = "dellyCall", run = delly_call, + In = list(exclude = "exclude", + genome = "genome", + outfile = "outbcf", + tbam = "tbam", + nbam = "nbam")) +s2 <- cwlStep(id = "listSample", run = bcftools_query, + In = list(vcf = "dellyCall/outbcf", + out = list(valueFrom = "sample.txt"), + listSample = list(valueFrom = "$(true)"))) +s3 <- cwlStep(id = "echo", run = echo, + In = list(sth = list(valueFrom = "tumor\ncontrol"))) +s4 <- cwlStep(id = "fpaste", run = fpaste, + In = list(files = list(source = list("listSample/qout", "echo/out"), + linkMerge = "merge_flattened"))) +s5 <- cwlStep(id = "dellyFilter", run = delly_filter, + In = list(outfile = "outbcf", + tbcf = "dellyCall/outbcf", + samples = "fpaste/out")) +o1 <- OutputParam(id = "bcf", type = "File", outputSource = "dellyFilter/fbcf") +delly_somatic <- cwlWorkflow(inputs = InputParamList(p1, p2, p3, p4, p5), + outputs = OutputParamList(o1), + requirements = list(requireStepInputExpression(), + requireMultipleInput(), + requireJS())) +delly_somatic <- delly_somatic + s1 + s2 + s3 + s4 + s5 diff --git a/Rcwl/pl_glnexus_joint.R b/Rcwl/pl_glnexus_joint.R new file mode 100644 index 0000000..f430529 --- /dev/null +++ b/Rcwl/pl_glnexus_joint.R @@ -0,0 +1,25 @@ +## https://github.com/google/deepvariant/blob/r1.1/docs/trio-merge-case-study.md +p1 <- InputParam(id = "config", type = "string") +p2 <- InputParam(id = "bed", type = "File?") +p3 <- InputParam(id = "gvcfs", type = "File[]") +p4 <- InputParam(id = "ovcf", type = "string") +p5 <- InputParam(id = "threads", type = "int") + +#' @include tl_glnexus_cli_list.R +s1 <- cwlStep(id = "glnexus", run = glnexus_cli_list, + In = list(config = "config", + threads = "threads", + bed = "bed", + gvcfs = "gvcfs", + ovcf = list(valueFrom = "merged.bcf"))) +#' @include tl_bcftools_view.R +s2 <- cwlStep(id = "bcf", run = bcftools_view, + In = list(vcf = "glnexus/bcf", + fout = "ovcf", + otype = list(valueFrom = "z"))) +o1 <- OutputParam(id = "outVcf", type = "File", outputSource = "bcf/Fout") +req1 <- requireStepInputExpression() +glnexus_joint <- cwlWorkflow(requirements = list(req1), + inputs = InputParamList(p1, p2, p3, p4, p5), + outputs = OutputParamList(o1)) +glnexus_joint <- glnexus_joint + s1 + s2 diff --git a/Rcwl/pl_hapCall.R b/Rcwl/pl_hapCall.R index 61f39fe..2cf9a01 100644 --- a/Rcwl/pl_hapCall.R +++ b/Rcwl/pl_hapCall.R @@ -1,44 +1,44 @@ -##source(system.file("tools", "runWDL.R", package = "RcwlPipelines")) -#' @include tl_runWDL.R tl_mvOut.R -## haplotypecaller -rscripts <- "args <- commandArgs(TRUE) -bam <- args[1] -intervals <- args[2] -tmpl3 <- args[3] -json1 <- jsonlite::fromJSON(tmpl3) -json1$HaplotypeCallerGvcf_GATK4.input_bam <- bam -json1$HaplotypeCallerGvcf_GATK4.input_bam_index <- sub('.bam', '.bai', bam) -json1$HaplotypeCallerGvcf_GATK4.scattered_calling_intervals_list <- intervals -cat(jsonlite::toJSON(json1, pretty = TRUE, auto_unbox = T))" -rscripts <- gsub("\n", ";", rscripts) - -p1 <- InputParam(id = "bam", type = "string") -p2 <- InputParam(id = "intervals", type = "string") -p3 <- InputParam(id = "tmpl", type = "File") -o1 <- OutputParam(id = "json", type = "File", glob = "tmpl3.json") -hapJson <- cwlParam(baseCommand = c("Rscript", "-e", rscripts), - inputs = InputParamList(p1, p2, p3), - outputs = OutputParamList(o1), - stdout = "tmpl3.json") - -p1 <- InputParam(id = "bam", type = "string") -p2 <- InputParam(id = "intervals", type = "string") -p3 <- InputParam(id = "cromwell", type = "File") -p4 <- InputParam(id = "wdl", type = "File") -p5 <- InputParam(id = "tmpl", type = "File") -o1 <- OutputParam(id = "hclog", type = "File", outputSource = "HC/log") -o2 <- OutputParam(id = "outdir", type = "Directory", outputSource = "mvOut/OutDir") -hapCall <- cwlStepParam(inputs = InputParamList(p1, p2, p3, p4, p5), - outputs = OutputParamList(o1, o2)) -s1 <- Step(id = "hapJson", run = hapJson, - In = list(bam = "bam", - intervals = "intervals", - tmpl = "tmpl")) -s2 <- Step(id = "HC", run = runWDL, - In = list(cromwell = "cromwell", - wdl = "wdl", - json = "hapJson/json")) -s3 <- Step(id = "mvOut", run = mvOut, - In = list(logFile = "HC/log")) - -hapCall <- hapCall + s1 + s2 + s3 +##source(system.file("tools", "runWDL.R", package = "RcwlPipelines")) +#' @include tl_runWDL.R tl_mvOut.R +## haplotypecaller +rscripts <- "args <- commandArgs(TRUE) +bam <- args[1] +intervals <- args[2] +tmpl3 <- args[3] +json1 <- jsonlite::fromJSON(tmpl3) +json1$HaplotypeCallerGvcf_GATK4.input_bam <- bam +json1$HaplotypeCallerGvcf_GATK4.input_bam_index <- sub('.bam', '.bai', bam) +json1$HaplotypeCallerGvcf_GATK4.scattered_calling_intervals_list <- intervals +cat(jsonlite::toJSON(json1, pretty = TRUE, auto_unbox = T))" +rscripts <- gsub("\n", ";", rscripts) + +p1 <- InputParam(id = "bam", type = "string") +p2 <- InputParam(id = "intervals", type = "string") +p3 <- InputParam(id = "tmpl", type = "File") +o1 <- OutputParam(id = "json", type = "File", glob = "tmpl3.json") +hapJson <- cwlProcess(baseCommand = c("Rscript", "-e", rscripts), + inputs = InputParamList(p1, p2, p3), + outputs = OutputParamList(o1), + stdout = "tmpl3.json") + +p1 <- InputParam(id = "bam", type = "string") +p2 <- InputParam(id = "intervals", type = "string") +p3 <- InputParam(id = "cromwell", type = "File") +p4 <- InputParam(id = "wdl", type = "File") +p5 <- InputParam(id = "tmpl", type = "File") +o1 <- OutputParam(id = "hclog", type = "File", outputSource = "HC/log") +o2 <- OutputParam(id = "outdir", type = "Directory", outputSource = "mvOut/OutDir") +hapCall <- cwlWorkflow(inputs = InputParamList(p1, p2, p3, p4, p5), + outputs = OutputParamList(o1, o2)) +s1 <- cwlStep(id = "hapJson", run = hapJson, + In = list(bam = "bam", + intervals = "intervals", + tmpl = "tmpl")) +s2 <- cwlStep(id = "HC", run = runWDL, + In = list(cromwell = "cromwell", + wdl = "wdl", + json = "hapJson/json")) +s3 <- cwlStep(id = "mvOut", run = mvOut, + In = list(logFile = "HC/log")) + +hapCall <- hapCall + s1 + s2 + s3 diff --git a/Rcwl/pl_jdCall.R b/Rcwl/pl_jdCall.R index c6fb5f4..f65288b 100644 --- a/Rcwl/pl_jdCall.R +++ b/Rcwl/pl_jdCall.R @@ -1,54 +1,54 @@ -##source(system.file("tools", "runWDL.R", package = "RcwlPipelines")) -#' @include tl_runWDL.R tl_mvOut.R -## joint discovery -rscripts <- "args <- commandArgs(TRUE) -splitList <- function(s)as.list(unlist(strsplit(s, split = ','))) -sampleName <- args[1] -gvcf <- args[2] -callsetName <- args[3] -intervals <- args[4] -unpadded_intervals <- args[5] -tmpl4 <- args[6] -json1 <- jsonlite::fromJSON(tmpl4, simplifyVector=FALSE) -json1$JointGenotyping.sample_names <- splitList(sampleName) -json1$JointGenotyping.input_gvcfs <- splitList(gvcf) -json1$JointGenotyping.input_gvcfs_indices <- splitList(gsub('gz', 'gz.tbi', gvcf)) -json1$JointGenotyping.callset_name <- callsetName -json1$JointGenotyping.eval_interval_list <- intervals -json1$JointGenotyping.unpadded_intervals_file <- unpadded_intervals -cat(jsonlite::toJSON(json1, pretty = TRUE, auto_unbox = T))" -rscripts <- gsub("\n", ";", rscripts) - -p1 <- InputParam(id = "sampleName", type = "string", position = 1) -p2 <- InputParam(id = "gvcf", type = "string", position = 2) -p3 <- InputParam(id = "callsetName", type = "string", position = 3) -p4 <- InputParam(id = "intervals", type = "string", position = 4) -p5 <- InputParam(id = "unpadded_intervals", type = "string", position =5) -p6 <- InputParam(id = "tmpl", type = "File", position = 6) -o1 <- OutputParam(id = "json", type = "File", glob = "tmpl4.json") -jdJson <- cwlParam(baseCommand = c("Rscript", "-e", rscripts), - inputs = InputParamList(p1, p2, p3, p4, p5, p6), - outputs = OutputParamList(o1), - stdout = "tmpl4.json") - -p7 <- InputParam(id = "cromwell", type = "File") -p8 <- InputParam(id = "wdl", type = "File") -o1 <- OutputParam(id = "hclog", type = "File", outputSource = "JD/log") -o2 <- OutputParam(id = "outdir", type = "Directory", outputSource = "mvOut/OutDir") -jdCall <- cwlStepParam(inputs = InputParamList(p1, p2, p3, p4, p5, p6, p7, p8), - outputs = OutputParamList(o1, o2)) -s1 <- Step(id = "jdJson", run = jdJson, - In = list(sampleName = "sampleName", - gvcf = "gvcf", - callsetName = "callsetName", - intervals = "intervals", - unpadded_intervals = "unpadded_intervals", - tmpl = "tmpl")) -s2 <- Step(id = "JD", run = runWDL, - In = list(cromwell = "cromwell", - wdl = "wdl", - json = "jdJson/json")) -s3 <- Step(id = "mvOut", run = mvOut, - In = list(logFile = "JD/log")) - -jdCall <- jdCall + s1 + s2 + s3 +##source(system.file("tools", "runWDL.R", package = "RcwlPipelines")) +#' @include tl_runWDL.R tl_mvOut.R +## joint discovery +rscripts <- "args <- commandArgs(TRUE) +splitList <- function(s)as.list(unlist(strsplit(s, split = ','))) +sampleName <- args[1] +gvcf <- args[2] +callsetName <- args[3] +intervals <- args[4] +unpadded_intervals <- args[5] +tmpl4 <- args[6] +json1 <- jsonlite::fromJSON(tmpl4, simplifyVector=FALSE) +json1$JointGenotyping.sample_names <- splitList(sampleName) +json1$JointGenotyping.input_gvcfs <- splitList(gvcf) +json1$JointGenotyping.input_gvcfs_indices <- splitList(gsub('gz', 'gz.tbi', gvcf)) +json1$JointGenotyping.callset_name <- callsetName +json1$JointGenotyping.eval_interval_list <- intervals +json1$JointGenotyping.unpadded_intervals_file <- unpadded_intervals +cat(jsonlite::toJSON(json1, pretty = TRUE, auto_unbox = T))" +rscripts <- gsub("\n", ";", rscripts) + +p1 <- InputParam(id = "sampleName", type = "string", position = 1) +p2 <- InputParam(id = "gvcf", type = "string", position = 2) +p3 <- InputParam(id = "callsetName", type = "string", position = 3) +p4 <- InputParam(id = "intervals", type = "string", position = 4) +p5 <- InputParam(id = "unpadded_intervals", type = "string", position =5) +p6 <- InputParam(id = "tmpl", type = "File", position = 6) +o1 <- OutputParam(id = "json", type = "File", glob = "tmpl4.json") +jdJson <- cwlProcess(baseCommand = c("Rscript", "-e", rscripts), + inputs = InputParamList(p1, p2, p3, p4, p5, p6), + outputs = OutputParamList(o1), + stdout = "tmpl4.json") + +p7 <- InputParam(id = "cromwell", type = "File") +p8 <- InputParam(id = "wdl", type = "File") +o1 <- OutputParam(id = "hclog", type = "File", outputSource = "JD/log") +o2 <- OutputParam(id = "outdir", type = "Directory", outputSource = "mvOut/OutDir") +jdCall <- cwlWorkflow(inputs = InputParamList(p1, p2, p3, p4, p5, p6, p7, p8), + outputs = OutputParamList(o1, o2)) +s1 <- cwlStep(id = "jdJson", run = jdJson, + In = list(sampleName = "sampleName", + gvcf = "gvcf", + callsetName = "callsetName", + intervals = "intervals", + unpadded_intervals = "unpadded_intervals", + tmpl = "tmpl")) +s2 <- cwlStep(id = "JD", run = runWDL, + In = list(cromwell = "cromwell", + wdl = "wdl", + json = "jdJson/json")) +s3 <- cwlStep(id = "mvOut", run = mvOut, + In = list(logFile = "JD/log")) + +jdCall <- jdCall + s1 + s2 + s3 diff --git a/Rcwl/pl_lancet_scatter.R b/Rcwl/pl_lancet_scatter.R new file mode 100644 index 0000000..ed62aa2 --- /dev/null +++ b/Rcwl/pl_lancet_scatter.R @@ -0,0 +1,31 @@ +#' @include tl_lancet.R tl_bcftools_concat.R +p1 <- InputParam(id = "tbam", type = "File", + secondaryFiles = list("^.bai?", ".bai?")) +p2 <- InputParam(id = "nbam", type = "File", + secondaryFiles = list("^.bai?", ".bai?")) +p3 <- InputParam(id = "ref", type = "File", + secondaryFiles = ".fai") +p4 <- InputParam(id = "bed", type = "File[]") +p5 <- InputParam(id = "threads", type = "int") +p6 <- InputParam(id = "outvcf", type = "string") +s1 <- cwlStep(id = "lancet_bed", lancet, + In = list(tbam = "tbam", + nbam = "nbam", + ref = "ref", + bed = "bed", + threads = "threads"), + scatter = "bed", + scatterMethod = "dotproduct") +s2 <- cwlStep(id = "mergeVcf", bcftools_concat, + In = list(ovcf = list(source = list("tbam"), + valueFrom = "$(self.nameroot)_lancet.vcf"), + vcfs = "lancet_bed/vcf")) +o1 <- OutputParam(id = "ovcf", type = "File", outputSource = "mergeVcf/Fout") +req1 <- requireScatter() +req2 <- requireStepInputExpression() +req3 <- requireJS() +lancet_scatter <- cwlWorkflow(cwlVersion = "v1.2", + requirements = list(req1, req2, req3), + inputs = InputParamList(p1, p2, p3, p4, p5), + outputs = OutputParamList(o1)) +lancet_scatter <- lancet_scatter + s1 + s2 diff --git a/Rcwl/pl_lofreq_indel.R b/Rcwl/pl_lofreq_indel.R new file mode 100644 index 0000000..62da3ac --- /dev/null +++ b/Rcwl/pl_lofreq_indel.R @@ -0,0 +1,21 @@ + +#' @include tl_lofreq_indelqual.R tl_samtools_index +p1 <- InputParam(id = "ref", type = "File", secondaryFiles = ".fai") +p2 <- InputParam(id = "bam", type = "File", secondaryFiles = ".bai") +## s1 <- cwlStep(id = "realign", run = lofreq_viterbi, +## In = list(ref = "ref", +## bam = "bam", +## vbam = list(valueFrom = "$(inputs.bam.nameroot)_v.bam"))) +## s2 <- cwlStep(id = "sortBam", run = samtools_sort, +## In = list(bam = "realign/obam")) +s3 <- cwlStep(id = "indelq", run = lofreq_indelqual, + In = list(ref = "ref", + bam = "bam", + ibam = list(valueFrom = "$(inputs.bam.nameroot)_i.bam"))) +s4 <- cwlStep(id = "bamIdx", run = samtools_index, + In = list(bam = "indelq/obam")) +o1 <- OutputParam(id = "ibam", type = "File", outputSource = "bamIdx/idx", secondaryFiles = ".bai") +lofreq_indel <- cwlWorkflow(requirements = list(requireStepInputExpression()), + inputs = InputParamList(p1, p2), + outputs = OutputParamList(o1)) +lofreq_indel <- lofreq_indel + s3 + s4 diff --git a/Rcwl/pl_lofreq_realign.R b/Rcwl/pl_lofreq_realign.R new file mode 100644 index 0000000..d2d3e20 --- /dev/null +++ b/Rcwl/pl_lofreq_realign.R @@ -0,0 +1,22 @@ + +#' @include tl_lofreq_viterbi.R tl_samtools_sort.R tl_lofreq_indelqual.R tl_samtools_index +p1 <- InputParam(id = "ref", type = "File", secondaryFiles = ".fai") +p2 <- InputParam(id = "bam", type = "File", secondaryFiles = ".bai") +s1 <- cwlStep(id = "realign", run = lofreq_viterbi, + In = list(ref = "ref", + bam = "bam", + vbam = list(valueFrom = "$(inputs.bam.nameroot)_v.bam"))) +s2 <- cwlStep(id = "sortBam", run = samtools_sort, + In = list(bam = "realign/obam", + obam = list(valueFrom = "$(inputs.bam.nameroot)_sort.bam"))) +s3 <- cwlStep(id = "indelq", run = lofreq_indelqual, + In = list(ref = "ref", + bam = "sortBam/sbam", + ibam = list(valueFrom = "$(inputs.bam.nameroot)_i.bam"))) +s4 <- cwlStep(id = "bamIdx", run = samtools_index, + In = list(bam = "indelq/obam")) +o1 <- OutputParam(id = "ibam", type = "File", outputSource = "bamIdx/idx", secondaryFiles = ".bai") +lofreq_realign <- cwlWorkflow(requirements = list(requireStepInputExpression()), + inputs = InputParamList(p1, p2), + outputs = OutputParamList(o1)) +lofreq_realign <- lofreq_realign + s1 + s2 + s3 + s4 diff --git a/Rcwl/pl_lumpy.R b/Rcwl/pl_lumpy.R new file mode 100644 index 0000000..040b4a0 --- /dev/null +++ b/Rcwl/pl_lumpy.R @@ -0,0 +1,47 @@ +p1 <- InputParam(id = "bam", type = "File[]", secondaryFiles = ".bai") + +#' @include tl_samtools_view.R tl_samtools_index.R +## extractSplitReads_BwaMem +arguments(samtools_view) <- list("-h") +s1 <- cwlStep(id = "discord", run = samtools_view, + In = list(bam = "bam", + outb = list(valueFrom = "$(true)"), + exFlag = list(valueFrom = "1294"), + obam = list(valueFrom = "$(inputs.bam.nameroot).discord.bam")), + scatter = "bam") +#' @include tl_lumpy_extractSplitReads_BwaMem.R tl_lumpy.R +s2 <- cwlStep(id = "sam", run = samtools_view, + In = list(bam = "bam", + obam = list(valueFrom = "$(inputs.bam.nameroot).sam")), + scatter = "bam") +s3 <- cwlStep(id = "split", run = lumpy_extractSplitReads_BwaMem, + In = list(sam = "sam/oBam"), + scatter = "sam") +s4 <- cwlStep(id = "sam2bam", run = samtools_view, + In = list(bam = "split/splitReads", + outb = list(valueFrom = "$(true)"), + obam = list(valueFrom = "$(inputs.bam.nameroot).bam")), + scatter = "bam") + +s5 <- cwlStep(id = "discord_idx", run = samtools_index, + In = list(bam = "discord/oBam"), + scatter = "bam") +s6 <- cwlStep(id = "split_idx", run = samtools_index, + In = list(bam = "sam2bam/oBam"), + scatter = "bam") + +s7 <- cwlStep(id = "lumpy", run = lumpy, + In = list(bam = "bam", + split = "split_idx/idx", + discord = "discord_idx/idx", + vout = list(valueFrom = "$(inputs.bam[0].nameroot).vcf"))) + + +o1 <- OutputParam(id = "vcf", type = "File", outputSource = "lumpy/vcf") +req1 <- requireJS() +req2 <- requireStepInputExpression() +req3 <- list(class = "ScatterFeatureRequirement") +lumpyPL <- cwlWorkflow(requirements = list(req1, req2, req3), + inputs = InputParamList(p1), + outputs = OutputParamList(o1)) +lumpyPL <- lumpyPL + s1 + s2 + s3 + s4 + s5 + s6 + s7 diff --git a/Rcwl/pl_mantaStrelka.R b/Rcwl/pl_mantaStrelka.R index dffe2dd..5ede910 100644 --- a/Rcwl/pl_mantaStrelka.R +++ b/Rcwl/pl_mantaStrelka.R @@ -1,25 +1,27 @@ -#' @include tl_manta.R tl_strelka.R -p1 <- InputParam(id = "tbam", type = "File", secondaryFiles = ".bai") -p2 <- InputParam(id = "nbam", type = "File", secondaryFiles = ".bai") -p3 <- InputParam(id = "ref", type = "File", secondaryFiles = ".fai") -p4 <- InputParam(id = "region", type = "File?", secondaryFiles = ".tbi") - -s1 <- Step(id = "manta", run = manta, - In = list(tbam = "tbam", - nbam = "nbam", - ref = "ref", - callRegions = "region")) -s2 <- Step(id = "strelka", run = strelka, - In = list(tbam = "tbam", - nbam = "nbam", - ref = "ref", - callRegions = "region", - indelCandidates = "manta/candidateSmallIndels")) - -o1 <- OutputParam(id = "snvs", type = "File", outputSource = "strelka/snvs") -o2 <- OutputParam(id = "indels", type = "File", outputSource = "strelka/indels") -o3 <- OutputParam(id = "somaticSV", type = "File", outputSource = "manta/somaticSV") -o4 <- OutputParam(id = "diploidSV", type = "File", outputSource = "manta/diploidSV") -mantaStrelka <- cwlStepParam(inputs = InputParamList(p1, p2, p3, p4), - outputs = OutputParamList(o1, o2, o3, o4)) -mantaStrelka <- mantaStrelka + s1 + s2 +#' @include tl_manta.R tl_strelka.R +p1 <- InputParam(id = "tbam", type = "File", secondaryFiles = ".bai") +p2 <- InputParam(id = "nbam", type = "File", secondaryFiles = ".bai") +p3 <- InputParam(id = "ref", type = "File", secondaryFiles = ".fai") +p4 <- InputParam(id = "region", type = "File?", secondaryFiles = ".tbi") +p5 <- InputParam(id = "exome", type = "boolean", default = TRUE) +s1 <- cwlStep(id = "manta", run = manta, + In = list(tbam = "tbam", + nbam = "nbam", + ref = "ref", + callRegions = "region", + exome = "exome")) +s2 <- cwlStep(id = "strelka", run = strelka, + In = list(tbam = "tbam", + nbam = "nbam", + ref = "ref", + callRegions = "region", + indelCandidates = "manta/candidateSmallIndels", + exome = "exome")) + +o1 <- OutputParam(id = "snvs", type = "File", outputSource = "strelka/snvs") +o2 <- OutputParam(id = "indels", type = "File", outputSource = "strelka/indels") +o3 <- OutputParam(id = "somaticSV", type = "File", outputSource = "manta/somaticSV") +o4 <- OutputParam(id = "diploidSV", type = "File", outputSource = "manta/diploidSV") +mantaStrelka <- cwlWorkflow(inputs = InputParamList(p1, p2, p3, p4, p5), + outputs = OutputParamList(o1, o2, o3, o4)) +mantaStrelka <- mantaStrelka + s1 + s2 diff --git a/Rcwl/pl_mergeBamDup.R b/Rcwl/pl_mergeBamDup.R index fee1bcd..58fcf08 100644 --- a/Rcwl/pl_mergeBamDup.R +++ b/Rcwl/pl_mergeBamDup.R @@ -1,32 +1,32 @@ -##source(system.file("tools", "mergeBam.R", package = "RcwlPipelines")) -##source(system.file("tools", "markdup.R", package = "RcwlPipelines")) -##source(system.file("tools", "samtools_index.R", package = "RcwlPipelines")) -##source(system.file("tools", "samtools_flagstat.R", package = "RcwlPipelines")) - - -#' @include tl_mergeBam.R tl_markdup.R tl_samtools_index.R tl_samtools_flagstat.R -## mergeBam + markdup + index + flagstat -p1 <- InputParam(id = "ibam", type = "File[]") -p2 <- InputParam(id = "obam", type = "string") -o1 <- OutputParam(id = "oBam", type = "File", outputSource = "markdup/mBam") -o2 <- OutputParam(id = "matrix", type = "File", outputSource = "markdup/Mat") -o3 <- OutputParam(id = "Idx", type = "File", outputSource = "samtools_index/idx") -o4 <- OutputParam(id = "stat", type = "File", - outputSource = "samtools_flagstat/flagstat") -req1 <- list(class = "StepInputExpressionRequirement") -req2 <- list(class = "InlineJavascriptRequirement") -mergeBamDup <- cwlStepParam(requirements = list(req1, req2), - inputs = InputParamList(p1, p2), - outputs = OutputParamList(o1, o2, o3, o4)) -s1 <- Step(id = "mergeBam", run = mergeBam, - In = list(ibam = "ibam", - obam = "obam")) -s2 <- Step(id = "markdup", run = markdup, - In = list(ibam = "mergeBam/oBam", - obam = "obam", - matrix = list(valueFrom="$(inputs.ibam.nameroot).markdup.txt"))) -s3 <- Step(id = "samtools_index", run = samtools_index, - In = list(bam = "markdup/mBam")) -s4 <- Step(id = "samtools_flagstat", run = samtools_flagstat, - In = list(bam = "markdup/mBam")) -mergeBamDup <- mergeBamDup + s1 + s2 + s3 + s4 +##source(system.file("tools", "mergeBam.R", package = "RcwlPipelines")) +##source(system.file("tools", "markdup.R", package = "RcwlPipelines")) +##source(system.file("tools", "samtools_index.R", package = "RcwlPipelines")) +##source(system.file("tools", "samtools_flagstat.R", package = "RcwlPipelines")) + + +#' @include tl_mergeBam.R tl_markdup.R tl_samtools_index.R tl_samtools_flagstat.R +## mergeBam + markdup + index + flagstat +p1 <- InputParam(id = "ibam", type = "File[]") +p2 <- InputParam(id = "obam", type = "string") +o1 <- OutputParam(id = "oBam", type = "File", outputSource = "markdup/mBam") +o2 <- OutputParam(id = "matrix", type = "File", outputSource = "markdup/Mat") +o3 <- OutputParam(id = "Idx", type = "File", outputSource = "samtools_index/idx") +o4 <- OutputParam(id = "stat", type = "File", + outputSource = "samtools_flagstat/flagstat") +req1 <- list(class = "StepInputExpressionRequirement") +req2 <- list(class = "InlineJavascriptRequirement") +mergeBamDup <- cwlWorkflow(requirements = list(req1, req2), + inputs = InputParamList(p1, p2), + outputs = OutputParamList(o1, o2, o3, o4)) +s1 <- cwlStep(id = "mergeBam", run = mergeBam, + In = list(ibam = "ibam", + obam = "obam")) +s2 <- cwlStep(id = "markdup", run = markdup, + In = list(ibam = "mergeBam/oBam", + obam = "obam", + matrix = list(valueFrom="$(inputs.ibam.nameroot).markdup.txt"))) +s3 <- cwlStep(id = "samtools_index", run = samtools_index, + In = list(bam = "markdup/mBam")) +s4 <- cwlStep(id = "samtools_flagstat", run = samtools_flagstat, + In = list(bam = "markdup/mBam")) +mergeBamDup <- mergeBamDup + s1 + s2 + s3 + s4 diff --git a/Rcwl/pl_miRDeep2PL.R b/Rcwl/pl_miRDeep2PL.R index 76e8a94..da15932 100644 --- a/Rcwl/pl_miRDeep2PL.R +++ b/Rcwl/pl_miRDeep2PL.R @@ -1,53 +1,54 @@ - -#' @include tl_miRMapper.R tl_miRDeep2.R -p1 <- InputParam(id = "reads", type = "File") -p2 <- InputParam(id = "format", type = "string", default = "-c") -p3 <- InputParam(id = "adapter", type = "string") -p4 <- InputParam(id = "len", type = "int", default = 18L) -p5 <- InputParam(id = "genome", type = "File", - valueFrom = "$(self.dirname + '/' + self.nameroot)", - secondaryFiles = c("$(self.nameroot + '.1.ebwt')", - "$(self.nameroot + '.2.ebwt')", - "$(self.nameroot + '.3.ebwt')", - "$(self.nameroot + '.4.ebwt')", - "$(self.nameroot + '.rev.1.ebwt')", - "$(self.nameroot + '.rev.2.ebwt')")) -p6 <- InputParam(id = "miRef", type = list("File", "string")) -p7 <- InputParam(id = "miOther", type = list("File", "string")) -p8 <- InputParam(id = "precursors", type = list("File", "string")) -p9 <- InputParam(id = "species", type = "string") - -s1 <- Step(id = "Mapper", run = miRMapper, - In = list(reads = "reads", - format = "format", - adapter = "adapter", - genome = "genome", - preads = list( - valueFrom = "$(inputs.reads.nameroot)_collapsed.fa"), - arf = list( - valueFrom = "$(inputs.reads.nameroot)_collapsed.arf"))) -s2 <- Step(id = "miRDeep2", run = miRDeep2, - In = list(reads = "Mapper/pReads", - genome = "genome", - mappings = "Mapper/Arf", - miRef = "miRef", - miOther = "miOther", - precursors = "precursors", - species = "species")) - -o1 <- OutputParam(id = "csvfiles", type = "File[]", outputSource = "miRDeep2/csvfiles") -o2 <- OutputParam(id = "htmls", type = "File[]", outputSource = "miRDeep2/htmls") -o3 <- OutputParam(id = "bed", type = "File", outputSource = "miRDeep2/bed") -o4 <- OutputParam(id = "expression", type = "Directory", outputSource = "miRDeep2/expression") -o5 <- OutputParam(id = "mirna_results", type = "Directory", outputSource = "miRDeep2/mirna_results") -o6 <- OutputParam(id = "pdfs", type = "Directory", outputSource = "miRDeep2/pdfs") -o7 <- OutputParam(id = "preads", type = "File", outputSource = "Mapper/pReads") -o8 <- OutputParam(id = "arf", type = "File", outputSource = "Mapper/Arf") - -req1 <- list(class = "StepInputExpressionRequirement") -req2 <- list(class = "InlineJavascriptRequirement") -miRDeep2PL <- cwlStepParam( - requirements = list(req1, req2), - inputs = InputParamList(p1, p2, p3, p4, p5, p6, p7, p8, p9), - outputs = OutputParamList(o1, o2, o3, o4, o5, o6, o7, o8)) -miRDeep2PL <- miRDeep2PL + s1 + s2 + +#' @include tl_miRMapper.R tl_miRDeep2.R +p1 <- InputParam(id = "reads", type = "File") +p2 <- InputParam(id = "format", type = "string", default = "-c") +p3 <- InputParam(id = "adapter", type = "string") +p4 <- InputParam(id = "len", type = "int", default = 18L) +p5 <- InputParam(id = "genome", type = "File", + valueFrom = "$(self.dirname + '/' + self.nameroot)", + secondaryFiles = c("$(self.nameroot + '.1.ebwt')", + "$(self.nameroot + '.2.ebwt')", + "$(self.nameroot + '.3.ebwt')", + "$(self.nameroot + '.4.ebwt')", + "$(self.nameroot + '.rev.1.ebwt')", + "$(self.nameroot + '.rev.2.ebwt')")) +p6 <- InputParam(id = "miRef", type = list("File", "string")) +p7 <- InputParam(id = "miOther", type = list("File", "string")) +p8 <- InputParam(id = "precursors", type = list("File", "string")) +p9 <- InputParam(id = "species", type = "string") + +s1 <- cwlStep(id = "Mapper", run = miRMapper, + In = list(reads = "reads", + format = "format", + adapter = "adapter", + genome = "genome", + len = "len", + preads = list( + valueFrom = "$(inputs.reads.nameroot)_collapsed.fa"), + arf = list( + valueFrom = "$(inputs.reads.nameroot)_collapsed.arf"))) +s2 <- cwlStep(id = "miRDeep2", run = miRDeep2, + In = list(reads = "Mapper/pReads", + genome = "genome", + mappings = "Mapper/Arf", + miRef = "miRef", + miOther = "miOther", + precursors = "precursors", + species = "species")) + +o1 <- OutputParam(id = "csvfiles", type = "File[]", outputSource = "miRDeep2/csvfiles") +o2 <- OutputParam(id = "htmls", type = "File[]", outputSource = "miRDeep2/htmls") +o3 <- OutputParam(id = "bed", type = "File", outputSource = "miRDeep2/bed") +o4 <- OutputParam(id = "expression", type = "Directory", outputSource = "miRDeep2/expression") +o5 <- OutputParam(id = "mirna_results", type = "Directory", outputSource = "miRDeep2/mirna_results") +o6 <- OutputParam(id = "pdfs", type = "Directory", outputSource = "miRDeep2/pdfs") +o7 <- OutputParam(id = "preads", type = "File", outputSource = "Mapper/pReads") +o8 <- OutputParam(id = "arf", type = "File", outputSource = "Mapper/Arf") + +req1 <- list(class = "StepInputExpressionRequirement") +req2 <- list(class = "InlineJavascriptRequirement") +miRDeep2PL <- cwlWorkflow( + requirements = list(req1, req2), + inputs = InputParamList(p1, p2, p3, p4, p5, p6, p7, p8, p9), + outputs = OutputParamList(o1, o2, o3, o4, o5, o6, o7, o8)) +miRDeep2PL <- miRDeep2PL + s1 + s2 diff --git a/Rcwl/pl_neusomatic.R b/Rcwl/pl_neusomatic.R index 6c1bae5..f363264 100644 --- a/Rcwl/pl_neusomatic.R +++ b/Rcwl/pl_neusomatic.R @@ -1,35 +1,35 @@ - -#' @include tl_neusomatic_preprocess.R tl_neusomatic_call.R tl_neusomatic_postprocess.R -p1 <- InputParam(id = "tbam", type = "File", secondaryFiles = ".bai") -p2 <- InputParam(id = "nbam", type = "File", secondaryFiles = ".bai") -p3 <- InputParam(id = "ref", type = "File", secondaryFiles = ".fai") -p4 <- InputParam(id = "region", type = "File") -p5 <- InputParam(id = "ensemble", type = "File") -p6 <- InputParam(id = "threads", type = "int", default = 2L) -p7 <- InputParam(id = "ovcf", type = "string") -o1 <- OutputParam(id = "outVcf", type = "File", outputSource = "postprocess/oVcf") - -s1 <- Step(id = "preprocess", run = neusomatic_preprocess, - In = list(tbam = "tbam", - nbam = "nbam", - ref = "ref", - ensemble = "ensemble", - region = "region", - threads = "threads")) - -s2 <- Step(id = "call", run = neusomatic_call, - In = list(candidates = "preprocess/candidates", - ref = "ref")) - -s3 <- Step(id = "postprocess", run = neusomatic_postprocess, - In = list(ref = "ref", - tbam = "tbam", - pred = "call/pred", - fcandidates = "preprocess/fcandidates", - ensemble = "ensemble", - ovcf = "ovcf")) - -neusomatic <- cwlStepParam(inputs = InputParamList(p1, p2, p3, p4, p5, p6, p7), - outputs = OutputParamList(o1)) - -neusomatic <- neusomatic + s1 + s2 + s3 + +#' @include tl_neusomatic_preprocess.R tl_neusomatic_call.R tl_neusomatic_postprocess.R +p1 <- InputParam(id = "tbam", type = "File", secondaryFiles = ".bai") +p2 <- InputParam(id = "nbam", type = "File", secondaryFiles = ".bai") +p3 <- InputParam(id = "ref", type = "File", secondaryFiles = ".fai") +p4 <- InputParam(id = "region", type = "File") +p5 <- InputParam(id = "ensemble", type = "File") +p6 <- InputParam(id = "threads", type = "int", default = 2L) +p7 <- InputParam(id = "ovcf", type = "string") +o1 <- OutputParam(id = "outVcf", type = "File", outputSource = "postprocess/oVcf") + +s1 <- cwlStep(id = "preprocess", run = neusomatic_preprocess, + In = list(tbam = "tbam", + nbam = "nbam", + ref = "ref", + ensemble = "ensemble", + region = "region", + threads = "threads")) + +s2 <- cwlStep(id = "call", run = neusomatic_call, + In = list(candidates = "preprocess/candidates", + ref = "ref")) + +s3 <- cwlStep(id = "postprocess", run = neusomatic_postprocess, + In = list(ref = "ref", + tbam = "tbam", + pred = "call/pred", + fcandidates = "preprocess/fcandidates", + ensemble = "ensemble", + ovcf = "ovcf")) + +neusomatic <- cwlWorkflow(inputs = InputParamList(p1, p2, p3, p4, p5, p6, p7), + outputs = OutputParamList(o1)) + +neusomatic <- neusomatic + s1 + s2 + s3 diff --git a/Rcwl/pl_phaseVcf.R b/Rcwl/pl_phaseVcf.R index 7df3142..3626d19 100644 --- a/Rcwl/pl_phaseVcf.R +++ b/Rcwl/pl_phaseVcf.R @@ -1,57 +1,57 @@ -## https://pvactools.readthedocs.io/en/latest/pvacseq/input_file_prep/proximal_vcf.html - -p1a <- InputParam(id = "gvariant", type = "File", secondaryFile = ".tbi") -p1b <- InputParam(id = "svariant", type = "File", secondaryFile = ".tbi") -p2 <- InputParam(id = "ref", type = "File", - secondaryFiles = c(".fai", "$(self.nameroot).dict")) -p3 <- InputParam(id = "bam", type = "File", secondaryFiles = ".bai") -p4 <- InputParam(id = "outvcf", type = "string") -p5 <- InputParam(id = "nsample", type = "string") -p6 <- InputParam(id = "tsample", type = "string") -#' @include tl_bcfview.R -s1 <- Step(id = "splitSample", run = bcfview, - In = list(vcf = "gvariant", - sample = "nsample", - fout = list(valueFrom = "$(inputs.sample)_germline.vcf"), - genotype = list(valueFrom = "^miss"), - exclude = list(valueFrom = "GT='0/0'"))) -#' @include tl_RenameSampleInVcf.R -s2a <- Step(id = "renameGVcf", run = RenameSampleInVcf, - In = list(vcf = "splitSample/Fout", - ovcf = list(valueFrom = "$(inputs.vcf.nameroot)_g.vcf"), - NewName = "tsample")) -s2b <- Step(id = "renameSVcf", run = RenameSampleInVcf, - In = list(vcf = "svariant", - ovcf = list(valueFrom = "$(inputs.vcf.nameroot)_s.vcf"), - NewName = "tsample")) -#' @include tl_CombineVariants.R -s3 <- Step(id = "combineVariants", run = CombineVariants, - In = list(variants = list(source = list("renameGVcf/oVcf", "renameSVcf/oVcf")), - ref = "ref", - ovcf = list(valueFrom = "combined_somatic_germline.vcf"))) -#' @include tl_SortVcf.R -s4 <- Step(id = "sortVcf", run = SortVcf, - In = list(vcf = "combineVariants/oVcf", - ovcf = list(valueFrom = "$(inputs.vcf.nameroot)_sorted.vcf"))) -#' @include tl_ReadBackedPhasing.R -s5 <- Step(id = "ReadBackedPhasing", run = ReadBackedPhasing, - In = list(vcf = "sortVcf/oVcf", - bam = "bam", - ref = "ref", - region = "sortVcf/oVcf", - ovcf = "outvcf")) -#' @include tl_bgzip.R -s6 <- Step(id = "bgzip", run = bgzip, - In = list(ifile = "ReadBackedPhasing/oVcf")) -#' @include tl_tabix_index.R -s7 <- Step(id = "tabixIndex", run = tabix_index, - In = list(tfile = "bgzip/zfile", - type = list(valueFrom = "vcf"))) -o1 <- OutputParam(id = "pvcf", type = "File", outputSource = "tabixIndex/idx") -req1 <- list(class = "InlineJavascriptRequirement") -req2 <- list(class = "StepInputExpressionRequirement") -req3 <- list(class = "MultipleInputFeatureRequirement") -phaseVcf <- cwlStepParam(requirements = list(req1, req2, req3), - inputs = InputParamList(p1a, p1b, p2, p3, p4, p5, p6), - outputs = OutputParamList(o1)) -phaseVcf <- phaseVcf + s1 + s2a + s2b + s3 + s4 + s5 + s6 + s7 +## https://pvactools.readthedocs.io/en/latest/pvacseq/input_file_prep/proximal_vcf.html + +p1a <- InputParam(id = "gvariant", type = "File", secondaryFile = ".tbi") +p1b <- InputParam(id = "svariant", type = "File", secondaryFile = ".tbi") +p2 <- InputParam(id = "ref", type = "File", + secondaryFiles = c(".fai", "$(self.nameroot).dict")) +p3 <- InputParam(id = "bam", type = "File", secondaryFiles = ".bai") +p4 <- InputParam(id = "outvcf", type = "string") +p5 <- InputParam(id = "nsample", type = "string") +p6 <- InputParam(id = "tsample", type = "string") +#' @include tl_bcfview.R +s1 <- cwlStep(id = "splitSample", run = bcfview, + In = list(vcf = "gvariant", + sample = "nsample", + fout = list(valueFrom = "$(inputs.sample)_germline.vcf"), + genotype = list(valueFrom = "^miss"), + exclude = list(valueFrom = "GT='0/0'"))) +#' @include tl_RenameSampleInVcf.R +s2a <- cwlStep(id = "renameGVcf", run = RenameSampleInVcf, + In = list(vcf = "splitSample/Fout", + ovcf = list(valueFrom = "$(inputs.vcf.nameroot)_g.vcf"), + NewName = "tsample")) +s2b <- cwlStep(id = "renameSVcf", run = RenameSampleInVcf, + In = list(vcf = "svariant", + ovcf = list(valueFrom = "$(inputs.vcf.nameroot)_s.vcf"), + NewName = "tsample")) +#' @include tl_CombineVariants.R +s3 <- cwlStep(id = "combineVariants", run = CombineVariants, + In = list(variants = list(source = list("renameGVcf/oVcf", "renameSVcf/oVcf")), + ref = "ref", + ovcf = list(valueFrom = "combined_somatic_germline.vcf"))) +#' @include tl_SortVcf.R +s4 <- cwlStep(id = "sortVcf", run = SortVcf, + In = list(vcf = "combineVariants/oVcf", + ovcf = list(valueFrom = "$(inputs.vcf.nameroot)_sorted.vcf"))) +#' @include tl_ReadBackedPhasing.R +s5 <- cwlStep(id = "ReadBackedPhasing", run = ReadBackedPhasing, + In = list(vcf = "sortVcf/oVcf", + bam = "bam", + ref = "ref", + region = "sortVcf/oVcf", + ovcf = "outvcf")) +#' @include tl_bgzip.R +s6 <- cwlStep(id = "bgzip", run = bgzip, + In = list(ifile = "ReadBackedPhasing/oVcf")) +#' @include tl_tabix_index.R +s7 <- cwlStep(id = "tabixIndex", run = tabix_index, + In = list(tfile = "bgzip/zfile", + type = list(valueFrom = "vcf"))) +o1 <- OutputParam(id = "pvcf", type = "File", outputSource = "tabixIndex/idx") +req1 <- list(class = "InlineJavascriptRequirement") +req2 <- list(class = "StepInputExpressionRequirement") +req3 <- list(class = "MultipleInputFeatureRequirement") +phaseVcf <- cwlWorkflow(requirements = list(req1, req2, req3), + inputs = InputParamList(p1a, p1b, p2, p3, p4, p5, p6), + outputs = OutputParamList(o1)) +phaseVcf <- phaseVcf + s1 + s2a + s2b + s3 + s4 + s5 + s6 + s7 diff --git a/Rcwl/pl_rnaseq.R b/Rcwl/pl_rnaseq.R new file mode 100644 index 0000000..ad94975 --- /dev/null +++ b/Rcwl/pl_rnaseq.R @@ -0,0 +1,85 @@ +##source(system.file("tools", "fastQC.R", package = "RcwlPipelines")) +##source(system.file("tools", "featureCounts.R", package = "RcwlPipelines")) +##source(system.file("tools", "samtools_flagstat.R", package = "RcwlPipelines")) +##source(system.file("tools", "samtools_index.R", package = "RcwlPipelines")) +##source(system.file("pipelines", "RSeQC.R", package = "RcwlPipelines")) +##source(system.file("tools", "STAR.R", package = "RcwlPipelines")) + +## Pipeline: fastQC + STAR + featureCounts + rnaseqc + TPM +## Note: output to current dir +p1 <- InputParam(id = "in_seqfiles", type = "File[]") +p2 <- InputParam(id = "in_prefix", type = "string") +p3 <- InputParam(id = "in_genomeDir", type = "Directory") +p4 <- InputParam(id = "in_GTFfile", type = "File") +p5 <- InputParam(id = "in_runThreadN", type = "int", default = 1L) +o1 <- OutputParam(id = "out_fastqc", type = "File[]", outputSource = "fastqc/QCfile") +o2a <- OutputParam(id = "out_BAM", type = "File", + outputSource = "samtools_index/idx") +o2b <- OutputParam(id = "out_Log", type = "File", outputSource = "STAR/outLog") +o2c <- OutputParam(id = "out_Count", type = "File", outputSource = "STAR/outCount") +##o3 <- OutputParam(id = "out_idx",type = "File", outputSource = "samtools_index/idx") +o4 <- OutputParam(id = "out_stat",type = "File", outputSource = "samtools_flagstat/flagstat") +o5 <- OutputParam(id = "out_count", type = "File", outputSource = "featureCounts/Count") + +o6 <- OutputParam(id = "QCout", type = "File[]", outputSource = "rnaseqc/qcOut") + +o9 <- OutputParam(id = "out_tpm", type = "File[]", outputSource = "tpm/out") +o10 <- OutputParam(id = "out_ent", type = "File[]", outputSource = "tpm/ent") +o11 <- OutputParam(id = "out_uni", type = "File[]", outputSource = "tpm/uni") + +req1 <- list(class = "ScatterFeatureRequirement") +req2 <- list(class = "SubworkflowFeatureRequirement") +req3 <- list(class = "StepInputExpressionRequirement") +rnaseq <- cwlWorkflow(requirements = list(req1, req2, req3), + inputs = InputParamList(p1, p2, p3, p4, p5), + outputs = OutputParamList(o1, o2a, o2b, o2c, o4, o5, o6, + o9, o10, o11)) + +## fastqc +#' @include tl_fastqc.R +s1 <- cwlStep(id = "fastqc", run = fastqc, + In = list(seqfile = "in_seqfiles"), + scatter = "seqfile") +## STAR +#' @include tl_STAR.R +## fix STAR sort problem +arguments(STAR)[[7]] <- "Unsorted" +s2 <- cwlStep(id = "STAR", run = STAR, + In = list(prefix = "in_prefix", + genomeDir = "in_genomeDir", + sjdbGTFfile = "in_GTFfile", + readFilesIn = "in_seqfiles", + runThreadN = "in_runThreadN")) +## samtools +#' @include tl_sortBam.R tl_samtools_index.R tl_samtools_flagstat.R +s3a <- cwlStep(id = "sortBam", run = sortBam, + In = list(bam = "STAR/outBAM")) +s3 <- cwlStep(id = "samtools_index", run = samtools_index, + In = list(bam = "sortBam/sbam")) +s4 <- cwlStep(id = "samtools_flagstat", run = samtools_flagstat, + In = list(bam = "sortBam/sbam")) +## featureCounts +#' @include tl_featureCounts.R +s5 <- cwlStep(id = "featureCounts", run = featureCounts, + In = list(gtf = "in_GTFfile", + bam = "samtools_index/idx", + count = list(valueFrom = "$(inputs.bam.nameroot).featureCounts.txt"))) +## rnaseqc +#' @include tl_collapse_annotation.R +s6a <- cwlStep(id = "collapse_annotation", run = collapse_annotation, + In = list(gtf = "in_GTFfile", + out = list(valueFrom = "collapse_annotation.gtf"))) +#' @include tl_rnaseqc.R +s6b <- cwlStep(id = "rnaseqc", run = rnaseqc, + In = list(gtf = "collapse_annotation/gtfout", + bam = "sortBam/sbam")) + +## TPM +#' @include tl_TPMCalculator.R +s7 <- cwlStep(id = "tpm", run = TPMCalculator, + In = list(bam = "samtools_index/idx", + gtf = "in_GTFfile")) + + +## pipeline +rnaseq <- rnaseq + s1 + s2 + s3a + s3 + s4 + s5 + s6a + s6b + s7 diff --git a/Rcwl/pl_rnaseq_Sf.R b/Rcwl/pl_rnaseq_Sf.R index 1b5fdeb..fad5d97 100644 --- a/Rcwl/pl_rnaseq_Sf.R +++ b/Rcwl/pl_rnaseq_Sf.R @@ -1,88 +1,100 @@ -##source(system.file("tools", "fastQC.R", package = "RcwlPipelines")) -##source(system.file("tools", "featureCounts.R", package = "RcwlPipelines")) -##source(system.file("tools", "samtools_flagstat.R", package = "RcwlPipelines")) -##source(system.file("tools", "samtools_index.R", package = "RcwlPipelines")) -##source(system.file("pipelines", "RSeQC.R", package = "RcwlPipelines")) -##source(system.file("tools", "STAR.R", package = "RcwlPipelines")) - -## Pipeline: fastQC + STAR + featureCounts -## Note: output to current dir -p1 <- InputParam(id = "in_seqfiles", type = "File[]") -p2 <- InputParam(id = "in_prefix", type = "string") -p3 <- InputParam(id = "in_genomeDir", type = "Directory") -p4 <- InputParam(id = "in_GTFfile", type = "File") -p5 <- InputParam(id = "in_runThreadN", type = "int", default = 1L) -o1 <- OutputParam(id = "out_fastqc", type = "File[]", outputSource = "fastqc/QCfile") -o2a <- OutputParam(id = "out_BAM", type = "File", - outputSource = "samtools_index/idx") -o2b <- OutputParam(id = "out_Log", type = "File", outputSource = "STAR/outLog") -o2c <- OutputParam(id = "out_Count", type = "File", outputSource = "STAR/outCount") -##o3 <- OutputParam(id = "out_idx",type = "File", outputSource = "samtools_index/idx") -o4 <- OutputParam(id = "out_stat",type = "File", outputSource = "samtools_flagstat/flagstat") -o5 <- OutputParam(id = "out_count", type = "File", outputSource = "featureCounts/Count") -o6 <- OutputParam(id = "out_distribution", type = "File", outputSource = "r_distribution/distOut") -o7 <- OutputParam(id = "out_gCovP", type = "File", outputSource = "gCoverage/gCovPDF") -o8 <- OutputParam(id = "out_gCovT", type = "File", outputSource = "gCoverage/gCovTXT") -req1 <- list(class = "ScatterFeatureRequirement") -req2 <- list(class = "SubworkflowFeatureRequirement") -req3 <- list(class = "StepInputExpressionRequirement") -rnaseq_Sf <- cwlStepParam(requirements = list(req1, req2, req3), - inputs = InputParamList(p1, p2, p3, p4, p5), - outputs = OutputParamList(o1, o2a, o2b, o2c, o4, o5, o6, o7, o8)) - -## fastqc -#' @include tl_fastqc.R -s1 <- Step(id = "fastqc", run = fastqc, - In = list(seqfile = "in_seqfiles"), - scatter = "seqfile") -## STAR -#' @include tl_STAR.R -## fix STAR sort problem -arguments(STAR)[[13]] <- "Unsorted" -s2 <- Step(id = "STAR", run = STAR, - In = list(prefix = "in_prefix", - genomeDir = "in_genomeDir", - sjdbGTFfile = "in_GTFfile", - readFilesIn = "in_seqfiles", - runThreadN = "in_runThreadN")) -## samtools -#' @include tl_sortBam.R tl_samtools_index.R tl_samtools_flagstat.R -s3a <- Step(id = "sortBam", run = sortBam, - In = list(bam = "STAR/outBAM")) -s3 <- Step(id = "samtools_index", run = samtools_index, - In = list(bam = "sortBam/sbam")) -s4 <- Step(id = "samtools_flagstat", run = samtools_flagstat, - In = list(bam = "sortBam/sbam")) -## featureCounts -#' @include tl_featureCounts.R -s5 <- Step(id = "featureCounts", run = featureCounts, - In = list(gtf = "in_GTFfile", - bam = "samtools_index/idx", - count = list(valueFrom = "$(inputs.bam.nameroot).featureCounts.txt"))) -## RSeQC -## #' @include pl_RSeQC.R -## s6 <- Step(id = "RSeQC", run = RSeQC, -## In = list(bam = "samtools_index/idx", -## gtf = "in_GTFfile")) -#' @include tl_gtfToGenePred.R tl_genePredToBed.R tl_read_distribution.R tl_geneBody_coverage.R -s6a <- Step(id = "gtfToGenePred", run = gtfToGenePred, - In = list(gtf = "in_GTFfile", - gPred = list(valueFrom = "$(inputs.gtf.nameroot).genePred"))) - -s6b <- Step(id = "genePredToBed", run = genePredToBed, - In = list(genePred = "gtfToGenePred/genePred", - Bed = list(valueFrom = "$(inputs.genePred.nameroot).bed"))) - -s6c <- Step(id = "r_distribution", run = read_distribution, - In = list(bam = "samtools_index/idx", - bed = "genePredToBed/bed")) -gCoverage <- geneBody_coverage -gCoverage@inputs$bam@secondaryFiles <- character() -s6d <- Step(id = "gCoverage", run = gCoverage, - In = list(bam = "samtools_index/idx", - bed = "genePredToBed/bed", - prefix = list(valueFrom = "$(inputs.bam.nameroot)"))) - - -## pipeline -rnaseq_Sf <- rnaseq_Sf + s1 + s2 + s3a + s3 + s4 + s5 + s6a + s6b + s6c + s6d +##source(system.file("tools", "fastQC.R", package = "RcwlPipelines")) +##source(system.file("tools", "featureCounts.R", package = "RcwlPipelines")) +##source(system.file("tools", "samtools_flagstat.R", package = "RcwlPipelines")) +##source(system.file("tools", "samtools_index.R", package = "RcwlPipelines")) +##source(system.file("pipelines", "RSeQC.R", package = "RcwlPipelines")) +##source(system.file("tools", "STAR.R", package = "RcwlPipelines")) + +## Pipeline: fastQC + STAR + featureCounts +## Note: output to current dir +p1 <- InputParam(id = "in_seqfiles", type = "File[]") +p2 <- InputParam(id = "in_prefix", type = "string") +p3 <- InputParam(id = "in_genomeDir", type = "Directory") +p4 <- InputParam(id = "in_GTFfile", type = "File") +p5 <- InputParam(id = "in_runThreadN", type = "int", default = 1L) +o1 <- OutputParam(id = "out_fastqc", type = "File[]", outputSource = "fastqc/QCfile") +o2a <- OutputParam(id = "out_BAM", type = "File", + outputSource = "samtools_index/idx") +o2b <- OutputParam(id = "out_Log", type = "File", outputSource = "STAR/outLog") +o2c <- OutputParam(id = "out_Count", type = "File", outputSource = "STAR/outCount") +##o3 <- OutputParam(id = "out_idx",type = "File", outputSource = "samtools_index/idx") +o4 <- OutputParam(id = "out_stat",type = "File", outputSource = "samtools_flagstat/flagstat") +o5 <- OutputParam(id = "out_count", type = "File", outputSource = "featureCounts/Count") +o6 <- OutputParam(id = "out_distribution", type = "File", outputSource = "r_distribution/distOut") +o7 <- OutputParam(id = "out_gCovP", type = "File", outputSource = "gCoverage/gCovPDF") +o8 <- OutputParam(id = "out_gCovT", type = "File", outputSource = "gCoverage/gCovTXT") +o9 <- OutputParam(id = "out_tpm", type = "File[]", outputSource = "tpm/out") +o10 <- OutputParam(id = "out_ent", type = "File[]", outputSource = "tpm/ent") +o11 <- OutputParam(id = "out_uni", type = "File[]", outputSource = "tpm/uni") + +req1 <- list(class = "ScatterFeatureRequirement") +req2 <- list(class = "SubworkflowFeatureRequirement") +req3 <- list(class = "StepInputExpressionRequirement") +rnaseq_Sf <- cwlWorkflow(requirements = list(req1, req2, req3), + inputs = InputParamList(p1, p2, p3, p4, p5), + outputs = OutputParamList(o1, o2a, o2b, o2c, o4, o5, o6, + o7, o8, o9, o10, o11)) + +## fastqc +#' @include tl_fastqc.R +s1 <- cwlStep(id = "fastqc", run = fastqc, + In = list(seqfile = "in_seqfiles"), + scatter = "seqfile") +## STAR +#' @include tl_STAR.R +## fix STAR sort problem +arguments(STAR)[[9]] <- "Unsorted" +s2 <- cwlStep(id = "STAR", run = STAR, + In = list(prefix = "in_prefix", + genomeDir = "in_genomeDir", + sjdbGTFfile = "in_GTFfile", + readFilesIn = "in_seqfiles", + runThreadN = "in_runThreadN")) +## samtools +#' @include tl_sortBam.R tl_samtools_index.R tl_samtools_flagstat.R +s3a <- cwlStep(id = "sortBam", run = sortBam, + In = list(bam = "STAR/outBAM")) +s3 <- cwlStep(id = "samtools_index", run = samtools_index, + In = list(bam = "sortBam/sbam")) +s4 <- cwlStep(id = "samtools_flagstat", run = samtools_flagstat, + In = list(bam = "sortBam/sbam")) +## featureCounts +#' @include tl_featureCounts.R +s5 <- cwlStep(id = "featureCounts", run = featureCounts, + In = list(gtf = "in_GTFfile", + bam = "samtools_index/idx", + count = list(valueFrom = "$(inputs.bam.nameroot).featureCounts.txt"))) + +## TPM +#' @include tl_TPMCalculator.R +s7 <- cwlStep(id = "tpm", run = TPMCalculator, + In = list(bam = "samtools_index/idx", + gtf = "in_GTFfile")) + +## RSeQC +## #' @include pl_RSeQC.R +## s6 <- cwlStep(id = "RSeQC", run = RSeQC, +## In = list(bam = "samtools_index/idx", +## gtf = "in_GTFfile")) +#' @include tl_gtfToGenePred.R tl_genePredToBed.R tl_read_distribution.R tl_geneBody_coverage.R +s6a <- cwlStep(id = "gtfToGenePred", run = gtfToGenePred, + In = list(gtf = "in_GTFfile", + gPred = list(valueFrom = "$(inputs.gtf.nameroot).genePred"))) + +s6b <- cwlStep(id = "genePredToBed", run = genePredToBed, + In = list(genePred = "gtfToGenePred/genePred", + Bed = list(valueFrom = "$(inputs.genePred.nameroot).bed"))) + +s6c <- cwlStep(id = "r_distribution", run = read_distribution, + In = list(bam = "samtools_index/idx", + bed = "genePredToBed/bed")) +gCoverage <- geneBody_coverage +gCoverage@inputs$bam@secondaryFiles <- character() +s6d <- cwlStep(id = "gCoverage", run = gCoverage, + In = list(bam = "samtools_index/idx", + bed = "genePredToBed/bed", + prefix = list(valueFrom = "$(inputs.bam.nameroot)"))) + + +## pipeline +rnaseq_Sf <- rnaseq_Sf + s1 + s2 + s3a + s3 + s4 + s5 + s6a + s6b + s6c + s6d + s7 diff --git a/Rcwl/pl_rnaseq_quant.R b/Rcwl/pl_rnaseq_quant.R new file mode 100644 index 0000000..e56340d --- /dev/null +++ b/Rcwl/pl_rnaseq_quant.R @@ -0,0 +1,74 @@ + +p1a <- InputParam(id = "in_fq1", type = "File") +p1b <- InputParam(id = "in_fq2", type = "File") +p2 <- InputParam(id = "in_prefix", type = "string") +p3 <- InputParam(id = "in_genomeDir", type = "Directory") +p4 <- InputParam(id = "in_GTFfile", type = "File") +p5 <- InputParam(id = "in_runThreadN", type = "int", default = 1L) +p6 <- InputParam(id = "salmon_index", type = "Directory") + +#' @include tl_STAR_FFPE.R +# arguments(STAR)[[9]] <- "Unsorted" +s1 <- cwlStep(id = "STAR", run = STAR_FFPE, + In = list(prefix = list(source = "in_prefix", + valueFrom = "$(self)_"), + genomeDir = "in_genomeDir", + sjdbGTFfile = "in_GTFfile", + readFilesIn = list(source = list("in_fq1", "in_fq2"), + linkMerge = "merge_flattened"), + runThreadN = "in_runThreadN")) + +## samtools sort for lower memory requirement +#' @include tl_sortBam.R tl_samtools_index.R tl_samtools_flagstat.R +s2 <- cwlStep(id = "sortBam", run = sortBam, + In = list(bam = "STAR/outBAM")) +s3 <- cwlStep(id = "samtools_index", run = samtools_index, + In = list(bam = "sortBam/sbam")) +s4 <- cwlStep(id = "samtools_flagstat", run = samtools_flagstat, + In = list(bam = "sortBam/sbam")) + +## featureCounts +#' @include tl_featureCounts.R +s5 <- cwlStep(id = "featureCounts", run = featureCounts, + In = list(gtf = "in_GTFfile", + bam = "samtools_index/idx", + count = list(valueFrom = "$(inputs.bam.nameroot).featureCounts.txt"))) +## RSeQC +#' @include tl_gtfToGenePred.R tl_genePredToBed.R tl_read_distribution.R +s6a <- cwlStep(id = "gtfToGenePred", run = gtfToGenePred, + In = list(gtf = "in_GTFfile", + gPred = list(valueFrom = "$(inputs.gtf.nameroot).genePred"))) + +s6b <- cwlStep(id = "genePredToBed", run = genePredToBed, + In = list(genePred = "gtfToGenePred/genePred", + Bed = list(valueFrom = "$(inputs.genePred.nameroot).bed"))) + +s6c <- cwlStep(id = "r_distribution", run = read_distribution, + In = list(bam = "samtools_index/idx", + bed = "genePredToBed/bed")) + +## salmon +#' @include tl_salmon_quant.R +s7 <- cwlStep(id = "salmon", run = salmon_quant, + In = list(threadN = "in_runThreadN", + ref = "salmon_index", + fq1 = "in_fq1", + fq2 = "in_fq2", + outPrefix = list(source = "in_prefix", + valueFrom = "$(self)_salmon"))) + +o1 <- OutputParam(id = "out_BAM", type = "File", outputSource = "samtools_index/idx") +o2 <- OutputParam(id = "out_Log", type = "File", outputSource = "STAR/outLog") +o3 <- OutputParam(id = "out_Count", type = "File", outputSource = "STAR/outCount") +o3 <- OutputParam(id = "out_junction", type = "File", outputSource = "STAR/junction") +o4 <- OutputParam(id = "out_stat",type = "File", outputSource = "samtools_flagstat/flagstat") +o5 <- OutputParam(id = "out_count", type = "File", outputSource = "featureCounts/Count") +o6 <- OutputParam(id = "out_salmon", type = "Directory", outputSource = "salmon/out1") +o7 <- OutputParam(id = "out_rdist", type = "File", outputSource = "r_distribution/distOut") +req1 <- list(class = "MultipleInputFeatureRequirement") +req2 <- list(class = "InlineJavascriptRequirement") +req3 <- list(class = "StepInputExpressionRequirement") +rnaseq_quant <- cwlWorkflow(requirements = list(req1, req2, req3), + inputs = InputParamList(p1a, p1b, p2, p3, p4, p5, p6), + outputs = OutputParamList(o1, o2, o3, o4, o5, o6, o7)) +rnaseq_quant <- rnaseq_quant + s1 + s2 + s3 + s4 + s5 + s6a + s6b + s6c + s7 diff --git a/Rcwl/pl_rrbs.R b/Rcwl/pl_rrbs.R new file mode 100644 index 0000000..36c850b --- /dev/null +++ b/Rcwl/pl_rrbs.R @@ -0,0 +1,52 @@ +## https://github.com/nugentechnologies/NuMetRRBS + +p1 <- InputParam(id = "fq1", type = "File") +p2 <- InputParam(id = "fq2", type = "File?") +p3 <- InputParam(id = "fq3", type = "File") +p4 <- InputParam(id = "sample", type = "string") +p5 <- InputParam(id = "genome", type = "Directory") +p6 <- InputParam(id = "threads", type = "int") +#' @include tl_trim_galore.R +s1 <- cwlStep(id = "trim", run = trim_galore, + In = list(fq1 = "fq1", + fq2 = "fq2")) +#' @include tl_trimRRBSdiversity.R +s2 <- cwlStep(id = "trimDiversity", run = trimRRBSdiversity, + In = list(fq1 = "trim/FQ1", + fq2 = "trim/FQ2")) +#' @include tl_bismark.R +s3 <- cwlStep(id = "bismark", run = bismark, + In = list(genome = "genome", + fq1 = "trimDiversity/FQ1", + fq2 = "trimDiversity/FQ2", + sam = list(valueFrom = "$(true)"))) +#' @include tl_strip_sam.R +s4 <- cwlStep(id = "stripSam", run = strip_sam, + In = list(sam = "bismark/align")) +#' @include tl_nudup.R +s5 <- cwlStep(id = "nudup", run = nudup, + In = list(index = "fq3", + paired = list(valueFrom = "$(true)"), + out = "sample", + sam = "stripSam/strip")) +#' @include tl_samtools_sort.R +arguments(samtools_sort) <- list("-n") +s6 <- cwlStep(id = "resort", run = samtools_sort, + In = list(bam = "nudup/dbam", + obam = list(valueFrom = "$(inputs.bam.nameroot)_nsort.bam"))) +#' @include tl_bismark_methylation_extractor.R +s7 <- cwlStep(id = "extractor", run = bismark_methylation_extractor, + In = list(paired = list(valueFrom = "$(true)"), + core = "threads", + bam = "resort/sbam")) +o1 <- OutputParam(id = "mbam", type = "File", outputSource = "nudup/mbam") +o2 <- OutputParam(id = "nbam", type = "File", outputSource = "resort/sbam") +o3 <- OutputParam(id = "cov", type = "File", outputSource = "extractor/cov") +o4 <- OutputParam(id = "Bed", type = "File?", outputSource = "extractor/Bed") +o5 <- OutputParam(id = "report", type = "File[]", outputSource = "extractor/report") +req1 <- requireJS() +req2 <- requireStepInputExpression() +rrbs <- cwlWorkflow(requirements = list(req1, req2), + inputs = InputParamList(p1, p2, p3, p4, p5, p6), + outputs = OutputParamList(o1, o2, o3, o4, o5)) +rrbs <- rrbs + s1 + s2 + s3 + s4 + s5 + s6 + s7 diff --git a/Rcwl/pl_strelka2PL.R b/Rcwl/pl_strelka2PL.R new file mode 100644 index 0000000..c9f6ad8 --- /dev/null +++ b/Rcwl/pl_strelka2PL.R @@ -0,0 +1,39 @@ +#' @include tl_manta.R tl_strelka.R +p1 <- InputParam(id = "tbam", type = "File", secondaryFiles = ".bai") +p2 <- InputParam(id = "nbam", type = "File", secondaryFiles = ".bai") +p3 <- InputParam(id = "ref", type = "File", secondaryFiles = ".fai") +p4 <- InputParam(id = "region", type = "File?", secondaryFiles = ".tbi") +p5 <- InputParam(id = "exome", type = "boolean", default = TRUE) +s1 <- cwlStep(id = "manta", run = manta, + In = list(tbam = "tbam", + nbam = "nbam", + ref = "ref", + callRegions = "region", + exome = "exome")) +s2 <- cwlStep(id = "strelka", run = strelka, + In = list(tbam = "tbam", + nbam = "nbam", + ref = "ref", + callRegions = "region", + indelCandidates = "manta/candidateSmallIndels", + exome = "exome")) +#' @include tl_bcftools_view.R +s3 <- cwlStep(id = "strelkaSNV", run = bcftools_view, + In = list(vcf = "strelka/snvs", + filter = list(valueFrom = "PASS"), + fout = list(source = "tbam", + valueFrom = "$(self.nameroot)_strelka2.somatic.snvs.vcf"))) +s4 <- cwlStep(id = "strelkaIndel", run = bcftools_view, + In = list(vcf = "strelka/indels", + filter = list(valueFrom = "PASS"), + fout = list(source = "tbam", + valueFrom = "$(self.nameroot)_strelka2.somatic.indels.vcf"))) + +o1 <- OutputParam(id = "snvs", type = "File", outputSource = "strelkaSNV/Fout") +o2 <- OutputParam(id = "indels", type = "File", outputSource = "strelkaIndel/Fout") +##o3 <- OutputParam(id = "somaticSV", type = "File", outputSource = "manta/somaticSV") +##o4 <- OutputParam(id = "diploidSV", type = "File", outputSource = "manta/diploidSV") +strelka2PL <- cwlWorkflow(requirements = list(requireStepInputExpression()), + inputs = InputParamList(p1, p2, p3, p4, p5), + outputs = OutputParamList(o1, o2)) +strelka2PL <- strelka2PL + s1 + s2 + s3 + s4 diff --git a/Rcwl/pl_targetVarCall.R b/Rcwl/pl_targetVarCall.R index 17c8c00..015974b 100644 --- a/Rcwl/pl_targetVarCall.R +++ b/Rcwl/pl_targetVarCall.R @@ -1,64 +1,64 @@ - - -p1 <- InputParam(id = "Sample", type = "string") -p2 <- InputParam(id = "RG", type = "string") -p3 <- InputParam(id = "threads", type = "int") -p4 <- InputParam(id = "Ref", type = "File", - secondaryFiles = c(".amb", ".ann", ".bwt", ".pac", - ".sa", ".fai", - "$(self.nameroot).dict")) -p5 <- InputParam(id = "FQ1", type = "File") -p6 <- InputParam(id = "FQ2", type = "File") -p7 <- InputParam(id = "knowSites", type = InputArrayParam(items = "File"), - secondaryFiles = ".idx") -p8 <- InputParam(id = "bed", type = "File") -p9 <- InputParam(id = "downsampling", type = "int", default = 0L) - -o1 <- OutputParam(id = "BAM", type = "File", outputSource = "BaseRecal/rcBam") -o2 <- OutputParam(id = "flagstat", type = "File", outputSource = "BaseRecal/flagstat") -o3 <- OutputParam(id = "stats", type = "File", outputSource = "BaseRecal/stats") -o4 <- OutputParam(id = "gVCF", type = "File", outputSource = "HaplotypeCaller/gvcf") -o5 <- OutputParam(id = "VCF", type = "File", outputSource = "GenotypeGVCFs/vcf") - -req1 <- list(class = "SubworkflowFeatureRequirement") -req2 <- list(class = "StepInputExpressionRequirement") -req3 <- list(class = "InlineJavascriptRequirement") -targetVarCall <- cwlStepParam(requirements = list(req1, req2, req3), - inputs = InputParamList(p1, p2, p3, p4, p5, p6, p7, p8, p9), - outputs = OutputParamList(o1, o2, o3, o4, o5)) -#' @include pl_bwaAlign.R -s1 <- Step(id = "bwaAlign", run = bwaAlign, - In = list(threads = "threads", - RG = "RG", - Ref = "Ref", - FQ1 = "FQ1", - FQ2 = "FQ2")) -#' @include pl_BaseRecal.R -s2 <- Step(id = "BaseRecal", run = BaseRecal, - In = list(bam = "bwaAlign/Idx", - ref = "Ref", - knowSites = "knowSites", - oBam = list(source = "Sample", - valueFrom = "$(self).bam"))) -#' @include tl_BedToIntervalList.R -s3 <- Step(id = "bedtolist", run = BedToIntervalList, - In = list(bed = "bed", - SD = list(source = "Ref", - valueFrom = "$(self.secondaryFiles[6])"), - out = list(valueFrom = "$(inputs.bed.nameroot).list"))) -#' @include tl_HaplotypeCaller.R -s4 <- Step(id = "HaplotypeCaller", run = HaplotypeCaller, - In = list(bam = "BaseRecal/rcBam", - interval = "bedtolist/intval", - ref = "Ref", - gout = list(source = "Sample", - valueFrom = "$(self).g.vcf"), - downsampling = "downsampling")) -#' @include tl_GenotypeGVCFs.R -s5 <- Step(id = "GenotypeGVCFs", run = GenotypeGVCFs, - In = list(variant = "HaplotypeCaller/gvcf", - ref = "Ref", - vout = list(source = "Sample", - valueFrom = "$(self).vcf"))) - -targetVarCall <- targetVarCall + s1 + s2 + s3 + s4 + s5 + + +p1 <- InputParam(id = "Sample", type = "string") +p2 <- InputParam(id = "RG", type = "string") +p3 <- InputParam(id = "threads", type = "int") +p4 <- InputParam(id = "Ref", type = "File", + secondaryFiles = c(".amb", ".ann", ".bwt", ".pac", + ".sa", ".fai", + "$(self.nameroot).dict")) +p5 <- InputParam(id = "FQ1", type = "File") +p6 <- InputParam(id = "FQ2", type = "File") +p7 <- InputParam(id = "knowSites", type = InputArrayParam(items = "File"), + secondaryFiles = ".idx") +p8 <- InputParam(id = "bed", type = "File") +p9 <- InputParam(id = "downsampling", type = "int", default = 0L) + +o1 <- OutputParam(id = "BAM", type = "File", outputSource = "BaseRecal/rcBam") +o2 <- OutputParam(id = "flagstat", type = "File", outputSource = "BaseRecal/flagstat") +o3 <- OutputParam(id = "stats", type = "File", outputSource = "BaseRecal/stats") +o4 <- OutputParam(id = "gVCF", type = "File", outputSource = "HaplotypeCaller/gvcf") +o5 <- OutputParam(id = "VCF", type = "File", outputSource = "GenotypeGVCFs/vcf") + +req1 <- list(class = "SubworkflowFeatureRequirement") +req2 <- list(class = "StepInputExpressionRequirement") +req3 <- list(class = "InlineJavascriptRequirement") +targetVarCall <- cwlWorkflow(requirements = list(req1, req2, req3), + inputs = InputParamList(p1, p2, p3, p4, p5, p6, p7, p8, p9), + outputs = OutputParamList(o1, o2, o3, o4, o5)) +#' @include pl_bwaAlign.R +s1 <- cwlStep(id = "bwaAlign", run = bwaAlign, + In = list(threads = "threads", + RG = "RG", + Ref = "Ref", + FQ1 = "FQ1", + FQ2 = "FQ2")) +#' @include pl_BaseRecal.R +s2 <- cwlStep(id = "BaseRecal", run = BaseRecal, + In = list(bam = "bwaAlign/Idx", + ref = "Ref", + knowSites = "knowSites", + oBam = list(source = "Sample", + valueFrom = "$(self).bam"))) +#' @include tl_BedToIntervalList.R +s3 <- cwlStep(id = "bedtolist", run = BedToIntervalList, + In = list(bed = "bed", + SD = list(source = "Ref", + valueFrom = "$(self.secondaryFiles[6])"), + out = list(valueFrom = "$(inputs.bed.nameroot).list"))) +#' @include tl_HaplotypeCaller.R +s4 <- cwlStep(id = "HaplotypeCaller", run = HaplotypeCaller, + In = list(bam = "BaseRecal/rcBam", + interval = "bedtolist/intval", + ref = "Ref", + gout = list(source = "Sample", + valueFrom = "$(self).g.vcf"), + downsampling = "downsampling")) +#' @include tl_GenotypeGVCFs.R +s5 <- cwlStep(id = "GenotypeGVCFs", run = GenotypeGVCFs, + In = list(variant = "HaplotypeCaller/gvcf", + ref = "Ref", + vout = list(source = "Sample", + valueFrom = "$(self).vcf"))) + +targetVarCall <- targetVarCall + s1 + s2 + s3 + s4 + s5 diff --git a/Rcwl/pl_vcfCoverage.R b/Rcwl/pl_vcfCoverage.R index 36a32b6..4f07557 100644 --- a/Rcwl/pl_vcfCoverage.R +++ b/Rcwl/pl_vcfCoverage.R @@ -1,40 +1,40 @@ - -p1 <- InputParam(id = "vcf", type = "File") -p2 <- InputParam(id = "sample", type = "string") -p3 <- InputParam(id = "bam", type = "File", secondaryFiles = ".bai") -p4 <- InputParam(id = "ntype", type = "string", default = "DNA") -p5 <- InputParam(id = "ref", type = "File", secondaryFiles = ".fai") -#' @include tl_vt_decompose.R -s1 <- Step(id = "decompose", run = vt_decompose, - In = list(ivcf = "vcf", - ovcf = list(valueFrom = "$(inputs.ivcf.nameroot)_dc.vcf"))) -#' @include tl_bam_readcount.R -s2 <- Step(id = "readcount", run = bam_readcount, - In = list(vcf = "decompose/oVcf", - sample = "sample", - ref = "ref", - bam = "bam")) -#' @include tl_vcf_readcount_annotator.R -s3 <- Step(id = "readcount_annotator_snv", run = vcf_readcount_annotator, - In = list(ivcf = "decompose/oVcf", - readcount = "readcount/snv", - ntype = "ntype", - sample = "sample", - ovcf = list(valueFrom = "$(inputs.ivcf.nameroot)_snv.vcf"))) -s4 <- Step(id = "readcount_annotator_indel", run = vcf_readcount_annotator, - In = list(ivcf = "readcount_annotator_snv/oVcf", - readcount = "readcount/indel", - ntype = "ntype", - sample = "sample", - vtype = list(valueFrom = "indel"), - ovcf = list(valueFrom = "$(inputs.ivcf.nameroot)_indel.vcf"))) - -o1 <- OutputParam(id = "outvcf", type = "File", - outputSource = "readcount_annotator_indel/oVcf") -req1 <- list(class = "InlineJavascriptRequirement") -req2 <- list(class = "StepInputExpressionRequirement") -req3 <- list(class = "SubworkflowFeatureRequirement") -vcfCoverage <- cwlStepParam(requirements = list(req1, req2, req3), - inputs = InputParamList(p1, p2, p3, p4, p5), - outputs = OutputParamList(o1)) -vcfCoverage <- vcfCoverage + s1 + s2 + s3 + s4 + +p1 <- InputParam(id = "vcf", type = "File") +p2 <- InputParam(id = "sample", type = "string") +p3 <- InputParam(id = "bam", type = "File", secondaryFiles = ".bai") +p4 <- InputParam(id = "ntype", type = "string", default = "DNA") +p5 <- InputParam(id = "ref", type = "File", secondaryFiles = ".fai") +#' @include tl_vt_decompose.R +s1 <- cwlStep(id = "decompose", run = vt_decompose, + In = list(ivcf = "vcf", + ovcf = list(valueFrom = "$(inputs.ivcf.nameroot)_dc.vcf"))) +#' @include tl_bam_readcount.R +s2 <- cwlStep(id = "readcount", run = bam_readcount, + In = list(vcf = "decompose/oVcf", + sample = "sample", + ref = "ref", + bam = "bam")) +#' @include tl_vcf_readcount_annotator.R +s3 <- cwlStep(id = "readcount_annotator_snv", run = vcf_readcount_annotator, + In = list(ivcf = "decompose/oVcf", + readcount = "readcount/snv", + ntype = "ntype", + sample = "sample", + ovcf = list(valueFrom = "$(inputs.ivcf.nameroot)_snv.vcf"))) +s4 <- cwlStep(id = "readcount_annotator_indel", run = vcf_readcount_annotator, + In = list(ivcf = "readcount_annotator_snv/oVcf", + readcount = "readcount/indel", + ntype = "ntype", + sample = "sample", + vtype = list(valueFrom = "indel"), + ovcf = list(valueFrom = "$(inputs.ivcf.nameroot)_indel.vcf"))) + +o1 <- OutputParam(id = "outvcf", type = "File", + outputSource = "readcount_annotator_indel/oVcf") +req1 <- list(class = "InlineJavascriptRequirement") +req2 <- list(class = "StepInputExpressionRequirement") +req3 <- list(class = "SubworkflowFeatureRequirement") +vcfCoverage <- cwlWorkflow(requirements = list(req1, req2, req3), + inputs = InputParamList(p1, p2, p3, p4, p5), + outputs = OutputParamList(o1)) +vcfCoverage <- vcfCoverage + s1 + s2 + s3 + s4 diff --git a/Rcwl/pl_vcfExpression.R b/Rcwl/pl_vcfExpression.R index 21b6dee..024fe80 100644 --- a/Rcwl/pl_vcfExpression.R +++ b/Rcwl/pl_vcfExpression.R @@ -1,76 +1,78 @@ -#' @include tl_kallisto_quant.R tl_vcf_expression_annotator.R tl_bgzip.R tl_tabix_index.R -#' @importFrom utils read.table write.table -#' @importFrom tximport tximport -cleanExp <- function(afile) { - exp1 <- read.table(afile, header = TRUE, stringsAsFactors = FALSE) - exp1[,1] <- sub("\\|ENSG.*", "", exp1[,1]) - write.table(exp1, file = "abundance_clean.tsv", - row.names = FALSE, quote = FALSE, sep = "\t") -} -p1 <- InputParam(id = "afile", type = "File", - prefix = "afile=", separate = FALSE) -o1 <- OutputParam(id = "aout", type = "File", glob = "abundance_clean.tsv") -CleanExp <- cwlParam(baseCommand = cleanExp, - inputs = InputParamList(p1), - outputs = OutputParamList(o1)) - -p1 <- InputParam(id = "rnafqs", type = "File[]") -p2 <- InputParam(id = "kallistoIdx", type = "File") -p3 <- InputParam(id = "threads", type = "int", default = 16L) -p4 <- InputParam(id = "svcf", type = "File") -s1 <- Step(id = "kallistoQuant", run = kallisto_quant, - In = list(fastq = "rnafqs", - index = "kallistoIdx", - threads = "threads")) -s2 <- Step(id = "cleanExp", run = CleanExp, - In = list(afile = "kallistoQuant/tsv")) -s3 <- Step(id = "vcfExpAnn", run = vcf_expression_annotator, - In = list(ivcf = "svcf", - ovcf = list(valueFrom = "$(inputs.ivcf.nameroot)_ExpAnn.vcf"), - expression = "cleanExp/aout", - gtype = list(valueFrom = "transcript"), - etype = list(valueFrom = "kallisto"))) -## transcript to gene -t2gene <- function(kexp){ - e1 <- read.table(kexp, header = TRUE, check.names = FALSE, - stringsAsFactors = FALSE, sep = "\t") - ids <- do.call(rbind, base::strsplit(e1$target_id, split = "\\|")) - tx2gene <- data.frame(ids[,1:2]) - gexp <- tximport::tximport(kexp, type = "kallisto", tx2gene = tx2gene, ignoreAfterBar=TRUE) - gExp <- data.frame(gene = sub("\\..*", "", rownames(gexp$abundance)), - abundance = gexp$abundance) - write.table(gExp, file = "abundance_gene.tsv", row.names = FALSE, - col.names = TRUE, quote = FALSE, sep = "\t") -} -tp1 <- InputParam(id = "kexp", type = "File", - prefix = "kexp=", separate = FALSE) -to1 <- OutputParam(id = "gout", type = "File", glob = "abundance_gene.tsv") -T2Gene <- cwlParam(baseCommand = t2gene, - inputs = InputParamList(tp1), - outputs = OutputParamList(to1)) - -s4 <- Step(id = "T2Gene", run = T2Gene, - In = list(kexp = "kallistoQuant/tsv")) -s5 <- Step(id = "vcfgExpAnn", run = vcf_expression_annotator, - In = list(ivcf = "vcfExpAnn/oVcf", - ovcf = list(source = list("svcf"), - valueFrom = "$(self[0].nameroot)_gAnn.vcf"), - expression = "T2Gene/gout", - gtype = list(valueFrom = "gene"), - etype = list(valueFrom = "custom"), - idCol = list(valueFrom = "gene"), - expCol = list(valueFrom = "abundance"))) - -s6 <- Step(id = "bgzip", run = bgzip, - In = list(ifile = "vcfgExpAnn/oVcf")) -s7 <- Step(id = "tabixIndex", run = tabix_index, - In = list(tfile = "bgzip/zfile", - type = list(valueFrom = "vcf"))) -o1 <- OutputParam(id = "ExpVcf", type = "File", - outputSource = "tabixIndex/idx", secondaryFile = ".tbi") -req1 <- list(class = "InlineJavascriptRequirement") -req2 <- list(class = "StepInputExpressionRequirement") -vcfExpression <- cwlStepParam(requirements = list(req1, req2), - inputs = InputParamList(p1, p2, p3, p4), - outputs = OutputParamList(o1)) -vcfExpression <- vcfExpression + s1 + s2 + s3 + s4 + s5 + s6 + s7 +#' @include tl_kallisto_quant.R tl_vcf_expression_annotator.R tl_bgzip.R tl_tabix_index.R +#' @importFrom utils read.table write.table +#' @importFrom tximport tximport +cleanExp <- function(afile) { + exp1 <- read.table(afile, header = TRUE, stringsAsFactors = FALSE) + exp1[,1] <- sub("\\|ENSG.*", "", exp1[,1]) + write.table(exp1, file = "abundance_clean.tsv", + row.names = FALSE, quote = FALSE, sep = "\t") +} +p1 <- InputParam(id = "afile", type = "File", + prefix = "afile=", separate = FALSE) +o1 <- OutputParam(id = "aout", type = "File", glob = "abundance_clean.tsv") +CleanExp <- cwlProcess(baseCommand = cleanExp, + inputs = InputParamList(p1), + outputs = OutputParamList(o1)) + +p1 <- InputParam(id = "rnafqs", type = "File[]") +p2 <- InputParam(id = "kallistoIdx", type = "File") +p3 <- InputParam(id = "threads", type = "int", default = 16L) +p4 <- InputParam(id = "svcf", type = "File") +s1 <- cwlStep(id = "kallistoQuant", run = kallisto_quant, + In = list(fastq = "rnafqs", + index = "kallistoIdx", + threads = "threads")) +s2 <- cwlStep(id = "cleanExp", run = CleanExp, + In = list(afile = "kallistoQuant/tsv")) +s3 <- cwlStep(id = "vcfExpAnn", run = vcf_expression_annotator, + In = list(ivcf = "svcf", + ovcf = list(valueFrom = "$(inputs.ivcf.nameroot)_ExpAnn.vcf"), + expression = "cleanExp/aout", + gtype = list(valueFrom = "transcript"), + etype = list(valueFrom = "kallisto"))) +## transcript to gene +t2gene <- function(kexp){ + e1 <- read.table(kexp, header = TRUE, check.names = FALSE, + stringsAsFactors = FALSE, sep = "\t") + ids <- do.call(rbind, base::strsplit(e1$target_id, split = "\\|")) + tx2gene <- data.frame(ids[,1:2]) + gexp <- tximport::tximport(kexp, type = "kallisto", tx2gene = tx2gene, ignoreAfterBar=TRUE) + gExp <- data.frame(gene = sub("\\..*", "", rownames(gexp$abundance)), + abundance = gexp$abundance) + write.table(gExp, file = "abundance_gene.tsv", row.names = FALSE, + col.names = TRUE, quote = FALSE, sep = "\t") +} +tp1 <- InputParam(id = "kexp", type = "File", + prefix = "kexp=", separate = FALSE) +to1 <- OutputParam(id = "gout", type = "File", glob = "abundance_gene.tsv") +req1 <- requireDocker("quay.io/biocontainers/bioconductor-tximport:1.22.0--r41hdfd78af_0") +T2Gene <- cwlProcess(baseCommand = t2gene, + requirements = list(req1), + inputs = InputParamList(tp1), + outputs = OutputParamList(to1)) + +s4 <- cwlStep(id = "T2Gene", run = T2Gene, + In = list(kexp = "kallistoQuant/tsv")) +s5 <- cwlStep(id = "vcfgExpAnn", run = vcf_expression_annotator, + In = list(ivcf = "vcfExpAnn/oVcf", + ovcf = list(source = list("svcf"), + valueFrom = "$(self[0].nameroot)_gAnn.vcf"), + expression = "T2Gene/gout", + gtype = list(valueFrom = "gene"), + etype = list(valueFrom = "custom"), + idCol = list(valueFrom = "gene"), + expCol = list(valueFrom = "abundance"))) + +s6 <- cwlStep(id = "bgzip", run = bgzip, + In = list(ifile = "vcfgExpAnn/oVcf")) +s7 <- cwlStep(id = "tabixIndex", run = tabix_index, + In = list(tfile = "bgzip/zfile", + type = list(valueFrom = "vcf"))) +o1 <- OutputParam(id = "ExpVcf", type = "File", + outputSource = "tabixIndex/idx", secondaryFile = ".tbi") +req1 <- list(class = "InlineJavascriptRequirement") +req2 <- list(class = "StepInputExpressionRequirement") +vcfExpression <- cwlWorkflow(requirements = list(req1, req2), + inputs = InputParamList(p1, p2, p3, p4), + outputs = OutputParamList(o1)) +vcfExpression <- vcfExpression + s1 + s2 + s3 + s4 + s5 + s6 + s7 diff --git a/Rcwl/pl_vcfSubBam.R b/Rcwl/pl_vcfSubBam.R new file mode 100644 index 0000000..9ac6d97 --- /dev/null +++ b/Rcwl/pl_vcfSubBam.R @@ -0,0 +1,24 @@ +#' @include tl_vcf2bed.R tl_samtools_view.R tl_samtools_index.R +p1 <- InputParam(id = "vcf", type = "File") +p2 <- InputParam(id = "fai", type = "File") +p3 <- InputParam(id = "win", type = "int") +p4 <- InputParam(id = "bam", type = "File") +s1 <- cwlStep(id = "vcf2bed", run = vcf2bed, + In = list(vcf = "vcf", + fai = "fai", + win = "win")) +s2 <- cwlStep(id = "subBam", run = samtools_view, + In = list(bam = "bam", + bed = "vcf2bed/bed", + outb = list(valueFrom = "$(true)"), + obam = list(valueFrom = "$(inputs.bam.nameroot).sub.bam"))) +s3 <- cwlStep(id = "idxBam", run = samtools_index, + In = list(bam = "subBam/oBam")) +o1 <- OutputParam(id = "outBam", type = "File", + outputSource = "idxBam/idx", secondaryFiles = ".bai") +req1 <- requireStepInputExpression() +req2 <- requireJS() +vcfSubBam <- cwlWorkflow(requirements = list(req1, req2), + inputs = InputParamList(p1, p2, p3, p4), + outputs = OutputParamList(o1)) +vcfSubBam <- vcfSubBam + s1 + s2 + s3 diff --git a/Rcwl/pl_vcf_index.R b/Rcwl/pl_vcf_index.R new file mode 100644 index 0000000..1a5c395 --- /dev/null +++ b/Rcwl/pl_vcf_index.R @@ -0,0 +1,13 @@ +#' @include tl_bgzip.R tl_tabix_index.R +p1 <- InputParam(id = "vcf", type = "File") +s1 <- cwlStep(id = "bgzip", run = bgzip, + In = list(ifile = "vcf")) +s2 <- cwlStep(id = "index", run = tabix_index, + In = list(tfile = "bgzip/zfile", + type = list(valueFrom = "vcf"))) +o1 <- OutputParam(id = "tbi", type = "File", outputSource = "index/idx") +req1 <- requireStepInputExpression() +vcf_index <- cwlWorkflow(requirements = list(req1), + inputs = InputParamList(p1), + outputs = OutputParamList(o1)) +vcf_index <- vcf_index + s1 + s2 diff --git a/Rcwl/tl_ApplyBQSR.R b/Rcwl/tl_ApplyBQSR.R index 67c83a7..78013f5 100644 --- a/Rcwl/tl_ApplyBQSR.R +++ b/Rcwl/tl_ApplyBQSR.R @@ -8,8 +8,25 @@ o1 <- OutputParam(id = "Bam", type = "File", req1 <- list(class = "DockerRequirement", dockerPull = "broadinstitute/gatk:latest") -ApplyBQSR <- cwlParam(baseCommand = c("gatk", +ApplyBQSR <- cwlProcess(baseCommand = c("gatk", "ApplyBQSR"), requirements = list(req1), inputs = InputParamList(p1, p2, p3, p4), outputs = OutputParamList(o1)) + + +ApplyBQSR <- addMeta( + ApplyBQSR, + label = "ApplyBQSR", + doc = "This tool performs the second pass in a two-stage process called Base Quality Score Recalibration (BQSR). Specifically, it recalibrates the base qualities of the input reads based on the recalibration table produced by the BaseRecalibrator tool, and outputs a recalibrated BAM or CRAM file.", + inputLabels = c("bam","ref","rtable","oBam"), + inputDocs = c("BAM/SAM/CRAM file containing reads This argument must be specified at least once.(Required)","Reference sequence Default value: null.","Input recalibration table for BQSR Required.","Write output to this file Required."), + outputLabels = c("Bam"), + outputDocs = c("Bam file with base Quality score recaliberated"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/broadinstitute/gatk", + example = paste() + ) +) diff --git a/Rcwl/tl_BaseRecalibrator.R b/Rcwl/tl_BaseRecalibrator.R index ffe0ef3..61ae13e 100644 --- a/Rcwl/tl_BaseRecalibrator.R +++ b/Rcwl/tl_BaseRecalibrator.R @@ -5,15 +5,32 @@ p2 <- InputParam(id = "ref", prefix = "-R", type = "File", secondaryFiles = c( "$(self.nameroot).dict")) p3 <- InputParam(id = "knowSites", type = InputArrayParam(items = "File", prefix = "--known-sites"), - secondaryFiles = ".idx") + secondaryFiles = "$(self.nameext == '.gz' ? self.basename+'.tbi' : self.basename+'.idx')") p4 <- InputParam(id = "recal", type = "string", prefix = "-O") o1 <- OutputParam(id = "rtable", type = "File", glob = "$(inputs.recal)") req1 <- list(class = "DockerRequirement", dockerPull = "broadinstitute/gatk:latest") +req2 <- requireJS() +BaseRecalibrator <- cwlProcess(cwlVersion = "v1.0", + baseCommand = c("gatk", "BaseRecalibrator"), + requirements = list(req1, req2), + inputs = InputParamList(p1, p2, p3, p4), + outputs = OutputParamList(o1)) -BaseRecalibrator <- cwlParam(baseCommand = c("gatk", - "BaseRecalibrator"), - requirements = list(req1), - inputs = InputParamList(p1, p2, p3, p4), - outputs = OutputParamList(o1)) + +BaseRecalibrator <- addMeta( + BaseRecalibrator, + label = "BaseRecalibrator", + doc = "First pass of the Base Quality Score Recalibration (BQSR) -- Generates recalibration table based on various user-specified covariates", + inputLabels = c("bam","ref","knowSites","recal"), + inputDocs = c("BAM/SAM/CRAM file containing reads This argument must be specified at least once.(Required)","Reference sequence file (Required)","One or more databases of known polymorphic sites used to exclude regions around known polymorphisms from analysis. This argument must be specified at least once.(Required)","The output recalibration table file to create (Required)"), + outputLabels = c("rtable"), + outputDocs = c("recalibration table"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/broadinstitute/gatk", + example = paste() + ) +) diff --git a/Rcwl/tl_BedToIntervalList.R b/Rcwl/tl_BedToIntervalList.R index 801354c..17715b5 100644 --- a/Rcwl/tl_BedToIntervalList.R +++ b/Rcwl/tl_BedToIntervalList.R @@ -6,8 +6,25 @@ o1 <- OutputParam(id = "intval", type = "File", glob = "$(inputs.out)") req1 <- list(class = "DockerRequirement", dockerPull = "quay.io/biocontainers/picard:2.21.1--0") -BedToIntervalList <- cwlParam(baseCommand = c("picard", +BedToIntervalList <- cwlProcess(baseCommand = c("picard", "BedToIntervalList"), requirements = list(req1), inputs = InputParamList(p1, p2, p3), outputs = OutputParamList(o1)) + + +BedToIntervalList <- addMeta( + BedToIntervalList, + label = "BedToIntervalList", + doc = "Converts a BED file to a Picard Interval List. This tool provides easy conversion from BED to the Picard interval_list format which is required by many Picard processing tools.", + inputLabels = c("bed","SD","out"), + inputDocs = c("Input Bed file","The sequence dictionary, or BAM/VCF/IntervalList from which a dictionary can be extracted.","The output Picard Interval List"), + outputLabels = c("intval"), + outputDocs = c("Convertrd picard intervel list"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/broadinstitute/gatk", + example = paste() + ) +) diff --git a/Rcwl/tl_COMPSRA.R b/Rcwl/tl_COMPSRA.R new file mode 100644 index 0000000..c965872 --- /dev/null +++ b/Rcwl/tl_COMPSRA.R @@ -0,0 +1,36 @@ +## https://github.com/cougarlj/COMPSRA +p1 <- InputParam(id = "fq", type = "File", prefix = "-in") +p2 <- InputParam(id = "adapt", type = "string", prefix = "-ra") +p3 <- InputParam(id = "ref", type = "string", prefix = "-ref", default = "hg38") +p4 <- InputParam(id = "DB", type = "Directory", position = -1) +o1 <- OutputParam(id = "outdir", type = "Directory", glob = "$(inputs.fq.nameroot.split('.')[0])") +req1 <- requireDocker("hubentu/compsra") +req2 <- requireInitialWorkDir(listing =list( + list(entry = "$(inputs.DB)", + entryname = "$('bundle_v1/')"))) +req3 <- requireJS() +COMPSRA <- cwlProcess(cwlVersion = "v1.2", + baseCommand = c("java", "-jar", "/opt/COMPSRA.jar"), + arguments = list("-qc", "-rb", "4", "-rh", "20", "-rt", "20", "-rr", "20", "-rlh", "8,17", + "-aln", "-mt", "star", "-ann", "-ac", "1,2,3,4,5,6", "-out", "."), + requirements = list(req1, req2, req3), + inputs = InputParamList(p1, p2, p3, p4), + outputs = OutputParamList(o1)) + + + +COMPSRA <- addMeta( + COMPSRA, + label = "COMPSRA", + doc = "A tool for identifying and quantifying small RNAs from small RNA sequencing data.", + inputLabels = c("fq","adapt","ref","DB"), + inputDocs = c("Annotation files for small RNAs,such as GFF3.","Remove adapters.","The version of reference genome","Database reference used"), + outputLabels = c("outdir"), + outputDocs = c("The directory of the output"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/cougarlj/COMPSRA", + example = paste() + ) +) diff --git a/Rcwl/tl_CREST.R b/Rcwl/tl_CREST.R new file mode 100644 index 0000000..e2f8919 --- /dev/null +++ b/Rcwl/tl_CREST.R @@ -0,0 +1,13 @@ +#' https://github.com/hubentu/CREST +p1 <- InputParam(id = "tbam", type = "File", position = 1L, secondaryFiles = ".bai") +p2 <- InputParam(id = "gbam", type = "File", position = 2L, secondaryFiles = ".bai") +p3 <- InputParam(id = "ref", type = "File", position = 3L, secondaryFiles = ".fai") +p4 <- InputParam(id = "bit", type = "File", position = 4L) +p5 <- InputParam(id = "host", type = "string", default = "localhost", position = 5L) +p6 <- InputParam(id = "port", type = "int", default = 2345L, position = 6L) +o1 <- OutputParam(id = "predSV", type = "File", glob = "$(inputs.tbam.basename).predSV.txt") +CREST <- cwlProcess(baseCommand = "/opt/CREST/CREST.sh", + requirements = list(requireDocker("hubentu/crest")), + inputs = InputParamList(p1, p2, p3, p4, p5, p6), + outputs = OutputParamList(o1)) + diff --git a/Rcwl/tl_CalculateContamination.R b/Rcwl/tl_CalculateContamination.R index d3b58b1..cbb252f 100644 --- a/Rcwl/tl_CalculateContamination.R +++ b/Rcwl/tl_CalculateContamination.R @@ -2,11 +2,28 @@ p1 <- InputParam(id = "ttable", type = "File", prefix = "-I") p2 <- InputParam(id = "ntable", type = "File", prefix = "-matched") p3 <- InputParam(id = "cont", type = "string", prefix = "-O") -o1 <- OutputParam(id = "cout", type = "File", glob = "$(inputs.cont)") -req1 <- list(class = "DockerRequirement", - dockerPull = "broadinstitute/gatk:latest") - -CalculateContamination <- cwlParam(baseCommand = c("gatk", "CalculateContamination"), +p4 <- InputParam(id = "seg", type = "string", prefix = "-segments") +o1 <- OutputParam(id = "Cout", type = "File", glob = "$(inputs.cont)") +o2 <- OutputParam(id = "Seg", type = "File", glob = "$(inputs.seg)") +req1 <- requireDocker("broadinstitute/gatk:latest") +CalculateContamination <- cwlProcess(baseCommand = c("gatk", "CalculateContamination"), requirements = list(req1), - inputs = InputParamList(p1, p2, p3), - outputs = OutputParamList(o1)) + inputs = InputParamList(p1, p2, p3, p4), + outputs = OutputParamList(o1, o2)) + + +CalculateContamination <- addMeta( + CalculateContamination, + label = "CalculateContamination", + doc = "Calculate the fraction of reads coming from cross-sample contamination", + inputLabels = c("ttable","ntable","cont","seg"), + inputDocs = c("The input table Required.","The matched normal input table Default value: null.","The output table Required.","The output table containing segmentation of the tumor by minor allele fraction Default value: null."), + outputLabels = c("Cout","Seg"), + outputDocs = c("Contamination table","segmentation based on baf"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/broadinstitute/gatk", + example = paste() + ) +) diff --git a/Rcwl/tl_Cat.R b/Rcwl/tl_Cat.R index 20286b0..017bf87 100644 --- a/Rcwl/tl_Cat.R +++ b/Rcwl/tl_Cat.R @@ -1,3 +1,20 @@ p1 <- InputParam(id = "infiles", type = "File[]") p2 <- InputParam(id = "outfile", type = "string", default = "catout.txt", position = -1) -Cat <- cwlParam(baseCommand = "cat", inputs = InputParamList(p1, p2), stdout = "$(inputs.outfile)") +Cat <- cwlProcess(baseCommand = "cat", inputs = InputParamList(p1, p2), stdout = "$(inputs.outfile)") + + +Cat <- addMeta( + Cat, + label = "Cat", + doc = "Tool to read and copy files", + inputLabels = c("infiles","outfile"), + inputDocs = c("Input file to read and display","Output file to copy"), + outputLabels = c(""), + outputDocs = c(""), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "NA", + example = paste() + ) +) diff --git a/Rcwl/tl_ColSeqArtifact.R b/Rcwl/tl_ColSeqArtifact.R index 3e063d0..c686a3f 100644 --- a/Rcwl/tl_ColSeqArtifact.R +++ b/Rcwl/tl_ColSeqArtifact.R @@ -8,8 +8,25 @@ o1 <- OutputParam(id = "aout", type = "File", req1 <- list(class = "DockerRequirement", dockerPull = "broadinstitute/gatk:latest") -ColSeqArtifact <- cwlParam(baseCommand = c("gatk", +ColSeqArtifact <- cwlProcess(baseCommand = c("gatk", "CollectSequencingArtifactMetrics"), requirements = list(req1), inputs = InputParamList(p1, p2, p3, p4), outputs = OutputParamList(o1)) + + +ColSeqArtifact <- addMeta( + ColSeqArtifact, + label = "ColSeqArtifact", + doc = "Collect metrics to quantify single-base sequencing artifacts.", + inputLabels = c("bam","ref","ext","art"), + inputDocs = c("Input SAM/BAM/CRAM file. Required.","Reference sequence file. Required.","Append the given file extension to all metric file names (ex.OUTPUT.pre_adapter_summary_metrics.EXT). None if null Default value: null.","The file to write the output to. Required."), + outputLabels = c("aout"), + outputDocs = c("Output of ColSeqArtifact"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/broadinstitute/gatk", + example = paste() + ) +) diff --git a/Rcwl/tl_CollectGcBiasMetrics.R b/Rcwl/tl_CollectGcBiasMetrics.R new file mode 100644 index 0000000..736538d --- /dev/null +++ b/Rcwl/tl_CollectGcBiasMetrics.R @@ -0,0 +1,32 @@ + +p1 <- InputParam(id = "bam", type = "File", prefix = "I=", separate = FALSE) +p2 <- InputParam(id = "ref", type = "File", prefix = "R=", + separate = FALSE, secondaryFiles = ".fai") +p3 <- InputParam(id = "gc", type = "string", prefix = "O=", separate = FALSE) +p4 <- InputParam(id = "chart", type = "string", prefix = "CHART=", separate = FALSE) +p5 <- InputParam(id = "summary", type = "string", prefix = "S=", separate = FALSE) +o1 <- OutputParam(id = "GC", type = "File", glob = "$(inputs.gc)") +o2 <- OutputParam(id = "Chart", type = "File", glob = "$(inputs.chart)") +o3 <- OutputParam(id = "Summary", type = "File", glob = "$(inputs.summary)") +req1 <- requireDocker("quay.io/biocontainers/picard:2.26.4--hdfd78af_0") +CollectGcBiasMetrics <- cwlProcess(baseCommand = c("picard", "CollectGcBiasMetrics"), + requirements = list(req1), + inputs = InputParamList(p1, p2, p3, p4, p5), + outputs = OutputParamList(o1, o2, o3)) + + +CollectGcBiasMetrics <- addMeta( + CollectGcBiasMetrics, + label = "CollectGcBiasMetrics", + doc = "This tool collects information about the relative proportions of guanine (G) and cytosine (C) nucleotides in a sample.", + inputLabels = c("bam","ref","gc","chart","summary"), + inputDocs = c("Input SAM/BAM/CRAM file. Required.","Reference sequence file. Default value: null.","The file to write the output to. Required.","The PDF file to render the chart to. Required.","The text file to write summary metrics to. Required."), + outputLabels = c("GC","Chart","Summary"), + outputDocs = c("Detailed information on the GC bias observed at various GC content levels","PDF file containing visualizations of the GC bias metrics","Summary statistics and metrics of GC bias in the sequencing data."), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/broadinstitute/picard", + example = paste() + ) +) diff --git a/Rcwl/tl_CollectInsertSizeMetrics.R b/Rcwl/tl_CollectInsertSizeMetrics.R new file mode 100644 index 0000000..3138201 --- /dev/null +++ b/Rcwl/tl_CollectInsertSizeMetrics.R @@ -0,0 +1,27 @@ +p1 <- InputParam(id = "bam", type = "File", prefix = "I=", separate = FALSE) +p2 <- InputParam(id = "metrics", type = "string", prefix = "O=", separate = FALSE) +p3 <- InputParam(id = "hist", type = "string", prefix = "H=", separate = FALSE) +o1 <- OutputParam(id = "Metrics", type = "File", glob = "$(inputs.metrics)") +o2 <- OutputParam(id = "Hist", type = "File", glob = "$(inputs.hist)") +req1 <- requireDocker("quay.io/biocontainers/picard:2.21.1--0") +CollectInsertSizeMetrics <- cwlProcess(baseCommand = c("picard", "CollectInsertSizeMetrics"), + requirements = list(req1), + inputs = InputParamList(p1, p2, p3), + outputs = OutputParamList(o1, o2)) + + +CollectInsertSizeMetrics <- addMeta( + CollectInsertSizeMetrics, + label = "CollectInsertSizeMetrics", + doc = "This tool provides useful metrics for validating library construction including the insert size distribution and read orientation of paired-end libraries.", + inputLabels = c("bam","metrics","hist"), + inputDocs = c("Input SAM or BAM file. Required.","File to write the output to. Required.","File to write insert size Histogram chart to. Required."), + outputLabels = c("Metrics","Hist"), + outputDocs = c("Summary statistics about the insert size distribution across the sequencing data.","histogram that visually represents the distribution of insert sizes in the dataset."), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/broadinstitute/picard", + example = paste() + ) +) diff --git a/Rcwl/tl_CombineGVCFs.R b/Rcwl/tl_CombineGVCFs.R index f8fa4dd..1637078 100644 --- a/Rcwl/tl_CombineGVCFs.R +++ b/Rcwl/tl_CombineGVCFs.R @@ -1,16 +1,32 @@ ## CombineGVCFs p1 <- InputParam(id = "vcfs", - type = InputArrayParam(items = "File"), - secondaryFiles = ".idx", - prefix = "--variant") + type = InputArrayParam(items = "File", prefix = "--variant"), + secondaryFiles = ".tbi") p2 <- InputParam(id = "Ref", type = "File", prefix = "-R", secondaryFiles = c(".fai", "$(self.nameroot).dict")) p3 <- InputParam(id = "ovcf", type = "string", prefix = "-O") -o1 <- OutputParam(id = "vcf", type = "File", glob = "$(inputs.vout)", +o1 <- OutputParam(id = "vcf", type = "File", glob = "$(inputs.ovcf)", secondaryFiles = ".idx") req1 <- list(class = "DockerRequirement", dockerPull = "broadinstitute/gatk:latest") -CombineGVCFs <- cwlParam(baseCommand = c("gatk", "CombineGVCFs"), +CombineGVCFs <- cwlProcess(baseCommand = c("gatk", "CombineGVCFs"), requirements = list(req1), inputs = InputParamList(p1, p2, p3), outputs = OutputParamList(o1)) + + +CombineGVCFs <- addMeta( + CombineGVCFs, + label = "CombineGVCFs", + doc = "Merges one or more HaplotypeCaller GVCF files into a single GVCF with appropriate annotations", + inputLabels = c("vcfs","Ref","ovcf"), + inputDocs = c("One or more VCF files containing variants This argument must be specified at least once. Required.","Reference sequence file Required.","The combined GVCF output file Required."), + outputLabels = c("vcf"), + outputDocs = c("Combined GVCF file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/broadinstitute/gatk", + example = paste() + ) +) diff --git a/Rcwl/tl_CombineVariants.R b/Rcwl/tl_CombineVariants.R index c4de924..9b37d77 100644 --- a/Rcwl/tl_CombineVariants.R +++ b/Rcwl/tl_CombineVariants.R @@ -7,9 +7,26 @@ p3 <- InputParam(id = "ovcf", type = "string", prefix = "-o") o1 <- OutputParam(id = "oVcf", type = "File", glob = "$(inputs.ovcf)") req1 <- list(class = "DockerRequirement", dockerPull = "broadinstitute/gatk3:3.8-1") -CombineVariants <- cwlParam(baseCommand = c("java", "-jar", "/usr/GenomeAnalysisTK.jar", +CombineVariants <- cwlProcess(baseCommand = c("java", "-jar", "/usr/GenomeAnalysisTK.jar", "-T", "CombineVariants"), requirements = list(req1), arguments = list("--assumeIdenticalSamples"), inputs = InputParamList(p1, p2, p3), outputs = OutputParamList(o1)) + + +CombineVariants <- addMeta( + CombineVariants, + label = "CombineVariants", + doc = "Merges variant call format (VCF) files from different sources into a single VCF file.", + inputLabels = c("variants","ref","ovcf"), + inputDocs = c("VCF files to merge together","Reference sequence file","File to which variants should be written"), + outputLabels = c("oVcf"), + outputDocs = c("Merged variant files"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/broadinstitute/gatk", + example = paste() + ) +) diff --git a/Rcwl/tl_DepthOfCoverage.R b/Rcwl/tl_DepthOfCoverage.R index 65345ef..af1a81c 100644 --- a/Rcwl/tl_DepthOfCoverage.R +++ b/Rcwl/tl_DepthOfCoverage.R @@ -12,9 +12,26 @@ o1 <- OutputParam(id = "out", type = "File", glob = "$(inputs.prefix).sample_sum req1 <- list(class = "DockerRequirement", dockerPull = "broadinstitute/gatk3:3.8-1") -DepthOfCoverage <- cwlParam(baseCommand = c("java", "-jar", "/usr/GenomeAnalysisTK.jar", +DepthOfCoverage <- cwlProcess(baseCommand = c("java", "-jar", "/usr/GenomeAnalysisTK.jar", "-T", "DepthOfCoverage"), requirements = list(req1), arguments = list("-omitBaseOutput"), inputs = InputParamList(p1, p2, p3, p4, p5), outputs = OutputParamList(o1)) + + +DepthOfCoverage <- addMeta( + DepthOfCoverage, + label = "DepthOfCoverage", + doc = "This tool processes a set of bam files to determine coverage at different levels of partitioning and aggregation", + inputLabels = c("bam","prefix","region","ref","ct"), + inputDocs = c("Input file containing sequence data (BAM or CRAM)","An output file created by the walker. Will overwrite contents if file exists","One or more genomic intervals over which to operate","Reference sequence file","Coverage threshold (in percent) for summarizing statistics"), + outputLabels = c("out"), + outputDocs = c("Tables pertaining to different coverage summaries."), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/broadinstitute/gatk", + example = paste() + ) +) diff --git a/Rcwl/tl_DepthOfCoverage4.R b/Rcwl/tl_DepthOfCoverage4.R new file mode 100644 index 0000000..cde0d35 --- /dev/null +++ b/Rcwl/tl_DepthOfCoverage4.R @@ -0,0 +1,36 @@ + +p1 <- InputParam(id = "bam", type = "File", + prefix = "-I", secondaryFiles = list(".bai?", "^.bai?")) +p2 <- InputParam(id = "prefix", type = "string", prefix = "-O") +p3 <- InputParam(id = "region", type = "File", prefix = "-L") +p4 <- InputParam(id = "ref", type = "File", + prefix = "-R", secondaryFiles = c(".fai", "^.dict")) +p5 <- InputParam(id = "ct", type = InputArrayParam(items = "int", + prefix = "--summary-coverage-threshold"), + default = list(1L, 10L, 20L, 30L)) +o1 <- OutputParam(id = "out", type = "File", glob = "$(inputs.prefix).sample_summary") + +req1 <- list(class = "DockerRequirement", + dockerPull = "broadinstitute/gatk:latest") +DepthOfCoverage4 <- cwlProcess(cwlVersion = "v1.2", + baseCommand = c("gatk", "DepthOfCoverage"), + requirements = list(req1), + inputs = InputParamList(p1, p2, p3, p4, p5), + outputs = OutputParamList(o1)) + + +DepthOfCoverage4 <- addMeta( + DepthOfCoverage4, + label = "DepthOfCoverage4", + doc = "This tool processes a set of bam files to determine coverage at different levels of partitioning and aggregation Using Lates gatk4", + inputLabels = c("bam","prefix","region","ref","ct"), + inputDocs = c("BAM/SAM/CRAM file containing reads This argument must be specified at least once.Required.","Base file location to which to write coverage summary information, must be a path to a file Required.","One or more genomic intervals over which to operate This argument must be specified at least once. Required.","Reference sequence file Required.","Coverage threshold (in percent) for summarizing statistics This argument may be specified 0 or more times. Default value: [15]."), + outputLabels = c("out"), + outputDocs = c("Tables pertaining to different coverage summaries."), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/broadinstitute/gatk", + example = paste() + ) +) diff --git a/Rcwl/tl_DropletUtils.R b/Rcwl/tl_DropletUtils.R index b8d4aa7..48335f7 100644 --- a/Rcwl/tl_DropletUtils.R +++ b/Rcwl/tl_DropletUtils.R @@ -22,12 +22,29 @@ DropletUtils <- function(dir.name, lower=100, df=20, ...) { saveRDS(sce1, file = "sce_filtered.rds") } -## write out the R function as `cwlParam`. +## write out the R function as `cwlProcess`. p1 <- InputParam(id = "dirname", type = "Directory", prefix = "dir.name=", separate = FALSE) p2 <- InputParam(id = "lower", type = "int", prefix = "lower=", separate = FALSE, default = 100L) p3 <- InputParam(id = "df", type = "int", prefix = "df=", separate = FALSE, default = 20L) o1 <- OutputParam(id = "plots", type = "File", glob = "*.pdf") o2 <- OutputParam(id = "outsce", type = "File", glob = "*.rds") -DropletUtils <- cwlParam(baseCommand = DropletUtils, +DropletUtils <- cwlProcess(baseCommand = DropletUtils, inputs = InputParamList(p1, p2, p3), outputs = OutputParamList(o1, o2)) + + +DropletUtils <- addMeta( + DropletUtils, + label = "DropletUtils", + doc = "Read raw 10x Genomics data from a specified directory, applies filtering to distinguish true cells from empty droplets using barcode ranking and the emptyDrops() function, and generates diagnostic plots.", + inputLabels = c("dirname","lower","df"), + inputDocs = c("Name of the input directory","A numeric scalar specifying the lower bound on the total UMI count, at or below which all barcodes are assumed to correspond to empty droplets","Degree of freadom"), + outputLabels = c("plots","outsce"), + outputDocs = c("Diagnostic Plots visualizing the barcode ranks and empty drops filtering process.","Filtered SCE Object containing only the droplets identified as true cells."), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/MarioniLab/DropletUtils", + example = paste() + ) +) diff --git a/Rcwl/tl_FilterMutectCalls.R b/Rcwl/tl_FilterMutectCalls.R index f2baea0..77a30b3 100644 --- a/Rcwl/tl_FilterMutectCalls.R +++ b/Rcwl/tl_FilterMutectCalls.R @@ -2,14 +2,33 @@ p1 <- InputParam(id = "vcf", type = "File", prefix = "-V", secondaryFiles = c(".idx", ".stats")) p2 <- InputParam(id = "cont", type = "File", prefix = "--contamination-table") -p3 <- InputParam(id = "fvcf", type = "string", prefix = "-O") -p4 <- InputParam(id = "ref", prefix = "-R", type = "File", - secondaryFiles = c(".fai", "$(self.nameroot).dict")) +p3 <- InputParam(id = "seg", type = "File", prefix = "--tumor-segmentation") +p4 <- InputParam(id = "lro", type = "File", prefix = "--ob-priors") +p5 <- InputParam(id = "fvcf", type = "string", prefix = "-O") +p6 <- InputParam(id = "ref", prefix = "-R", type = "File", + secondaryFiles = c(".fai", "^.dict")) o1 <- OutputParam(id = "fout", type = "File", glob = "$(inputs.fvcf)") req1 <- list(class = "DockerRequirement", dockerPull = "broadinstitute/gatk:latest") -FilterMutectCalls <- cwlParam(baseCommand = c("gatk", "FilterMutectCalls"), +FilterMutectCalls <- cwlProcess(baseCommand = c("gatk", "FilterMutectCalls"), requirements = list(req1), - inputs = InputParamList(p1, p2, p3, p4), + inputs = InputParamList(p1, p2, p3, p4, p5, p6), outputs = OutputParamList(o1)) + + +FilterMutectCalls <- addMeta( + FilterMutectCalls, + label = "FilterMutectCalls", + doc = "FilterMutectCalls applies filters to the raw output of Mutect2.", + inputLabels = c("vcf","cont","seg","lro","fvcf","ref"), + inputDocs = c("A VCF file containing variants Required.","Tables containing contamination information. This argument may be specified 0 or more times. Default value: null.","Tables containing tumor segments' minor allele fractions for germline hets emitted by CalculateContamination.This argument may be specified 0 or more times. Default value:null.","File that contains the prior probabilities of observing orientation bias artifacts","The output filtered VCF file Required.","Reference sequence file Required."), + outputLabels = c("fout"), + outputDocs = c("Filtered VCF file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/broadinstitute/gatk", + example = paste() + ) +) diff --git a/Rcwl/tl_FilterOBias.R b/Rcwl/tl_FilterOBias.R index 7e0fd4c..7c9f4f2 100644 --- a/Rcwl/tl_FilterOBias.R +++ b/Rcwl/tl_FilterOBias.R @@ -1,14 +1,14 @@ -## FilterByOrientationBias -p1 <- InputParam(id = "vcf", type = "File", prefix = "-V") -p2 <- InputParam(id = "art", type = "File", prefix = "-P") -p3 <- InputParam(id = "mode", type = InputArrayParam(items = "string", prefix = "--artifact-modes")) -p4 <- InputParam(id = "avcf", type = "string", prefix = "-O") -o1 <- OutputParam(id = "fout", type = "File", glob = "$(inputs.avcf)") -req1 <- list(class = "DockerRequirement", - dockerPull = "broadinstitute/gatk:latest") - -FilterOBias <- cwlParam(baseCommand = c("gatk", - "FilterByOrientationBias"), - requirements = list(req1), - inputs = InputParamList(p1, p2, p3, p4), - outputs = OutputParamList(o1)) +## FilterByOrientationBias +p1 <- InputParam(id = "vcf", type = "File", prefix = "-V") +p2 <- InputParam(id = "art", type = "File", prefix = "-P") +p3 <- InputParam(id = "mode", type = InputArrayParam(items = "string", prefix = "--artifact-modes")) +p4 <- InputParam(id = "avcf", type = "string", prefix = "-O") +o1 <- OutputParam(id = "fout", type = "File", glob = "$(inputs.avcf)") +req1 <- list(class = "DockerRequirement", + dockerPull = "broadinstitute/gatk:latest") + +FilterOBias <- cwlProcess(baseCommand = c("gatk", + "FilterByOrientationBias"), + requirements = list(req1), + inputs = InputParamList(p1, p2, p3, p4), + outputs = OutputParamList(o1)) diff --git a/Rcwl/tl_Funcotator.R b/Rcwl/tl_Funcotator.R index 55a5fc1..bf48de2 100644 --- a/Rcwl/tl_Funcotator.R +++ b/Rcwl/tl_Funcotator.R @@ -10,9 +10,26 @@ o1 <- OutputParam(id = "mout", type = "File", glob = "$(inputs.maf)") req1 <- list(class = "DockerRequirement", dockerPull = "broadinstitute/gatk:latest") -Funcotator <- cwlParam(baseCommand = c("gatk", +Funcotator <- cwlProcess(baseCommand = c("gatk", "Funcotator"), requirements = list(req1), arguments = list("--remove-filtered-variants"), inputs = InputParamList(p1, p2, p3, p4, p5, p6), outputs = OutputParamList(o1)) + + +Funcotator <- addMeta( + Funcotator, + label = "Funcotator", + doc = "Create functional annotations on given variants cross-referenced by a given set of data sources.A GATK functional annotation tool (similar functionality to Oncotator).", + inputLabels = c("vcf","ref","outf","dsource","version","maf"), + inputDocs = c("A VCF file containing variants Required.","Reference sequence file Required.","The output file format. Either VCF, MAF, or SEG. Please note that MAF output for germline use case VCFs is unsupported. SEG will generate two output files: a simple tsv and a gene list. Required. Possible values: {VCF, MAF, SEG}","The path to a data source folder for Funcotator. May be specified more than once to handle multiple data source folders. This argument must be specified at least once.Required.","The version of the Human Genome reference to use (e.g. hg19, hg38, etc.). This will correspond to a sub-folder of each data source corresponding to that data source for the given reference. Required.","Output file to which annotated variants should be written. Required."), + outputLabels = c("mout"), + outputDocs = c("Annotated vcf or maf file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/broadinstitute/gatk", + example = paste() + ) +) diff --git a/Rcwl/tl_GenomicsDB.R b/Rcwl/tl_GenomicsDB.R index 9bfead8..f6febd2 100644 --- a/Rcwl/tl_GenomicsDB.R +++ b/Rcwl/tl_GenomicsDB.R @@ -1,14 +1,31 @@ ## Create a GenomicsDB p1 <- InputParam(id = "vcf", type = InputArrayParam(prefix = "-V", items = "File"), secondaryFiles = ".idx") -p2 <- InputParam(id = "Ref", prefix = "-R", type = "File", secondaryFiles = c(".fai", "$(self.nameroot).dict")) +p2 <- InputParam(id = "Ref", prefix = "-R", type = "File", secondaryFiles = c(".fai", "^.dict")) p3 <- InputParam(id = "db", prefix = "--genomicsdb-workspace-path", type = "string", default = "pon_db") p4 <- InputParam(id = "intervals", prefix = "-L", type = "File") o1 <- OutputParam(id = "dbout", type = "Directory", glob = "$(inputs.db)") req1 <- list(class = "DockerRequirement", dockerPull = "broadinstitute/gatk:latest") -GenomicsDB <- cwlParam(baseCommand = c("gatk", "GenomicsDBImport"), +GenomicsDB <- cwlProcess(baseCommand = c("gatk", "GenomicsDBImport"), requirements = list(req1), arguments = list("--merge-input-intervals"), inputs = InputParamList(p1, p2, p3, p4), outputs = OutputParamList(o1)) + + +GenomicsDB <- addMeta( + GenomicsDB, + label = "GenomicsDB", + doc = "Import single-sample GVCFs into GenomicsDB before joint genotyping.", + inputLabels = c("vcf","Ref","db","intervals"), + inputDocs = c("GVCF files to be imported to GenomicsDB. Each file must contain data for only a single sample. Either this or sample-name-map must be specified. This argument may be specified 0 or more times. Default value: null. Cannot be used in conjunction with argument(s) sampleNameMapFile avoidNio","Reference sequence Default value: null.","Workspace for GenomicsDB. Can be a POSIX file system absolute or relative path or a HDFS/GCS URL. Use this argument when creating a new GenomicsDB workspace. Either this or genomicsdb-update-workspace-path must be specified. Must be an empty or non-existent directory. Required. Cannot be used in conjunction with argument(s) incrementalImportWorkspace intervalListOutputPathString","One or more genomic intervals over which to operate This argument may be specified 0 or more times. Default value: null."), + outputLabels = c("dbout"), + outputDocs = c("GenomicsDB workspace"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/broadinstitute/gatk", + example = paste() + ) +) diff --git a/Rcwl/tl_GenotypeGVCFs.R b/Rcwl/tl_GenotypeGVCFs.R index a23cd4a..0e04bd3 100644 --- a/Rcwl/tl_GenotypeGVCFs.R +++ b/Rcwl/tl_GenotypeGVCFs.R @@ -8,7 +8,24 @@ o1 <- OutputParam(id = "vcf", type = "File", glob = "$(inputs.vout)", secondaryFiles = ".idx") req1 <- list(class = "DockerRequirement", dockerPull = "broadinstitute/gatk:latest") -GenotypeGVCFs <- cwlParam(baseCommand = c("gatk", "GenotypeGVCFs"), +GenotypeGVCFs <- cwlProcess(baseCommand = c("gatk", "GenotypeGVCFs"), requirements = list(req1), inputs = InputParamList(p1, p2, p3), outputs = OutputParamList(o1)) + + +GenotypeGVCFs <- addMeta( + GenotypeGVCFs, + label = "GenotypeGVCFs", + doc = "Perform joint genotyping on a single-sample GVCF from HaplotypeCaller or a multi-sample GVCF from CombineGVCFs or GenomicsDBImport", + inputLabels = c("variant","ref","vout"), + inputDocs = c("A VCF file containing variants Required.","Reference sequence file Required.","File to which variants should be written Required."), + outputLabels = c("vcf"), + outputDocs = c("A final VCF in which all samples have been jointly genotyped."), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/broadinstitute/gatk", + example = paste() + ) +) diff --git a/Rcwl/tl_GetPileupSummaries.R b/Rcwl/tl_GetPileupSummaries.R index caf603e..7ba4817 100644 --- a/Rcwl/tl_GetPileupSummaries.R +++ b/Rcwl/tl_GetPileupSummaries.R @@ -1,13 +1,32 @@ ## GetPileupSummaries -p1 <- InputParam(id = "bam", type = "File", prefix = "-I") -p2 <- InputParam(id = "vcf", type = "File", prefix = "-V", secondaryFiles = ".idx") -p3 <- InputParam(id = "interval", type = "File", prefix = "-L", secondaryFiles = ".idx") +p1 <- InputParam(id = "bam", type = "File", prefix = "-I", secondaryFiles = ".bai") +p2 <- InputParam(id = "vcf", type = "File", prefix = "-V", + secondaryFiles = "$(self.nameext == '.gz' ? self.basename+'.tbi' : self.basename+'.idx')") +p3 <- InputParam(id = "interval", type = "File", prefix = "-L", + secondaryFiles = "$(self.nameext == '.gz' ? self.basename+'.tbi' : self.basename+'.idx')") p4 <- InputParam(id = "pileup", type = "string", prefix = "-O") o1 <- OutputParam(id = "pout", type = "File", glob = "$(inputs.pileup)") req1 <- list(class = "DockerRequirement", dockerPull = "broadinstitute/gatk:latest") +req2 <- requireJS() +GetPileupSummaries <- cwlProcess(baseCommand = c("gatk", "GetPileupSummaries"), + requirements = list(req1, req2), + inputs = InputParamList(p1, p2, p3, p4), + outputs = OutputParamList(o1)) -GetPileupSummaries <- cwlParam(baseCommand = c("gatk", "GetPileupSummaries"), - requirements = list(req1), - inputs = InputParamList(p1, p2, p3, p4), - outputs = OutputParamList(o1)) + +GetPileupSummaries <- addMeta( + GetPileupSummaries, + label = "GetPileupSummaries", + doc = "Tabulates pileup metrics for inferring contamination", + inputLabels = c("bam","vcf","interval","pileup"), + inputDocs = c("BAM/SAM/CRAM file containing reads This argument must be specified at least once. Required.","A VCF file containing variants and allele frequencies Required.","One or more genomic intervals over which to operate This argument must be specified at least once. Required.","The output table Required."), + outputLabels = c("pout"), + outputDocs = c("Output table"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/broadinstitute/gatk", + example = paste() + ) +) diff --git a/Rcwl/tl_HaplotypeCaller.R b/Rcwl/tl_HaplotypeCaller.R index 4281d0d..a16d8cf 100644 --- a/Rcwl/tl_HaplotypeCaller.R +++ b/Rcwl/tl_HaplotypeCaller.R @@ -12,7 +12,24 @@ o1 <- OutputParam(id = "gvcf", type = "File", glob = "$(inputs.gout)", secondaryFiles = ".idx") req1 <- list(class = "DockerRequirement", dockerPull = "broadinstitute/gatk:latest") -HaplotypeCaller <- cwlParam(baseCommand = c("gatk", "HaplotypeCaller"), +HaplotypeCaller <- cwlProcess(baseCommand = c("gatk", "HaplotypeCaller"), requirements = list(req1), inputs = InputParamList(p1, p2, p3, p4, p5, p6), outputs = OutputParamList(o1)) + + +HaplotypeCaller <- addMeta( + HaplotypeCaller, + label = "HaplotypeCaller", + doc = "Call germline SNPs and indels via local re-assembly of haplotypes", + inputLabels = c("bam","interval","ref","gout","emit","downsampling"), + inputDocs = c("BAM/SAM/CRAM file containing reads This argument must be specified at least once.Required.","One or more genomic intervals over which to operate This argument may be specified 0 or more times. Default value: null.","Reference sequence file Required.","File to which variants should be written Required.","Mode for emitting reference confidence scores (For Mutect2, this is a BETA feature) Default value: NONE. Possible values: {NONE, BP_RESOLUTION, GVCF}","Maximum number of reads to retain per alignment start position. Reads above this threshold will be downsampled. Set to 0 to disable. Default value: 50."), + outputLabels = c("gvcf"), + outputDocs = c("output vcf file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/broadinstitute/gatk", + example = paste() + ) +) diff --git a/Rcwl/tl_LearnReadOrientationModel.R b/Rcwl/tl_LearnReadOrientationModel.R new file mode 100644 index 0000000..ec7d69a --- /dev/null +++ b/Rcwl/tl_LearnReadOrientationModel.R @@ -0,0 +1,27 @@ +## gatk LearnReadOrientationModel -I f1r2.tar.gz -O read-orientation-model.tar.gz +p1 <- InputParam(id = "f1r2", type = "File", prefix = "-I") +p2 <- InputParam(id = "romodel", type = "string", prefix = "-O", + default = "read-orientation-model.tar.gz") +o1 <- OutputParam(id = "rofile", type = "File", glob = "$(inputs.romodel)") +req1 <- requireDocker("broadinstitute/gatk:latest") +LearnReadOrientationModel <- cwlProcess(baseCommand = c("gatk", "LearnReadOrientationModel"), + requirements = list(req1), + inputs = InputParamList(p1, p2), + outputs = OutputParamList(o1)) + + +LearnReadOrientationModel <- addMeta( + LearnReadOrientationModel, + label = "LearnReadOrientationModel", + doc = "Get the maximum likelihood estimates of artifact prior probabilities in the orientation bias mixture model filter", + inputLabels = c("f1r2","romodel"), + inputDocs = c("One or more .tar.gz containing outputs of CollectF1R2Counts This argument must be specified at least once. Required.","tar.gz of artifact prior tables Required."), + outputLabels = c("rofile"), + outputDocs = c("learned artifact priors for the same samples."), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/broadinstitute/gatk", + example = paste() + ) +) diff --git a/Rcwl/tl_LoFreq.R b/Rcwl/tl_LoFreq.R index 139d9cf..70df75a 100644 --- a/Rcwl/tl_LoFreq.R +++ b/Rcwl/tl_LoFreq.R @@ -3,22 +3,44 @@ p1 <- InputParam(id = "tbam", type = "File", prefix = "-t", secondaryFiles = ".b p2 <- InputParam(id = "nbam", type = "File", prefix = "-n", secondaryFiles = ".bai") p3 <- InputParam(id = "ref", type = "File", prefix = "-f", secondaryFiles = ".fai") p4 <- InputParam(id = "region", type = "File", prefix = "-l") -p5 <- InputParam(id = "dbsnp", type = "File", prefix = "-d", secondaryFiles = ".tbi") +p5 <- InputParam(id = "dbsnp", type = "File", prefix = "-d", + secondaryFiles = "$(self.nameext == '.gz' ? self.basename+'.tbi' : self.basename+'.idx')") p6 <- InputParam(id = "out", type = "string", prefix = "-o") p7 <- InputParam(id = "threads", type = "int", prefix = "--threads") o1 <- OutputParam(id = "snp", type = "File", - glob = "$(inputs.out)somatic_final.snvs.vcf.gz") + glob = "$(inputs.out)somatic_final.snvs.vcf.gz", + secondaryFiles = ".tbi") o2 <- OutputParam(id = "snpdb", type = "File", - glob = "$(inputs.out)somatic_final_minus-dbsnp.snvs.vcf.gz") + glob = "$(inputs.out)somatic_final_minus-dbsnp.snvs.vcf.gz", + secondaryFiles = ".tbi") o3 <- OutputParam(id = "indel", type = "File", - glob = "$(inputs.out)somatic_final.indels.vcf.gz") + glob = "$(inputs.out)somatic_final.indels.vcf.gz", + secondaryFiles = ".tbi") o4 <- OutputParam(id = "indeldb", type = "File", - glob = "$(inputs.out)somatic_final_minus-dbsnp.indels.vcf.gz") + glob = "$(inputs.out)somatic_final_minus-dbsnp.indels.vcf.gz", + secondaryFiles = ".tbi") -req1 <- list(class = "DockerRequirement", - dockerPull = "andreaswilm/lofreq:v2.1.2") +req1 <- requireDocker("quay.io/biocontainers/lofreq:2.1.5--py37h916d2e8_4") +req2 <- requireJS() +LoFreq <- cwlProcess(baseCommand = c("lofreq", "somatic"), + arguments = list("--call-indels"), + requirements = list(req1, req2), + inputs = InputParamList(p1, p2, p3, p4, p5, p6, p7), + outputs= OutputParamList(o1, o2, o3, o4)) -LoFreq <- cwlParam(baseCommand = c("lofreq", "somatic"), - requirements = list(req1), - inputs = InputParamList(p1, p2, p3, p4, p5, p6, p7), - outputs= OutputParamList(o1, o2, o3, o4)) + +LoFreq <- addMeta( + LoFreq, + label = "LoFreq", + doc = "Predict somatic variants from a paired normal/disease sample. The script will produce several output files using the prefix specified.", + inputLabels = c("tbam","nbam","ref","region","dbsnp","out","threads"), + inputDocs = c("Tumor BAM file","Normal BAM file","Reference fasta file","BED file listing regions to restrict analysis to","vcf-file (bgzipped and index with tabix) containing known germline variants (e.g. dbsnp for human","Prefix for output files","Use this many threads for each call"), + outputLabels = c("snp","snpdb","indel","indeldb"), + outputDocs = c("SNVs before dbsnp removal","SNVs after dbsnp removal","Indels before dbsnp removal","Indels after dbsnp removal"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://csb5.github.io/lofreq/commands/#somatic", + example = paste() + ) +) diff --git a/Rcwl/tl_MergeVcf_MMS.R b/Rcwl/tl_MergeVcf_MMS.R new file mode 100644 index 0000000..665c205 --- /dev/null +++ b/Rcwl/tl_MergeVcf_MMS.R @@ -0,0 +1,53 @@ +## Merge somatic vcfs from Mutect2, MuSE, Strelka2 +mergeVcf3 <- function(vcf_mt, vcf_ms, vcf_ss, vcf_si, id_t, id_n, outvcf){ + library(VariantCombiner) + ## merge mutect and muse + v_m <- MergeSomatic(vcf_mt, vcf_ms, sources = c("mutect2", "MuSE"), + GENO = c(GT = 1, DP = 1, AD = 1), + id_t = id_t, id_n = id_n, pass_only = TRUE) + ## merge strelka snv and indel + v1 <- readVcf(vcf_ss) + v2 <- readVcf(vcf_si) + v1a <- strelka_snv(v1) + v2a <- strelka_indel(v2) + v_s <- MergeSomatic(v1a, v2a, sources = c("strelka2", "strelka2"), + GENO = c(GT = 1, DP = 1, AD = 1), + id_t = id_t, id_n = id_n, pass_only = TRUE) + + vm <- MergeSomatic(v_m, v_s, sources = c("", ""), + GENO = c(GT = 1, DP = 1, AD = 1), + id_t = id_t, id_n = id_n) + writeVcf(vm, outvcf) +} + +i1 <- InputParam(id = "mutect", type = "File", prefix = "vcf_mt=", separate = FALSE) +i2 <- InputParam(id = "muse", type = "File", prefix = "vcf_ms=", separate = FALSE) +i3 <- InputParam(id = "strelka_s", type = "File", prefix = "vcf_ss=", separate = FALSE) +i4 <- InputParam(id = "strelka_i", type = "File", prefix = "vcf_si=", separate = FALSE) +i5 <- InputParam(id = "id_t", type = "string", prefix = "id_t=", separate = FALSE) +i6 <- InputParam(id = "id_n", type = "string", prefix = "id_n=", separate = FALSE) +i7 <- InputParam(id = "outvcf", type = "string", prefix = "outvcf=", separate = FALSE) +o1 <- OutputParam(id = "ovcf", type = "File", glob = "$(inputs.outvcf)") + +req1 <- requireDocker("hubentu/variantcombiner") +MergeVcf_MMS <- cwlProcess(baseCommand = mergeVcf3, + requirements = list(req1), + inputs = InputParamList(i1, i2, i3, i4, i5, i6, i7), + outputs = OutputParamList(o1)) + + +MergeVcf_MMS <- addMeta( + MergeVcf_MMS, + label = "MergeVcf_MMS", + doc = "Merge somatic vcfs from Mutect2, MuSE, Strelka2", + inputLabels = c("mutect","muse","strelka_s","strelka_i","id_t","id_n","outvcf"), + inputDocs = c("Mutect file","Muse file","Strelka SNV file","Strelka Indel file","Tumor ID","Normal ID","Output vcf file name"), + outputLabels = c("ovcf"), + outputDocs = c("Merged vcf file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "NA", + example = paste() + ) +) diff --git a/Rcwl/tl_MuSE.R b/Rcwl/tl_MuSE.R index a8a4c97..92802ec 100644 --- a/Rcwl/tl_MuSE.R +++ b/Rcwl/tl_MuSE.R @@ -7,28 +7,47 @@ p3 <- InputParam(id = "ref", type = "File", prefix = "-f", secondaryFiles = ".fai", position = 3) p4 <- InputParam(id = "region", type = "File?", prefix = "-l", position = 4) -p5 <- InputParam(id = "dbsnp", type = "File", prefix = "-D", - secondaryFiles = ".tbi", position = 10) +p5 <- InputParam(id = "dbsnp", type = "File", prefix = "-D", position = 10, + secondaryFiles = "$(self.nameext == '.gz' ? self.basename+'.tbi' : self.basename+'.idx')") p6 <- InputParam(id = "vcf", type = "string", prefix = "-O", position = 11) p7 <- InputParam(id = "exome", type = "boolean", prefix = "-E", position = 12, default = TRUE) p8 <- InputParam(id = "genome", type = "boolean", prefix = "-G", position = 12, default = FALSE) -o1 <- OutputParam(id = "outVcf", type = "File", glob = "$(inputs.vcf)") +o1 <- OutputParam(id = "outVcf", type = "File", glob = "$(inputs.vcf)", secondaryFiles = ".tbi?") req1 <- list(class = "DockerRequirement", - dockerPull = "marghoob/muse:1.0rc_c") + dockerPull = "quay.io/biocontainers/muse:1.0.rc--h2e03b76_5") req2 <- list(class = "ShellCommandRequirement") -MuSE <- cwlParam(baseCommand = c("MuSEv1.0rc_submission_c039ffa", "call"), - requirements = list(req1, req2), - arguments = list( - "-O", "output", - list(valueFrom = " && ", position = 5L), - list(valueFrom = "MuSEv1.0rc_submission_c039ffa", position = 6L), - list(valueFrom = "sump", position = 7L), - list(valueFrom = "-I", position = 8L), - list(valueFrom = "output.MuSE.txt", position = 9L) - ), - inputs = InputParamList(p1, p2, p3, p4, p5, p6, p7, p8), - outputs = OutputParamList(o1)) +req3 <- requireJS() +MuSE <- cwlProcess(cwlVersion = "v1.0", + baseCommand = c("MuSE", "call"), + requirements = list(req1, req2, req3), + arguments = list( + "-O", "output", + list(valueFrom = " && ", position = 5L, shellQuote = FALSE), + list(valueFrom = "MuSE", position = 6L), + list(valueFrom = "sump", position = 7L), + list(valueFrom = "-I", position = 8L), + list(valueFrom = "output.MuSE.txt", position = 9L) + ), + inputs = InputParamList(p1, p2, p3, p4, p5, p6, p7, p8), + outputs = OutputParamList(o1)) + + +MuSE <- addMeta( + MuSE, + label = "MuSE", + doc = "Statistical approach for mutation calling based on a Markov substitution model for molecular evolution.", + inputLabels = c("tbam","nbam","ref","region","dbsnp","vcf","exome","genome"), + inputDocs = c("Tumor bam file","Normal bam file","faidx indexed reference sequence file","list of regions (chr:pos-pos or BED), one region per line","dbSNP vcf file that should be bgzip compressed,tabix indexed and based on the same reference genome used in 'MuSE call'","output file name (VCF format)","input generated from whole exome sequencing data","input generated from whole genome sequencing data"), + outputLabels = c("outVcf"), + outputDocs = c("Output VCF file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://bioinformatics.mdanderson.org/public-software/muse/", + example = paste() + ) +) diff --git a/Rcwl/tl_MuSEv2.R b/Rcwl/tl_MuSEv2.R new file mode 100644 index 0000000..507cbff --- /dev/null +++ b/Rcwl/tl_MuSEv2.R @@ -0,0 +1,53 @@ +## https://bioinformatics.mdanderson.org/public-software/muse/ +p1 <- InputParam(id = "tbam", type = "File", + secondaryFiles = list(".bai?", "^.bai?"), position = 1) +p2 <- InputParam(id = "nbam", type = "File", + secondaryFiles = list(".bai", "^.bai?"), position = 2) +p3 <- InputParam(id = "ref", type = "File", prefix = "-f", + secondaryFiles = ".fai", position = 3) +p4 <- InputParam(id = "region", type = "File?", + prefix = "-l", position = 4) +p5 <- InputParam(id = "dbsnp", type = "File", prefix = "-D", position = 10, + secondaryFiles = "$(self.nameext == '.gz' ? self.basename+'.tbi' : self.basename+'.idx')") +p6 <- InputParam(id = "vcf", type = "string", + prefix = "-O", position = 11) +p7 <- InputParam(id = "exome", type = "boolean", + prefix = "-E", position = 12, default = TRUE) +p8 <- InputParam(id = "genome", type = "boolean", + prefix = "-G", position = 12, default = FALSE) +o1 <- OutputParam(id = "outVcf", type = "File", glob = "$(inputs.vcf)", secondaryFiles = ".tbi?") + +req1 <- list(class = "DockerRequirement", + dockerPull = "quay.io/biocontainers/muse:1.0.rc--0") +req2 <- list(class = "ShellCommandRequirement") +req3 <- requireJS() +MuSE <- cwlProcess(cwlVersion = "v1.2", + baseCommand = c("MuSE", "call"), + requirements = list(req1, req2, req3), + arguments = list( + "-O", "output", + list(valueFrom = " && ", position = 5L, shellQuote = FALSE), + list(valueFrom = "MuSE", position = 6L), + list(valueFrom = "sump", position = 7L), + list(valueFrom = "-I", position = 8L), + list(valueFrom = "output.MuSE.txt", position = 9L) + ), + inputs = InputParamList(p1, p2, p3, p4, p5, p6, p7, p8), + outputs = OutputParamList(o1)) + + +MuSE <- addMeta( + MuSE, + label = "MuSE", + doc = "Statistical approach for mutation calling based on a Markov substitution model for molecular evolution.", + inputLabels = c("tbam","nbam","ref","region","dbsnp","vcf","exome","genome"), + inputDocs = c("Tumor bam file","Normal bam file","faidx indexed reference sequence file","list of regions (chr:pos-pos or BED), one region per line","dbSNP vcf file that should be bgzip compressed,tabix indexed and based on the same reference genome used in 'MuSE call'","output file name (VCF format)","input generated from whole exome sequencing data","input generated from whole genome sequencing data"), + outputLabels = c("outVcf"), + outputDocs = c("Output VCF file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://bioinformatics.mdanderson.org/public-software/muse/", + example = paste() + ) +) diff --git a/Rcwl/tl_MutSigCV.R b/Rcwl/tl_MutSigCV.R new file mode 100644 index 0000000..974b0aa --- /dev/null +++ b/Rcwl/tl_MutSigCV.R @@ -0,0 +1,32 @@ +## https://github.com/genepattern/docker-mutsigcv + +p1 <- InputParam(id = "maf", type = "File", position = 1) +p2 <- InputParam(id = "coverage", type = "File", position = 2) +p3 <- InputParam(id = "covar", type = "File", position = 3) +p4 <- InputParam(id = "sig", type = "string", position = 4) +p5 <- InputParam(id = "dict", type = "File", position = 5) +o1 <- OutputParam(id = "sigout", type = "File", glob = "$(inputs.sig).sig_genes.txt") +req1 <- requireDocker("genepattern/docker-mutsigcv:2a") +req2 <- list(class = "EnvVarRequirement", + envDef = list(MCR_INHIBIT_CTF_LOCK = "$(1)")) +MutSigCV <- cwlProcess(baseCommand = "gp_MutSigCV", + requirements = list(req1), + inputs = InputParamList(p1, p2, p3, p4, p5), + outputs = OutputParamList(o1)) + + +MutSigCV <- addMeta( + MutSigCV, + label = "MutSigCV", + doc = "MutSigCV accepts whole genome or whole exome sequencing data from multiple samples, with information about point mutations, small insertions/deletions, and coverage, and identifies genes that are mutated more often than one would expect by chance.", + inputLabels = c("maf","coverage","covar","sig","dict"), + inputDocs = c("Mutation list in Mutation Annotation Format (MAF). For more information on the file format, see the Input Files section.","Coverage file in tab-delimited format, containing the number of sequenced bases in each patient, per gene per mutation category. For more information on the file format, see the Input Files section.","Covariates table in a tab-delimited text file. For more information on the file contents and format, see the Input Files section.","Base name for the output files.","The mutation type dictionary to use for automatic category and effect discovery. This is necessary only if you are using a MAF file without the columns 'categ' and 'effect'. See the Input Files section for details."), + outputLabels = c("sigout"), + outputDocs = c("A tab-delimited report of significant mutations, listed in descending order from most significant to least significant."), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/genepattern/docker-mutsigcv", + example = paste() + ) +) diff --git a/Rcwl/tl_Mutect2.R b/Rcwl/tl_Mutect2.R index 092b6ca..5dd3e73 100644 --- a/Rcwl/tl_Mutect2.R +++ b/Rcwl/tl_Mutect2.R @@ -1,20 +1,44 @@ ## gatk Mutect2 - p1a <- InputParam(id = "tbam", type = "File", prefix = "-I", secondaryFiles = ".bai") p1b <- InputParam(id = "nbam", type = "File?", prefix = "-I", secondaryFiles = ".bai") -p2 <- InputParam(id = "Ref", prefix = "-R", type = "File", secondaryFiles = c(".fai", "$(self.nameroot).dict")) +p2 <- InputParam(id = "Ref", prefix = "-R", type = "File", + secondaryFiles = list(".fai", "^.dict")) p3 <- InputParam(id = "normal", type = "string?", prefix = "-normal") -p4 <- InputParam(id = "germline", type = "File?", prefix = "--germline-resource", secondaryFiles = ".idx") -p5 <- InputParam(id = "pon", type = "File?", prefix = "--panel-of-normals", secondaryFiles = ".idx") +p4 <- InputParam(id = "germline", type = "File?", prefix = "--germline-resource", + secondaryFiles = "$(self.nameext == '.gz' ? self.basename+'.tbi' : self.basename+'.idx')") +p5 <- InputParam(id = "pon", type = "File?", prefix = "--panel-of-normals", + secondaryFiles = "$(self.nameext == '.gz' ? self.basename+'.tbi' : self.basename+'.idx')") p6 <- InputParam(id = "interval", type = "File?", prefix = "-L") p7 <- InputParam(id = "out", type = "string", prefix = "-O") -o1 <- OutputParam(id = "vout", type = "File", glob = "$(inputs.out)", secondaryFiles = c(".idx", ".stats")) -req1 <- list(class = "DockerRequirement", - dockerPull = "broadinstitute/gatk:4.1.3.0") +p8 <- InputParam(id = "f1r2", type = "string?", prefix = "--f1r2-tar-gz", + default = "f1r2.tar.gz") +p9 <- InputParam(id = "threads", type = "int?", prefix = "--native-pair-hmm-threads") +o1 <- OutputParam(id = "vout", type = "File", glob = "$(inputs.out)", + secondaryFiles = c(".idx", ".stats")) +o2 <- OutputParam(id = "F1r2", type = "File", glob = "$(inputs.f1r2)") +req1 <- requireDocker("broadinstitute/gatk:latest") +req2 <- requireJS() +Mutect2 <- cwlProcess(cwlVersion = "v1.0", + baseCommand = c("gatk", "Mutect2"), + requirements = list(req1, req2), + inputs = InputParamList(p1a, p1b, p2, p3, p4, p5, p6, p7, p8, p9), + outputs = OutputParamList(o1, o2)) + -Mutect2 <- cwlParam(baseCommand = c("gatk", "Mutect2"), - requirements = list(req1), - inputs = InputParamList(p1a, p1b, p2, p3, p4, p5, p6, p7), - outputs = OutputParamList(o1)) +Mutect2 <- addMeta( + Mutect2, + label = "Mutect2", + doc = "Call somatic SNVs and indels via local assembly of haplotypes GATK4", + inputLabels = c("tbam","nbam","Ref","normal","germline","pon","interval","out","f1r2","threads"), + inputDocs = c("Tumer BAM/SAM/CRAM file containing reads This argument must be specified at least once.Required.","Normal BAM/SAM/CRAM file containing reads This argument must be specified at least once.Required.","Reference sequence file Required.","BAM sample name of normal(s), if any. May be URL-encoded as output by GetSampleName with -encode argument. This argument may be specified 0 or more times. Default value: null.","Population vcf of germline sequencing containing allele fractions. Default value: null.","VCF file of sites observed in normal. Default value: null.","One or more genomic intervals over which to operate This argument may be specified 0 or more times. Default value: null.","File to which variants should be written Required.","If specified, collect F1R2 counts and output files into this tar.gz file Default value:null.","How many threads should a native pairHMM implementation use Default value: 4."), + outputLabels = c("vout","F1r2"), + outputDocs = c("Variant annotated file","F1R2 counts file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/broadinstitute/gatk", + example = paste() + ) +) diff --git a/Rcwl/tl_Mutect2_gatk3.R b/Rcwl/tl_Mutect2_gatk3.R index a4862e7..4d1623b 100644 --- a/Rcwl/tl_Mutect2_gatk3.R +++ b/Rcwl/tl_Mutect2_gatk3.R @@ -14,8 +14,25 @@ o1 <- OutputParam(id = "vout", type = "File", glob = "$(inputs.out)", secondaryF req1 <- list(class = "DockerRequirement", dockerPull = "broadinstitute/gatk3:3.8-1") -Mutect2_gatk3 <- cwlParam(baseCommand = c("java", "-jar", "/usr/GenomeAnalysisTK.jar", +Mutect2_gatk3 <- cwlProcess(baseCommand = c("java", "-jar", "/usr/GenomeAnalysisTK.jar", "-T", "MuTect2"), requirements = list(req1), inputs = InputParamList(p1a, p1b, p2, p3, p4, p5, p6, p7), outputs = OutputParamList(o1)) + + +Mutect2_gatk3 <- addMeta( + Mutect2_gatk3, + label = "Mutect2_gatk3", + doc = "Call somatic SNVs and indels via local assembly of haplotypes GATK3", + inputLabels = c("tbam","nbam","Ref","dbSNP","cosmic","interval","out","nct"), + inputDocs = c("Tumer BAM/SAM/CRAM file containing reads This argument must be specified at least once.Required.","Normal BAM/SAM/CRAM file containing reads This argument must be specified at least once.Required.","Reference sequence file Required.","dbSNP file","VCF file of COSMIC sites","One or more genomic intervals over which to operate This argument may be specified 0 or more times. Default value: null.","File to which variants should be written","Number of CPU threads to allocate per data thread"), + outputLabels = c("vout"), + outputDocs = c("Variant annotated file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://software.broadinstitute.org/gatk/documentation/tooldocs/3.8-0/org_broadinstitute_gatk_tools_walkers_cancer_m2_MuTect2.php", + example = paste() + ) +) diff --git a/Rcwl/tl_Nirvana.R b/Rcwl/tl_Nirvana.R new file mode 100644 index 0000000..b26efc6 --- /dev/null +++ b/Rcwl/tl_Nirvana.R @@ -0,0 +1,32 @@ +## https://illumina.github.io/NirvanaDocumentation/ +p1 <- InputParam(id = "cache", type = "Directory", position = -1) +p2 <- InputParam(id = "sd", type = "Directory", prefix = "--sd") +p3 <- InputParam(id = "ref", type = "File", prefix = "-r") +p4 <- InputParam(id = "prefix", type = "string", prefix = "-o") +p5 <- InputParam(id = "vcf", type = "File", prefix = "-i") +o1 <- OutputParam(id = "out", type = "File", glob = "$(inputs.prefix).json.gz", + secondaryFile = ".jsi") +req1 <- requireDocker("annotation/nirvana:3.14") +Nirvana <- cwlProcess(cwlVersion = "v1.2", + baseCommand = c("dotnet", "/opt/nirvana/Nirvana.dll"), + arguments = list("-c", list(valueFrom="$(inputs.cache.path)/Both")), + requirements = list(req1), + inputs = InputParamList(p1, p2, p3, p4, p5), + outputs = OutputParamList(o1)) + + +Nirvana <- addMeta( + Nirvana, + label = "Nirvana", + doc = "Nirvana provides clinical-grade annotation of genomic variants (SNVs, MNVs, insertions, deletions, indels, STRs, gene fusions, and SVs (including CNVs).", + inputLabels = c("cache","sd","ref","prefix","vcf"), + inputDocs = c("input cache","input supplementary annotation directory","input compressed reference sequence path","output file path","input VCF path"), + outputLabels = c("out"), + outputDocs = c("Clinical grade annotated output"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://illumina.github.io/NirvanaDocumentation/", + example = paste() + ) +) diff --git a/Rcwl/tl_Nirvana_download.R b/Rcwl/tl_Nirvana_download.R new file mode 100644 index 0000000..5c66f6a --- /dev/null +++ b/Rcwl/tl_Nirvana_download.R @@ -0,0 +1,26 @@ +## https://illumina.github.io/NirvanaDocumentation/ +p1 <- InputParam(id = "genome", type = "string", prefix = "--ga") +o1 <- OutputParam(id = "data", type = "Directory[]", glob = "*") +req1 <- requireDocker("annotation/nirvana:3.14") +Nirvana_download <- cwlProcess(baseCommand = c("dotnet", "/opt/nirvana/Downloader.dll"), + arguments = list("-o", "./"), + requirements = list(req1), + inputs = InputParamList(p1), + outputs = OutputParamList(o1)) + + +Nirvana_download <- addMeta( + Nirvana_download, + label = "Nirvana_download", + doc = "Download the necessary reference data files and annotation databases required by Nirvana to perform variant annotation.", + inputLabels = c("genome"), + inputDocs = c("genome assembly version"), + outputLabels = c("data"), + outputDocs = c("Downloaded output file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://illumina.github.io/NirvanaDocumentation/", + example = paste() + ) +) diff --git a/Rcwl/tl_PoN.R b/Rcwl/tl_PoN.R index 4e35c03..a5ea52c 100644 --- a/Rcwl/tl_PoN.R +++ b/Rcwl/tl_PoN.R @@ -2,10 +2,12 @@ p1 <- InputParam(id = "db", type = "Directory", prefix = "gendb://", separate = F, position = 1) p2 <- InputParam(id = "Ref", prefix = "-R", type = "File", - secondaryFiles = c(".fai", "$(self.nameroot).dict"), position = 2) + secondaryFiles = c(".fai", "^.dict"), position = 2) p3 <- InputParam(id = "pon", prefix = "-O", type = "string", position = 3) p4 <- InputParam(id = "gresource", type = "File?", prefix = "--germline-resource", - secondaryFiles = ".idx", position = 4) + secondaryFiles = "$(self.nameext == '.gz' ? self.basename+'.tbi' : self.basename+'.idx')", + position = 4) + o1 <- OutputParam(id = "pout", type = "File", glob = "$(inputs.pon)", secondaryFiles = ".idx") req1 <- list(class = "DockerRequirement", @@ -13,9 +15,26 @@ req1 <- list(class = "DockerRequirement", ## fix bug for lock files on POSIX filesystems req2 <- list(class = "EnvVarRequirement", envDef = list("TILEDB_DISABLE_FILE_LOCKING" = "1")) +req3 <- requireJS() +PoN <- cwlProcess(baseCommand = c("gatk", "CreateSomaticPanelOfNormals"), + requirements = list(req1, req2, req3), + arguments = list("--min-sample-count", "1", "-V"), + inputs = InputParamList(p1, p2, p3, p4), + outputs = OutputParamList(o1)) + -PoN <- cwlParam(baseCommand = c("gatk", "CreateSomaticPanelOfNormals"), - requirements = list(req1, req2), - arguments = list("-V"), - inputs = InputParamList(p1, p2, p3, p4), - outputs = OutputParamList(o1)) +PoN <- addMeta( + PoN, + label = "PoN", + doc = "Create a panel of normals (PoN) containing germline and artifactual sites for use with Mutect2.", + inputLabels = c("db","Ref","pon","gresource"), + inputDocs = c("URI used to reference a GenomicsDB instance in GATK workflows.","Reference sequence Default value: null.","Output vcf Required.","Population vcf of germline sequencing containing allele fractions. Default value: null."), + outputLabels = c("pout"), + outputDocs = c("Panel of normal output"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/broadinstitute/gatk", + example = paste() + ) +) diff --git a/Rcwl/tl_ReadBackedPhasing.R b/Rcwl/tl_ReadBackedPhasing.R index 1bfa87d..9abd881 100644 --- a/Rcwl/tl_ReadBackedPhasing.R +++ b/Rcwl/tl_ReadBackedPhasing.R @@ -8,8 +8,25 @@ p5 <- InputParam(id = "region", type = "File", prefix = "-L") o1 <- OutputParam(id = "oVcf", type = "File", glob = "$(inputs.ovcf)") req1 <- list(class = "DockerRequirement", dockerPull = "broadinstitute/gatk3:3.8-1") -ReadBackedPhasing <- cwlParam(baseCommand = c("java", "-jar", "/usr/GenomeAnalysisTK.jar", +ReadBackedPhasing <- cwlProcess(baseCommand = c("java", "-jar", "/usr/GenomeAnalysisTK.jar", "-T", "ReadBackedPhasing"), requirements = list(req1), inputs = InputParamList(p1, p2, p3, p4, p5), outputs = OutputParamList(o1)) + + +ReadBackedPhasing <- addMeta( + ReadBackedPhasing, + label = "ReadBackedPhasing", + doc = "Tool to phase variants by determining their haplotype structure based on the alignment of reads that span multiple variants.", + inputLabels = c("vcf","bam","ref","ovcf","region"), + inputDocs = c("Input VCF file","Input file containing sequence data (BAM or CRAM)","Reference sequence file","File to which variants should be written","One or more genomic intervals over which to operate"), + outputLabels = c("oVcf"), + outputDocs = c("Output vcf file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/broadinstitute/gatk", + example = paste() + ) +) diff --git a/Rcwl/tl_RenameSampleInVcf.R b/Rcwl/tl_RenameSampleInVcf.R index aa23a49..4a17611 100644 --- a/Rcwl/tl_RenameSampleInVcf.R +++ b/Rcwl/tl_RenameSampleInVcf.R @@ -6,8 +6,25 @@ o1 <- OutputParam(id = "oVcf", type = "File", glob = "$(inputs.ovcf)") req1 <- list(class = "DockerRequirement", dockerPull = "quay.io/biocontainers/picard:2.21.1--0") -RenameSampleInVcf <- cwlParam(baseCommand = c("picard", +RenameSampleInVcf <- cwlProcess(baseCommand = c("picard", "RenameSampleInVcf"), requirements = list(req1), inputs = InputParamList(p1, p2, p3), outputs = OutputParamList(o1)) + + +RenameSampleInVcf <- addMeta( + RenameSampleInVcf, + label = "RenameSampleInVcf", + doc = "This tool enables the user to rename a sample in either a VCF or BCF file.", + inputLabels = c("vcf","ovcf","NewName"), + inputDocs = c("Input single sample VCF or BCF file. Required.","Output single sample VCF. Required.","New name to give sample in output VCF. Required."), + outputLabels = c("oVcf"), + outputDocs = c("Sample name renamed vcf file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/broadinstitute/picard", + example = paste() + ) +) diff --git a/Rcwl/tl_ReorderSam.R b/Rcwl/tl_ReorderSam.R new file mode 100644 index 0000000..4a746ef --- /dev/null +++ b/Rcwl/tl_ReorderSam.R @@ -0,0 +1,29 @@ +## picard ReorderSam +p1 <- InputParam(id = "ibam", type = "File", prefix = "I=", separate = FALSE) +p2 <- InputParam(id = "obam", type = "string", prefix = "O=", separate = FALSE) +p3 <- InputParam(id = "dict", type = "File", prefix = "SD=", separate = FALSE) +o1 <- OutputParam(id = "rBam", type = "File", glob = "$(inputs.obam)") +req1 <- list(class = "DockerRequirement", + dockerPull = "quay.io/biocontainers/picard:2.21.1--0") +ReorderSam <- cwlProcess(baseCommand = c("picard", + "ReorderSam"), + requirements = list(req1), + inputs = InputParamList(p1, p2, p3), + outputs = OutputParamList(o1)) + + +ReorderSam <- addMeta( + ReorderSam, + label = "ReorderSam", + doc = "ReorderSam reorders reads in a SAM/BAM file to match the contig ordering in a provided reference file, as determined by exact name matching of contigs.", + inputLabels = c("ibam","obam","dict"), + inputDocs = c("Input file (SAM or BAM) to extract reads from. Required.","Output file (SAM or BAM) to write extracted reads to. Required.","A Sequence Dictionary for the OUTPUT file (can be read from one of the following file types (SAM, BAM, VCF, BCF, Interval List, Fasta, or Dict) Required."), + outputLabels = c("rBam"), + outputDocs = c("Reordered bam file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/broadinstitute/picard", + example = paste() + ) +) diff --git a/Rcwl/tl_Rsplit.R b/Rcwl/tl_Rsplit.R index 2571f51..080a9cb 100644 --- a/Rcwl/tl_Rsplit.R +++ b/Rcwl/tl_Rsplit.R @@ -26,6 +26,23 @@ p3 <- InputParam(id = "cnames", type = "string?", prefix = "cnames=", separate = p4 <- InputParam(id = "outfile", type = "string", prefix = "outfile=", separate = F) o1 <- OutputParam(id = "outFile", type = "File", glob = "$(inputs.outfile)") -Rsplit <- cwlParam(baseCommand = rsplit, +Rsplit <- cwlProcess(baseCommand = rsplit, inputs = InputParamList(p1, p2, p3, p4), outputs = OutputParamList(o1)) + + +Rsplit <- addMeta( + Rsplit, + label = "Rsplit", + doc = "Split and combine multiple files by column names", + inputLabels = c("files","columns","cnames","outfile"), + inputDocs = c("Input files","A string specifying the column names to extract from each input file","An optional parameter. A string containing custom column names to assign to the combined data","he name of the output file where the combined data will be saved."), + outputLabels = c("outFile"), + outputDocs = c("Combined output file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "NA", + example = paste() + ) +) diff --git a/Rcwl/tl_STAR.R b/Rcwl/tl_STAR.R index 5482c44..ccb0816 100644 --- a/Rcwl/tl_STAR.R +++ b/Rcwl/tl_STAR.R @@ -6,21 +6,37 @@ p2 <- InputParam(id = "readFilesIn", type = "File[]", prefix = "--readFilesIn") p3 <- InputParam(id = "genomeDir", type = "Directory", prefix = "--genomeDir") p4 <- InputParam(id = "sjdbGTFfile", type = "File", prefix = "--sjdbGTFfile") p5 <- InputParam(id = "runThreadN", type = "int", prefix = "--runThreadN", default = 1L) +p6 <- InputParam(id = "readFileCommand", type = "string", + prefix = "--readFilesCommand", default = "zcat") o1 <- OutputParam(id = "outBAM", type = "File", glob = "*.bam") o2 <- OutputParam(id = "outLog", type = "File", glob = "*Log.final.out") o3 <- OutputParam(id = "outCount", type = "File", glob = "*ReadsPerGene.out.tab") req1 <- list(class = "DockerRequirement", - dockerPull = "quay.io/biocontainers/star:2.7.3a--0") -STAR <- cwlParam(baseCommand = "STAR", + dockerPull = "quay.io/biocontainers/star:2.7.9a--h9ee0642_0") +STAR <- cwlProcess(baseCommand = "STAR", requirements = list(req1), - arguments = list("--outFilterMultimapNmax", "3", - "--outSAMunmapped", "Within", - "--outFilterMismatchNmax", "2", + arguments = list("--outSAMunmapped", "Within", "--outSAMstrandField", "intronMotif", - "--readFilesCommand", "zcat", "--outSAMtype", "BAM", "SortedByCoordinate", "--twopassMode", "Basic", "--quantMode", "GeneCounts"), - inputs = InputParamList(p1, p2, p3, p4, p5), + inputs = InputParamList(p1, p2, p3, p4, p5, p6), outputs = OutputParamList(o1, o2, o3)) + + +STAR <- addMeta( + STAR, + label = "STAR", + doc = "RNA-seq read aligner designed specifically for aligning RNA sequencing (RNA-seq) reads to a reference genome.", + inputLabels = c("prefix","readFilesIn","genomeDir","sjdbGTFfile","runThreadN","readFileCommand"), + inputDocs = c("Output filr prefix","Input files","Path of the genoem file","specifies the path to the file with annotated transcripts in the standard GTF format.","number of threads to be used for genome generation,","command line to execute for each of the input file. This command should generate FASTA or FASTQ text and send it to stdout"), + outputLabels = c("outBAM","outLog","outCount"), + outputDocs = c("Aligned Bam file","detailed logs providing statistics and metrics about the alignment process.","reads mapped to each gene"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/alexdobin/STAR", + example = paste() + ) +) diff --git a/Rcwl/tl_STAR_FFPE.R b/Rcwl/tl_STAR_FFPE.R new file mode 100644 index 0000000..47accd6 --- /dev/null +++ b/Rcwl/tl_STAR_FFPE.R @@ -0,0 +1,62 @@ +## STAR +## from NUC +## readFilesIn must be full path ##string +p1 <- InputParam(id = "prefix", type = "string", prefix = "--outFileNamePrefix") +p2 <- InputParam(id = "readFilesIn", type = "File[]", prefix = "--readFilesIn") +p3 <- InputParam(id = "genomeDir", type = "Directory", prefix = "--genomeDir") +p4 <- InputParam(id = "sjdbGTFfile", type = "File", prefix = "--sjdbGTFfile") +p5 <- InputParam(id = "runThreadN", type = "int", prefix = "--runThreadN", default = 1L) +o1 <- OutputParam(id = "outBAM", type = "File", glob = "*Aligned.out.bam") +o2 <- OutputParam(id = "outLog", type = "File", glob = "*Log.final.out") +o3 <- OutputParam(id = "outCount", type = "File", glob = "*ReadsPerGene.out.tab") +o4 <- OutputParam(id = "junction", type = "File", glob = "*Chimeric.out.junction") +req1 <- list(class = "DockerRequirement", + dockerPull = "quay.io/biocontainers/star:2.7.9a--h9ee0642_0") +STAR_FFPE <- cwlProcess(baseCommand = "STAR", + requirements = list(req1), + arguments = list("--outSAMattrRGline", "-", + "--alignIntronMax", "1000000", + "--alignIntronMin", "20", + "--alignMatesGapMax", "1000000", + "--alignSJDBoverhangMin", "1", + "--alignSJoverhangMin", "8", + "--alignSoftClipAtReferenceEnds", "Yes", + "--chimJunctionOverhangMin", "15", + "--chimMainSegmentMultNmax", "1", + "--chimOutType", "Junctions", "WithinBAM", "SoftClip", + "--chimSegmentMin", "15", + "--genomeLoad", "NoSharedMemory", + "--limitSjdbInsertNsj", "1200000", + "--outFilterIntronMotifs", "None", + "--outFilterMatchNminOverLread", "0.33", + "--outFilterMismatchNmax", "999", + "--outFilterMismatchNoverLmax", "0.1", + "--outFilterMultimapNmax", "20", + "--outFilterScoreMinOverLread", "0.33", + "--outFilterType", "BySJout", + "--outSAMattributes", "NH", "HI", "AS", "nM", "NM", "ch", + "--outSAMstrandField", "intronMotif", + "--outSAMtype", "BAM", "Unsorted", + "--outSAMunmapped", "Within", + "--quantMode", "GeneCounts", + "--readFilesCommand", "zcat", + "--twopassMode", "Basic"), + inputs = InputParamList(p1, p2, p3, p4, p5), + outputs = OutputParamList(o1, o2, o3, o4)) + + +STAR_FFPE <- addMeta( + STAR_FFPE, + label = "STAR_FFPE", + doc = "aligner for analyzing RNA sequencing (RNA-seq) data from FFPE (Formalin-Fixed, Paraffin-Embedded) tissue samples.", + inputLabels = c("prefix","readFilesIn","genomeDir","sjdbGTFfile","runThreadN"), + inputDocs = c("output files name prefix (including full or relative path). Can only be defined on the command line.","paths to files that contain input read1 (and, if needed, read2)","path to the directory where genome files are stored (for –runMode alignReads) or will be generated (for –runMode generateGenome)","path to the GTF file with annotations","number of threads to run STAR"), + outputLabels = c("outBAM","outLog","outCount","junction"), + outputDocs = c("Aligned Bam file","detailed logs providing statistics and metrics about the alignment process.","reads mapped to each gene","splice junction"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/alexdobin/STAR", + example = paste() + ) +) diff --git a/Rcwl/tl_STAR_rMATS.R b/Rcwl/tl_STAR_rMATS.R new file mode 100644 index 0000000..5f1bec2 --- /dev/null +++ b/Rcwl/tl_STAR_rMATS.R @@ -0,0 +1,45 @@ +## STAR +## Note: output to current dir +p1 <- InputParam(id = "prefix", type = "string", prefix = "--outFileNamePrefix") +p2 <- InputParam(id = "readFilesIn", type = "File[]", prefix = "--readFilesIn") +p3 <- InputParam(id = "genomeDir", type = "Directory", prefix = "--genomeDir") +p4 <- InputParam(id = "sjdbGTFfile", type = "File", prefix = "--sjdbGTFfile") +p5 <- InputParam(id = "runThreadN", type = "int", prefix = "--runThreadN", default = 1L) +p6 <- InputParam(id = "readFilesCommand", type = "string?", prefix = "--readFilesCommand") +p7 <- InputParam(id = "twopass", type = "string?", prefix = "--twopassMode") +p8 <- InputParam(id = "chimSegmentMin", type = "int?", prefix = "--chimSegmentMin") +p9 <- InputParam(id = "outFilterMismatchNmax", type = "int?", prefix = "--outFilterMismatchNmax") +p10 <- InputParam(id = "alignIntronMax", type = "int?", prefix = "--alignIntronMax") +p11 <- InputParam(id = "alignSJDBoverhangMin", type = "int?", prefix = "--alignSJDBoverhangMin") +o1 <- OutputParam(id = "outBAM", type = "File", glob = "*.bam") +o2 <- OutputParam(id = "outLog", type = "File", glob = "*Log.final.out") +o3 <- OutputParam(id = "outCount", type = "File", glob = "*ReadsPerGene.out.tab") + +req1 <- list(class = "DockerRequirement", + dockerPull = "quay.io/biocontainers/star:2.7.9a--h9ee0642_0") +STAR <- cwlProcess(baseCommand = "STAR", + requirements = list(req1), + arguments = list("--outSAMunmapped", "Within", + "--outSAMstrandField", "intronMotif", + "--outSAMtype", "BAM", "SortedByCoordinate", + "--quantMode", "GeneCounts"), + inputs = InputParamList(p1, p2, p3, p4, p5, + p6, p7, p8, p9, p10, p11), + outputs = OutputParamList(o1, o2, o3)) + + +STAR <- addMeta( + STAR, + label = "STAR", + doc = "STAR (Spliced Transcripts Alignment to a Reference) aligner that is tailored to work with rMATS (RNA-seq Multivariate Analysis of Transcript Splicing),", + inputLabels = c("prefix","readFilesIn","genomeDir","sjdbGTFfile","runThreadN","readFilesCommand","twopass","chimSegmentMin","outFilterMismatchNmax","alignIntronMax","alignSJDBoverhangMin"), + inputDocs = c("output files name prefix (including full or relative path). Can only be defined on the command line.","paths to files that contain input read1 (and, if needed, read2)","path to the directory where genome files are stored","path to the GTF file with annotations","number of threads to run STAR","command line to execute for each of the input file. This command should generate FASTA or FASTQ text and send it to stdout","2-pass mapping mode.","minimum length of chimeric segment length, if ==0, no chimeric output","maximum number of mismatches per pair, large number switches off this filter","maximum intron size, if 0, max intron size will be determined by (2ˆwinBinNbits)*winAnchorDistNbins","minimum overhang for annotated junctions"), + outputLabels = c("outBAM","outLog","outCount"), + outputDocs = c("Aligned Bam file","detailed logs providing statistics and metrics about the alignment process.","reads mapped to each gene"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/alexdobin/STAR", + example = paste() + ) +) diff --git a/Rcwl/tl_STARindex.R b/Rcwl/tl_STARindex.R index 19debfd..3c384b2 100644 --- a/Rcwl/tl_STARindex.R +++ b/Rcwl/tl_STARindex.R @@ -6,8 +6,25 @@ p4 <- InputParam(id = "runThreadN", type = "int", prefix = "--runThreadN", defau o1 <- OutputParam(id = "outIndex", type = "Directory", glob = "$(inputs.genomeDir)") -STARindex <- cwlParam(baseCommand = "STAR", - requirements = list(requireDocker("quay.io/biocontainers/star:2.7.5a--0")), +STARindex <- cwlProcess(baseCommand = "STAR", + requirements = list(requireDocker("quay.io/biocontainers/star:2.7.10a--h9ee0642_0")), arguments = list("--runMode", "genomeGenerate"), inputs = InputParamList(p1, p2, p3, p4), outputs = OutputParamList(o1)) + + +STARindex <- addMeta( + STARindex, + label = "STARindex", + doc = "Create star index", + inputLabels = c("genomeDir","genomeFastaFiles","sjdbGTFfile","runThreadN"), + inputDocs = c("path to the directory where the genome indices are stored.","one or more FASTA files with the genome reference sequences","path to the file with annotated transcripts in the standard GTF format.","defines the number of threads to be used for genome generation"), + outputLabels = c("outIndex"), + outputDocs = c("Output index file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/alexdobin/STAR", + example = paste() + ) +) diff --git a/Rcwl/tl_STARsolo.R b/Rcwl/tl_STARsolo.R index f786dfb..7a07c9f 100644 --- a/Rcwl/tl_STARsolo.R +++ b/Rcwl/tl_STARsolo.R @@ -6,23 +6,44 @@ p2 <- InputParam(id = "readFilesIn_cb", type = "File[]", position = 2, itemSepar p3 <- InputParam(id = "genomeDir", type = "Directory", prefix = "--genomeDir") p4 <- InputParam(id = "whiteList", type = "File", prefix = "--soloCBwhitelist") p5 <- InputParam(id = "soloType", type = "string", prefix = "--soloType", - default = "CB_UMI_Simple") + default = "Droplet") p6 <- InputParam(id = "soloUMIlen", type = "string", prefix = "--soloUMIlen", default = "12") -p7 <- InputParam(id = "runThreadN", type = "int", prefix = "--runThreadN", default = 1L) +p7 <- InputParam(id = "soloCellFilter", type = "string", prefix = "--soloCellFilter") +p8 <- InputParam(id = "outSAMattributes", type = "string[]", prefix = "outSAMattributes", + default = list("NH", "HI", "nM", "AS", "CR", "UR", "CB", "UB", "GX", "GN", "sS", "sQ", "sM")) +p9 <- InputParam(id = "readFilesCommand", type = "string", prefix = "--readFilesCommand", + default = "zcat") +p10 <- InputParam(id = "runThreadN", type = "int", prefix = "--runThreadN", default = 1L) -o1 <- OutputParam(id = "outAlign", type = "File", glob = "*.sam") +o1 <- OutputParam(id = "outAlign", type = "File", glob = "*.bam") o2 <- OutputParam(id = "outLog", type = "File[]", glob = "Log*") o3 <- OutputParam(id = "SJ", type = "File", glob = "SJ.out.tab") o4 <- OutputParam(id = "Solo", type = "Directory", glob = "Solo.out") -STARsolo <- cwlParam(baseCommand = "STAR", - requirements = list(requireDocker("quay.io/biocontainers/star:2.7.5a--0")), - arguments = list(## "--outSAMunmapped", "Within", - "--readFilesCommand", "zcat", - ## "--outSAMtype", "BAM", "SortedByCoordinate", - "--soloUMIfiltering", "MultiGeneUMI", - "--soloCBmatchWLtype", "1MM_multi_pseudocounts"), - inputs = InputParamList(p1, p2, p3, p4, p5, p6, p7), - outputs = OutputParamList(o1, o2, o3, o4)) +STARsolo <- cwlProcess(baseCommand = "STAR", + requirements = list(requireDocker("quay.io/biocontainers/star:2.7.10a--h9ee0642_0")), + arguments = list(## "--outSAMunmapped", "Within", + "--outSAMtype", "BAM", "SortedByCoordinate", + "--soloUMIfiltering", "MultiGeneUMI", + "--soloCBmatchWLtype", "1MM_multi_pseudocounts"), + inputs = InputParamList(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10), + outputs = OutputParamList(o1, o2, o3, o4)) + + +STARsolo <- addMeta( + STARsolo, + label = "STARsolo", + doc = "STARsolo is a turnkey solution for analyzing droplet single cell RNA sequencing data (e.g. 10X Genomics Chromium System) built directly into STAR code.", + inputLabels = c("readFilesIn_cdna","readFilesIn_cb","genomeDir","whiteList","soloType","soloUMIlen","soloCellFilter","outSAMattributes","readFilesCommand","runThreadN"), + inputDocs = c("paths to files that contain input read1 (and, if needed, read2)","specific input file(s) containing the cell barcodes","specifies path to the genome directory where genome indices where generated","The 10X Chromium whitelist file can be found inside the CellRanger distribution","type of single-cell RNA-seq","UMI length","Which cells are retained in the final output based on criteria","a string of desired SAM attributes, in the order desired for the output SAM",": command line to execute for each of the input file. This command should generate FASTA or FASTQ text and send it to stdout","number of threads to run STAR"), + outputLabels = c("outAlign","outLog","SJ","Solo"), + outputDocs = c("Alignment file","Detailed metrics on read processing, alignment quality, and filtering results.","Details splice junctions detected","Provides additional metrics related to barcode detection and UMI processing."), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/alexdobin/STAR/blob/master/docs/STARsolo.md", + example = paste() + ) +) diff --git a/Rcwl/tl_SUPPA_diffSplice.R b/Rcwl/tl_SUPPA_diffSplice.R index df844be..5f8a0e7 100644 --- a/Rcwl/tl_SUPPA_diffSplice.R +++ b/Rcwl/tl_SUPPA_diffSplice.R @@ -9,8 +9,25 @@ o1 <- OutputParam(id = "outFile", type = "File[]", glob = "$(inputs.output)*") req1 <- list(class = "DockerRequirement", dockerPull = "hubentu/suppa") SUPPA_diffSplice <- - cwlParam(baseCommand = c("python", "/opt/SUPPA/suppa.py", "diffSplice"), + cwlProcess(baseCommand = c("python", "/opt/SUPPA/suppa.py", "diffSplice"), requirements = list(req1), inputs = InputParamList(p1, p2, p3, p4, p5, p6, p7), outputs = OutputParamList(o1)) + + +SUPPA_diffSplice <- addMeta( + SUPPA_diffSplice, + label = "SUPPA_diffSplice", + doc = "tool within the SUPPA suite designed to detect differential alternative splicing events between experimental conditions using RNA-seq data.", + inputLabels = c("method","iox","psi","exp","output","gc","paired"), + inputDocs = c("Method to test significance. Required.","Input file with the event-transcripts equivalence","Path of the PSI files. PSI files and the transcript expression (TPM) files must have the same order.","Path of the transcript expression (TPM) files.Conditions files and the transcript expression (TPM) files must have the same order.","Name of the output files.","If True, SUPPA correct the p-values by gene.(Default: False).","Indicates if replicates in conditions are paired. (Default: False)."), + outputLabels = c("outFile"), + outputDocs = c("Output files of SUPPA diffsplice"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/comprna/SUPPA", + example = paste() + ) +) diff --git a/Rcwl/tl_SUPPA_generateEvents.R b/Rcwl/tl_SUPPA_generateEvents.R index c405dd0..e09a66a 100644 --- a/Rcwl/tl_SUPPA_generateEvents.R +++ b/Rcwl/tl_SUPPA_generateEvents.R @@ -10,7 +10,24 @@ req1 <- list(class = "DockerRequirement", dockerPull = "hubentu/suppa") req2 <- list(class = "ShellCommandRequirement") SUPPA_generateEvents <- - cwlParam(baseCommand = c("python", "/opt/SUPPA/suppa.py", "generateEvents"), + cwlProcess(baseCommand = c("python", "/opt/SUPPA/suppa.py", "generateEvents"), requirements = list(req1, req2), inputs = InputParamList(p1, p2, p3, p4), outputs = OutputParamList(o1, o2)) + + +SUPPA_generateEvents <- addMeta( + SUPPA_generateEvents, + label = "SUPPA_generateEvents", + doc = "identify and catalog all potential alternative splicing events in a given transcriptome based on a gene annotation file", + inputLabels = c("gtf","outfile","events","format"), + inputDocs = c("specify input file","specify output path and name without extension","list of events to analyze. (space separated) Options: SE -- Skipping Exon SS -- Alternative Splice Site (5'/3') MX -- Mutually Exclusive Exon RI -- Retained Intron FL -- Alternative First/Last Exon","Format of the annotation file. Required."), + outputLabels = c("outGTF","outIOE"), + outputDocs = c("intermediate outputs that contain filtered or reformatted versions of the input GTF file","files listing all detected alternative splicing events in the transcriptome."), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/comprna/SUPPA", + example = paste() + ) +) diff --git a/Rcwl/tl_SUPPA_multipleFieldSelection.R b/Rcwl/tl_SUPPA_multipleFieldSelection.R index d95f5cc..8b56350 100644 --- a/Rcwl/tl_SUPPA_multipleFieldSelection.R +++ b/Rcwl/tl_SUPPA_multipleFieldSelection.R @@ -7,7 +7,24 @@ o1 <- OutputParam(id = "outFile", type = "File", glob = "$(inputs.outfile)") req1 <- list(class = "DockerRequirement", dockerPull = "hubentu/suppa") SUPPA_multipleFieldSelection <- - cwlParam(baseCommand = c("python", "/opt/SUPPA/multipleFieldSelection.py"), + cwlProcess(baseCommand = c("python", "/opt/SUPPA/multipleFieldSelection.py"), requirements = list(req1), inputs = InputParamList(p1, p2, p3, p4, p5), outputs = OutputParamList(o1)) + + +SUPPA_multipleFieldSelection <- addMeta( + SUPPA_multipleFieldSelection, + label = "SUPPA_multipleFieldSelection", + doc = "Takes 1 or more fields from multiple files with a common format and at least a common field which can be used as a unique identifier.", + inputLabels = c("inputFiles","key","field","outfile","noheader"), + inputDocs = c("spaced separated list of files to join.","common field among the input files.","spaced separated list of fields to select.(starting in 1)","name of the output file.","use it if the file has no header."), + outputLabels = c("outFile"), + outputDocs = c("Feild selected output file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/comprna/SUPPA", + example = paste() + ) +) diff --git a/Rcwl/tl_SUPPA_psiPerEvent.R b/Rcwl/tl_SUPPA_psiPerEvent.R index 93f9ba6..1dba879 100644 --- a/Rcwl/tl_SUPPA_psiPerEvent.R +++ b/Rcwl/tl_SUPPA_psiPerEvent.R @@ -5,7 +5,24 @@ o1 <- OutputParam(id = "outFile", type = "File[]", glob = "$(inputs.outfile).psi req1 <- list(class = "DockerRequirement", dockerPull = "hubentu/suppa") SUPPA_psiPerEvent <- - cwlParam(baseCommand = c("python", "/opt/SUPPA/suppa.py", "psiPerEvent"), + cwlProcess(baseCommand = c("python", "/opt/SUPPA/suppa.py", "psiPerEvent"), requirements = list(req1), inputs = InputParamList(p1, p2, p3), outputs = OutputParamList(o1)) + + +SUPPA_psiPerEvent <- addMeta( + SUPPA_psiPerEvent, + label = "SUPPA_psiPerEvent", + doc = "calculates the Percent Spliced In (PSI) values for different types of alternative splicing events across multiple samples.", + inputLabels = c("ioe","exp","outfile"), + inputDocs = c("Input file with the event-transcripts equivalence (.ioe format).","Input transcript expression file.","Output psi file."), + outputLabels = c("outFile"), + outputDocs = c("file containing the PSI values for the specified splicing events across all samples."), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/comprna/SUPPA", + example = paste() + ) +) diff --git a/Rcwl/tl_SVE.R b/Rcwl/tl_SVE.R index d77a4f5..9eef14d 100644 --- a/Rcwl/tl_SVE.R +++ b/Rcwl/tl_SVE.R @@ -10,7 +10,24 @@ o1 <- OutputParam(id = "outs", type = "Directory", glob = "$(inputs.outdir)") req1 <- list(class = "DockerRequirement", dockerPull = "timothyjamesbecker/sve") -SVE <- cwlParam(baseCommand = "/software/SVE/scripts/auto.py", +SVE <- cwlProcess(baseCommand = "/software/SVE/scripts/auto.py", requirements = list(req1), inputs = InputParamList(p1, p2, p3, p4), outputs = OutputParamList(o1)) + + +SVE <- addMeta( + SVE, + label = "SVE", + doc = "Given a .fa reference file and a pair: NA12878_1.fq.gz,NA12878_2.fq.gz,produce a FusorSV VCF file all_samples_merge.vcf with comprehensive merged SV calls using a fusion model.", + inputLabels = c("fqs","ref","outdir","threads"), + inputDocs = c("comma-sep file path list","fasta reference path (if indexes are not found, run (A))","output directory to store resulting files","number of threads per CPU"), + outputLabels = c("outs"), + outputDocs = c("SVE output directory"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/timothyjamesbecker/SVE", + example = paste() + ) +) diff --git a/Rcwl/tl_SVE_VP.R b/Rcwl/tl_SVE_VP.R index c016c06..69c6a21 100644 --- a/Rcwl/tl_SVE_VP.R +++ b/Rcwl/tl_SVE_VP.R @@ -10,7 +10,24 @@ o1 <- OutputParam(id = "outs", type = "Directory", glob = "$(inputs.outdir)") req1 <- list(class = "DockerRequirement", dockerPull = "timothyjamesbecker/sve") -SVE_VP <- cwlParam(baseCommand = "/software/SVE/scripts/variant_processor.py", +SVE_VP <- cwlProcess(baseCommand = "/software/SVE/scripts/variant_processor.py", requirements = list(req1), inputs = InputParamList(p1, p2, p3, p4), outputs = OutputParamList(o1)) + + +SVE_VP <- addMeta( + SVE_VP, + label = "SVE_VP", + doc = "Shortened Version of the SVE that uses pre-made .bam files Allthough .bam files are not compatible with all callers such as Variation Hunter", + inputLabels = c("bam","ref","outdir","tools"), + inputDocs = c("BAM comma-sep bam file path list, assuming matching bam.bai is in place","Reference file","output directory to store resulting files","stage name list"), + outputLabels = c("outs"), + outputDocs = c("SVE VP directory"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/timothyjamesbecker/SVE", + example = paste() + ) +) diff --git a/Rcwl/tl_SamToFastq.R b/Rcwl/tl_SamToFastq.R index 7b0238a..ad19584 100644 --- a/Rcwl/tl_SamToFastq.R +++ b/Rcwl/tl_SamToFastq.R @@ -7,8 +7,25 @@ o2 <- OutputParam(id = "FQ2", type = "File", glob = "$(inputs.fq2)") req1 <- list(class = "DockerRequirement", dockerPull = "quay.io/biocontainers/picard:2.21.1--0") -SamToFastq <- cwlParam(baseCommand = c("picard", +SamToFastq <- cwlProcess(baseCommand = c("picard", "SamToFastq"), requirements = list(req1), inputs = InputParamList(p1, p2, p3), outputs = OutputParamList(o1, o2)) + + +SamToFastq <- addMeta( + SamToFastq, + label = "SamToFastq", + doc = "Converts a SAM or BAM file to FASTQ.", + inputLabels = c("bam","fq1","fq2"), + inputDocs = c("Input SAM/BAM file to extract reads from Required.","Output FASTQ file1 (single-end fastq or, if paired, first end of the pair FASTQ). Required. Cannot be used in conjuction with option(s) OUTPUT_DIR (ODIR) COMPRESS_OUTPUTS_PER_RG (GZOPRG) OUTPUT_PER_RG (OPRG)","Output FASTQ file2 (single-end fastq or, if paired, first end of the pair FASTQ). Required. Cannot be used in conjuction with option(s) OUTPUT_DIR (ODIR) COMPRESS_OUTPUTS_PER_RG (GZOPRG) OUTPUT_PER_RG (OPRG)"), + outputLabels = c("FQ1","FQ2"), + outputDocs = c("Fastq1","Fastq2"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/broadinstitute/picard", + example = paste() + ) +) diff --git a/Rcwl/tl_SomaticSeq_Wrapper.R b/Rcwl/tl_SomaticSeq_Wrapper.R index 6816d92..408282a 100644 --- a/Rcwl/tl_SomaticSeq_Wrapper.R +++ b/Rcwl/tl_SomaticSeq_Wrapper.R @@ -1,7 +1,7 @@ p1 <- InputParam(id = "ref", type = "File", prefix = "--genome-reference", - secondaryFiles = c(".fai", "$(self.nameroot).dict")) + secondaryFiles = c(".fai", "^.dict")) p2 <- InputParam(id = "tbam", type = "File", prefix = "--tumor-bam", secondaryFile = ".bai") p3 <- InputParam(id = "nbam", type = "File", prefix = "--normal-bam", @@ -18,7 +18,8 @@ p12 <- InputParam(id = "lofreqSnv", type = "File?", prefix = "--lofreq-snv") p13 <- InputParam(id = "lofreqIndel", type = "File?", prefix = "--lofreq-indel") p14 <- InputParam(id = "region", type = "File?", prefix = "--inclusion-region") p15 <- InputParam(id = "dbsnp", type = "File", - prefix = "--dbsnp", secondaryFiles = ".tbi") + prefix = "--dbsnp", + secondaryFiles = "$(self.nameext == '.gz' ? self.basename+'.tbi' : self.basename+'.idx')") o1 <- OutputParam(id = "conSNV", type = "File", glob = "Consensus.sSNV.vcf") o2 <- OutputParam(id = "conINDEL", type = "File", glob = "Consensus.sINDEL.vcf") o3 <- OutputParam(id = "EnsSNV", type = "File", glob = "Ensemble.sSNV.tsv") @@ -26,10 +27,27 @@ o4 <- OutputParam(id = "EnsINDEL", type = "File", glob = "Ensemble.sINDEL.tsv") req1 <- list(class = "DockerRequirement", dockerPull = "lethalfang/somaticseq:2.7.2") -SomaticSeq_Wrapper <- cwlParam(baseCommand = "/opt/somaticseq/SomaticSeq.Wrapper.sh", +SomaticSeq_Wrapper <- cwlProcess(baseCommand = "/opt/somaticseq/SomaticSeq.Wrapper.sh", requirements = list(req1), arguments = list("--output-dir", ".", "--gatk", "/opt/GATK/GenomeAnalysisTK.jar"), inputs = InputParamList(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15), outputs = OutputParamList(o1, o2, o3, o4)) + + +SomaticSeq_Wrapper <- addMeta( + SomaticSeq_Wrapper, + label = "SomaticSeq_Wrapper", + doc = "Simplify the execution and management of the SomaticSeq pipeline by handling the various steps involved in somatic mutation detection.", + inputLabels = c("ref","tbam","nbam","mutect2","varscanSnv","varscanIndel","sniper","vardict","muse","strelkaSnv","strelkaIndel","lofreqSnv","lofreqIndel","region","dbsnp"), + inputDocs = c("Reference file","Tumar bam file","Matched Normal bam file","Mutec2 file","Varscan snv file","Varscan indel file","Integration of the SomaticSniper tool into the SomaticSeq workflow","Integration of the VarDict tool into the SomaticSeq workflow","Integration of the MuSE tool into the SomaticSeq workflow","Strelka snv file","Strelka indel file","Lofreq SNV file","Lofreq Indel file","Region to include","Known variant information from dbSNP"), + outputLabels = c("conSNV","conINDEL","EnsSNV","EnsINDEL"), + outputDocs = c("Consensus sSNV output","Consensus sIndel output","Ensemble sSNV output","Ensemble sIndel output"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/bioinform/somaticseq", + example = paste() + ) +) diff --git a/Rcwl/tl_SomaticSniper.R b/Rcwl/tl_SomaticSniper.R index 72b344f..b2af624 100644 --- a/Rcwl/tl_SomaticSniper.R +++ b/Rcwl/tl_SomaticSniper.R @@ -7,8 +7,25 @@ o1 <- OutputParam(id = "outVcf", type = "File", glob = "$(inputs.vcf)") req1 <- list(class = "DockerRequirement", dockerPull = "lethalfang/somaticsniper:1.0.5.0-2") -SomaticSniper <- cwlParam(baseCommand = "/opt/somatic-sniper/build/bin/bam-somaticsniper", +SomaticSniper <- cwlProcess(baseCommand = "/opt/somatic-sniper/build/bin/bam-somaticsniper", requirements = list(req1), arguments = list("-q", "10", "-F", "vcf"), inputs = InputParamList(p1, p2 , p3, p4), outputs = OutputParamList(o1)) + + +SomaticSniper <- addMeta( + SomaticSniper, + label = "SomaticSniper", + doc = "Identify single nucleotide positions that are different between tumor and normal (or in theory, any two bam files).", + inputLabels = c("ref","tbam","nbam","vcf"), + inputDocs = c("reference sequence in the FASTA format","Tumer bam file","Normal bam file","Name of vcf file"), + outputLabels = c("outVcf"), + outputDocs = c("Output VCF file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/genome/somatic-sniper", + example = paste() + ) +) diff --git a/Rcwl/tl_SortVcf.R b/Rcwl/tl_SortVcf.R index 2bfd9ee..b40307b 100644 --- a/Rcwl/tl_SortVcf.R +++ b/Rcwl/tl_SortVcf.R @@ -6,8 +6,25 @@ o1 <- OutputParam(id = "oVcf", type = "File", glob = "$(inputs.ovcf)") req1 <- list(class = "DockerRequirement", dockerPull = "broadinstitute/picard") -SortVcf <- cwlParam(baseCommand = c("java", "-jar", "/usr/picard/picard.jar", +SortVcf <- cwlProcess(baseCommand = c("java", "-jar", "/usr/picard/picard.jar", "SortVcf"), requirements = list(req1), inputs = InputParamList(p1, p2, p3), outputs = OutputParamList(o1)) + + +SortVcf <- addMeta( + SortVcf, + label = "SortVcf", + doc = "Sorts one or more VCF files. This tool sorts the records in VCF files according to the order of the contigs in the header/sequence dictionary and then by coordinate.", + inputLabels = c("vcf","ovcf","dict"), + inputDocs = c("Input VCF(s) to be sorted. Multiple inputs must have the same sample names (in order) This argument must be specified at least once. Required.","Output VCF to be written. Required.","Sequence directory"), + outputLabels = c("oVcf"), + outputDocs = c("Sorted vcf file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/broadinstitute/picard", + example = paste() + ) +) diff --git a/Rcwl/tl_TPMCalculator.R b/Rcwl/tl_TPMCalculator.R new file mode 100644 index 0000000..0580953 --- /dev/null +++ b/Rcwl/tl_TPMCalculator.R @@ -0,0 +1,29 @@ +p1 <- InputParam(id = "bam", type = "File", prefix = "-b") +p2 <- InputParam(id = "gtf", type = "File", prefix = "-g") +p3 <- InputParam(id = "paired", type = "boolean?", prefix = "-p", default = TRUE) +p4 <- InputParam(id = "all", type = "boolean?", prefix = "-a", default = TRUE) +o1 <- OutputParam(id = "out", type = "File[]", glob = "*.out") +o2 <- OutputParam(id = "ent", type = "File[]?", glob = "*.ent") +o3 <- OutputParam(id = "uni", type = "File[]?", glob = "*.uni") +req1 <- requireDocker(searchContainer("tpmcalculator")$container[1]) +TPMCalculator <- cwlProcess(baseCommand = "TPMCalculator", + requirements = list(req1), + inputs = InputParamList(p1, p2, p3, p4), + outputs = OutputParamList(o1, o2, o3)) + + +TPMCalculator <- addMeta( + TPMCalculator, + label = "TPMCalculator", + doc = "Quantifying gene expression levels from RNA sequencing (RNA-seq) data.", + inputLabels = c("bam","gtf","paired","all"), + inputDocs = c("Input bam file","GTF file","Use only properly paired reads. Default: No. Recommended for paired-end reads.","Print out all features with read counts equal to zero. Default: No."), + outputLabels = c("out","ent","uni"), + outputDocs = c("The main output file that contains the calculated TPM (Transcripts Per Million) and FPKM (Fragments Per Kilobase of transcript per Million mapped reads) values for each gene or transcript.","This file provides additional details or metadata about the genes or transcripts included in the analysis.","This file contains information about uniquely mapped reads to genes or transcripts."), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/ncbi/TPMCalculator", + example = paste() + ) +) diff --git a/Rcwl/tl_VarDict.R b/Rcwl/tl_VarDict.R index 6fe3c14..cee74d7 100644 --- a/Rcwl/tl_VarDict.R +++ b/Rcwl/tl_VarDict.R @@ -5,31 +5,50 @@ p1 <- InputParam(id = "tbam", type = "File", p2 <- InputParam(id = "nbam", type = "File", secondaryFiles = ".bai", position = -1) p3 <- InputParam(id = "ref", type = "File", prefix = "-G", - secondaryFiles = ".fai", position = 1) -p4 <- InputParam(id = "region", type = "File") -p5 <- InputParam(id = "af", type = "float", default = 0.05, position = -1) + secondaryFiles = ".fai", position = 2) +p4 <- InputParam(id = "region", type = "File", position = 1) +p5 <- InputParam(id = "af", type = "string", default = "0.01", position = -1) p6 <- InputParam(id = "vcf", type = "string", position = -1) -o1 <- OutputParam(id = "outVcf", type = "stdout") +p7 <- InputParam(id = "threads", type = "int", position = 4, + prefix = "-th", default = 1L) +o1 <- OutputParam(id = "outVcf", type = "File", glob = "$(inputs.vcf)") req1 <- list(class = "DockerRequirement", - dockerPull = "lethalfang/vardictjava:1.5.1") + dockerPull = "quay.io/biocontainers/vardict-java:1.8.2--hdfd78af_1") req2 <- list(class = "ShellCommandRequirement") -VarDict <- cwlParam(baseCommand = c("/opt/VarDict-1.5.1/bin/VarDict"), +VarDict <- cwlProcess(baseCommand = c("vardict-java"), requirements = list(req1, req2), arguments = list( - list(valueFrom = "-b", position = 2L), - list(valueFrom = "$(inputs.tbam.path)|$(inputs.nbam.path)", position = 3L), - list(valueFrom = "-f", position = 4L), - list(valueFrom = "$(inputs.af)", position = 5L), + list(valueFrom = "-b", position = 5L), + list(valueFrom = "$(inputs.tbam.path)|$(inputs.nbam.path)", position = 6L), + list(valueFrom = "-f", position = 7L), + list(valueFrom = "$(inputs.af)", position = 8L), "-c", "1", "-S", "2", "-E", "3", "-g", "4", - list(valueFrom = " | ", position = 6L), - list(valueFrom = "/opt/VarDict/testsomatic.R", position = 7L), - list(valueFrom = " | ", position = 8L), - list(valueFrom = "/opt/VarDict/var2vcf_paired.pl", position = 9L), - list(valueFrom = "-N", position = 10L), - list(valueFrom = "TUMOR|NORMAL", position = 11L), - list(valueFrom = "-f", position = 12L), - list(valueFrom = "$(inputs.af)", position = 13L) + list(valueFrom = " | ", position = 9L, shellQuote = FALSE), + list(valueFrom = "testsomatic.R", position = 10L), + list(valueFrom = " | ", position = 11L, shellQuote = FALSE), + list(valueFrom = "var2vcf_paired.pl", position = 12L), + list(valueFrom = "-N", position = 13L), + list(valueFrom = "TUMOR|NORMAL", position = 14L), + list(valueFrom = "-f", position = 15L), + list(valueFrom = "$(inputs.af)", position = 16L) ), - inputs = InputParamList(p1, p2, p3, p4, p5, p6), + inputs = InputParamList(p1, p2, p3, p4, p5, p6, p7), outputs = OutputParamList(o1), stdout = "$(inputs.vcf)") + + +VarDict <- addMeta( + VarDict, + label = "VarDict", + doc = "VarDict is a variant calling program for SNV, MNV, indels (<50 bp), and complex variants. It accepts any BAM format, either from DNA-seq or RNA-seq.", + inputLabels = c("tbam","nbam","ref","region","af","vcf","threads"), + inputDocs = c("Tumor bam file","Normal bam file","The reference fasta.","The region of interest.","The minimum allele frequency threshold for reporting variants.","The name of the VCF (Variant Call Format) file that will contain the output variants detected by VarDict.","The number of CPU threads to use for parallel processing."), + outputLabels = c("outVcf"), + outputDocs = c("Output vcf file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/AstraZeneca-NGS/VarDictJava", + example = paste() + ) +) diff --git a/Rcwl/tl_VarScan2.R b/Rcwl/tl_VarScan2.R index f71b6c6..647abd0 100644 --- a/Rcwl/tl_VarScan2.R +++ b/Rcwl/tl_VarScan2.R @@ -13,8 +13,25 @@ o2 <- OutputParam(id = "somVcf", type = "File", glob = "$(inputs.somvcf)") req1 <- list(class = "DockerRequirement", dockerPull = "serge2016/varscan:v0.1.1") -VarScan2 <- cwlParam(baseCommand = "", +VarScan2 <- cwlProcess(baseCommand = "", requirements = list(req1), arguments = list("-o", "."), inputs = InputParamList(p1, p2, p3, p4, p5, p6), outputs = OutputParamList(o1, o2)) + + +VarScan2 <- addMeta( + VarScan2, + label = "VarScan2", + doc = "Variant calling and somatic mutation/CNV detection for next-generation sequencing data", + inputLabels = c("nbam","tbam","ref","allvcf","somvcf","proc"), + inputDocs = c("normal-exome-BAM","tumor-exome-BAM","refGenomeFile - a full filename of UNPACKED reference genome .fasta file [].fasta.fai file is expected to be in the same directory.When provided together with -a, then downloaded file will be saved as -b.","File name of an output copy of a VCF-file with all (SNPs + InDels; Somatic + Germline + LOH) filtered mutations By default it is + '/' + + '.all.hc.fp-filtered.SV-filtered.vcf'. If it is specified then the default output file is copied (with mkdir -p).","File name of an output copy of a file with only Somatic (SNPs + InDels; Somatic) filtered mutations By default it is + '/' + + '.all.hc.fp-filtered.SV-filtered.Somatic.vcf'.If it is specified then the default output file is copied (with mkdir -p).","Number of CPUs to use [2] If not provided, script will try to use all existing (nproc).For competability with Universe CWL: 0 - use all existing (nproc) (same as the absence of this option, default)."), + outputLabels = c("allVcf","somVcf"), + outputDocs = c("All Variant file","Somantic Variant file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/dkoboldt/varscan", + example = paste() + ) +) diff --git a/Rcwl/tl_VarScan2_processSomatic.R b/Rcwl/tl_VarScan2_processSomatic.R index 40a4ffe..5087ca9 100644 --- a/Rcwl/tl_VarScan2_processSomatic.R +++ b/Rcwl/tl_VarScan2_processSomatic.R @@ -18,9 +18,26 @@ req1 <- list(class = "DockerRequirement", req2 <- list(class = "InitialWorkDirRequirement", listing = list("$(inputs.vcf)")) -VarScan2_processSomatic <- cwlParam(baseCommand = c("java", "-jar", +VarScan2_processSomatic <- cwlProcess(baseCommand = c("java", "-jar", "/opt/varscan/VarScan.jar", "processSomatic"), requirements = list(req1, req2), inputs = InputParamList(p1), outputs = OutputParamList(o1, o2, o3, o4, o5, o6)) + + +VarScan2_processSomatic <- addMeta( + VarScan2_processSomatic, + label = "VarScan2_processSomatic", + doc = "processes the output from the VarScan2 somatic command.", + inputLabels = c("vcf"), + inputDocs = c("Somantic vcf file"), + outputLabels = c("somaticHC","somatic","germline","germlineHC","LOH","LOHHC"), + outputDocs = c("High-confidence somatic variants; a reliable set for downstream analysis.","All detected somatic variants, including lower-confidence variants.","Variants identified as germline mutations, present in both tumor and normal samples.","High-confidence germline variants, passing all stringent criteria.","Contains all detected LOH events, including both high- and lower-confidence calls.","Contains only high-confidence LOH events, which are more likely to be accurate and are filtered based on stringent criteria."), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "http://varscan.sourceforge.net", + example = paste() + ) +) diff --git a/Rcwl/tl_VarScan2_somatic.R b/Rcwl/tl_VarScan2_somatic.R index 56b14ff..295a2b1 100644 --- a/Rcwl/tl_VarScan2_somatic.R +++ b/Rcwl/tl_VarScan2_somatic.R @@ -10,8 +10,25 @@ o2 <- OutputParam(id = "indel", type = "File", glob = "$(inputs.bname).indel.vcf req1 <- list(class = "DockerRequirement", dockerPull = "mgibio/varscan-cwl:v2.4.2-samtools1.3.1") -VarScan2_somatic <- cwlParam(baseCommand = c("java", "-jar", +VarScan2_somatic <- cwlProcess(baseCommand = c("java", "-jar", "/opt/varscan/VarScan.jar", "somatic"), requirements = list(req1), inputs = InputParamList(p1, p2, p3, p4), outputs = OutputParamList(o1, o2)) + + +VarScan2_somatic <- addMeta( + VarScan2_somatic, + label = "VarScan2_somatic", + doc = "VarScan2 tool designed for detecting somatic variants in paired tumor-normal samples from high-throughput sequencing data.", + inputLabels = c("npileup","tpileup","bname","vcfout"), + inputDocs = c("Normal sample pileup file used to establish a baseline for somatic variant calling.","Tumor sample pileup file used to identify somatic mutations.","Base name for output files, serving as a prefix for naming all output files generated by VarScan2.","Option to enable or disable VCF format output (set to 1 to output in VCF format)."), + outputLabels = c("snp","indel"), + outputDocs = c("A single nucleotide polymorphism (SNP), also known as a single nucleotide variant (SNV), is a genetic variant that involves a change of a single nucleotide base in the DNA sequence.","indel is a term used to refer to either an insertion or deletion of one or more bases in the DNA sequence."), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "http://varscan.sourceforge.net", + example = paste() + ) +) diff --git a/Rcwl/tl_VarScan2_somaticFilter.R b/Rcwl/tl_VarScan2_somaticFilter.R index ff7ba00..c1f9c86 100644 --- a/Rcwl/tl_VarScan2_somaticFilter.R +++ b/Rcwl/tl_VarScan2_somaticFilter.R @@ -5,8 +5,25 @@ p3 <- InputParam(id = "outvcf", type = "string", prefix = "--output-file", posit o1 <- OutputParam(id = "outVcf", type = "File", glob = "$(inputs.outvcf)") req1 <- list(class = "DockerRequirement", dockerPull = "mgibio/varscan-cwl:v2.4.2-samtools1.3.1") -VarScan2_somaticFilter <- cwlParam(baseCommand = c("java", "-jar", +VarScan2_somaticFilter <- cwlProcess(baseCommand = c("java", "-jar", "/opt/varscan/VarScan.jar", "somaticFilter"), requirements = list(req1), inputs = InputParamList(p1, p2, p3), outputs = OutputParamList(o1)) + + +VarScan2_somaticFilter <- addMeta( + VarScan2_somaticFilter, + label = "VarScan2_somaticFilter", + doc = "toolkit designed to apply additional filters to the somatic variant calls identified by VarScan2 somatic.", + inputLabels = c("vcf","indel","outvcf"), + inputDocs = c("Input Somantic VCF file","File of indels for filtering nearby SNPs","Optional output file for filtered variants"), + outputLabels = c("outVcf"), + outputDocs = c("FIltered vfc file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "http://varscan.sourceforge.net", + example = paste() + ) +) diff --git a/Rcwl/tl_annovar.R b/Rcwl/tl_annovar.R index b6a6a2b..78ca9a9 100644 --- a/Rcwl/tl_annovar.R +++ b/Rcwl/tl_annovar.R @@ -1,4 +1,3 @@ - p1 <- InputParam(id = "vcf", type = "File", position = 1) p2 <- InputParam(id = "db", type = "Directory", position = 2) p3 <- InputParam(id = "build", type = "string", prefix = "-buildver", default = "hg19") @@ -17,8 +16,27 @@ req1 <- list(class = "InlineJavascriptRequirement") req2 <- list(class = "DockerRequirement", dockerPull = "bioinfochrustrasbourg/annovar") -annovar <- cwlParam(baseCommand = "table_annovar.pl", +annovar <- cwlProcess(baseCommand = "table_annovar.pl", requirements = list(req1, req2), arguments = list("-vcfinput"), inputs = InputParamList(p1, p2, p3, p4, p5, p6, p7), outputs = OutputParamList(o1)) + + + + +annovar <- addMeta( + annovar, + label = "annovar", + doc = "ANNOVAR is an efficient software tool to utilize update-to-date information to functionally annotate genetic variants detected from diverse genomes", + inputLabels = c("vcf","db","build","aout","protocol","operation","nastring"), + inputDocs = c("Query vcf File for the annovar tool to annotate","location of the database used to annotate the file","genome build version (default: hg18)","output file name prefix","comma-delimited string specifying database protocol","comma-delimited string specifying type of operation","string to display when a score is not available (default: null)"), + outputLabels = c("Aout"), + outputDocs = c("The annotated file generated by annovar"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://annovar.openbioinformatics.org/en/latest/", + example = paste() + ) +) diff --git a/Rcwl/tl_arcasHLA_extract.R b/Rcwl/tl_arcasHLA_extract.R new file mode 100644 index 0000000..46bef2e --- /dev/null +++ b/Rcwl/tl_arcasHLA_extract.R @@ -0,0 +1,26 @@ +p1 <- InputParam(id = "bam", type = "File", position = 1L, secondaryFiles = ".bai") +p2 <- InputParam(id = "threads", type = "int", prefix = "-t", default=4L) +o1 <- OutputParam(id = "fqs", type = "File[]", glob = "*.fq.gz") +req1 <- requireDocker("hubentu/arcas-hla") +arcasHLA_extract <- cwlProcess(baseCommand = c("arcasHLA", "extract"), + arguments = list("-o", ".", "-v"), + requirements = list(req1), + inputs = InputParamList(p1, p2), + outputs = OutputParamList(o1)) + + +arcasHLA_extract <- addMeta( + arcasHLA_extract, + label = "arcasHLA_extract", + doc = "arcasHLA extract takes sorted BAM files and extracts chromosome 6 reads and related HLA sequences. If the BAM file is not indexed, this tool will run samtools index before extracting reads", + inputLabels = c("bam","threads"), + inputDocs = c("Input Bam file","No. of threads"), + outputLabels = c("fqs"), + outputDocs = c("paired FASTQ files; use the --single flag for single-end samples"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/RabadanLab/arcasHLA", + example = paste() + ) +) diff --git a/Rcwl/tl_arcasHLA_genotype.R b/Rcwl/tl_arcasHLA_genotype.R new file mode 100644 index 0000000..6f8086e --- /dev/null +++ b/Rcwl/tl_arcasHLA_genotype.R @@ -0,0 +1,30 @@ +p1 <- InputParam(id = "fqs", type = "File[]", position = 1L) +p2 <- InputParam(id = "gene", type = "string", prefix = "-g", + default = "A,B,C,DPB1,DQB1,DQA1,DRB1") +p3 <- InputParam(id = "threads", type = "int", prefix = "-t") +o1 <- OutputParam(id = "genotype", type = "File", glob = "*.genotype.json") +o2 <- OutputParam(id = "align", type = "File", glob = "*.alignment.p") +o3 <- OutputParam(id = "gjs", type = "File", glob = "*.genes.json") +req1 <- requireDocker("hubentu/arcas-hla") +arcasHLA_genotype <- cwlProcess(baseCommand = c("arcasHLA", "genotype"), + arguments = list("-o", ".", "-v"), + requirements = list(req1), + inputs = InputParamList(p1, p2, p3), + outputs = OutputParamList(o1, o2, o3)) + + +arcasHLA_genotype <- addMeta( + arcasHLA_genotype, + label = "arcasHLA_genotype", + doc = "arcasHLA genotype predicts the most likely genotype (no partial alleles), input the FASTQs produced by extract or the original FASTQs with all reads (experimental - use with caution).", + inputLabels = c("fqs","gene","threads"), + inputDocs = c("list of fastq files (e.g. sample.extracted.fq.gz) or alignment file (sample.alignment.p)","comma separated list of HLA genes ,default: all,options: A, B, C, DMA, DMB, DOA, DOB, DPA1, DPB1, DQA1,DQB1, DRA, DRB1, DRB3, DRB5, E, F, G, H, J, K, L","No. of threads"), + outputLabels = c("genotype","align","gjs"), + outputDocs = c("most likely genotype","pseudoalignment of the extracted reads with Kallisto","quantified allele abundances"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/RabadanLab/arcasHLA", + example = paste() + ) +) diff --git a/Rcwl/tl_arcasHLA_partial.R b/Rcwl/tl_arcasHLA_partial.R new file mode 100644 index 0000000..a963013 --- /dev/null +++ b/Rcwl/tl_arcasHLA_partial.R @@ -0,0 +1,31 @@ +p1 <- InputParam(id = "fqs", type = "File[]", position = 1L) +p2 <- InputParam(id = "gene", type = "string", prefix = "-g", + default = "A,B,C,DPB1,DQB1,DQA1,DRB1") +p3 <- InputParam(id = "threads", type = "int", prefix = "-t") +p4 <- InputParam(id = "genotype", type = "File", prefix = "-G") +o1 <- OutputParam(id = "pg", type = "File", glob = "*.partial_genotype.json") +o2 <- OutputParam(id = "align", type = "File", glob = "*.partial_alignment.p") +req1 <- requireDocker("hubentu/arcas-hla") +arcasHLA_partial <- cwlProcess(baseCommand = c("arcasHLA", "partial"), + arguments = list("-o", ".", "-v"), + requirements = list(req1), + inputs = InputParamList(p1, p2, p3, p4), + outputs = OutputParamList(o1, o2)) + + + +arcasHLA_partial <- addMeta( + arcasHLA_partial, + label = "arcasHLA_partial", + doc = "arcasHLA_partial alignes reads to a reference containing partial alleles. Possible partial alleles are selected and compared with the complete genotype", + inputLabels = c("fqs","gene","threads","genotype"), + inputDocs = c("list of fastq files or '.partial.json' file","comma separated list of HLA genes ,default: all,options: A, B, C, DMA, DMB, DOA, DOB, DPA1, DPB1, DQA1,DQB1, DRA, DRB1, DRB3, DRB5, E, F, G, H, J, K, L","THREADS","genotype.json file from arcasHLA genotype"), + outputLabels = c("pg","align"), + outputDocs = c("partially typed genotype","Aligned reads to reference containing partial alleles"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/RabadanLab/arcasHLA", + example = paste() + ) +) diff --git a/Rcwl/tl_arriba.R b/Rcwl/tl_arriba.R new file mode 100644 index 0000000..038ccb8 --- /dev/null +++ b/Rcwl/tl_arriba.R @@ -0,0 +1,34 @@ +## https://github.com/suhrig/arriba +p1 <- InputParam(id = "align", type = "File", prefix = "-x") +p2 <- InputParam(id = "out", type = "string", prefix = "-o") +p3 <- InputParam(id = "dout", type = "string", prefix = "-O") +p4 <- InputParam(id = "genome", type = "File", prefix = "-a", secondaryFiles = ".fai") +p5 <- InputParam(id = "gtf", type = "File", prefix = "-g") +p6 <- InputParam(id = "blacklist", type = "File", prefix = "-b") +p7 <- InputParam(id = "known", type = "File", prefix = "-k") +p8 <- InputParam(id = "tag", type = "File", prefix = "-t") +p9 <- InputParam(id = "protein", type = "File", prefix = "-p") +o1 <- OutputParam(id = "fout", type = "File", glob = "$(inputs.out)") +o2 <- OutputParam(id = "fOut", type = "File", glob = "$(inputs.dout)" ) +req1 <- requireDocker(searchContainer("arriba")$container[1]) +arriba <- cwlProcess(baseCommand = "arriba", + requirements = list(req1), + inputs = InputParamList(p1, p2, p3, p4, p5, p6, p7, p8, p9), + outputs = OutputParamList(o1, o2)) + + +arriba <- addMeta( + arriba, + label = "arriba", + doc = "Arriba is a fast tool to search for aberrant transcripts such as gene fusions. It is based on chimeric alignments found by the STAR RNA-Seq aligner.", + inputLabels = c("align","out","dout","genome","gtf","blacklist","known","tag","protein"), + inputDocs = c("File in SAM/BAM/CRAM format with main alignments as generated by STAR (Aligned.out.sam). Arriba extracts candidate reads from this file.","Name of output file with fusions that have passed all filters.","Name of output file with fusions that were discarded due to filtering.","FastA file with genome sequence (assembly). The file may be gzip-compressed. An index with the file extension .fai must exist only if CRAM files are processed.","GTF file with gene annotation. The file may be gzip-compressed.","File containing blacklisted events (recurrent artifacts and transcripts observed in healthy tissue).","File containing known/recurrent fusions. Some cancer entities are often characterized by fusions between the same pair of genes. In order to boost sensitivity, a list of known fusions can be supplied using this parameter. The list must contain two columns with the names of the fused genes, separated by tabs.","File containing list of user-defined tags","Protein domain annotation File"), + outputLabels = c("fout","fOut"), + outputDocs = c("Output file with fusions that have passed all filters.","Output file with fusions that were discarded due to filtering."), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/suhrig/arriba", + example = paste() + ) +) diff --git a/Rcwl/tl_awk_merge.R b/Rcwl/tl_awk_merge.R index 92ce915..43fa0e9 100644 --- a/Rcwl/tl_awk_merge.R +++ b/Rcwl/tl_awk_merge.R @@ -2,8 +2,25 @@ p1 <- InputParam(id = "files", type = "File[]") p2 <- InputParam(id = "outfile", type = "string", default = "merged.txt", position = -1) o1 <- OutputParam(id = "out", type = "File", glob = "$(inputs.outfile)") -awk_merge <- cwlParam(baseCommand = "awk", +awk_merge <- cwlProcess(baseCommand = "awk", arguments = list("FNR==1 && NR!=1 { while (/^
/) getline; } 1 {print}"), inputs = InputParamList(p1, p2), outputs = OutputParamList(o1), stdout = "$(inputs.outfile)") + + +awk_merge <- addMeta( + awk_merge, + label = "awk_merge", + doc = "Takes multiple input files and merges them into a single output file", + inputLabels = c("files","outfile"), + inputDocs = c("Array of files to be merged","Name of the merged output file"), + outputLabels = c("out"), + outputDocs = c("Merged output file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "NA", + example = paste() + ) +) diff --git a/Rcwl/tl_bam2seqz.R b/Rcwl/tl_bam2seqz.R new file mode 100644 index 0000000..4ee0fc0 --- /dev/null +++ b/Rcwl/tl_bam2seqz.R @@ -0,0 +1,28 @@ +p1 <- InputParam(id = "normal", type = "File", prefix = "-n", secondaryFiles = ".bai") +p2 <- InputParam(id = "tumor", type = "File", prefix = "-t", secondaryFiles = ".bai") +p3 <- InputParam(id = "ref", type = "File", prefix = "--fasta", secondaryFiles = ".fai") +p4 <- InputParam(id = "gc", type = "File", prefix = "-gc") +p5 <- InputParam(id = "out", type = "string", prefix = "-o") +o1 <- OutputParam(id = "seqz", type = "File", glob = "$(inputs.out)") +r1 <- requireDocker("quay.io/biocontainers/sequenza-utils:3.0.0--py39h67e14b5_5") +bam2seqz <- cwlProcess(baseCommand = c("sequenza-utils", "bam2seqz"), + requirements = list(r1), + inputs = InputParamList(p1, p2, p3, p4, p5), + outputs = OutputParamList(o1)) + + +bam2seqz <- addMeta( + bam2seqz, + label = "bam2seqz", + doc = "Process a paired set of BAM/pileup files (tumor and matching normal), and GC-content genome-wide information, to extract the common positions with A and B alleles frequencies", + inputLabels = c("normal","tumor","ref","gc","out"), + inputDocs = c("Name of the BAM/pileup file from the reference/normal sample","Name of the BAM/pileup file from the tumor sample","The reference FASTA file used to generate the intermediate pileup. Required when input are BAM","The GC-content wiggle file","Name of the output file. To use gzip compression name the file ending in .gz. Default STDOUT."), + outputLabels = c("seqz"), + outputDocs = c("Seqz output file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/Yunuuuu/sequenza", + example = paste() + ) +) diff --git a/Rcwl/tl_bamCoverage.R b/Rcwl/tl_bamCoverage.R index 46bec49..6f6562f 100644 --- a/Rcwl/tl_bamCoverage.R +++ b/Rcwl/tl_bamCoverage.R @@ -11,9 +11,26 @@ p5 <- InputParam(id = "outFormat", type = "string", o1 <- OutputParam(id = "bigwig", type = "File", glob = "$(inputs.bw)") req1 <- list(class = "DockerRequirement", dockerPull = "quay.io/biocontainers/deeptools:3.4.3--py_0") -bamCoverage <- cwlParam(baseCommand = "bamCoverage", +bamCoverage <- cwlProcess(baseCommand = "bamCoverage", requirements = list(req1), arguments = list("--ignoreDuplicates", "--skipNonCoveredRegions"), inputs = InputParamList(p1, p2, p3, p4, p5), outputs = OutputParamList(o1)) + + +bamCoverage <- addMeta( + bamCoverage, + label = "bamCoverage", + doc = "This tool takes an alignment of reads or fragments as input (BAM file) and generates a coverage track (bigWig or bedGraph) as output.", + inputLabels = c("bam","outFile","binsize","processors","outFormat"), + inputDocs = c("BAM file to process (default: None)","Output file name. (default: None)","Size of the bins, in bases, for the output of the bigwig/bedgraph file. (Default: 50)","Number of processors to use. Type 'max/2' to use half the maximum number of processors or 'max' to use all available processors. (Default: 1)","{bigwig,bedgraph}, -of {bigwig,bedgraph} Output file type. Either 'bigwig' or 'bedgraph'.(default: bigwig)"), + outputLabels = c("bigwig"), + outputDocs = c("Proccesed bigwig file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/gartician/deepTools-bamCoverage", + example = paste() + ) +) diff --git a/Rcwl/tl_bam_readcount.R b/Rcwl/tl_bam_readcount.R index 8087bfe..ef68892 100644 --- a/Rcwl/tl_bam_readcount.R +++ b/Rcwl/tl_bam_readcount.R @@ -14,7 +14,7 @@ o2 <- OutputParam(id = "indel", type = "File", req1 <- list(class = "DockerRequirement", dockerPull = "mgibio/bam_readcount_helper-cwl:1.1.1") -bam_readcount <- cwlParam(baseCommand = c("/usr/bin/python", +bam_readcount <- cwlProcess(baseCommand = c("/usr/bin/python", "/usr/bin/bam_readcount_helper.py"), requirements = list(req1), arguments = list( @@ -22,3 +22,20 @@ bam_readcount <- cwlParam(baseCommand = c("/usr/bin/python", list(valueFrom = "./", position = 6L, shellQuote = FALSE)), inputs = InputParamList(p1, p2, p3, p4), outputs = OutputParamList(o1, o2)) + + +bam_readcount <- addMeta( + bam_readcount, + label = "bam_readcount", + doc = "generates low-level information about sequencing data at specific nucleotide positions.", + inputLabels = c("vcf","sample","ref","bam"), + inputDocs = c("Input VCF file","Smaple name","reference sequence in the fasta format.","bam input file"), + outputLabels = c("snv","indel"), + outputDocs = c("SNV file","Indel FIle"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/genome/bam-readcount", + example = paste() + ) +) diff --git a/Rcwl/tl_bam_stat.py b/Rcwl/tl_bam_stat.py new file mode 100644 index 0000000..bf9c110 --- /dev/null +++ b/Rcwl/tl_bam_stat.py @@ -0,0 +1,10 @@ +## RSeQC bam_stat +p1 <- InputParam(id = "bam", type = "File", prefix = "-i") +o1 <- OutputParam(id = "statOut", type = "File", glob = "$(inputs.bam.nameroot).bamStat.txt") + +req1 <- requireDocker("quay.io/biocontainers/rseqc:4.0.0--py38h4a8c8d9_1") +read_distribution <- cwlProcess(baseCommand = c("bam_stat.py"), + requirements = list(req1), + inputs = InputParamList(p1), + outputs = OutputParamList(o1), + stdout = "$(inputs.bam.nameroot).bamStat.txt") diff --git a/Rcwl/tl_bambino.R b/Rcwl/tl_bambino.R new file mode 100644 index 0000000..c20334a --- /dev/null +++ b/Rcwl/tl_bambino.R @@ -0,0 +1,28 @@ +p1 <- InputParam(id = "dbam", type = "File", position=1, secondaryFile=".bai") +p2 <- InputParam(id = "gbam", type = "File", position=2, secondaryFile=".bai") +p3 <- InputParam(id = "out", type = "string", position=3) +p4 <- InputParam(id = "ref", type = "File", position=4, secondaryFile=".fai") +o1 <- OutputParam(id = "vout", type = "File", glob = "$(inputs.out)") + +req1 <- requireDocker("hubentu/bambino") +bambino <- cwlProcess(baseCommand = "/opt/run.sh", + requirements = list(req1), + inputs = InputParamList(p1, p2, p3, p4), + outputs = OutputParamList(o1)) + + +bambino <- addMeta( + bambino, + label = "bambino", + doc = "NA", + inputLabels = c("dbam","gbam","out","ref"), + inputDocs = c("NA","NA","NA","NA"), + outputLabels = c("vout"), + outputDocs = c("NA"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "NA", + example = paste() + ) +) diff --git a/Rcwl/tl_bcftools_concat.R b/Rcwl/tl_bcftools_concat.R new file mode 100644 index 0000000..9e46cc4 --- /dev/null +++ b/Rcwl/tl_bcftools_concat.R @@ -0,0 +1,30 @@ +p1 <- InputParam(id = "ovcf", type = "string", prefix = "-o") +p2 <- InputParam(id = "vcfs", type = "File[]?", secondaryFiles = "tbi?") +p3 <- InputParam(id = "type", type = "string?", prefix = "-O") +p4 <- InputParam(id = "overlap", type = "boolean?", prefix = "-a") +p5 <- InputParam(id = "vfile", type = "File?", prefix = "-f") +o1 <- OutputParam(id = "Fout", type = "File", glob = "$(inputs.ovcf)", secondaryFiles = ".tbi?") +req1 <- requireDocker("quay.io/biocontainers/bcftools:1.13--h3a49de5_0") + +bcftools_concat <- cwlProcess(cwlVersion = "v1.2", + baseCommand = c("bcftools", "concat"), + requirements = list(req1), + inputs = InputParamList(p1, p2, p3, p4, p5), + outputs = OutputParamList(o1)) + + +bcftools_concat <- addMeta( + bcftools_concat, + label = "bcftools_concat", + doc = "Concatenate or combine VCF/BCF files. All source files must have the same sample columns appearing in the same order.", + inputLabels = c("ovcf","vcfs","type","overlap","vfile"), + inputDocs = c("Write output to a file [standard output]","Input vcf files","b: compressed BCF, u: uncompressed BCF, z: compressed VCF, v: uncompressed VCF [v]","First coordinate of the next file can precede last record of the current file.","Read the list of files from a file."), + outputLabels = c("Fout"), + outputDocs = c("Concatinated vcf file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/samtools/bcftools", + example = paste() + ) +) diff --git a/Rcwl/tl_bcftools_concat_file.R b/Rcwl/tl_bcftools_concat_file.R new file mode 100644 index 0000000..005986c --- /dev/null +++ b/Rcwl/tl_bcftools_concat_file.R @@ -0,0 +1,31 @@ +p1 <- InputParam(id = "ovcf", type = "string", prefix = "-o") +p2 <- InputParam(id = "gvcfs", type = "File[]", position = -1) +p3 <- InputParam(id = "type", type = "string?", prefix = "-O") +p4 <- InputParam(id = "overlap", type = "boolean?", prefix = "-a") +o1 <- OutputParam(id = "Fout", type = "File", glob = "$(inputs.ovcf)", secondaryFiles = ".tbi?") +req1 <- requireDocker("quay.io/biocontainers/bcftools:1.13--h3a49de5_0") +req2 <- requireManifest("gvcfs", sep = "\t") + +bcftools_concat_file <- cwlProcess(cwlVersion = "v1.2", + baseCommand = c("bcftools", "concat"), + requirements = list(req1, req2), + arguments = list("-f", "gvcfs"), + inputs = InputParamList(p1, p2, p3, p4), + outputs = OutputParamList(o1)) + + +bcftools_concat_file <- addMeta( + bcftools_concat_file, + label = "bcftools_concat_file", + doc = "Concatenate or combine VCF/BCF files. All source files must have the same sample columns appearing in the same order.", + inputLabels = c("ovcf","gvcfs","type","overlap"), + inputDocs = c("Write output to a file [standard output]","Input zipped vcf files","b: compressed BCF, u: uncompressed BCF, z: compressed VCF, v: uncompressed VCF [v]","First coordinate of the next file can precede last record of the current file."), + outputLabels = c("Fout"), + outputDocs = c("Concatinated vcf file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/samtools/bcftools", + example = paste() + ) +) diff --git a/Rcwl/tl_bcftools_norm.R b/Rcwl/tl_bcftools_norm.R new file mode 100644 index 0000000..a4e7dbf --- /dev/null +++ b/Rcwl/tl_bcftools_norm.R @@ -0,0 +1,30 @@ +p1 <- InputParam(id = "ovcf", type = "string", prefix = "-o") +p2 <- InputParam(id = "vcf", type = "File", + secondaryFiles = ".tbi?") +p3 <- InputParam(id = "type", type = "string?", prefix = "-O") +p4 <- InputParam(id = "dup", type = "string?", prefix = "-d") +o1 <- OutputParam(id = "Fout", type = "File", glob = "$(inputs.ovcf)", secondaryFiles = ".tbi?") +req1 <- requireDocker("quay.io/biocontainers/bcftools:1.13--h3a49de5_0") + +bcftools_norm <- cwlProcess(cwlVersion = "v1.2", + baseCommand = c("bcftools", "norm"), + requirements = list(req1), + inputs = InputParamList(p1, p2, p3, p4), + outputs = OutputParamList(o1)) + + +bcftools_norm <- addMeta( + bcftools_norm, + label = "bcftools_norm", + doc = "Left-align and normalize indels, check if REF alleles match the reference, split multiallelic sites into multiple rows; recover multiallelics from multiple rows. Left-alignment and normalization will only be applied if the –fasta-ref option is supplied", + inputLabels = c("ovcf","vcf","type","dup"), + inputDocs = c("Write output to a file [standard output]","Input VCF file","b' compressed BCF; 'u' uncompressed BCF; 'z' compressed VCF; 'v' uncompressed VCF [v]","Remove duplicate snps|indels|both|all|exact"), + outputLabels = c("Fout"), + outputDocs = c("BCF normalized output file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/samtools/bcftools", + example = paste() + ) +) diff --git a/Rcwl/tl_bcftools_query.R b/Rcwl/tl_bcftools_query.R new file mode 100644 index 0000000..5134760 --- /dev/null +++ b/Rcwl/tl_bcftools_query.R @@ -0,0 +1,40 @@ +p1 <- InputParam(id = "exclude", type = "string?", prefix = "-e") +p2 <- InputParam(id = "format", type = "string?", prefix = "-f") +p3 <- InputParam(id = "header", type = "boolean?", prefix = "-H") +p4 <- InputParam(id = "include", type = "string?", prefix = "-i") +p5 <- InputParam(id = "listSample", type = "boolean?", prefix = "-l") +p6 <- InputParam(id = "region", type = "string?", prefix = "-r") +p7 <- InputParam(id = "regionFile", type = "File?", prefix = "-R") +p8 <- InputParam(id = "sample", type = "string?", prefix = "-s") +p9 <- InputParam(id = "sampleFile", type = "File?", prefix = "-S") +p10 <- InputParam(id = "target", type = "string?", prefix = "-t") +p11 <- InputParam(id = "targetFile", type = "File?", prefix = "-T") +p12 <- InputParam(id = "uTags", type = "boolean?", prefix = "-u") +p13 <- InputParam(id = "vcfList", type = "File?", prefix = "-v") +p14 <- InputParam(id = "vcf", type = "File?", position = 20L) +p15 <- InputParam(id = "out", type = "string", position = -1L) +o1 <- OutputParam(id = "qout", type = "File", glob = "$(inputs.out)") +req1 <- requireDocker("quay.io/biocontainers/bcftools:1.13--h3a49de5_0") +bcftools_query <- cwlProcess(baseCommand = c("bcftools", "query"), + requirements = list(req1), + inputs = InputParamList(p1, p2, p3, p4, p5, p6, p7, p8, + p9, p10, p11, p12, p13, p14, p15), + outputs = OutputParamList(o1), + stdout = "$(inputs.out)") + + +bcftools_query <- addMeta( + bcftools_query, + label = "bcftools_query", + doc = "Extracts fields from VCF/BCF file and prints them in user-defined format", + inputLabels = c("exclude","format","header","include","listSample","region","regionFile","sample","sampleFile","target","targetFile","uTags","vcfList","vcf","out"), + inputDocs = c("exclude sites for which the expression is true","define specific columns from the VCF file which will be selected","print header","select sites for which the expression is true","print the list of samples and exit","restrict to comma-separated list of regions","restrict to regions listed in a file","list of samples to include","file of samples to include","similar to -r but streams rather than index-jumps","similar to -R but streams rather than index-jumps","print '.' for undefined tags","process multiple VCFs listed in the file","Input VCF file","name of the Output file"), + outputLabels = c("qout"), + outputDocs = c("Queried file with extracted information"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/samtools/bcftools", + example = paste() + ) +) diff --git a/Rcwl/tl_bcftools_reheader.R b/Rcwl/tl_bcftools_reheader.R new file mode 100644 index 0000000..83c7b2a --- /dev/null +++ b/Rcwl/tl_bcftools_reheader.R @@ -0,0 +1,28 @@ +p1 <- InputParam(id = "fai", type = "File?", prefix = "-f") +p2 <- InputParam(id = "header", type = "File?", prefix = "-h") +p3 <- InputParam(id = "samples", type = "File?", prefix = "-s") +p4 <- InputParam(id = "vcf", type = "File") +p5 <- InputParam(id = "output", type = "string", prefix = "-o") +o1 <- OutputParam(id = "outvcf", type = "File", glob = "$(inputs.output)") +req1 <- requireDocker("quay.io/biocontainers/bcftools:1.13--h3a49de5_0") +bcftools_reheader <- cwlProcess(baseCommand = c("bcftools", "reheader"), + requirements = list(req1), + inputs = InputParamList(p1, p2, p3, p4, p5), + outputs = OutputParamList(o1)) + + +bcftools_reheader <- addMeta( + bcftools_reheader, + label = "bcftools_reheader", + doc = "Modify header of VCF/BCF files, change sample names.", + inputLabels = c("fai","header","samples","vcf","output"), + inputDocs = c("update sequences and their lengths from the .fai file","new header","new sample names","input VCF file","write output to a file [standard output]"), + outputLabels = c("outvcf"), + outputDocs = c("output VCF with modified header"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/samtools/bcftools", + example = paste() + ) +) diff --git a/Rcwl/tl_bcftools_sort.R b/Rcwl/tl_bcftools_sort.R new file mode 100644 index 0000000..2f51ca0 --- /dev/null +++ b/Rcwl/tl_bcftools_sort.R @@ -0,0 +1,28 @@ +p1 <- InputParam(id = "ovcf", type = "string", prefix = "-o") +p2 <- InputParam(id = "vcf", type = "File", secondaryFiles = ".tbi?") +p3 <- InputParam(id = "type", type = "string?", prefix = "-O") +o1 <- OutputParam(id = "Fout", type = "File", glob = "$(inputs.ovcf)", secondaryFiles = ".tbi?") +req1 <- requireDocker("quay.io/biocontainers/bcftools:1.13--h3a49de5_0") + +bcftools_sort <- cwlProcess(cwlVersion = "v1.2", + baseCommand = c("bcftools", "sort"), + requirements = list(req1), + inputs = InputParamList(p1, p2, p3), + outputs = OutputParamList(o1)) + + +bcftools_sort <- addMeta( + bcftools_sort, + label = "bcftools_sort", + doc = "Sort VCF/BCF file.", + inputLabels = c("ovcf","vcf","type"), + inputDocs = c("output file name [stdout]","input VCF file","b: compressed BCF, u: uncompressed BCF, z: compressed VCF, v: uncompressed VCF [v]"), + outputLabels = c("Fout"), + outputDocs = c("Sorted VCF file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/samtools/bcftools", + example = paste() + ) +) diff --git a/Rcwl/tl_bcftools_view.R b/Rcwl/tl_bcftools_view.R new file mode 100644 index 0000000..a7f8a2b --- /dev/null +++ b/Rcwl/tl_bcftools_view.R @@ -0,0 +1,36 @@ + +p1 <- InputParam(id = "vcf", type = "File") +p2 <- InputParam(id = "filter", type = "string?", prefix = "-f") +p3 <- InputParam(id = "fout", type = "string", prefix = "-o") +p4 <- InputParam(id = "otype", type = "string?", prefix = "-O", default = "v") +p5 <- InputParam(id = "sample", type = "string?", prefix = "-s") +p6 <- InputParam(id = "samplefile", type = "File?", prefix = "-S") +p7 <- InputParam(id = "genotype", type = "string?", prefix = "-g") +p8 <- InputParam(id = "include", type = "string?", prefix = "-i") +p9 <- InputParam(id = "exclude", type = "string?", prefix = "-e") + +o1 <- OutputParam(id = "Fout", type = "File", glob = "$(inputs.fout)") +req1 <- list(class = "DockerRequirement", + dockerPull = "quay.io/biocontainers/bcftools:1.13--h3a49de5_0") + +bcftools_view <- cwlProcess(baseCommand = c("bcftools", "view"), + requirements = list(req1), + inputs = InputParamList(p1, p2, p3, p4, p5, p6, p7, p8, p9), + outputs = OutputParamList(o1)) + + +bcftools_view <- addMeta( + bcftools_view, + label = "bcftools_view", + doc = "VCF/BCF conversion, view, subset and filter VCF/BCF files.", + inputLabels = c("vcf","filter","fout","otype","sample","samplefile","genotype","include","exclude"), + inputDocs = c("Input VCF file","require at least one of the listed FILTER strings (e.g. 'PASS,.')","output file name [stdout]","b: compressed BCF, u: uncompressed BCF, z: compressed VCF, v: uncompressed VCF [v]","comma separated list of samples to include (or exclude with '^' prefix)","file of samples to include (or exclude with '^' prefix)","require one or more hom/het/missing genotype or, if prefixed with '^', exclude sites with hom/het/missing genotypes","select sites for which the expression is true","exclude sites for which the expression is true"), + outputLabels = c("Fout"), + outputDocs = c("Viewed,filtered,.subsetted vcf file output"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/samtools/bcftools", + example = paste() + ) +) diff --git a/Rcwl/tl_bcfview.R b/Rcwl/tl_bcfview.R index 418b498..beba890 100644 --- a/Rcwl/tl_bcfview.R +++ b/Rcwl/tl_bcfview.R @@ -13,7 +13,24 @@ o1 <- OutputParam(id = "Fout", type = "File", glob = "$(inputs.fout)") req1 <- list(class = "DockerRequirement", dockerPull = "biocontainers/bcftools:v1.5_cv3") -bcfview <- cwlParam(baseCommand = c("bcftools", "view"), +bcfview <- cwlProcess(baseCommand = c("bcftools", "view"), requirements = list(req1), inputs = InputParamList(p1, p2, p3, p4, p5, p6, p7, p8, p9), outputs = OutputParamList(o1)) + + +bcfview <- addMeta( + bcfview, + label = "bcfview", + doc = "VCF/BCF conversion, view, subset and filter VCF/BCF files.", + inputLabels = c("vcf","filter","fout","otype","sample","samplefile","genotype","include","exclude"), + inputDocs = c("Input VCF file","require at least one of the listed FILTER strings (e.g. 'PASS,.')","output file name [stdout]","b: compressed BCF, u: uncompressed BCF, z: compressed VCF, v: uncompressed VCF [v]","comma separated list of samples to include (or exclude with '^' prefix)","file of samples to include (or exclude with '^' prefix)","require one or more hom/het/missing genotype or, if prefixed with '^', exclude sites with hom/het/missing genotypes","select sites for which the expression is true","exclude sites for which the expression is true"), + outputLabels = c("Fout"), + outputDocs = c("Viewed,filtered,.subsetted vcf file output"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/samtools/bcftools", + example = paste() + ) +) diff --git a/Rcwl/tl_bedtools_genomecov.R b/Rcwl/tl_bedtools_genomecov.R index e295b0b..f92c41c 100644 --- a/Rcwl/tl_bedtools_genomecov.R +++ b/Rcwl/tl_bedtools_genomecov.R @@ -4,8 +4,25 @@ p2 <- InputParam(id = "bedgraph", type = "boolean", prefix = "-bg", default = TR o1 <- OutputParam(id = "bed", type = "File", glob = "*.bedgraph") req1 <- list(class = "DockerRequirement", dockerPull = "quay.io/biocontainers/bedtools:2.29.2--hc088bd4_0") -bedtools_genomecov <- cwlParam(baseCommand = c("bedtools", "genomecov"), +bedtools_genomecov <- cwlProcess(baseCommand = c("bedtools", "genomecov"), requirements = list(req1), inputs = InputParamList(p1, p2), outputs = OutputParamList(o1), stdout = "$(inputs.bam.nameroot).bedgraph") + + +bedtools_genomecov <- addMeta( + bedtools_genomecov, + label = "bedtools_genomecov", + doc = "Compute the coverage of a feature file among a genome.", + inputLabels = c("bam","bedgraph"), + inputDocs = c("The input file is in BAM format.Note: BAM _must_ be sorted by position","Report depth in BedGraph format. For details, see:genome.ucsc.edu/goldenPath/help/bedgraph.html"), + outputLabels = c("bed"), + outputDocs = c("Depth of coverage in bedgraph"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/samtools/bcftools", + example = paste() + ) +) diff --git a/Rcwl/tl_bgzip.R b/Rcwl/tl_bgzip.R index d49d85b..a4d7a12 100644 --- a/Rcwl/tl_bgzip.R +++ b/Rcwl/tl_bgzip.R @@ -3,8 +3,25 @@ p1 <- InputParam(id = "ifile", type = "File") o1 <- OutputParam(id = "zfile", type = "File", glob = "$(inputs.ifile.basename).gz") req1 <- list(class = "DockerRequirement", dockerPull = "biocontainers/tabix:v1.3.2-2-deb_cv1") -bgzip <- cwlParam(baseCommand = c("bgzip", "-c"), +bgzip <- cwlProcess(baseCommand = c("bgzip", "-c"), requirements = list(req1), inputs = InputParamList(p1), outputs = OutputParamList(o1), stdout = "$(inputs.ifile.basename).gz") + + +bgzip <- addMeta( + bgzip, + label = "bgzip", + doc = "Bgzip compresses files in a similar manner to, and compatible with, gzip(1). The file is compressed into a series of small (less than 64K) 'BGZF' blocks. This allows indexes to be built against the compressed file and used to retrieve portions of the data without having to decompress the entire file.", + inputLabels = c("ifile"), + inputDocs = c("Input file"), + outputLabels = c("zfile"), + outputDocs = c("Commpressed file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "NA", + example = paste() + ) +) diff --git a/Rcwl/tl_bigWigToWig.R b/Rcwl/tl_bigWigToWig.R index 01a0d4d..45fcd6c 100644 --- a/Rcwl/tl_bigWigToWig.R +++ b/Rcwl/tl_bigWigToWig.R @@ -4,8 +4,25 @@ p2 <- InputParam(id = "wig", type = "string", position = 2) o1 <- OutputParam(id = "wigOut", type = "File", glob = "$(inputs.wig)") req1 <- list(class = "DockerRequirement", dockerPull = "biowardrobe2/ucscuserapps:v358_2") -bigWigToWig <- cwlParam(baseCommand = "bigWigToWig", +bigWigToWig <- cwlProcess(baseCommand = "bigWigToWig", requirements = list(req1), inputs = InputParamList(p1, p2), outputs = OutputParamList(o1)) + + +bigWigToWig <- addMeta( + bigWigToWig, + label = "bigWigToWig", + doc = "Convert bigWig to wig.", + inputLabels = c("bw","wig"), + inputDocs = c("Input bigwig file","Name of the output wig file"), + outputLabels = c("wigOut"), + outputDocs = c("Output wig file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/ENCODE-DCC/kentUtils", + example = paste() + ) +) diff --git a/Rcwl/tl_bismark.R b/Rcwl/tl_bismark.R new file mode 100644 index 0000000..dda699a --- /dev/null +++ b/Rcwl/tl_bismark.R @@ -0,0 +1,31 @@ +p1 <- InputParam(id = "genome", type = "Directory", prefix = "--genome") +p2 <- InputParam(id = "fq1", type = list("File", "File[]"), prefix = "-1", itemSeparator=",") +p3 <- InputParam(id = "fq2", type = list("File", "File[]"), prefix = "-2", itemSeparator=",") +p4 <- InputParam(id = "sam", type = "boolean?", prefix = "--sam") +p5 <- InputParam(id = "threads", type = "int?", prefix = "-p") +o1 <- OutputParam(id = "align", type = "File", glob = "*_bismark_bt2_pe.*") +o2 <- OutputParam(id = "report", type = "File", glob = "*_report.txt") +req1 <- requireDocker("quay.io/biocontainers/bismark:0.23.1--hdfd78af_0") +bismark <- cwlProcess(cwlVersion = "v1.2", + baseCommand = "bismark", + arguments = list("-o", "./"), + requirements = list(req1), + inputs = InputParamList(p1, p2, p3, p4, p5), + outputs = OutputParamList(o1, o2)) + + +bismark <- addMeta( + bismark, + label = "bismark", + doc = "Bismark is a set of tools for the time-efficient analysis of Bisulfite-Seq (BS-Seq) data. Bismark performs alignments of bisulfite-treated reads to a reference genome and cytosine methylation calls at the same time.", + inputLabels = c("genome","fq1","fq2","sam","threads"), + inputDocs = c("The path to the folder containing the unmodified reference genome as well as the subfolders created by the Bismark_Genome_Preparation script","Paired input fastq file 1","Paired input fastq file 2","The output will be written out in SAM format instead of the default BAM format.","Launch NTHREADS parallel search threads (default: 1)."), + outputLabels = c("align","report"), + outputDocs = c("Aligned bam.sam file","report file detailing alignment and methylation call statistics"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/FelixKrueger/Bismark", + example = paste() + ) +) diff --git a/Rcwl/tl_bismark_methylation_extractor.R b/Rcwl/tl_bismark_methylation_extractor.R new file mode 100644 index 0000000..31401fc --- /dev/null +++ b/Rcwl/tl_bismark_methylation_extractor.R @@ -0,0 +1,31 @@ +p1 <- InputParam(id = "paired", type = "boolean?", prefix = "-p") +p2 <- InputParam(id = "single", type = "boolean?", prefix = "-s") +p3 <- InputParam(id = "bedGraph", type = "boolean?", prefix = "--bedGraph", default = TRUE) +p4 <- InputParam(id = "gzip", type = "boolean?", prefix = "--gzip", default = TRUE) +p5 <- InputParam(id = "core", type = "int", prefix = "--multicore", default = 4) +p6 <- InputParam(id = "bam", type = "File", position = 10) +o1 <- OutputParam(id = "cov", type = "File", glob = "*.cov*") +o2 <- OutputParam(id = "Bed", type = "File?", glob = "*.bedGraph*") +o3 <- OutputParam(id = "report", type = "File[]", glob = "*.txt") +req1 <- requireDocker("quay.io/biocontainers/bismark:0.23.1--hdfd78af_0") +bismark_methylation_extractor <- cwlProcess(baseCommand = "bismark_methylation_extractor", + requirements = list(req1), + inputs = InputParamList(p1, p2, p3, p4, p5, p6), + outputs = OutputParamList(o1, o2, o3)) + + +bismark_methylation_extractor <- addMeta( + bismark_methylation_extractor, + label = "bismark_methylation_extractor", + doc = "This script reads in a bisulfite read alignment results file produced by the Bismark bisulfite mapper (in BAM/CRAM/SAM format) and extracts the methylation information for individual cytosines.", + inputLabels = c("paired","single","bedGraph","gzip","core","bam"), + inputDocs = c("Input file(s) are Bismark result file(s) generated from paired-end read data.","Input file(s) are Bismark result file(s) generated from single-end read data","After finishing the methylation extraction, the methylation output is written into a sorted bedGraph file that reports the position of a given cytosine and its methylation state.","The methylation extractor files (CpG_OT_..., CpG_OB_... etc) will be written out in a GZIP compressed form to save disk space.","Sets the number of cores to be used for the methylation extraction process.","Input bam file from bismark"), + outputLabels = c("cov","Bed","report"), + outputDocs = c("Coverage output","bedGraph output","genome-wide cytosine methylation report"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/FelixKrueger/Bismark", + example = paste() + ) +) diff --git a/Rcwl/tl_blastn.R b/Rcwl/tl_blastn.R index a089f70..b210903 100644 --- a/Rcwl/tl_blastn.R +++ b/Rcwl/tl_blastn.R @@ -12,7 +12,24 @@ o1 <- OutputParam(id = "Output", type = "File", glob = "$(inputs.OutFile)") req1 <- list(class = "DockerRequirement", dockerPull = "biocontainers/blast:v2.2.31_cv2") -blastn <- cwlParam(baseCommand = "blastn", +blastn <- cwlProcess(baseCommand = "blastn", requirements = list(req1), inputs = InputParamList(p1, p2, p3, p4, p5, p6, p7, p8), outputs = OutputParamList(o1)) + + +blastn <- addMeta( + blastn, + label = "blastn", + doc = "BLAST finds regions of similarity between biological sequences. The program compares nucleotide or protein sequences to sequence databases and calculates the statistical significance", + inputLabels = c("ThreadN","Ref","Query","IdenPerc","WordSize","Evalue","OutFormat","OutFile"), + inputDocs = c("Number of threads (CPUs) to use in the BLAST search Default = 1","BLAST database name","Input file name","Percent identity","Word size for wordfinder algorithm (length of best perfect match)","Expectation value (E) threshold for saving hits Default = `10'","Output format.alignment view options:0 = pairwise,1 = query-anchored showing identities,2 = query-anchored no identities,3 = flat query-anchored, show identities,4 = flat query-anchored, no identities,5 = XML Blast output,6 = tabular,7 = tabular with comment lines,8 = Text ASN.1,9 = Binary ASN.1,10 = Comma-separated values,11 = BLAST archive format (ASN.1),12 = JSON Seqalign output,13 = JSON Blast output,14 = XML2 Blast output","Output file name"), + outputLabels = c("Output"), + outputDocs = c("Blast specified output"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/ncbi/blast_plus", + example = paste() + ) +) diff --git a/Rcwl/tl_bowtie2.R b/Rcwl/tl_bowtie2.R index a602ace..d80d573 100644 --- a/Rcwl/tl_bowtie2.R +++ b/Rcwl/tl_bowtie2.R @@ -19,8 +19,25 @@ p3 <- InputParam(id = "fq1", type = "File", prefix = "-1") p4 <- InputParam(id = "fq2", type = "File", prefix = "-2") o1 <- OutputParam(id = "sam", type = "File", glob = "*.sam") -bowtie2 <- cwlParam(baseCommand = "bowtie2", +bowtie2 <- cwlProcess(baseCommand = "bowtie2", requirements = list(req1, req2), arguments = list("-S", "output.sam"), inputs = InputParamList(p1, p2, p3, p4), outputs = OutputParamList(o1)) + + +bowtie2 <- addMeta( + bowtie2, + label = "bowtie2", + doc = "Bowtie 2 is an ultrafast and memory-efficient tool for aligning sequencing reads to long reference sequences.", + inputLabels = c("threadN","IndexPrefix","fq1","fq2"), + inputDocs = c("number of alignment threads to launch (1)","Index filename prefix (minus trailing .X.bt2).","Files with #1 mates, paired with files in .","Files with #2 mates, paired with files in ."), + outputLabels = c("sam"), + outputDocs = c("Aligned Sam file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/BenLangmead/bowtie2", + example = paste() + ) +) diff --git a/Rcwl/tl_bowtie2_build.R b/Rcwl/tl_bowtie2_build.R index c88fcd4..c74ab06 100644 --- a/Rcwl/tl_bowtie2_build.R +++ b/Rcwl/tl_bowtie2_build.R @@ -7,7 +7,24 @@ p1 <- InputParam(id = "ref", type = "File", position = 1) p2 <- InputParam(id = "outPrefix", type = "string", position = 2) o1 <- OutputParam(id = "idx", type = "File[]", glob = "$(inputs.outPrefix).*") -bowtie2_build <- cwlParam(baseCommand = c("bowtie2-build"), +bowtie2_build <- cwlProcess(baseCommand = c("bowtie2-build"), requirements = list(req1), inputs = InputParamList(p1, p2), outputs = OutputParamList(o1)) + + +bowtie2_build <- addMeta( + bowtie2_build, + label = "bowtie2_build", + doc = "Index referenc file using bowtie", + inputLabels = c("ref","outPrefix"), + inputDocs = c("comma-separated list of files with ref sequences","write bt2 data to files with this dir/basename"), + outputLabels = c("idx"), + outputDocs = c("Index reference file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/BenLangmead/bowtie2", + example = paste() + ) +) diff --git a/Rcwl/tl_bowtie_build.R b/Rcwl/tl_bowtie_build.R index 5a1c954..3bd2cbb 100644 --- a/Rcwl/tl_bowtie_build.R +++ b/Rcwl/tl_bowtie_build.R @@ -6,7 +6,24 @@ p1 <- InputParam(id = "ref", type = "File", position = 1) p2 <- InputParam(id = "outPrefix", type = "string", position = 2) o1 <- OutputParam(id = "idx", type = "File[]", glob = "$(inputs.outPrefix).*") -bowtie_build <- cwlParam(baseCommand = c("bowtie-build"), +bowtie_build <- cwlProcess(baseCommand = c("bowtie-build"), requirements = list(req1), inputs = InputParamList(p1, p2), outputs = OutputParamList(o1)) + + +bowtie_build <- addMeta( + bowtie_build, + label = "bowtie_build", + doc = "Index referenc file using bowtie", + inputLabels = c("ref","outPrefix"), + inputDocs = c("comma-separated list of files with ref sequences","write bt2 data to files with this dir/basename"), + outputLabels = c("idx"), + outputDocs = c("Index reference file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/BenLangmead/bowtie2", + example = paste() + ) +) diff --git a/Rcwl/tl_bwa.R b/Rcwl/tl_bwa.R index 23abaea..6257fb2 100644 --- a/Rcwl/tl_bwa.R +++ b/Rcwl/tl_bwa.R @@ -1,6 +1,6 @@ ## bwa mem p1 <- InputParam(id = "threads", type = "int", prefix = "-t", position = 1) -p2 <- InputParam(id = "RG", type = "string", prefix = "-R", position = 2) +p2 <- InputParam(id = "RG", type = "string?", prefix = "-R", position = 2) p3 <- InputParam(id = "Ref", type = "File", position = 3, secondaryFiles = c(".amb", ".ann", ".bwt", ".pac", ".sa")) p4 <- InputParam(id = "FQ1", type = "File", position = 4) @@ -8,8 +8,25 @@ p5 <- InputParam(id = "FQ2", type = "File?", position = 5) o1 <- OutputParam(id = "sam", type = "File", glob = "*.sam") req1 <- list(class = "DockerRequirement", dockerPull = "biocontainers/bwa:v0.7.17-3-deb_cv1") -bwa <- cwlParam(baseCommand = c("bwa", "mem"), +bwa <- cwlProcess(baseCommand = c("bwa", "mem"), requirements = list(req1), inputs = InputParamList(p1, p2, p3, p4, p5), outputs = OutputParamList(o1), stdout = "bwaOutput.sam") + + +bwa <- addMeta( + bwa, + label = "bwa", + doc = "BWA is a software package for mapping DNA sequences against a large reference genome, such as the human genome.", + inputLabels = c("threads","RG","Ref","FQ1","FQ2"), + inputDocs = c("number of threads [1]","read group header line such as '@RG\tID:foo\tSM:bar' [null]","Reference file","Paired fastq file 1","Paired fastq file 2"), + outputLabels = c("sam"), + outputDocs = c("Aligned sam File"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/lh3/bwa", + example = paste() + ) +) diff --git a/Rcwl/tl_bwa_index.R b/Rcwl/tl_bwa_index.R index c033276..c764099 100644 --- a/Rcwl/tl_bwa_index.R +++ b/Rcwl/tl_bwa_index.R @@ -15,8 +15,25 @@ o1 <- OutputParam(id = "idx", type = "File", "$(inputs.Ref.basename + '.pac')", "$(inputs.Ref.basename + '.sa')") ) -bwa_index <- cwlParam(baseCommand = c("bwa", "index"), +bwa_index <- cwlProcess(baseCommand = c("bwa", "index"), requirements = list(req1, req2, req3), arguments = list("-a", "bwtsw"), inputs = InputParamList(p1), outputs = OutputParamList(o1)) + + +bwa_index <- addMeta( + bwa_index, + label = "bwa_index", + doc = "Index referenc file using BWA mem", + inputLabels = c("Ref"), + inputDocs = c("Reference fasta file"), + outputLabels = c("idx"), + outputDocs = c("Index reference file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/lh3/bwa", + example = paste() + ) +) diff --git a/Rcwl/tl_cnv_facets.R b/Rcwl/tl_cnv_facets.R index e428a2d..ebfd640 100644 --- a/Rcwl/tl_cnv_facets.R +++ b/Rcwl/tl_cnv_facets.R @@ -1,15 +1,35 @@ ## cnv_facets -p1 <- InputParam(id = "tbam", type = "File?", prefix = "-t", secondaryFiles = ".bai") -p2 <- InputParam(id = "nbam", type = "File?", prefix = "-n", secondaryFiles = ".bai") +p1 <- InputParam(id = "tbam", type = "File?", prefix = "-t", secondaryFiles = list(".bai?", "^.bai?")) +p2 <- InputParam(id = "nbam", type = "File?", prefix = "-n", secondaryFiles = list(".bai?", "^.bai?")) p3 <- InputParam(id = "vcf", type = "File?", prefix = "-vcf", secondaryFiles = ".tbi") p4 <- InputParam(id = "pileup", type = "File?", prefix = "-p") p5 <- InputParam(id = "out", type = "string", prefix = "-o") -p6 <- InputParam(id = "build", type = "string", prefix = "-g") -p7 <- InputParam(id = "targets", type = "File", prefix = "-T") +p6 <- InputParam(id = "build", type = "string?", prefix = "-g") +p7 <- InputParam(id = "targets", type = "File?", prefix = "-T") +p8 <- InputParam(id = "cval", type = "int[]?", prefix = "-cv") +p9 <- InputParam(id = "nprocs", type = "int?", prefix = "-N") o1 <- OutputParam(id = "Out", type = "File[]", glob = "$(inputs.out)*") req1 <- list(class = "DockerRequirement", - dockerPull = "hubuntu/cnv_facets") -cnv_facets <- cwlParam(baseCommand = "cnv_facets.R", - requirements = list(req1), - inputs = InputParamList(p1, p2, p3, p4, p5, p6, p7), - outputs = OutputParamList(o1)) + dockerPull = "hubentu/facets:0.6.2") +cnv_facets <- cwlProcess(cwlVersion = "v1.2", + baseCommand = "cnv_facets.R", + requirements = list(req1), + inputs = InputParamList(p1, p2, p3, p4, p5, p6, p7, p8, p9), + outputs = OutputParamList(o1)) + + +cnv_facets <- addMeta( + cnv_facets, + label = "cnv_facets", + doc = "cnv_facets detects somatic copy number variants (CNVs), i.e., variants private to a tumour sample given a matched or unmatched normal sample. cnv_facets uses next generation sequencing data from whole genome (WGS), whole exome (WEX) and targeted (panel) sequencing experiments. In addition, it estimates tumour purity and ploidy.", + inputLabels = c("tbam","nbam","vcf","pileup","out","build","targets","cval","nprocs"), + inputDocs = c("BAM file for tumour sample","BAM file for normal sample","VCF file of SNPs where pileup is to be computed","Pileup for matched normal (first sample) and tumour (second sample). Not needed if using BAM input. This file is the .cvs.gz output of of a previous run of cnv_facet.R","Output prefix for the output files","String indicating the reference genome build. Default hg38.","BED file of target regions to scan. It may be the target regions from WEX or panel sequencing protocols. It is not required, even for targeted sequencing, but it may improve the results","Critical values for segmentation in pre-processing and processing. Larger values reduce segmentation. [25 150] is facets default based on exome data. For whole genome consider increasing to [25 400] and for targeted sequencing consider reducing them. Default 25 150","Number of parallel processes to run to prepare the read pileup file. Each chromsome is assigned to a process. Default 1"), + outputLabels = c("Out"), + outputDocs = c("This is a tab-delimited text file that contains copy number calls and segmentation information for the sample"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/dariober/cnv_facets", + example = paste() + ) +) diff --git a/Rcwl/tl_cnvkit_batch.R b/Rcwl/tl_cnvkit_batch.R index 6f8f4be..20d7c0e 100644 --- a/Rcwl/tl_cnvkit_batch.R +++ b/Rcwl/tl_cnvkit_batch.R @@ -18,12 +18,30 @@ p11 <- InputParam(id = "diagram", type = "boolean", prefix = "--diagram", default = TRUE) p12 <- InputParam(id = "scatter", type = "boolean", prefix = "--scatter", default = TRUE) +p13 <- InputParam(id = "method", type = "string?", prefix = "-m") o1 <- OutputParam(id = "Outdir", type = "Directory", glob = "$(inputs.outdir)") o2 <- OutputParam(id = "outRef", type = "File?", glob = "$(inputs.outref)") req1 <- list(class = "DockerRequirement", dockerPull = "etal/cnvkit") -cnvkit_batch <- cwlParam(baseCommand = c("cnvkit.py", "batch"), +cnvkit_batch <- cwlProcess(baseCommand = c("cnvkit.py", "batch"), requirements = list(req1), - inputs = InputParamList(p1, p2, p3, p4, p5a, p5b, p6, p7, p8, p9, p10, p11, p12), + inputs = InputParamList(p1, p2, p3, p4, p5a, p5b, p6, p7, p8, p9, p10, p11, p12, p13), outputs = OutputParamList(o1, o2)) + + +cnvkit_batch <- addMeta( + cnvkit_batch, + label = "cnvkit_batch", + doc = "CNVkit Batch is a powerful command that automates the process of detecting copy number variations in a batch of sequencing data.", + inputLabels = c("tbams","ref","outdir","normal","outref","reference","target","anti","access","annotate","parallel","diagram","scatter","method"), + inputDocs = c("Tumor Mapped sequence reads (.bam)","Reference genome, FASTA format (e.g. UCSC hg19.fa)","Output directory.","Normal samples (.bam) used to construct the pooled,paired, or flat reference. If this option is used but no filenames are given, a 'flat' reference will be built. Otherwise, all filenames following this option will be used.","Output filename/path for the new reference file being created. (If given, ignores the -o/--output-dir option and will write the file to the given path. Otherwise, 'reference.cnn' will be created in the current directory or specified output directory.)","Copy number reference file (.cnn).","Target intervals (.bed or .list)","Antitarget intervals (.bed or .list)","Regions of accessible sequence on chromosomes (.bed), as output by the 'access' command.","Use gene models from this file to assign names to the target regions. Format: UCSC refFlat.txt or ensFlat.txt file (preferred), or BED, interval list, GFF, or similar.","Number of subprocesses used to running each of the BAM files in parallel. Without an argument, use the maximum number of available CPUs. [Default: process each BAM in serial]","Create an ideogram of copy ratios on chromosomes as a PDF.","Create a whole-genome copy ratio profile as a PDF scatter plot.","Sequencing assay type: hybridization capture ('hybrid'), targeted amplicon sequencing ('amplicon'), or whole genome sequencing ('wgs'). Determines whether and how to use antitarget bins. [Default: hybrid]"), + outputLabels = c("Outdir","outRef"), + outputDocs = c("Directory where all output files will be stored","Output of new reference file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://cnvkit.readthedocs.io/en/stable/", + example = paste() + ) +) diff --git a/Rcwl/tl_collapse_annotation.R b/Rcwl/tl_collapse_annotation.R new file mode 100644 index 0000000..bb23bc9 --- /dev/null +++ b/Rcwl/tl_collapse_annotation.R @@ -0,0 +1,28 @@ +## https://github.com/broadinstitute/gtex-pipeline/tree/master/gene_model +p1 <- InputParam(id = "gtf", type = "File", position = 1) +p2 <- InputParam(id = "out", type = "string", position = 2) +p3 <- InputParam(id = "blacklist", type = "File?", prefix = "--transcript_blacklist") +o1 <- OutputParam(id = "gtfout", type = "File", glob="$(inputs.out)") +req1 <- requireDocker("hubentu/collapse_annotation") +collapse_annotation <- cwlProcess(baseCommand = c("python", + "/opt/collapse_annotation.py"), + requirements = list(req1), + inputs = InputParamList(p1, p2, p3), + outputs = OutputParamList(o1)) + + +collapse_annotation <- addMeta( + collapse_annotation, + label = "collapse_annotation", + doc = "Collapse isoforms into single transcript per gene and remove overlapping intervals between genes", + inputLabels = c("gtf","out","blacklist"), + inputDocs = c("Transcript annotation in GTF format","Name of the output file","List of transcripts to exclude (e.g., unannotated readthroughs)"), + outputLabels = c("gtfout"), + outputDocs = c("Output file with multiple overlapping annotations are collapsed into a single annotation"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/broadinstitute/gtex-pipeline/tree/master/gene_model", + example = paste() + ) +) diff --git a/Rcwl/tl_convert2bed.R b/Rcwl/tl_convert2bed.R new file mode 100644 index 0000000..cb7a999 --- /dev/null +++ b/Rcwl/tl_convert2bed.R @@ -0,0 +1,30 @@ +## bedops convert2bed +p1 <- InputParam(id = "infmt", type = "string", prefix = "--input=", separate = FALSE) +p2 <- InputParam(id = "infile", type = "File", position = -1L) +p3 <- InputParam(id = "outbed", type = "string", position = -1L) +o1 <- OutputParam(id = "outBed", type = "File", glob = "$(inputs.outbed)") + +req1 <- requireDocker("quay.io/biocontainers/bedops:2.4.39--h7d875b9_1") +convert2bed <- cwlProcess(baseCommand = "convert2bed", + requirements = list(req1), + inputs = InputParamList(p1, p2, p3), + outputs = OutputParamList(o1), + stdin = "$(inputs.infile.path)", + stdout = "$(inputs.outbed)") + + +convert2bed <- addMeta( + convert2bed, + label = "convert2bed", + doc = "Convert BAM, GFF, GTF, GVF, PSL, RepeatMasker (OUT), SAM, VCF and WIG genomic formats to BED or BEDOPS Starch (compressed BED)", + inputLabels = c("infmt","infile","outbed"), + inputDocs = c("Genomic format of input file (required)","Input file","Name of the output file"), + outputLabels = c("outBed"), + outputDocs = c("Converted bed file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "NA", + example = paste() + ) +) diff --git a/Rcwl/tl_counts2sce.R b/Rcwl/tl_counts2sce.R new file mode 100644 index 0000000..4072ef6 --- /dev/null +++ b/Rcwl/tl_counts2sce.R @@ -0,0 +1,30 @@ +counts2sce <- function(dir.name, ...) { + library(DropletUtils) + dir.name <- file.path(dir.name, "Gene/filtered") + sce <- read10xCounts(dir.name, ...) + saveRDS(sce, file = "counts_sce.rds") +} + +## write out the R function as `cwlProcess`. +p1 <- InputParam(id = "dirname", type = "Directory", prefix = "dir.name=", separate = FALSE) +o1 <- OutputParam(id = "outsce", type = "File", glob = "*.rds") +counts2sce <- cwlProcess(baseCommand = counts2sce, + inputs = InputParamList(p1), + outputs = OutputParamList(o1)) + + +counts2sce <- addMeta( + counts2sce, + label = "counts2sce", + doc = "reads in 10x Genomics single-cell RNA-seq data, processes it into a SingleCellExperiment (SCE) object,", + inputLabels = c("dirname"), + inputDocs = c("directory containing the output files from a 10x Genomics pipeline"), + outputLabels = c("outsce"), + outputDocs = c("SCE object outputted"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "NA", + example = paste() + ) +) diff --git a/Rcwl/tl_cp.R b/Rcwl/tl_cp.R new file mode 100644 index 0000000..56a154c --- /dev/null +++ b/Rcwl/tl_cp.R @@ -0,0 +1,25 @@ +p1 <- InputParam(id = "file1", type = list("File", "Directory"), position = 2) +p2 <- InputParam(id = "file2", type = "string", position = 3) +p3 <- InputParam(id = "folder", type = "boolean?", prefix = "-r", position = 1) +o1 <- OutputParam(id = "cpfile", type = list("File", "Directory"), glob = "$(inputs.file2)") + +cp <- cwlProcess(baseCommand = "cp", + inputs = InputParamList(p1, p2, p3), + outputs = OutputParamList(o1)) + + +cp <- addMeta( + cp, + label = "cp", + doc = "Copy files", + inputLabels = c("file1","file2","folder"), + inputDocs = c("Copy from file","Copy to file","Folder"), + outputLabels = c("cpfile"), + outputDocs = c("Copied file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "NA", + example = paste() + ) +) diff --git a/Rcwl/tl_cutadapt.R b/Rcwl/tl_cutadapt.R index e7f5bff..559ed4f 100644 --- a/Rcwl/tl_cutadapt.R +++ b/Rcwl/tl_cutadapt.R @@ -5,19 +5,42 @@ ## - FASTQ with extensions: .fastq or .fq ## - Any of the above, but compressed as .gz, .bz2 or .xz -req1 <- list(class = "DockerRequirement", - dockerPull = "kfdrc/cutadapt") +## req1 <- list(class = "DockerRequirement", +## dockerPull = "kfdrc/cutadapt") +req1 <- requireDocker("quay.io/biocontainers/cutadapt:4.2--py310h1425a21_0") -p1 <- InputParam(id = "threadN", type = "int", prefix = "-j", position = 1, default = 1) -p2 <- InputParam(id = "adapter", type = "string", prefix = "-b", position = 2) -p3 <- InputParam(id = "out1prefix", type = "string", prefix = "-o", position = 3) -p4 <- InputParam(id = "out2prefix", type = "string", prefix = "-p", position = 4) -p5 <- InputParam(id = "in1", type = "File", position = 5) -p6 <- InputParam(id = "in2", type = "File", position = 6) +p1 <- InputParam(id = "threadN", type = "int?", prefix = "-j", position = 1, default = 1L) +p2a <- InputParam(id = "adapter1a", type = "string?", prefix = "-a", position = 2) +p2b <- InputParam(id = "adapter2a", type = "string?", prefix = "-A", position = 3) +p2c <- InputParam(id = "adapter1g", type = "string?", prefix = "-g", position = 4) +p2d <- InputParam(id = "adapter2g", type = "string?", prefix = "-G", position = 5) +p2e <- InputParam(id = "adapter1b", type = "string?", prefix = "-b", position = 6) +p2f <- InputParam(id = "adapter2b", type = "string?", prefix = "-B", position = 7) +p3 <- InputParam(id = "out1prefix", type = "string", prefix = "-o", position = 8) +p4 <- InputParam(id = "out2prefix", type = "string?", prefix = "-p", position = 9) +p5 <- InputParam(id = "in1", type = "File", position = 99) +p6 <- InputParam(id = "in2", type = "File?", position = 100) o1 <- OutputParam(id = "out1", type = "File", glob = "$(inputs.out1prefix)") -o2 <- OutputParam(id = "out2", type = "File", glob = "$(inputs.out2prefix)") +o2 <- OutputParam(id = "out2", type = "File?", glob = "$(inputs.out2prefix)") -cutadapt <- cwlParam(baseCommand = "cutadapt", +cutadapt <- cwlProcess(baseCommand = "cutadapt", requirements = list(req1), - inputs = InputParamList(p1, p2, p3, p4, p5, p6), + inputs = InputParamList(p1, p2a, p2b, p2c, p2d, p2e, p2f, p3, p4, p5, p6), outputs = OutputParamList(o1, o2)) + + +cutadapt <- addMeta( + cutadapt, + label = "cutadapt", + doc = "Cutadapt Work for paired-end reads Input files need to be in one of these formats: - FASTA with extensions: .fasta, .fa or .fna - FASTQ with extensions: .fastq or .fq - Any of the above, but compressed as .gz, .bz2 or .xz req1 <- list(class = 'DockerRequirement', dockerPull = 'kfdrc/cutadapt')", + inputLabels = c("threadN","adapter1a","adapter2a","adapter1g","adapter2g","adapter1b","adapter2b","out1prefix","out2prefix","in1","in2"), + inputDocs = c("Number of CPU cores to use. Use 0 to auto-detect.Default: 1","Sequence of an adapter ligated to the 3' end (paired data: of the first read). The adapter and subsequent bases are trimmed. If a '$' character is appended ('anchoring'), the adapter is only found if it is a suffix of the read.","3' adapter to be removed from second read in a pair.","Sequence of an adapter ligated to the 5' end (paired data: of the first read). The adapter and any preceding bases are trimmed. Partial matches at the 5' end are allowed. If a '^' character is prepended ('anchoring'), the adapter is only found if it is a prefix of the read.","5' adapter to be removed from second read in a pair.","Sequence of an adapter that may be ligated to the 5' or 3' end (paired data: of the first read). Both types of matches as described under -a und -g are allowed. If the first base of the read is part of the match, the behavior is as with -g, otherwise as with -a. This option is mostly for rescuing failed library preparations - do not use if you know which end your adapter was ligated to!","5'/3 adapter to be removed from second read in a pair.","Write trimmed reads to FILE. FASTQ or FASTA format is chosen depending on input. Summary report is sent to standard output. Use '{name}' for demultiplexing (see docs). Default: write to standard output","Write second read in a pair to FILE.","first fastq file","second fastq file"), + outputLabels = c("out1","out2"), + outputDocs = c("modified first fastq file","modified second fastq file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/marcelm/cutadapt", + example = paste() + ) +) diff --git a/Rcwl/tl_deduplicate_bismark.R b/Rcwl/tl_deduplicate_bismark.R new file mode 100644 index 0000000..711aa8f --- /dev/null +++ b/Rcwl/tl_deduplicate_bismark.R @@ -0,0 +1,27 @@ +p1 <- InputParam(id = "bam", type = "File", position = 99) +p2 <- InputParam(id = "format", type = "boolean?", prefix = "--bam") +p3 <- InputParam(id = "paired", type = "boolean?", prefix = "--paired") +p4 <- InputParam(id = "outdir", type = "string?", prefix = "--output_dir") +o1 <- OutputParam(id = "dbam", type = "File", glob = "*.deduplicated.bam") +req1 <- requireDocker("quay.io/biocontainers/bismark:0.23.1--hdfd78af_0") +deduplicate_bismark <- cwlProcess(baseCommand = "deduplicate_bismark", + requirements = list(req1), + inputs = InputParamList(p1, p2, p3, p4), + outputs = OutputParamList(o1)) + + +deduplicate_bismark <- addMeta( + deduplicate_bismark, + label = "deduplicate_bismark", + doc = "This script is supposed to remove alignments to the same position in the genome from the Bismark mapping output (both single and paired-end SAM/BAM files), which can arise by e.g. excessive PCR amplification.", + inputLabels = c("bam","format","paired","outdir"), + inputDocs = c("Input bam file","The output will be written out in BAM format.","deduplicate paired-end BAM/SAM Bismark files. Default: [AUTO-DETECT]","Output directory, either relative or absolute. Output is written to the current directory if not specified explicitly."), + outputLabels = c("dbam"), + outputDocs = c("deduplicated file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/FelixKrueger/Bismark", + example = paste() + ) +) diff --git a/Rcwl/tl_deepvariant.R b/Rcwl/tl_deepvariant.R new file mode 100644 index 0000000..795412f --- /dev/null +++ b/Rcwl/tl_deepvariant.R @@ -0,0 +1,38 @@ +## https://github.com/google/deepvariant +p1 <- InputParam(id = "bam", type = "File", prefix = "--reads=", + secondaryFiles = ".bai", separate = FALSE) +p2 <- InputParam(id = "model", type = "string", prefix = "--model_type=", separate = FALSE) +p3 <- InputParam(id = "ref", type = "File", prefix = "--ref=", + secondaryFiles = ".fai", separate = FALSE) +p4 <- InputParam(id = "regions", type = list("File?", "string?"), prefix = "--regions") +p5 <- InputParam(id = "outVcf", type = "string", prefix = "--output_vcf=", separate = FALSE) +p6 <- InputParam(id = "outGVcf", type = "string?", prefix = "--output_gvcf=", separate = FALSE) +p7 <- InputParam(id = "intermediate", type = "string?", prefix = "--intermediate_results_dir") +p8 <- InputParam(id = "cores", type = "int?", prefix = "--num_shards=", separate = FALSE) +o1 <- OutputParam(id = "vcf", type = "File", secondaryFiles = ".tbi", glob = "$(inputs.outVcf)") +o2 <- OutputParam(id = "gvcf", type = "File?", secondaryFiles = ".tbi", glob = "$(inputs.outGVcf)") +o3 <- OutputParam(id = "report", type = "File", glob = "*.html") +o4 <- OutputParam(id = "intdir", type = "Directory?", glob = "$(inputs.intermediate)") + +req1 <- requireDocker("google/deepvariant") +deepvariant <- cwlProcess(baseCommand = "/opt/deepvariant/bin/run_deepvariant", + requirements = list(req1), + inputs = InputParamList(p1, p2, p3, p4, p5, p6, p7, p8), + outputs = OutputParamList(o1, o2, o3, o4)) + + +deepvariant <- addMeta( + deepvariant, + label = "deepvariant", + doc = "DeepVariant is a deep learning-based variant caller that takes aligned reads (in BAM or CRAM format), produces pileup image tensors from them, classifies each tensor using a convolutional neural network, and finally reports the results in a standard VCF or gVCF file.", + inputLabels = c("bam","model","ref","regions","outVcf","outGVcf","intermediate","cores"), + inputDocs = c("Required. Aligned, sorted, indexed BAM file containing the reads we want to call. Should be aligned to a reference genome compatible with --ref.","Required. Type of model to use for variant calling. Set this flag to use the default model associated with each type, and it will set necessary flags corresponding to each model. If you want to use a customized model, add --customized_model flag in addition to this flag.","Required. Genome reference to use. Must have an associated FAI index as well. Supports text or gzipped references. Should match the reference used to align the BAM file provided to --reads.","Optional. Space-separated list of regions we want to process. Elements can be region literals (e.g., chr20:10-20) or paths to BED/BEDPE files.","Required. Path where we should write VCF file.","Optional. Path where we should write gVCF file.","Optional. If specified, this should be an existing directory that is visible insider docker, and will be used to to store intermediate outputs.","Optional. Number of shards for make_examples step. (default: '1') (an integer)"), + outputLabels = c("vcf","gvcf","report","intdir"), + outputDocs = c("Vcf output file","gVcf output file","run-time information and performance metrics","Intermediate files"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/google/deepvariant", + example = paste() + ) +) diff --git a/Rcwl/tl_delly_call.R b/Rcwl/tl_delly_call.R new file mode 100644 index 0000000..cd820a0 --- /dev/null +++ b/Rcwl/tl_delly_call.R @@ -0,0 +1,31 @@ +## https://github.com/dellytools/delly +p1 <- InputParam(id = "exclude", type = "File?", prefix = "-x") +p2 <- InputParam(id = "genome", type = "File", prefix = "-g", secondaryFiles = ".fai") +p3 <- InputParam(id = "outfile", type = "string", prefix = "-o") +p4 <- InputParam(id = "bcf", type = "File?", prefix = "-v", secondaryFiles = ".csi") +p5 <- InputParam(id = "tbam", type = "File", position = 5, secondaryFiles = ".bai") +p6 <- InputParam(id = "nbam", type = "File?", position = 6, secondaryFiles = ".bai") +o1 <- OutputParam(id = "outbcf", type = "File", glob = "$(inputs.outfile)", + secondaryFiles = ".csi") +req1 <- requireDocker("quay.io/biocontainers/delly:0.8.7--he03298f_1") +delly_call <- cwlProcess(baseCommand = c("delly", "call"), + requirements = list(req1), + inputs = InputParamList(p1, p2, p3, p4, p5, p6), + outputs = OutputParamList(o1)) + + +delly_call <- addMeta( + delly_call, + label = "delly_call", + doc = "Delly is an integrated structural variant (SV) prediction method that can discover, genotype and visualize deletions, tandem duplications, inversions and translocations at single-nucleotide resolution in short-read and long-read massively parallel sequencing data.", + inputLabels = c("exclude","genome","outfile","bcf","tbam","nbam"), + inputDocs = c("file with regions to exclude","genome fasta file","SV BCF output file","input VCF/BCF file for genotyping","Tumor bam file","Normal Bam file"), + outputLabels = c("outbcf"), + outputDocs = c("Output BCF file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/dellytools/delly", + example = paste() + ) +) diff --git a/Rcwl/tl_delly_filter.R b/Rcwl/tl_delly_filter.R new file mode 100644 index 0000000..e64dc5a --- /dev/null +++ b/Rcwl/tl_delly_filter.R @@ -0,0 +1,29 @@ + +p1 <- InputParam(id = "filter", type = "string", prefix = "-f", default = "somatic") +p2 <- InputParam(id = "outfile", type = "string", prefix = "-o") +p3 <- InputParam(id = "samples", type = "File", prefix = "-s") +p4 <- InputParam(id = "tbcf", type = "File", secondaryFiles = ".csi") +o1 <- OutputParam(id = "fbcf", type = "File", glob = "$(inputs.outfile)", + secondaryFiles = ".csi") +req1 <- requireDocker("quay.io/biocontainers/delly:0.8.7--he03298f_1") +delly_filter <- cwlProcess(baseCommand = c("delly", "filter"), + requirements = list(req1), + inputs = InputParamList(p1, p2, p3, p4), + outputs = OutputParamList(o1)) + + +delly_filter <- addMeta( + delly_filter, + label = "delly_filter", + doc = "Filter structural variant calls based on specific criteria", + inputLabels = c("filter","outfile","samples","tbcf"), + inputDocs = c("Filter mode (somatic, germline)","Filtered SV BCF output file","Two-column sample file listing sample name and tumor or control","Input BCF file"), + outputLabels = c("fbcf"), + outputDocs = c("Filtered BCF file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/dellytools/delly", + example = paste() + ) +) diff --git a/Rcwl/tl_echo.R b/Rcwl/tl_echo.R new file mode 100644 index 0000000..e7d58a0 --- /dev/null +++ b/Rcwl/tl_echo.R @@ -0,0 +1,25 @@ +p1 <- InputParam(id = "sth", type = "string") +p2 <- InputParam(id = "escape", type = "boolean?", prefix = "-e") +p3 <- InputParam(id = "outfile", type = "string", position = -1L, default = "echo.txt") +o1 <- OutputParam(id = "out", type = "File", glob = "$(inputs.outfile)") +echo <- cwlProcess(baseCommand = "echo", + inputs = InputParamList(p1, p2, p3), + outputs = OutputParamList(o1), + stdout = "$(inputs.outfile)") + + +echo <- addMeta( + echo, + label = "echo", + doc = "Print string to file", + inputLabels = c("sth","escape","outfile"), + inputDocs = c("String to be printed","enables interpretation of escape sequences like \n (new line) or \t (tab).","Name of the output file"), + outputLabels = c("out"), + outputDocs = c("Outputfile that contains the printed string"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "NA", + example = paste() + ) +) diff --git a/Rcwl/tl_fastqc.R b/Rcwl/tl_fastqc.R index da4d398..15aabc9 100644 --- a/Rcwl/tl_fastqc.R +++ b/Rcwl/tl_fastqc.R @@ -2,11 +2,27 @@ f1 <- InputParam(id = "seqfile", type = "File") o1 <- OutputParam(id = "QCfile", type = "File", glob = "*.zip") -req1 <- list(class = "DockerRequirement", - dockerPull = "hubentu/rcwl-rnaseq") -fastqc <- cwlParam(baseCommand = "fastqc", +req1 <- requireDocker("quay.io/biocontainers/fastqc:0.12.1--hdfd78af_0") +fastqc <- cwlProcess(baseCommand = "fastqc", requirements = list(req1), arguments = list("--outdir", "./"), inputs = InputParamList(f1), outputs = OutputParamList(o1)) + + +fastqc <- addMeta( + fastqc, + label = "fastqc", + doc = "FastQC reads a set of sequence files and produces from each one a quality control report consisting of a number of different modules, each one of which will help to identify a different potential type of problem in your data.", + inputLabels = c("seqfile"), + inputDocs = c("Input fastq file"), + outputLabels = c("QCfile"), + outputDocs = c("Output Quality score report"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/s-andrews/FastQC", + example = paste() + ) +) diff --git a/Rcwl/tl_fastqdump.R b/Rcwl/tl_fastqdump.R new file mode 100644 index 0000000..4c59570 --- /dev/null +++ b/Rcwl/tl_fastqdump.R @@ -0,0 +1,32 @@ +p1 <- InputParam(id = "acc", type = list("string", "File"), position = 99) +p2 <- InputParam(id = "split", type = "boolean", prefix = "--split-3", default = TRUE) +p3 <- InputParam(id = "guid", type = "string?", position = -1) +p4 <- InputParam(id = "gzip", type = "boolean?", prefix = "--gzip") +o1 <- OutputParam(id = "fqs", type = "File[]", glob = "*") +## req1 <- requireDocker("quay.io/biocontainers/sra-tools:2.11.0--pl5321h314213e_2") +req1 <- requireDocker("quay.io/biocontainers/sra-tools:3.1.0--h9f5acd7_0") +req2 <- requireInitialWorkDir( + listing = + list(Dirent(entryname = ".ncbi/user-settings.mkfg", + entry = "/LIBS/GUID = '666666'"))) +fastqdump <- cwlProcess(baseCommand = "fastq-dump", + requirements = list(req1, req2), + inputs = InputParamList(p1, p2, p3, p4), + outputs = OutputParamList(o1)) + + +fastqdump <- addMeta( + fastqdump, + label = "fastqdump", + doc = "tool for downloading sequencing reads from NCBI’s Sequence Read Archive (SRA). These sequence reads will be downloaded as FASTQ files.", + inputLabels = c("acc","split","guid","gzip"), + inputDocs = c("Accession Id","3-way splitting for mate-pairs. For each spot, if there are two biological reads satisfying filter conditions, the first is placed in the `*_1.fastq` file, and the second is placed in the `*_2.fastq` file. If there is only one biological read satisfying the filter conditions, it is placed in the `*.fastq` file.All otherreads in the spot are ignored.","Path to download file","Compress output using gzip: deprecated, not recommended"), + outputLabels = c("fqs"), + outputDocs = c("Downloaded fastq file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/ncbi/sra-tools", + example = paste() + ) +) diff --git a/Rcwl/tl_featureCounts.R b/Rcwl/tl_featureCounts.R index 71f4fb2..1885359 100644 --- a/Rcwl/tl_featureCounts.R +++ b/Rcwl/tl_featureCounts.R @@ -5,10 +5,27 @@ f2 <- InputParam(id = "count", type = "string", prefix = "-o") f3 <- InputParam(id = "bam", type = "File") o1 <- OutputParam(id = "Count", type = "File", glob = "$(inputs.count)", secondaryFiles = ".summary") -req1 <- list(class = "DockerRequirement", - dockerPull = "hubentu/rcwl-rnaseq") -featureCounts <- cwlParam(baseCommand = "featureCounts", - requirements = list(req1), - inputs = InputParamList(f1, f2, f3), - outputs = OutputParamList(o1)) +req1 <- requireDocker("quay.io/biocontainers/subread:2.0.6--he4a0461_0") +featureCounts <- cwlProcess(baseCommand = "featureCounts", + arguments = list("-p", "--countReadPairs"), + requirements = list(req1), + inputs = InputParamList(f1, f2, f3), + outputs = OutputParamList(o1)) + + +featureCounts <- addMeta( + featureCounts, + label = "featureCounts", + doc = "Feature count is a program that counts how many reads map to genomic features, such as genes, exon, promoter and genomic bins", + inputLabels = c("gtf","count","bam"), + inputDocs = c("Name of an annotation file. GTF/GFF format by default. See -F option for more format information. Inbuilt annotations (SAF format) is available in 'annotation' directory of the package. Gzipped file is also accepted.","Name of the output file including read counts. A separate file including summary statistics of counting results is also included in the output ('.summary')","Input bam file"), + outputLabels = c("Count"), + outputDocs = c("Count file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/toghrulb/subread", + example = paste() + ) +) diff --git a/Rcwl/tl_fpaste.R b/Rcwl/tl_fpaste.R new file mode 100644 index 0000000..d3763d7 --- /dev/null +++ b/Rcwl/tl_fpaste.R @@ -0,0 +1,25 @@ +p1 <- InputParam(id = "files", type = "File[]") +p2 <- InputParam(id = "sep", type = "string?", prefix = "-d") +p3 <- InputParam(id = "outfile", type = "string", position = -1L, default = "paste.txt") +o1 <- OutputParam(id = "out", type = "File", glob = "$(inputs.outfile)") +fpaste <- cwlProcess(baseCommand = "paste", + inputs = InputParamList(p1, p2, p3), + outputs = OutputParamList(o1), + stdout = "$(inputs.outfile)") + + +fpaste <- addMeta( + fpaste, + label = "fpaste", + doc = "Concatenate corresponding lines of multiple input file", + inputLabels = c("files","sep","outfile"), + inputDocs = c("Input files","delimiter value","Output file name"), + outputLabels = c("out"), + outputDocs = c("Concatinated file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "NA", + example = paste() + ) +) diff --git a/Rcwl/tl_fragCounter.R b/Rcwl/tl_fragCounter.R new file mode 100644 index 0000000..96c305c --- /dev/null +++ b/Rcwl/tl_fragCounter.R @@ -0,0 +1,31 @@ +## https://github.com/mskilab-org/fragCounter +p1 <- InputParam(id = "bam", type = "File", prefix = "-b", secondaryFiles = list(".bai?", "^.bai?")) +p2 <- InputParam(id = "gcmap", type = "Directory", prefix = "-d") +p3 <- InputParam(id = "window", type = "int", prefix = "-w") +p4 <- InputParam(id = "mapq", type = "int?", prefix = "-q") +p5 <- InputParam(id = "paired", type = "string", prefix = "-p", default="TRUE") +o1 <- OutputParam(id = "bw", type = "File", glob = "cov.corrected.bw") +o2 <- OutputParam(id = "rds", type = "File", glob = "cov.rds") +req1 <- requireDocker("hubentu/jabba:fix") +fragCounter <- cwlProcess(cwlVersion = "v1.2", + baseCommand = "frag", + requirements = list(req1), + inputs = InputParamList(p1, p2, p3, p4, p5), + outputs = OutputParamList(o1, o2)) + + +fragCounter <- addMeta( + fragCounter, + label = "fragCounter", + doc = "fragCounter corrects Whole genome or targeted sequencing data for GC and mappability bias.", + inputLabels = c("bam","gcmap","window","mapq","paired"), + inputDocs = c("Path to .bam file","Mappability / GC content dir","Window / bin size","Minimal map quality","Is paired"), + outputLabels = c("bw","rds"), + outputDocs = c("corrected bw file","output RDS file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/mskilab-org/fragCounter", + example = paste() + ) +) diff --git a/Rcwl/tl_gc_wiggle.R b/Rcwl/tl_gc_wiggle.R new file mode 100644 index 0000000..e91d0c3 --- /dev/null +++ b/Rcwl/tl_gc_wiggle.R @@ -0,0 +1,27 @@ +## https://sequenza-utils.readthedocs.io/en/latest/ +p1 <- InputParam(id = "window", type = "int", prefix = "-w") +p2 <- InputParam(id = "ref", type = "File", prefix = "-f") +p3 <- InputParam(id = "out", type = "string", prefix = "-o") +o1 <- OutputParam(id = "wig", type = "File", glob = "$(inputs.out)") +r1 <- requireDocker("quay.io/biocontainers/sequenza-utils:3.0.0--py39h67e14b5_5") +gc_wiggle <- cwlProcess(baseCommand = c("sequenza-utils", "gc_wiggle"), + requirements = list(r1), + inputs = InputParamList(p1, p2, p3), + outputs = OutputParamList(o1)) + + +gc_wiggle <- addMeta( + gc_wiggle, + label = "gc_wiggle", + doc = "Given a fasta file and a window size it computes the GC percentage across the sequences, and returns a file in the UCSC wiggle format.", + inputLabels = c("window","ref","out"), + inputDocs = c("The window size to calculate the GC-content percentage","the fasta file. It can be a file name or '-' to use STDIN","Output file '-' for STDOUT"), + outputLabels = c("wig"), + outputDocs = c("GC content wig file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://sequenza-utils.readthedocs.io/en/latest/", + example = paste() + ) +) diff --git a/Rcwl/tl_geneBody_coverage.R b/Rcwl/tl_geneBody_coverage.R index 23cbd60..ae6cf6e 100644 --- a/Rcwl/tl_geneBody_coverage.R +++ b/Rcwl/tl_geneBody_coverage.R @@ -6,7 +6,24 @@ o1 <- OutputParam(id = "gCovPDF", type = "File", glob = "*.geneBodyCoverage.curv o2 <- OutputParam(id = "gCovTXT", type = "File", glob = "*.geneBodyCoverage.txt") req1 <- list(class = "DockerRequirement", dockerPull = "hubentu/rcwl-rnaseq") -geneBody_coverage <- cwlParam(baseCommand = c("geneBody_coverage.py"), +geneBody_coverage <- cwlProcess(baseCommand = c("geneBody_coverage.py"), requirements = list(req1), inputs = InputParamList(p1, p2, p3), outputs = OutputParamList(o1, o2)) + + +geneBody_coverage <- addMeta( + geneBody_coverage, + label = "geneBody_coverage", + doc = "Calculate the RNA-seq reads coverage over gene body.", + inputLabels = c("bam","bed","prefix"), + inputDocs = c("Input file(s) in BAM format. '-i' takes these input:1) a single BAM file. 2) ',' separated BAM files. 3)directory containing one or more bam files. 4) plain text file containing the path of one or more bam file(Each row is a BAM file path). All BAM files should be sorted and indexed using samtools.","Reference gene model in bed format. [required]","Prefix of output files(s). [required]"), + outputLabels = c("gCovPDF","gCovTXT"), + outputDocs = c("The final plot, in PDF format","Table that includes the data used to generate the plots"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/Xinglab/rseqc", + example = paste() + ) +) diff --git a/Rcwl/tl_genePredToBed.R b/Rcwl/tl_genePredToBed.R index 874812e..b70a208 100644 --- a/Rcwl/tl_genePredToBed.R +++ b/Rcwl/tl_genePredToBed.R @@ -2,9 +2,27 @@ p1 <- InputParam(id = "genePred", type = "File", position = 1) p2 <- InputParam(id = "Bed", type = "string", position = 2) o1 <- OutputParam(id = "bed", type = "File", glob = "$(inputs.Bed)") -req1 <- list(class = "DockerRequirement", - dockerPull = "hubentu/rcwl-rnaseq") -genePredToBed <- cwlParam(baseCommand = "genePredToBed", - requirements = list(req1), - inputs = InputParamList(p1, p2), - outputs = OutputParamList(o1)) +## req1 <- list(class = "DockerRequirement", +## dockerPull = "hubentu/rcwl-rnaseq") +req1 <- requireDocker("quay.io/biocontainers/ucsc-genepredtobed:377--h0b8a92a_4") +genePredToBed <- cwlProcess(baseCommand = "genePredToBed", + requirements = list(req1), + inputs = InputParamList(p1, p2), + outputs = OutputParamList(o1)) + + +genePredToBed <- addMeta( + genePredToBed, + label = "genePredToBed", + doc = "Convert from genePred to bed format.", + inputLabels = c("genePred","Bed"), + inputDocs = c("Input genePred file","Name of output bed file"), + outputLabels = c("bed"), + outputDocs = c("Bed file output"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/ENCODE-DCC/kentUtils", + example = paste() + ) +) diff --git a/Rcwl/tl_ggsashimi.R b/Rcwl/tl_ggsashimi.R new file mode 100644 index 0000000..6f7244d --- /dev/null +++ b/Rcwl/tl_ggsashimi.R @@ -0,0 +1,35 @@ +## https://github.com/guigolab/ggsashimi +p1 <- InputParam(id = "tsv", type = "File", prefix = "-b") +p2 <- InputParam(id = "bamDir", type = "Directory", position = -1, + doc = "The bam files in the input tsv should be relative to this directory") +p3 <- InputParam(id = "coord", type = "string", prefix = "-c") +p4 <- InputParam(id = "gtf", type = "File", prefix = "-g") +p5 <- InputParam(id = "Cfactor", type = "int?", prefix = "-C") +p6 <- InputParam(id = "overlay", type = "int?", prefix = "-O") +p7 <- InputParam(id = "oprefix", type = "string", prefix = "-o", default = "sashimi") +p8 <- InputParam(id = "alpha", type = "float", prefix = "--alpha", default = 0.25) +o1 <- OutputParam(id = "plot", type = "File", glob = "$(inputs.oprefix).pdf") + +req1 <- requireDocker("guigolab/ggsashimi:1.0.0") +req2 <- requireInitialWorkDir(listing = list("$(inputs.bamDir)")) +ggsashimi <- cwlProcess(baseCommand = "", + requirements = list(req1, req2), + inputs = InputParamList(p1, p2, p3, p4, p5, p6, p7, p8), + outputs = OutputParamList(o1)) + + +ggsashimi <- addMeta( + ggsashimi, + label = "ggsashimi", + doc = "Command-line tool for the visualization of splicing events across multiple samples", + inputLabels = c("tsv","bamDir","coord","gtf","Cfactor","overlay","oprefix","alpha"), + inputDocs = c("Individual bam file or file with a list of bam files.In the case of a list of files the format is tsv:1col: id for bam file, 2col: path of bam file, 3+col:additional columns","Bam directory","Genomic region. Format: chr:start-end. Remember that bam coordinates are 0-based","Gtf file with annotation (only exons is enough)","Index of column with color levels (1-based)","Index of column with overlay levels (1-based)","Prefix for plot file name [default=sashimi]","Transparency level for density histogram [default=0.5]"), + outputLabels = c("plot"), + outputDocs = c("Plot of splicing event"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/guigolab/ggsashimi", + example = paste() + ) +) diff --git a/Rcwl/tl_gistic2.R b/Rcwl/tl_gistic2.R new file mode 100644 index 0000000..57ab404 --- /dev/null +++ b/Rcwl/tl_gistic2.R @@ -0,0 +1,36 @@ +p1 <- InputParam(id = "seg", type = "File", prefix = "-seg") +p2 <- InputParam(id = "refgene", type = "File", prefix = "-refgene") +p3 <- InputParam(id = "markers", type = "File?", prefix = "-mk") +p4 <- InputParam(id = "rx", type = "int?", prefix = "-rx") +p5 <- InputParam(id = "genegistic", type = "int?", prefix = "-genegistic") +p6 <- InputParam(id = "savegene", type = "int?", prefix = "-savegene") +p7 <- InputParam(id = "tamp", type = "float?", prefix = "-ta") +p8 <- InputParam(id = "tdel", type = "float?", prefix = "-td") +p9 <- InputParam(id = "gcm", type = "string?", prefix = "-gcm") +p10 <- InputParam(id = "brlen", type = "float?", prefix = "-brlen") +p11 <- InputParam(id = "conf", type = "float?", prefix = "-conf") +o1 <- OutputParam(id = "outs", type = "File[]", glob = "*") + +req1 <- requireDocker("hubentu/gistic2") +gistic2 <- cwlProcess(baseCommand = "gistic2", + requirements = list(req1), + arguments = list("-b", "./"), + inputs = InputParamList(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11), + outputs = OutputParamList(o1)) + + +gistic2 <- addMeta( + gistic2, + label = "gistic2", + doc = "The GISTIC module identifies regions of the genome that are significantly amplified or deleted across a set of samples", + inputLabels = c("seg","refgene","markers","rx","genegistic","savegene","tamp","tdel","gcm","brlen","conf"), + inputDocs = c("Path to segmented data input file (REQUIRED, see below for file description).","Path to reference genome data input file (REQUIRED, see below for file description).","Path to markers input file (OPTIONAL, but encouraged: see below for file description).","Flag indicating whether to remove data from the sex chromosomes before analysis. Allowed values= {1,0}. (DEFAULT=1, remove X,Y)","Flag indicating that the gene GISTIC algorithm should be used to calculate the significance of deletions at a gene level instead of a marker level. Allowed values= {1,0}. (DEFAULT=0, no gene GISTIC).","Flag indicating that gene tables should be saved. Allowed values= {1,0}. (DEFAULT=0, don't save gene tables)","Threshold for copy number amplifications. Regions with a copy number gain above this positive value are considered amplified. Regions with a copy number gain smaller than this value are considered noise and set to 0. (DEFAULT=0.1)","Threshold for copy number deletions. Regions with a copy number loss below the negative of this positive value are considered deletions. Regions with a smaller copy number loss are considered noise and set to 0. (DEFAULT=0.1)","Method for reducing marker-level copy number data to the gene-level copy number data in the gene tables. Markers contained in the gene are used when available, otherwise the flanking marker or markers are used. Allowed values are mean, median, min, max or extreme. The extreme method chooses whichever of min or max is furthest from diploid. (DEFAULT=mean)","Threshold used to distinguish broad from focal events, given in units of fraction of chromosome arm. (DEFAULT = 0.98)","Confidence level used to calculate the region containing a driver. (DEFAULT=0.75)"), + outputLabels = c("outs"), + outputDocs = c("gistic2 output files"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/broadinstitute/gistic2", + example = paste() + ) +) diff --git a/Rcwl/tl_glnexus_cli.R b/Rcwl/tl_glnexus_cli.R new file mode 100644 index 0000000..33309c3 --- /dev/null +++ b/Rcwl/tl_glnexus_cli.R @@ -0,0 +1,32 @@ +## https://github.com/dnanexus-rnd/GLnexus +p1 <- InputParam(id = "config", type = "string", prefix = "--config") +p2 <- InputParam(id = "bed", type = "File?", prefix = "--bed") +p3 <- InputParam(id = "gvcfs", type = "File[]") +p4 <- InputParam(id = "ovcf", type = "string", position = -1) +p5 <- InputParam(id = "threads", type = "int", prefix = "-t") +o1 <- OutputParam(id = "bcf", type = "File", glob = "$(inputs.ovcf)") + +## req1 <- requireDocker("quay.io/mlin/glnexus:v1.3.1") +req1 <- requireDocker("ghcr.io/dnanexus-rnd/glnexus:v1.4.1") +glnexus_cli <- cwlProcess(baseCommand = "glnexus_cli", + requirements = list(req1), + inputs = InputParamList(p1, p2, p3, p4, p5), + outputs = OutputParamList(o1), + stdout = "$(inputs.ovcf)") + + +glnexus_cli <- addMeta( + glnexus_cli, + label = "glnexus_cli", + doc = "Merge and joint-call input gVCF files, emitting multi-sample BCF on standard output.", + inputLabels = c("config","bed","gvcfs","ovcf","threads"), + inputDocs = c("configuration preset name or .yml filename (default: gatk)","three-column BED file with ranges to analyze (if neither --range nor --bed: use full length of all contigs)","Input gVCFs file","Output vcf file","thread budget (default: all hardware threads)"), + outputLabels = c("bcf"), + outputDocs = c("Output file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/dnanexus-rnd/GLnexus", + example = paste() + ) +) diff --git a/Rcwl/tl_glnexus_cli_list.R b/Rcwl/tl_glnexus_cli_list.R new file mode 100644 index 0000000..728d564 --- /dev/null +++ b/Rcwl/tl_glnexus_cli_list.R @@ -0,0 +1,34 @@ +## https://github.com/dnanexus-rnd/GLnexus +p1 <- InputParam(id = "config", type = "string", prefix = "--config") +p2 <- InputParam(id = "bed", type = "File?", prefix = "--bed") +p3 <- InputParam(id = "gvcfs", type = "File[]", position = -1) +p4 <- InputParam(id = "ovcf", type = "string", position = -1) +p5 <- InputParam(id = "threads", type = "int", prefix = "-t") +o1 <- OutputParam(id = "bcf", type = "File", glob = "$(inputs.ovcf)") + +req1 <- requireDocker("ghcr.io/dnanexus-rnd/glnexus:v1.4.1") +req2 <- requireManifest("gvcfs") +req3 <- requireJS() +glnexus_cli_list <- cwlProcess(baseCommand = "glnexus_cli", + requirements = list(req1, req2, req3), + arguments = list("--list", "gvcfs"), + inputs = InputParamList(p1, p2, p3, p4, p5), + outputs = OutputParamList(o1), + stdout = "$(inputs.ovcf)") + + +glnexus_cli_list <- addMeta( + glnexus_cli_list, + label = "glnexus_cli_list", + doc = "Merge and joint-call input gVCF files, emitting multi-sample BCF on standard output.", + inputLabels = c("config","bed","gvcfs","ovcf","threads"), + inputDocs = c("configuration preset name or .yml filename (default: gatk)","three-column BED file with ranges to analyze (if neither --range nor --bed: use full length of all contigs)","Input gVCFs file","Output vcf file","thread budget (default: all hardware threads)"), + outputLabels = c("bcf"), + outputDocs = c("Output file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/dnanexus-rnd/GLnexus", + example = paste() + ) +) diff --git a/Rcwl/tl_gridss.R b/Rcwl/tl_gridss.R new file mode 100644 index 0000000..e3ec1cc --- /dev/null +++ b/Rcwl/tl_gridss.R @@ -0,0 +1,38 @@ +## https://github.com/PapenfussLab/gridss + +p1 <- InputParam(id = "bam", type = "File", position = 99, secondaryFiles = ".bai") +p2 <- InputParam(id = "ref", type = "File", prefix = "--reference", + secondaryFiles = c(".amb", ".ann", ".bwt", ".pac", ".sa", ".fai")) +p3 <- InputParam(id = "vcf", type = "string", prefix = "--output") +p4 <- InputParam(id = "assembly", type = "string?", prefix = "--assembly") +p5 <- InputParam(id = "threads", type = "int?", prefix = "--threads") +p6 <- InputParam(id = "gridss", type = "File?", prefix = "--jar") +p7 <- InputParam(id = "steps", type = "string", prefix = "--steps", default = "all") +o1 <- OutputParam(id = "ovcf", type = "File", glob = "$(inputs.vcf)") +o2 <- OutputParam(id = "abam", type = "File?", glob = "$(inputs.assembly)") + +req1 <- requireDocker("quay.io/biocontainers/gridss:2.13.2--h20b1175_1") +req2 <- list(class = "InitialWorkDirRequirement", + listing = list("$(inputs.ref)")) + +gridss <- cwlProcess(baseCommand = "gridss", + requirements = list(req1, req2), + inputs = InputParamList(p1, p2, p3, p4, p5, p6, p7), + outputs = OutputParamList(o1, o2)) + + +gridss <- addMeta( + gridss, + label = "gridss", + doc = "GRIDSS is a module software suite containing tools useful for the detection of genomic rearrangements.", + inputLabels = c("bam","ref","vcf","assembly","threads","gridss","steps"), + inputDocs = c("Input bam file","reference genome to use.","output VCF.","location of the GRIDSS assembly BAM. This file will be created by GRIDSS.","number of threads to use. (Default: 8)","location of GRIDSS jar","processing steps to run. Defaults to all steps.Multiple steps are specified using comma separators."), + outputLabels = c("ovcf","abam"), + outputDocs = c("Variant VCF file","Bam file for visualization"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/PapenfussLab/gridss", + example = paste() + ) +) diff --git a/Rcwl/tl_gtf2bed.R b/Rcwl/tl_gtf2bed.R new file mode 100644 index 0000000..fb7b52c --- /dev/null +++ b/Rcwl/tl_gtf2bed.R @@ -0,0 +1,31 @@ +script <- " +gtf=$1 +name=`basename $gtf .gtf` +awk '{ if ($0 ~ \"transcript_id\") print $0; else print $0\" transcript_id \\\"\\\";\"; }' $gtf | gtf2bed - > $name.bed +" +p1 <- InputParam(id = "gtf", type = "File") +o1 <- OutputParam(id = "bed", type = "File", glob = "*.bed") +req1 <- requireDocker("quay.io/biocontainers/bedops:2.4.39--h7d875b9_1") +req2 <- requireShellScript(script) +gtf2bed <- cwlProcess(cwlVersion = "v1.2", + baseCommand = ShellScript(), + requirements = list(req1, req2), + inputs = InputParamList(p1), + outputs = OutputParamList(o1)) + + +gtf2bed <- addMeta( + gtf2bed, + label = "gtf2bed", + doc = "Convert gtf to bed", + inputLabels = c("gtf"), + inputDocs = c("Input gtf file"), + outputLabels = c("bed"), + outputDocs = c("Output bed file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/arq5x/bedops", + example = paste() + ) +) diff --git a/Rcwl/tl_gtfToGenePred.R b/Rcwl/tl_gtfToGenePred.R index cbb6b30..75853b8 100644 --- a/Rcwl/tl_gtfToGenePred.R +++ b/Rcwl/tl_gtfToGenePred.R @@ -2,9 +2,28 @@ p1 <- InputParam(id = "gtf", type = "File", position = 1) p2 <- InputParam(id = "gPred", type = "string", position = 2) o1 <- OutputParam(id = "genePred", type = "File", glob = "$(inputs.gPred)") -req1 <- list(class = "DockerRequirement", - dockerPull = "hubentu/rcwl-rnaseq") -gtfToGenePred <- cwlParam(baseCommand = "gtfToGenePred", - requirements = list(req1), - inputs = InputParamList(p1, p2), - outputs = OutputParamList(o1)) +## req1 <- list(class = "DockerRequirement", +## dockerPull = "hubentu/rcwl-rnaseq") +req1 <- requireDocker("quay.io/biocontainers/ucsc-gtftogenepred:377--h0b8a92a_4") +gtfToGenePred <- cwlProcess(baseCommand = "gtfToGenePred", + arguments = list("-genePredExt"), + requirements = list(req1), + inputs = InputParamList(p1, p2), + outputs = OutputParamList(o1)) + + +gtfToGenePred <- addMeta( + gtfToGenePred, + label = "gtfToGenePred", + doc = "convert a GTF file to a genePred", + inputLabels = c("gtf","gPred"), + inputDocs = c("Input gtf file","Name of output gPred file"), + outputLabels = c("genePred"), + outputDocs = c("Output gPred file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/ENCODE-DCC/kentUtils", + example = paste() + ) +) diff --git a/Rcwl/tl_hisat2_align.R b/Rcwl/tl_hisat2_align.R index 0f6168d..e7025a0 100644 --- a/Rcwl/tl_hisat2_align.R +++ b/Rcwl/tl_hisat2_align.R @@ -19,8 +19,25 @@ p3 <- InputParam(id = "fq1", type = "File", prefix = "-1") p4 <- InputParam(id = "fq2", type = "File", prefix = "-2") o1 <- OutputParam(id = "sam", type = "File", glob = "*.sam") -hisat2_align <- cwlParam(baseCommand = "hisat2", +hisat2_align <- cwlProcess(baseCommand = "hisat2", requirements = list(req1, req2), inputs = InputParamList(p1, p2, p3, p4), outputs = OutputParamList(o1), stdout = "output.sam") + + +hisat2_align <- addMeta( + hisat2_align, + label = "hisat2_align", + doc = "HISAT2 is a fast and sensitive alignment program for mapping next-generation sequencing reads (both DNA and RNA) to a population of human genomes as well as to a single reference genome.", + inputLabels = c("threadN","IndexPrefix","fq1","fq2"), + inputDocs = c("number of alignment threads to launch (1)","Index filename prefix (minus trailing .X.ht2).","fasrq file 1","fasrq file 2"), + outputLabels = c("sam"), + outputDocs = c("Aligned sam file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/DaehwanKimLab/hisat2", + example = paste() + ) +) diff --git a/Rcwl/tl_hisat2_build.R b/Rcwl/tl_hisat2_build.R index 79f99a7..71b89bb 100644 --- a/Rcwl/tl_hisat2_build.R +++ b/Rcwl/tl_hisat2_build.R @@ -8,7 +8,24 @@ p1 <- InputParam(id = "ref", type = "File", position = 1) p2 <- InputParam(id = "outPrefix", type = "string", position = 2) o1 <- OutputParam(id = "idx", type = "File[]", glob = "$(inputs.outPrefix).*") -hisat2_build <- cwlParam(baseCommand = c("hisat2-build"), +hisat2_build <- cwlProcess(baseCommand = c("hisat2-build"), requirements = list(req1), inputs = InputParamList(p1, p2), outputs = OutputParamList(o1)) + + +hisat2_build <- addMeta( + hisat2_build, + label = "hisat2_build", + doc = "hisat2-build builds a HISAT2 index from a set of DNA sequences.", + inputLabels = c("ref","outPrefix"), + inputDocs = c("comma-separated list of files with ref sequences","write ht2 data to files with this dir/basename"), + outputLabels = c("idx"), + outputDocs = c("Output indexed file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/DaehwanKimLab/hisat2", + example = paste() + ) +) diff --git a/Rcwl/tl_htseq.R b/Rcwl/tl_htseq.R index fdce9eb..231e21d 100644 --- a/Rcwl/tl_htseq.R +++ b/Rcwl/tl_htseq.R @@ -11,10 +11,27 @@ p3 <- InputParam(id = "bam", type = "File") p4 <- InputParam(id = "gtf", type = "File") o1 <- OutputParam(id = "out", type = "File", glob = "$(inputs.bam.nameroot).htseq.txt") -htseq <- cwlParam(baseCommand = "htseq-count", +htseq <- cwlProcess(baseCommand = "htseq-count", requirements = list(req1), arguments = list("--format", "bam", "--mode", "intersection-strict"), inputs = InputParamList(p1, p2, p3, p4), outputs = OutputParamList(o1), stdout = "$(inputs.bam.nameroot).htseq.txt") + + +htseq <- addMeta( + htseq, + label = "htseq", + doc = "HTseq Input BAM needs to be sorted by position or name For gene quantification", + inputLabels = c("minaqual","stranded","bam","gtf"), + inputDocs = c("skip all reads with alignment quality lower than the given minimum value (default: 10)","whether the data is from a strand-specific assay.Specify 'yes', 'no', or 'reverse' (default: yes).'reverse' means 'yes' with reversed strand interpretation","Path to the SAM/BAM files containing the mapped reads.If '-' is selected, read from standard input","Path to the file containing the features"), + outputLabels = c("out"), + outputDocs = c("Count file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/htseq/htseq", + example = paste() + ) +) diff --git a/Rcwl/tl_infer_experiment.R b/Rcwl/tl_infer_experiment.R new file mode 100644 index 0000000..288ad44 --- /dev/null +++ b/Rcwl/tl_infer_experiment.R @@ -0,0 +1,27 @@ +p1 <- InputParam(id = "bed", type = "File", prefix = "-r") +p2 <- InputParam(id = "bam", type = "File", prefix = "-i", secondaryFiles = ".bai") +p3 <- InputParam(id = "size", type = "int?", prefix = "-s") +o1 <- OutputParam(id = "sout", type = "File", glob = "$(inputs.bam.nameroot).strand.txt") +req1 <- requireDocker("quay.io/biocontainers/rseqc:4.0.0--py38h4a8c8d9_1") +infer_experiment <- cwlProcess(baseCommand = "infer_experiment.py", + requirements = list(req1), + inputs = InputParamList(p1, p2, p3), + outputs = OutputParamList(o1), + stdout = "$(inputs.bam.nameroot).strand.txt") + + +infer_experiment <- addMeta( + infer_experiment, + label = "infer_experiment", + doc = "Tool to “guess” how RNA-seq sequencing were configured, particulary how reads were stranded for strand-specific RNA-seq data", + inputLabels = c("bed","bam","size"), + inputDocs = c("Reference gene model in bed fomat.","Input alignment file in SAM or BAM format","Number of reads sampled from SAM/BAM file.default=200000"), + outputLabels = c("sout"), + outputDocs = c("Info regarding how reads were stranded for strand-specific RNA-seq data"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/Xinglab/rseqc", + example = paste() + ) +) diff --git a/Rcwl/tl_jabba.R b/Rcwl/tl_jabba.R new file mode 100644 index 0000000..9bb8a21 --- /dev/null +++ b/Rcwl/tl_jabba.R @@ -0,0 +1,38 @@ +## https://github.com/mskilab-org/JaBbA + +p1 <- InputParam(id = "junction", type = "File", position = 1) +p2 <- InputParam(id = "coverage", type = "File", position = 2) +p3 <- InputParam(id = "gurobi", type = "string?", + prefix = "--gurobi", position = 3, default="TRUE") +p4 <- InputParam(id = "slack", type = "int?", + prefix = "--slack", position = 4) +p5 <- InputParam(id = "license", type = "File", position = -1) +o1 <- OutputParam(id = "gg", type = "File", glob = "jabba.simple.gg.rds") +o2 <- OutputParam(id = "plot", type = "File", glob = "karyograph.rds.ppfit.png") +o3 <- OutputParam(id = "seg", type = "File", glob = "jabba.seg") +o4 <- OutputParam(id = "report", type = "File", glob = "opt.report.rds") +req1 <- requireDocker("hubentu/jabba") +req2 <- requireEnvVar(list( + GRB_LICENSE_FILE="$(inputs.license.path)")) +req3 <- requireJS() +jabba <- cwlProcess(baseCommand = "jba", + requirements = list(req1, req2, req3), + inputs = InputParamList(p1, p2, p3, p4, p5), + outputs = OutputParamList(o1, o2, o3, o4)) + + +jabba <- addMeta( + jabba, + label = "jabba", + doc = "JaBbA builds a genome graph based on junctions and read depth from whole genome sequencing, inferring optimal copy numbers for both vertices (DNA segments) and edges (bonds between segments). It can be used for discovering various patterns of structural variations.", + inputLabels = c("junction","coverage","gurobi","slack","license"), + inputDocs = c("BND style vcf, bedpe, rds of GrangesList",".wig, .bw, .bedgraph, .bed., .rds of a granges, or .tsv .csv /.txt file that is coercible to a GRanges use --field=FIELD argument so specify which column to use if specific meta field of a multi-column table","use gurobi optimizer instead of CPLEX?","Slack penalty to apply per loose end","license"), + outputLabels = c("gg","plot","seg","report"), + outputDocs = c("The out put genome graph with integer copy numbers.","plot illustrates the distribution of the raw segmental mean of the coverage signal, with red dashed vertical lines indicating the grid of integer copy number states","SEG format file of the final segmental copy numbers, compatible with IGV/ABSOLUTE/GISTIC and many more.","This file contains an R data.table object of the convergence statistics of all the sub-problems (identified by 'cl' column)."), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/mskilab-org/JaBbA", + example = paste() + ) +) diff --git a/Rcwl/tl_kallisto_index.R b/Rcwl/tl_kallisto_index.R index 00ad400..f8d8988 100644 --- a/Rcwl/tl_kallisto_index.R +++ b/Rcwl/tl_kallisto_index.R @@ -6,7 +6,24 @@ o1 <- OutputParam(id = "fidx", type = "File", glob = "$(inputs.index)") req1 <- list(class = "DockerRequirement", dockerPull = "zlskidmore/kallisto") -kallisto_index <- cwlParam(baseCommand = c("kallisto", "index"), +kallisto_index <- cwlProcess(baseCommand = c("kallisto", "index"), requirements = list(req1), inputs = InputParamList(p1, p2), outputs = OutputParamList(o1)) + + +kallisto_index <- addMeta( + kallisto_index, + label = "kallisto_index", + doc = "builds an index from a FASTA formatted file of target sequences.", + inputLabels = c("index","fasta"), + inputDocs = c("Filename for the kallisto index to be constructed","Input fasta file"), + outputLabels = c("fidx"), + outputDocs = c("Indexed file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://pachterlab.github.io/kallisto/", + example = paste() + ) +) diff --git a/Rcwl/tl_kallisto_quant.R b/Rcwl/tl_kallisto_quant.R index ea54faf..0d1e84c 100644 --- a/Rcwl/tl_kallisto_quant.R +++ b/Rcwl/tl_kallisto_quant.R @@ -9,8 +9,25 @@ o3 <- OutputParam(id = "info", type = "File", glob = "run_info.json") req1 <- list(class = "DockerRequirement", dockerPull = "zlskidmore/kallisto") -kallisto_quant <- cwlParam(baseCommand = c("kallisto", "quant"), +kallisto_quant <- cwlProcess(baseCommand = c("kallisto", "quant"), requirements = list(req1), arguments = list("-o", "./"), inputs = InputParamList(p1, p2, p3), outputs = OutputParamList(o1, o2, o3)) + + +kallisto_quant <- addMeta( + kallisto_quant, + label = "kallisto_quant", + doc = "Runs the quantification algorithm", + inputLabels = c("index","fastq","threads"), + inputDocs = c("Filename for the kallisto index to be used for quantification","Input dastq file","Number of threads to use (default: 1)"), + outputLabels = c("h5","tsv","info"), + outputDocs = c("HDF5 (Hierarchical Data Format) binary file that contains the same abundance information","Estimated abundance of transcripts in the RNA-Seq sample","A JSON file that contains metadata and information about the kallisto quant"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://pachterlab.github.io/kallisto/", + example = paste() + ) +) diff --git a/Rcwl/tl_lancet.R b/Rcwl/tl_lancet.R index 9af2b0c..1fc9a5b 100644 --- a/Rcwl/tl_lancet.R +++ b/Rcwl/tl_lancet.R @@ -1,19 +1,36 @@ ## https://github.com/nygenome/lancet p1 <- InputParam(id = "tbam", type = "File", prefix = "--tumor", - secondaryFiles = ".bai") + secondaryFiles = list("^.bai?", ".bai?")) p2 <- InputParam(id = "nbam", type = "File", prefix = "--normal", - secondaryFiles = ".bai") -p3 <- InputParam(id = "ref", type = "File", - prefix = "--ref", secondaryFiles = ".fai") -p4 <- InputParam(id = "region", type = "File", prefix = "--bed") -p5 <- InputParam(id = "threads", type = "int", prefix = "--num-threads") -o1 <- OutputParam(id = "vcf", type = "stdout") + secondaryFiles = list("^.bai?", ".bai?")) +p3 <- InputParam(id = "ref", type = "File", prefix = "--ref", + secondaryFiles = ".fai") +p4 <- InputParam(id = "bed", type = "File?", prefix = "--bed") +p5 <- InputParam(id = "reg", type = "string?", prefix = "--reg") +p6 <- InputParam(id = "threads", type = "int", prefix = "--num-threads") +o1 <- OutputParam(id = "vcf", type = "File", glob = "$(inputs.tbam.namerooot)_lancet.vcf") +req1 <- requireDocker("hubentu/lancet") +lancet <- cwlProcess(cwlVersion = "v1.2", + baseCommand = "lancet", + requirements = list(req1), + inputs = InputParamList(p1, p2, p3, p4, p5, p6), + outputs = OutputParamList(o1), + stdout = "$(inputs.tbam.namerooot)_lancet.vcf") -req1 <- list(class = "DockerRequirement", - dockerPull = "kfdrc/lancet:1.0.7") -lancet <- cwlParam(baseCommand = "/lancet-1.0.7/lancet", - requirements = list(req1), - inputs = InputParamList(p1, p2, p3, p4, p5), - outputs = OutputParamList(o1), - stdout = "$(inputs.tbam.nameroot)_$(inputs.nbam.nameroot).vcf") + +lancet <- addMeta( + lancet, + label = "lancet", + doc = "Lancet is a somatic variant caller (SNVs and indels) for short read data. Lancet uses a localized micro-assembly strategy to detect somatic mutation with high sensitivity and accuracy on a tumor/normal pair.", + inputLabels = c("tbam","nbam","ref","bed","reg","threads"), + inputDocs = c("BAM file of mapped reads for tumor","BAM file of mapped reads for normal","FASTA file of reference genome","genomic regions from file (BED format)","genomic region (in chr:start-end format)","number of parallel threads [default: 1]"), + outputLabels = c("vcf"), + outputDocs = c("Variant vcf file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/nygenome/lancet", + example = paste() + ) +) diff --git a/Rcwl/tl_liftOver.R b/Rcwl/tl_liftOver.R new file mode 100644 index 0000000..e78845a --- /dev/null +++ b/Rcwl/tl_liftOver.R @@ -0,0 +1,29 @@ +## listOver +p1 <- InputParam(id = "oldFile", type = "File", position = 1) +p2 <- InputParam(id = "chain", type = "File", position = 2) +p3 <- InputParam(id = "newFile", type = "string", position = 3) +p4 <- InputParam(id = "unmap", type = "string", position = 4) +o1 <- OutputParam(id = "outFile", type = "File", glob = "$(inputs.newFile)") +o2 <- OutputParam(id = "unMap", type = "File", glob = "$(inputs.unmap)") +req1 <- requireDocker("biowardrobe2/ucscuserapps:v358_2") +liftOver <- cwlProcess(baseCommand = "liftOver", + requirements = list(req1), + inputs = InputParamList(p1, p2, p3, p4), + outputs = OutputParamList(o1, o2)) + + +liftOver <- addMeta( + liftOver, + label = "liftOver", + doc = "Lift over variants, positions, or intervals from one reference genome to another.", + inputLabels = c("oldFile","chain","newFile","unmap"), + inputDocs = c("Input file","chain file liftOver to perform the conversion between genome assemblies","New liftover file","Output file"), + outputLabels = c("outFile","unMap"), + outputDocs = c("Liftoverred file","file listing regions that could not be converted"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/ENCODE-DCC/kentUtils", + example = paste() + ) +) diff --git a/Rcwl/tl_lofreq_indelqual.R b/Rcwl/tl_lofreq_indelqual.R new file mode 100644 index 0000000..7a488e6 --- /dev/null +++ b/Rcwl/tl_lofreq_indelqual.R @@ -0,0 +1,29 @@ +p1 <- InputParam(id = "ref", type = "File", prefix = "-f", + secondaryFiles = ".fai", position = 1) +p2 <- InputParam(id = "bam", type = "File", position = 2) +p3 <- InputParam(id = "ibam", type = "string", position = -1) +o1 <- OutputParam(id = "obam", type = "File", glob = "$(inputs.ibam)") +req1 <- requireDocker("quay.io/biocontainers/lofreq:2.1.5--py37h916d2e8_4") +lofreq_indelqual <- cwlProcess(baseCommand = c("lofreq", "indelqual"), + requirements = list(req1), + arguments = list("--dindel", "--verbose"), + inputs = InputParamList(p1, p2, p3), + outputs = OutputParamList(o1), + stdout = "$(inputs.ibam)") + + +lofreq_indelqual <- addMeta( + lofreq_indelqual, + label = "lofreq_indelqual", + doc = "Insert indel qualities into BAM file", + inputLabels = c("ref","bam","ibam"), + inputDocs = c("Reference sequence used for mapping (Only required for --dindel)","Input bam file","indexed bam file"), + outputLabels = c("obam"), + outputDocs = c("Output bam file with indel qual"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/CSB5/lofreq", + example = paste() + ) +) diff --git a/Rcwl/tl_lofreq_viterbi.R b/Rcwl/tl_lofreq_viterbi.R new file mode 100644 index 0000000..36dc4fc --- /dev/null +++ b/Rcwl/tl_lofreq_viterbi.R @@ -0,0 +1,29 @@ +p1 <- InputParam(id = "ref", type = "File", prefix = "-f", + secondaryFiles = ".fai", position = 1) +p2 <- InputParam(id = "bam", type = "File", position = 2, secondaryFiles = ".bai") +p3 <- InputParam(id = "vbam", type = "string", position = -1) +o1 <- OutputParam(id = "obam", type = "File", glob = "$(inputs.vbam)") +req1 <- requireDocker("quay.io/biocontainers/lofreq:2.1.5--py37h916d2e8_4") +lofreq_viterbi <- cwlProcess(baseCommand = c("lofreq", "viterbi"), + requirements = list(req1), + arguments = list("--verbose"), + inputs = InputParamList(p1, p2, p3), + outputs = OutputParamList(o1), + stdout = "$(inputs.vbam)") + + +lofreq_viterbi <- addMeta( + lofreq_viterbi, + label = "lofreq_viterbi", + doc = "Probabilistic realignment of your already mapped reads, which corrects mapping errors (run right after mapping). Not recommended for non-Illumina data.", + inputLabels = c("ref","bam","vbam"), + inputDocs = c("Indexed reference fasta file [null]","Input bam file","Input variant bam file"), + outputLabels = c("obam"), + outputDocs = c("realigned bam file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/arq5x/lumpy-sv", + example = paste() + ) +) diff --git a/Rcwl/tl_lumpy.R b/Rcwl/tl_lumpy.R new file mode 100644 index 0000000..4a1698d --- /dev/null +++ b/Rcwl/tl_lumpy.R @@ -0,0 +1,28 @@ +## https://github.com/arq5x/lumpy-sv +p1 <- InputParam(id = "bam", type = "File[]", prefix = "-B", itemSeparator = ",", secondaryFiles = ".bai") +p2 <- InputParam(id = "split", type = "File[]", prefix = "-S", itemSeparator = ",", secondaryFiles = ".bai") +p3 <- InputParam(id = "discord", type = "File[]", prefix = "-D", itemSeparator = ",", secondaryFiles = ".bai") +p4 <- InputParam(id = "vout", type = "string", prefix = "-o") +o1 <- OutputParam(id = "vcf", type = "File", glob = "$(inputs.vout)") +req1 <- requireDocker("quay.io/biocontainers/lumpy-sv:0.3.1--hdfd78af_3") +lumpy <- cwlProcess(baseCommand = "lumpyexpress", + requirements = list(req1), + inputs = InputParamList(p1, p2, p3, p4), + outputs = OutputParamList(o1)) + + +lumpy <- addMeta( + lumpy, + label = "lumpy", + doc = "A probabilistic framework for structural variant discovery.", + inputLabels = c("bam","split","discord","vout"), + inputDocs = c("full BAM or CRAM file(s) (comma separated) (required)","split reads BAM file(s) (comma separated)","discordant reads BAM files(s) (comma separated)","output file [fullBam.bam.vcf]"), + outputLabels = c("vcf"), + outputDocs = c("Output Variant file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/arq5x/lumpy-sv", + example = paste() + ) +) diff --git a/Rcwl/tl_lumpy_extractSplitReads_BwaMem.R b/Rcwl/tl_lumpy_extractSplitReads_BwaMem.R new file mode 100644 index 0000000..5460df3 --- /dev/null +++ b/Rcwl/tl_lumpy_extractSplitReads_BwaMem.R @@ -0,0 +1,25 @@ +p1 <- InputParam(id = "sam", type = "File", prefix = "-i") +o1 <- OutputParam(id = "splitReads", type = "File", glob = "$(inputs.sam.nameroot).splitReads.sam") +req1 <- requireDocker("quay.io/biocontainers/lumpy-sv:0.3.1--hdfd78af_3") +lumpy_extractSplitReads_BwaMem <- cwlProcess(baseCommand = "extractSplitReads_BwaMem", + requirements = list(req1), + inputs = InputParamList(p1), + outputs = OutputParamList(o1), + stdout = "$(inputs.sam.nameroot).splitReads.sam") + + +lumpy_extractSplitReads_BwaMem <- addMeta( + lumpy_extractSplitReads_BwaMem, + label = "lumpy_extractSplitReads_BwaMem", + doc = "Get split-read alignments from bwa-mem in lumpy compatible format. Ignores reads marked as duplicates.", + inputLabels = c("sam"), + inputDocs = c("A SAM file or standard input (-i stdin)."), + outputLabels = c("splitReads"), + outputDocs = c("split read alignment in lumpy format"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/arq5x/lumpy-sv", + example = paste() + ) +) diff --git a/Rcwl/tl_mageck_count.R b/Rcwl/tl_mageck_count.R new file mode 100644 index 0000000..6e8d609 --- /dev/null +++ b/Rcwl/tl_mageck_count.R @@ -0,0 +1,32 @@ +## https://sourceforge.net/p/mageck/wiki/Home/ +p1 <- InputParam(id = "library", type = "File", prefix = "-l") +p2 <- InputParam(id = "fastq", type = "File[]", prefix = "--fastq") +p3 <- InputParam(id = "samples", type = "string[]?", + itemSeparator = ",", prefix = "--sample-label") +p4 <- InputParam(id = "prefix", type = "string", prefix = "-n") +p5 <- InputParam(id = "conSGRNA", type = "File?", prefix = "--control-sgrna") +o1 <- OutputParam(id = "counts", type = "File[]", + glob = "$(inputs.prefix)*") + +req1 <- requireDocker("quay.io/biocontainers/mageck:0.5.9.4--py38hed8969a_0") +mageck_count <- cwlProcess(baseCommand = c("mageck", "count"), + requirements = list(req1), + inputs = InputParamList(p1, p2, p3, p4, p5), + outputs = OutputParamList(o1)) + + +mageck_count <- addMeta( + mageck_count, + label = "mageck_count", + doc = "Used to quantify guide RNA (gRNA) counts from CRISPR screens", + inputLabels = c("library","fastq","samples","prefix","conSGRNA"), + inputDocs = c("A file containing the list of sgRNA names, their sequences and associated genes. Support file format: csv and txt. Provide an empty file for collecting all possible sgRNA counts.","Sample fastq files (or fastq.gz files, or SAM/BAM files after v0.5.5), separated by space; use comma (,) to indicate technical replicates of the same sample.","Sample labels, separated by comma (,). Must be equal to the number of samples provided (in --fastq option).","The prefix of the output file(s). Default sample1.","A list of control sgRNAs for normalization and for generating the null distribution of RRA."), + outputLabels = c("counts"), + outputDocs = c("Output count file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://sourceforge.net/p/mageck/wiki/Home/", + example = paste() + ) +) diff --git a/Rcwl/tl_mageck_mle.R b/Rcwl/tl_mageck_mle.R new file mode 100644 index 0000000..92f99ff --- /dev/null +++ b/Rcwl/tl_mageck_mle.R @@ -0,0 +1,29 @@ +p1 <- InputParam(id = "countTable", type = "File", prefix = "-k") +p2 <- InputParam(id = "desgin", type = "File?", prefix = "-d") +p3 <- InputParam(id = "day0", type = "string?", prefix = "--day0-label") +p4 <- InputParam(id = "prefix", type = "string", prefix = "-n") +p5 <- InputParam(id = "conSGRNA", type = "File?", prefix = "--control-sgrna") +o1 <- OutputParam(id = "mout", type = "File[]", glob = "$(inputs.prefix)*") + +req1 <- requireDocker("quay.io/biocontainers/mageck:0.5.9.4--py38hed8969a_0") +mageck_mle <- cwlProcess(baseCommand = c("mageck", "mle"), + requirements = list(req1), + inputs = InputParamList(p1, p2, p3, p4, p5), + outputs = OutputParamList(o1)) + + +mageck_mle <- addMeta( + mageck_mle, + label = "mageck_mle", + doc = "Estimates gene effects and their significance in each condition for multiple CRISPR experimental conditions or groups", + inputLabels = c("countTable","desgin","day0","prefix","conSGRNA"), + inputDocs = c("Provide a tab-separated count table. Each line in the table should include sgRNA name (1st column), target gene (2nd column) and read counts in each sample.","Provide a design matrix, either a file name or a quoted string of the design matrix. For example, '1,1;1,0'. The row of the design matrix must match the order of the samples in the count table (if --include- samples is not specified), or the order of the samples by the --include-samples option.","Specify the label for control sample (usually day 0 or plasmid). For every other sample label, the MLE module will treat it as a single condition and generate an corresponding design matrix.","The prefix of the output file(s). Default sample1.","A list of control sgRNAs for normalization and for generating the null distribution of RRA."), + outputLabels = c("mout"), + outputDocs = c("Output files"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://sourceforge.net/p/mageck/wiki/Home/", + example = paste() + ) +) diff --git a/Rcwl/tl_mageck_pathway.R b/Rcwl/tl_mageck_pathway.R new file mode 100644 index 0000000..63a88a5 --- /dev/null +++ b/Rcwl/tl_mageck_pathway.R @@ -0,0 +1,27 @@ +p1 <- InputParam(id = "geneRank", type = "File", prefix = "--gene-ranking") +p2 <- InputParam(id = "gmt", type = "File", prefix = "--gmt-file") +p3 <- InputParam(id = "prefix", type = "string", prefix = "-n") +o1 <- OutputParam(id = "pouts", type = "File[]", glob = "$(inputs.prefix)*") + +req1 <- requireDocker("quay.io/biocontainers/mageck:0.5.9.4--py38hed8969a_0") +mageck_pathway <- cwlProcess(baseCommand = c("mageck", "pathway"), + requirements = list(req1), + inputs = InputParamList(p1, p2, p3), + outputs = OutputParamList(o1)) + + +mageck_pathway <- addMeta( + mageck_pathway, + label = "mageck_pathway", + doc = "Determine if specific biological pathways or gene sets are significantly enriched with positively or negatively selected genes", + inputLabels = c("geneRank","gmt","prefix"), + inputDocs = c("The gene summary file (containing both positive and negative selection tests) generated by the gene test step. Pathway enrichment will be performed in both directions.","The pathway file in GMT format.","The prefix of the output file(s). Default sample1."), + outputLabels = c("pouts"), + outputDocs = c("The outputs generated"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://sourceforge.net/p/mageck/wiki/Home/", + example = paste() + ) +) diff --git a/Rcwl/tl_mageck_test.R b/Rcwl/tl_mageck_test.R new file mode 100644 index 0000000..2cacc0c --- /dev/null +++ b/Rcwl/tl_mageck_test.R @@ -0,0 +1,32 @@ +p1 <- InputParam(id = "countTable", type = "File", prefix = "-k") +p2 <- InputParam(id = "treat", type = "string[]?", + prefix = "-t", itemSeparator = ",") +p3 <- InputParam(id = "control", type = "string[]?", + prefix = "-c", itemSeparator = ",") +p4 <- InputParam(id = "prefix", type = "string", prefix = "-n") +p5 <- InputParam(id = "conSGRNA", type = "File?", prefix = "--control-sgrna") +p6 <- InputParam(id = "day0", type = "string?", prefix = "--day0-label") +o1 <- OutputParam(id = "touts", type = "File[]", glob = "$(inputs.prefix)*") + +req1 <- requireDocker("quay.io/biocontainers/mageck:0.5.9.4--py38hed8969a_0") +mageck_test <- cwlProcess(baseCommand = c("mageck", "test"), + requirements = list(req1), + inputs = InputParamList(p1, p2, p3, p4, p5, p6), + outputs = OutputParamList(o1)) + + +mageck_test <- addMeta( + mageck_test, + label = "mageck_test", + doc = "Designed to analyze CRISPR screen data by comparing the abundance of guide RNAs (gRNAs) targeting each gene between different experimental conditions", + inputLabels = c("countTable","treat","control","prefix","conSGRNA","day0"), + inputDocs = c("Provide a tab-separated count table instead of sam files. Each line in the table should include sgRNA name (1st column), gene name (2nd column) and read counts in each sample.","Sample label or sample index (0 as the first sample) in the count table as treatment experiments, separated by comma (,). If sample label is provided, the labels must match the labels in the first line of the count table; for example, 'HL60.final,KBM7.final'. For sample index, '0,2' means the 1st and 3rd samples are treatment experiments.","Sample label or sample index in the count table as control experiments, separated by comma (,). Default is all the samples not specified in treatment experiments.","The prefix of the output file(s). Default sample1.","A list of control sgRNAs for normalization and for generating the null distribution of RRA.","Specify the label for control sample (usually day 0 or plasmid). For every other sample label, the module will treat it as a treatment condition and compare with control sample."), + outputLabels = c("touts"), + outputDocs = c("The outputs generated"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://sourceforge.net/p/mageck/wiki/Home/", + example = paste() + ) +) diff --git a/Rcwl/tl_makeblastdb.R b/Rcwl/tl_makeblastdb.R index bd1bad0..eb33a9c 100644 --- a/Rcwl/tl_makeblastdb.R +++ b/Rcwl/tl_makeblastdb.R @@ -13,8 +13,25 @@ o1 <- OutputParam(id = "idx", type = "File", "$(inputs.Ref.basename + '.nin')", "$(inputs.Ref.basename + '.nsq')")) -makeblastdb <- cwlParam(baseCommand = c("makeblastdb"), +makeblastdb <- cwlProcess(baseCommand = c("makeblastdb"), requirements = list(req1, req2, req3), arguments = list("-dbtype", "nucl"), inputs = InputParamList(p1), outputs = OutputParamList(o1)) + + +makeblastdb <- addMeta( + makeblastdb, + label = "makeblastdb", + doc = "Produces BLAST databases from FASTA files", + inputLabels = c("Ref"), + inputDocs = c("Input sequence file"), + outputLabels = c("idx"), + outputDocs = c("blast db"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/ncbi/blast_plus", + example = paste() + ) +) diff --git a/Rcwl/tl_manta.R b/Rcwl/tl_manta.R index d45575b..327e7f9 100644 --- a/Rcwl/tl_manta.R +++ b/Rcwl/tl_manta.R @@ -7,6 +7,7 @@ p3 <- InputParam(id = "ref", type = "File", prefix = "--referenceFasta", secondaryFiles = ".fai", position = 3) p4 <- InputParam(id = "callRegions", type = "File?", prefix = "--callRegions", secondaryFiles = ".tbi", position = 4) +p5 <- InputParam(id = "exome", type = "boolean", prefix = "--exome", default = TRUE) o1 <- OutputParam(id = "somaticSV", type = "File", glob = "mantaRunDir/results/variants/somaticSV.vcf.gz", secondaryFiles = ".tbi") @@ -21,16 +22,33 @@ o4 <- OutputParam(id = "candidateSmallIndels", type = "File", secondaryFiles = ".tbi") req1 <- list(class = "DockerRequirement", - dockerPull = "cmopipeline/strelka2_manta") + dockerPull = "quay.io/biocontainers/manta:1.6.0--h9ee0642_1") req2 <- list(class = "ShellCommandRequirement") -manta <- cwlParam(baseCommand = "configManta.py", +manta <- cwlProcess(baseCommand = "configManta.py", requirements = list(req1, req2), arguments = list( - "--runDir", "mantaRunDir", "--exome", - list(valueFrom = " && ", position = 5L), + "--runDir", "mantaRunDir", + list(valueFrom = " && ", position = 5L, shellQuote = FALSE), list(valueFrom = "mantaRunDir/runWorkflow.py", position = 6L), list(valueFrom = "-m", position = 7L), list(valueFrom = "local", position = 8L)), - inputs = InputParamList(p1, p2, p3, p4), + inputs = InputParamList(p1, p2, p3, p4, p5), outputs = OutputParamList(o1, o2, o3, o4)) + + +manta <- addMeta( + manta, + label = "manta", + doc = "Manta calls structural variants (SVs) and indels from mapped paired-end sequencing reads. It is optimized for analysis of germline variation in small sets of individuals and somatic variation in tumor/normal sample pairs.", + inputLabels = c("tbam","nbam","ref","callRegions","exome"), + inputDocs = c("Tumor sample BAM or CRAM file. Only up to one tumor bam file accepted. [optional] (no default)","Normal sample BAM or CRAM file. May be specified more than once, multiple inputs will be treated as each BAM file representing a different sample. [optional] (no default)","samtools-indexed reference fasta file [required]","Optionally provide a bgzip-compressed/tabix-indexed BED file containing the set of regions to call. No VCF output will be provided outside of these regions. The full genome will still be used to estimate statistics from the input (such as expected fragment size distribution). Only one BED file may be specified. (default: call the entire genome)","Set options for WES input: turn off depth filters"), + outputLabels = c("somaticSV","diploidSV","candidateSV","candidateSmallIndels"), + outputDocs = c("Somantic SV file","Diploid SV file","Candidate SV file","Candidate Small Indel file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/Illumina/manta", + example = paste() + ) +) diff --git a/Rcwl/tl_markdup.R b/Rcwl/tl_markdup.R index 327d63f..02364c2 100644 --- a/Rcwl/tl_markdup.R +++ b/Rcwl/tl_markdup.R @@ -6,8 +6,25 @@ o1 <- OutputParam(id = "mBam", type = "File", glob = "$(inputs.obam)") o2 <- OutputParam(id = "Mat", type = "File", glob = "$(inputs.matrix)") req1 <- list(class = "DockerRequirement", dockerPull = "quay.io/biocontainers/picard:2.21.1--0") -markdup <- cwlParam(baseCommand = c("picard", +markdup <- cwlProcess(baseCommand = c("picard", "MarkDuplicates"), requirements = list(req1), inputs = InputParamList(p1, p2, p3), outputs = OutputParamList(o1, o2)) + + +markdup <- addMeta( + markdup, + label = "markdup", + doc = "Identifies duplicate reads.This tool locates and tags duplicate reads in a BAM or SAM file, where duplicate reads are defined as originating from a single fragment of DNA.", + inputLabels = c("ibam","obam","matrix"), + inputDocs = c("One or more input SAM or BAM files to analyze. Must be coordinate sorted. Default value:null. This option may be specified 0 or more times.","The output file to write marked records to Required.","File to write duplication metrics to Required."), + outputLabels = c("mBam","Mat"), + outputDocs = c("Marked duplicate bam file","Metric of marked duplicate"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/biod/sambamba", + example = paste() + ) +) diff --git a/Rcwl/tl_md5sum.R b/Rcwl/tl_md5sum.R new file mode 100644 index 0000000..6331055 --- /dev/null +++ b/Rcwl/tl_md5sum.R @@ -0,0 +1,23 @@ +p1 <- InputParam(id = "file", type = "File") +o1 <- OutputParam(id = "md5", type = "File", glob = "$(inputs.file.basename).md5") +md5sum <- cwlProcess(baseCommand = "md5sum", + inputs = InputParamList(p1), + outputs = OutputParamList(o1), + stdout = "$(inputs.file.basename).md5") + + +md5sum <- addMeta( + md5sum, + label = "md5sum", + doc = "compute and verify MD5 (Message Digest Algorithm 5) checksums for files", + inputLabels = c("file"), + inputDocs = c("Input FIle"), + outputLabels = c("md5"), + outputDocs = c("md5 checksum"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "NA", + example = paste() + ) +) diff --git a/Rcwl/tl_mergeBam.R b/Rcwl/tl_mergeBam.R index 1c9eea5..6f6b5c4 100644 --- a/Rcwl/tl_mergeBam.R +++ b/Rcwl/tl_mergeBam.R @@ -6,8 +6,25 @@ p2 <- InputParam(id = "obam", type = "string", prefix = "O=", separate = FALSE) o1 <- OutputParam(id = "oBam", type = "File", glob = "$(inputs.obam)") req1 <- list(class = "DockerRequirement", dockerPull = "quay.io/biocontainers/picard:2.21.1--0") -mergeBam <- cwlParam(baseCommand = c("picard", +mergeBam <- cwlProcess(baseCommand = c("picard", "MergeSamFiles"), requirements = list(req1), inputs = InputParamList(p1, p2), outputs = OutputParamList(o1)) + + +mergeBam <- addMeta( + mergeBam, + label = "mergeBam", + doc = "Merges multiple SAM and/or BAM files into a single file.", + inputLabels = c("ibam","obam"), + inputDocs = c("SAM or BAM input file Default value: null. This option must be specified at least 1 times.","SAM or BAM file to write merged result to Required."), + outputLabels = c("oBam"), + outputDocs = c("Merged bam file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/broadinstitute/picard", + example = paste() + ) +) diff --git a/Rcwl/tl_miRDeep2.R b/Rcwl/tl_miRDeep2.R index 8e18b70..4d662f9 100644 --- a/Rcwl/tl_miRDeep2.R +++ b/Rcwl/tl_miRDeep2.R @@ -20,7 +20,24 @@ o5 <- OutputParam(id = "mirna_results", type = "Directory", glob = "mirna_result o6 <- OutputParam(id = "pdfs", type = "Directory", glob = "pdf*") req1 <- list(class = "DockerRequirement", dockerPull = "hubentu/mirdeep2") -miRDeep2 <- cwlParam(baseCommand = "miRDeep2.pl", +miRDeep2 <- cwlProcess(baseCommand = "miRDeep2.pl", requirements = list(req1), inputs = InputParamList(p1, p2, p3, p4, p5, p6, p7), outputs = OutputParamList(o1, o2, o3, o4, o5, o6)) + + +miRDeep2 <- addMeta( + miRDeep2, + label = "miRDeep2", + doc = "miRDeep2 discovers active known or novel miRNAs from deep sequencing data", + inputLabels = c("reads","genome","mappings","miRef","miOther","precursors","species"), + inputDocs = c("deep sequences in fasta format. The identifier should contain a prefix, a running number and a '_x' to indicate the number of reads that have this sequence.There should be no redundancy in the sequences.","genome contigs in fasta format. The identifiers should be unique.","file_reads mapped against file_genome. The mappings should be in arf format.For details on the format see the documentation.","miRBase miRNA sequences in fasta format. These should be the known mature sequences for the species being analyzed.","miRBase miRNA sequences in fasta format. These should be the pooled known mature sequences for 1-5 species closely related to the species being analyzed.","miRBase miRNA precursor sequences in fasta format. These should be the known precursor sequences for the species being analyzed.","species being analyzed - this is used to link to the appropriate UCSC browser entry"), + outputLabels = c("csvfiles","htmls","bed","expression","mirna_results","pdfs"), + outputDocs = c("spread-sheet format of results.html","a html table giving an overview of novel and known miRNAs detected in the data. The table is hyperlinked to pdfs showing the signature and structure of each hairpin.","miRNA bed file","Files containing the expression levels of known miRNAs.","miRNA result","PDF files illustrating the predicted hairpin secondary structures of the novel miRNA precursors."), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/rajewsky-lab/mirdeep2", + example = paste() + ) +) diff --git a/Rcwl/tl_miRMapper.R b/Rcwl/tl_miRMapper.R index 42f63b1..a4c5d21 100644 --- a/Rcwl/tl_miRMapper.R +++ b/Rcwl/tl_miRMapper.R @@ -25,10 +25,27 @@ o2 <- OutputParam(id = "Arf", type = "File", glob = "$(inputs.arf)") req1 <- list(class = "DockerRequirement", dockerPull = "hubentu/mirdeep2") req2 <- list(class = "InlineJavascriptRequirement") -miRMapper <- cwlParam(baseCommand = "mapper.pl", +miRMapper <- cwlProcess(baseCommand = "mapper.pl", requirements = list(req1, req2), arguments = list( list(valueFrom = "-j", position = 8L), list(valueFrom = "-m", position = 9L)), inputs = InputParamList(p1, p2, p3, p4, p5, p6, p7), outputs = OutputParamList(o1, o2)) + + +miRMapper <- addMeta( + miRMapper, + label = "miRMapper", + doc = "This script takes as input a file with deep sequencing reads (these can be in different formats, see the options below). The script then processes the reads and/or maps them to the reference genome, as designated by the options given.", + inputLabels = c("reads","format","adapter","len","genome","preads","arf"), + inputDocs = c("Input file","Format of the input file","clip 3' adapter sequence","discard reads shorter than int nts, default = 18","map to genome (must be indexed by bowtie-build). The 'genome' string must be the prefix of the bowtie index. For instance, if the first indexed file is called 'h_sapiens_37_asm.1.ebwt' then the prefix is 'h_sapiens_37_asm'.","print processed reads to this file","print read mappings to this file"), + outputLabels = c("pReads","Arf"), + outputDocs = c("pRead of miRMapper","Arf file of miRMapper"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/rajewsky-lab/mirdeep2", + example = paste() + ) +) diff --git a/Rcwl/tl_mosdepth.R b/Rcwl/tl_mosdepth.R new file mode 100644 index 0000000..48c9b87 --- /dev/null +++ b/Rcwl/tl_mosdepth.R @@ -0,0 +1,29 @@ +## https://github.com/brentp/mosdepth +i1<-InputParam(id="bedfile", type="File", prefix="--by") +i2<-InputParam(id="ct", type="string", prefix="--thresholds") +i3<-InputParam(id="fileID", type="string", position=1) +i4<-InputParam(id="bamfile", type="File", position=2, secondaryFile=".bai") +o1 <- OutputParam(id = "out", type="File[]", glob="$(inputs.fileID)*") +req1 <- requireDocker("quay.io/biocontainers/mosdepth:0.3.3--h37c5b7d_2") +mosdepth <- cwlProcess(baseCommand="mosdepth", + arguments = list("-x"), + requirements = list(req1), + inputs=InputParamList(i1,i2,i3,i4), + outputs = OutputParamList(o1)) + + +mosdepth <- addMeta( + mosdepth, + label = "mosdepth", + doc = "fast BAM/CRAM depth calculation for WGS, exome, or targeted sequencing.", + inputLabels = c("bedfile","ct","fileID","bamfile"), + inputDocs = c("optional BED file or (integer) window-sizes.","for each interval in --by, write number of bases covered by at least threshold bases. Specify multiple integer values separated by ','.","Output files","Input bam files"), + outputLabels = c("out"), + outputDocs = c("Output files"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/brentp/mosdepth", + example = paste() + ) +) diff --git a/Rcwl/tl_msisensor_pro_msi.R b/Rcwl/tl_msisensor_pro_msi.R new file mode 100644 index 0000000..97b1280 --- /dev/null +++ b/Rcwl/tl_msisensor_pro_msi.R @@ -0,0 +1,28 @@ +## https://github.com/xjtu-omics/msisensor-pro +p1 <- InputParam(id = "site", type = "File", prefix = "-d") +p2 <- InputParam(id = "nbam", type = "File", prefix = "-n", secondaryFile = ".bai") +p3 <- InputParam(id = "tbam", type = "File", prefix = "-t", secondaryFile = ".bai") +p4 <- InputParam(id = "outprefix", type = "string", prefix = "-o") +o1 <- OutputParam(id = "outs", type = "File[]", glob = "$(inputs.outprefix)*") +r1 <- requireDocker("pengjia1110/msisensor-pro") +msisensor_pro_msi <- cwlProcess(baseCommand = c("msisensor-pro", "msi"), + requirements = list(r1), + inputs = InputParamList(p1, p2, p3, p4), + outputs = OutputParamList(o1)) + + +msisensor_pro_msi <- addMeta( + msisensor_pro_msi, + label = "msisensor_pro_msi", + doc = "MSIsensor-pro evaluates Microsatellite Instability (MSI) for cancer patients with next generation sequencing data.", + inputLabels = c("site","nbam","tbam","outprefix"), + inputDocs = c("homopolymers and microsatellites file","normal bam file with index","tumor bam file with index","output prefix"), + outputLabels = c("outs"), + outputDocs = c("Output files"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/xjtu-omics/msisensor-pro", + example = paste() + ) +) diff --git a/Rcwl/tl_msisensor_pro_scan.R b/Rcwl/tl_msisensor_pro_scan.R new file mode 100644 index 0000000..9f76bee --- /dev/null +++ b/Rcwl/tl_msisensor_pro_scan.R @@ -0,0 +1,26 @@ +## https://github.com/xjtu-omics/msisensor-pro +p1 <- InputParam(id = "ref", type = "File", prefix = "-d", secondaryFiles = ".fai") +p2 <- InputParam(id = "site", type = "string", prefix = "-o") +o1 <- OutputParam(id = "outsite", type = "File", glob = "$(inputs.site)") +r1 <- requireDocker("pengjia1110/msisensor-pro") +msisensor_pro_scan <- cwlProcess(baseCommand = c("msisensor-pro", "scan"), + requirements = list(r1), + inputs = InputParamList(p1, p2), + outputs = OutputParamList(o1)) + + +msisensor_pro_scan <- addMeta( + msisensor_pro_scan, + label = "msisensor_pro_scan", + doc = "Scan a reference genome to identify microsatellite regions.", + inputLabels = c("ref","site"), + inputDocs = c("reference genome sequences file, *.fasta or *.fa format","output homopolymers and microsatellites file"), + outputLabels = c("outsite"), + outputDocs = c("Output files"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/xjtu-omics/msisensor-pro", + example = paste() + ) +) diff --git a/Rcwl/tl_multiqc.R b/Rcwl/tl_multiqc.R index e2a8134..20313bc 100644 --- a/Rcwl/tl_multiqc.R +++ b/Rcwl/tl_multiqc.R @@ -2,10 +2,26 @@ p1 <- InputParam(id = "dir", type = "Directory") o1 <- OutputParam(id = "qc", type = "File", glob = "*.html") o2 <- OutputParam(id = "qcDat", type = "Directory", glob = "multiqc_data") -req1 <- list(class = "DockerRequirement", - dockerPull = "hubentu/rcwl-rnaseq") +req1 <- requireDocker("quay.io/biocontainers/multiqc:1.11--pyhdfd78af_0") -multiqc <- cwlParam(baseCommand = "multiqc", +multiqc <- cwlProcess(baseCommand = "multiqc", requirements = list(req1), inputs = InputParamList(p1), outputs = OutputParamList(o1, o2)) + + +multiqc <- addMeta( + multiqc, + label = "multiqc", + doc = "MultiQC aggregates results from bioinformatics analyses across many samples into a single report.", + inputLabels = c("dir"), + inputDocs = c("Input directory"), + outputLabels = c("qc","qcDat"), + outputDocs = c("Output QC metric","Output QC metric"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/ewels/MultiQC", + example = paste() + ) +) diff --git a/Rcwl/tl_mv.R b/Rcwl/tl_mv.R new file mode 100644 index 0000000..87d304a --- /dev/null +++ b/Rcwl/tl_mv.R @@ -0,0 +1,24 @@ +p1 <- InputParam(id = "file1", type = "File", position = 1) +p2 <- InputParam(id = "file2", type = "string", position = 2) +o1 <- OutputParam(id = "mvfile", type = "File", glob = "$(inputs.file2)") + +mv <- cwlProcess(baseCommand = "mv", + inputs = InputParamList(p1, p2), + outputs = OutputParamList(o1)) + + +mv <- addMeta( + mv, + label = "mv", + doc = "Move/rename file", + inputLabels = c("file1","file2"), + inputDocs = c("Input file","Name of output file"), + outputLabels = c("mvfile"), + outputDocs = c("renamed file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "NA", + example = paste() + ) +) diff --git a/Rcwl/tl_mvOut.R b/Rcwl/tl_mvOut.R index 5d2093d..f441c45 100644 --- a/Rcwl/tl_mvOut.R +++ b/Rcwl/tl_mvOut.R @@ -13,7 +13,7 @@ ## p1 <- InputParam(id = "logFile", type = "File") ## o1 <- OutputParam(id = "OutDir", type = "Directory", glob = "output") -## mvOut <- cwlParam(baseCommand = c("Rscript", "-e", rscripts), +## mvOut <- cwlProcess(baseCommand = c("Rscript", "-e", rscripts), ## inputs = InputParamList(p1), ## outputs = OutputParamList(o1)) ## #' @importFrom jsonlite fromJSON @@ -30,7 +30,24 @@ mvout <- function(logFile){ p1 <- InputParam(id = "logFile", type = "File", prefix = "logFile=", separate = F) o1 <- OutputParam(id = "OutDir", type = "Directory", glob = "output") -mvOut <- cwlParam(baseCommand = mvout, +mvOut <- cwlProcess(baseCommand = mvout, id = "mvOut", inputs = InputParamList(p1), outputs = OutputParamList(o1)) + + +mvOut <- addMeta( + mvOut, + label = "mvOut", + doc = "Consolidates all output files into a single directory, making it easier to manage and access them.", + inputLabels = c("logFile"), + inputDocs = c("Input log file"), + outputLabels = c("OutDir","OutDir"), + outputDocs = c("Output folder to move","Moved output directory"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "NA", + example = paste() + ) +) diff --git a/Rcwl/tl_neusomatic_call.R b/Rcwl/tl_neusomatic_call.R index 0e7c6f2..c80c009 100644 --- a/Rcwl/tl_neusomatic_call.R +++ b/Rcwl/tl_neusomatic_call.R @@ -10,7 +10,7 @@ o1 <- OutputParam(id = "pred", type = "File", glob = "pred.vcf") req1 <- list(class = "DockerRequirement", dockerPull = "msahraeian/neusomatic") -neusomatic_call <- cwlParam(baseCommand = c("python", +neusomatic_call <- cwlProcess(baseCommand = c("python", "/opt/neusomatic/neusomatic/python/call.py"), requirements = list(req1), arguments = list("--out", ".", @@ -18,3 +18,20 @@ neusomatic_call <- cwlParam(baseCommand = c("python", "--batch_size", "100"), inputs = InputParamList(p1, p2, p3), outputs = OutputParamList(o1)) + + +neusomatic_call <- addMeta( + neusomatic_call, + label = "neusomatic_call", + doc = "Used to call somatic mutations from the prepared input data using the trained deep learning model provided by Neusomatic.", + inputLabels = c("candidates","ref","checkpoint","threads"), + inputDocs = c("test candidate tsv files","reference fasta filename","network model checkpoint path","number of threads"), + outputLabels = c("pred"), + outputDocs = c("Variant output file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/bioinform/neusomatic", + example = paste() + ) +) diff --git a/Rcwl/tl_neusomatic_postprocess.R b/Rcwl/tl_neusomatic_postprocess.R index 03d651f..4c6e307 100644 --- a/Rcwl/tl_neusomatic_postprocess.R +++ b/Rcwl/tl_neusomatic_postprocess.R @@ -11,9 +11,26 @@ o1 <- OutputParam(id = "oVcf", type = "File", glob = "$(inputs.ovcf)") req1 <- list(class = "DockerRequirement", dockerPull = "msahraeian/neusomatic") -neusomatic_postprocess <- cwlParam(baseCommand = c("python", +neusomatic_postprocess <- cwlProcess(baseCommand = c("python", "/opt/neusomatic/neusomatic/python/postprocess.py"), requirements = list(req1), arguments = list("--work", "."), inputs = InputParamList(p1, p2, p3, p4, p5, p6), outputs = OutputParamList(o1)) + + +neusomatic_postprocess <- addMeta( + neusomatic_postprocess, + label = "neusomatic_postprocess", + doc = "Used in the Neusomatic pipeline that serves as the final step in processing the somatic mutation calls generated by the neusomatic_call commandused in the Neusomatic pipeline that serves as the final step in processing the somatic mutation calls generated by the neusomatic_call command", + inputLabels = c("ref","tbam","pred","fcandidates","ensemble","ovcf"), + inputDocs = c("reference fasta filename","tumor bam","predicted vcf","filtered candidate vcf","Ensemble annotation tsv file (only for short read)","output final vcf"), + outputLabels = c("oVcf"), + outputDocs = c("Output filtered vcf file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/bioinform/neusomatic", + example = paste() + ) +) diff --git a/Rcwl/tl_neusomatic_preprocess.R b/Rcwl/tl_neusomatic_preprocess.R index a78191c..0be37f2 100644 --- a/Rcwl/tl_neusomatic_preprocess.R +++ b/Rcwl/tl_neusomatic_preprocess.R @@ -17,7 +17,7 @@ o2 <- OutputParam(id = "fcandidates", type = "File", req1 <- list(class = "DockerRequirement", dockerPull = "msahraeian/neusomatic") req2 <- list(class = "ShellCommandRequirement") -neusomatic_preprocess <- cwlParam(baseCommand = c("python", +neusomatic_preprocess <- cwlProcess(baseCommand = c("python", "/opt/neusomatic/neusomatic/python/preprocess.py"), requirements = list(req1, req2), arguments = list("--mode", "call", "--work", ".", @@ -27,3 +27,20 @@ neusomatic_preprocess <- cwlParam(baseCommand = c("python", position = 10L, shellQuote = FALSE)), inputs = InputParamList(p1, p2, p3, p4, p5, p6, p7), outputs = OutputParamList(o1, o2)) + + +neusomatic_preprocess <- addMeta( + neusomatic_preprocess, + label = "neusomatic_preprocess", + doc = "Used in the Neusomatic pipeline to prepare input data for deep learning-based somatic mutation detection.", + inputLabels = c("tbam","nbam","ref","region","ensemble","mapq","threads"), + inputDocs = c("tumor bam","normal bam","reference fasta filename","region bed","Ensemble annotation tsv file (only for short read)","minimum mapping quality","number of threads"), + outputLabels = c("candidates","fcandidates"), + outputDocs = c("tsv output file","filtered cadidate vcf file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/bioinform/neusomatic", + example = paste() + ) +) diff --git a/Rcwl/tl_nudup.R b/Rcwl/tl_nudup.R new file mode 100644 index 0000000..e3defbf --- /dev/null +++ b/Rcwl/tl_nudup.R @@ -0,0 +1,29 @@ +p1 <- InputParam(id = "index", type = "File", prefix = "-f") +p2 <- InputParam(id = "paired", type = "boolean?", prefix = "-2") +p3 <- InputParam(id = "out", type = "string", prefix = "-o") +p4 <- InputParam(id = "sam", type = "File", position = 10) +o1 <- OutputParam(id = "mbam", type = "File", glob = "$(inputs.out).sorted.markdup.bam") +o2 <- OutputParam(id = "dbam", type = "File", glob = "$(inputs.out).sorted.dedup.bam") +o3 <- OutputParam(id = "report", type = "File", glob = "*log.txt") +req1 <- requireDocker("quay.io/biocontainers/nudup:2.3.3--py_2") +nudup <- cwlProcess(baseCommand = "nudup.py", + requirements = list(req1), + inputs = InputParamList(p1, p2, p3, p4), + outputs = OutputParamList(o1, o2, o3)) + + +nudup <- addMeta( + nudup, + label = "nudup", + doc = "Marks/removes PCR introduced duplicate molecules based on the molecular tagging technology used in NuGEN products.", + inputLabels = c("index","paired","out","sam"), + inputDocs = c("FASTQ file containing the molecular tag sequence for each read name in the corresponding SAM/BAM file (required only for CASE 1 detailed above)","use paired end deduping with template. SAM/BAM alignment must contain paired end reads. Degenerate read pairs (alignments for one read of pair) will be discarded.","prefix of output file paths for sorted BAMs (default will create prefix.sorted.markdup.bam, prefix.sorted.dedup.bam, prefix_dup_log.txt)","Input sam file"), + outputLabels = c("mbam","dbam","report"), + outputDocs = c("Marked duplicate bam file","Deduplicated bam file","final reoprt"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/CGATOxford/nudup", + example = paste() + ) +) diff --git a/Rcwl/tl_octopus_somatic.R b/Rcwl/tl_octopus_somatic.R new file mode 100644 index 0000000..59ddb80 --- /dev/null +++ b/Rcwl/tl_octopus_somatic.R @@ -0,0 +1,39 @@ +# https://github.com/luntergroup/octopus +p1 <- InputParam(id = "bams", type = "File[]", prefix = "-I", secondaryFiles = list(".bai?", "^.bai?")) +p2 <- InputParam(id = "ref", type = "File", prefix = "-R", secondaryFiles = ".fai") +p3 <- InputParam(id = "normal", type = "string", prefix = "-N") +p4 <- InputParam(id = "ovcf", type = "string", prefix = "-o") +p5 <- InputParam(id = "region", type = "File?", prefix = "-t") +p6 <- InputParam(id = "error", type = "string?", prefix = "--sequence-error-model") +p7 <- InputParam(id = "threads", type = "int?", prefix = "--threads") +p8 <- InputParam(id = "expFreq", type = "float?", prefix = "--min-expected-somatic-frequency") +p9 <- InputParam(id = "creFreq", type = "float?", prefix = "--min-credible-somatic-frequency") +p10 <- InputParam(id = "annotation", type = "string[]?", prefix = "--annotations") +o1 <- OutputParam(id = "oVcf", type = "File", glob = "$(inputs.ovcf)") +req1 <- requireDocker("dancooke/octopus") +octopus_somatic <- cwlProcess(cwlVersion = "v1.2", + baseCommand = "octopus", + requirements = list(req1), + arguments = list("--forest", + "/opt/octopus/resources/forests/germline.v0.7.4.forest", + "--somatic-forest", + "/opt/octopus/resources/forests/somatic.v0.7.4.forest"), + inputs = InputParamList(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10), + outputs = OutputParamList(o1)) + + +octopus_somatic <- addMeta( + octopus_somatic, + label = "octopus_somatic", + doc = "Calls somatic variants by comparing a tumor sample to a matched normal sample.", + inputLabels = c("bams","ref","normal","ovcf","region","error","threads","expFreq","creFreq","annotation"), + inputDocs = c("Indexed BAM/CRAM files to be analysed","Indexed FASTA format reference genome file to be analysed","Normal samples - all other samples are considered tumour","File to where output is written (calls are written to stdout if unspecified)","File containing a list of regions (chrom:begin-end), one per line, to be analysed","Sequencing error model to use by the haplotyoe likelihood model","Maximum number of threads to be used. If no argument is provided unlimited threads are assumed","Minimum expected somatic allele frequency in the sample","Minimum credible somatic allele frequency that will be reported","Annotations to write to final VCF"), + outputLabels = c("oVcf"), + outputDocs = c("Output somantic variant file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/luntergroup/octopus", + example = paste() + ) +) diff --git a/Rcwl/tl_oncokb_CnaAnnotator.R b/Rcwl/tl_oncokb_CnaAnnotator.R new file mode 100644 index 0000000..4dba3ce --- /dev/null +++ b/Rcwl/tl_oncokb_CnaAnnotator.R @@ -0,0 +1,28 @@ +p1 <- InputParam(id = "input", type = "File", prefix = "-i") +p2 <- InputParam(id = "output", type = "string", prefix = "-o") +p3 <- InputParam(id = "clinic", type = "File?", prefix = "-c") +p4 <- InputParam(id = "token", type = "string", prefix = "-b") +o1 <- OutputParam(id = "ofile", type = "File", glob = "$(inputs.output)") +req1 <- requireDocker("hubentu/oncokb-annotator") +oncokb_CnaAnnotator <- cwlProcess( + baseCommand = c("python", "/opt/CnaAnnotator.py"), + requirements = list(req1), + inputs = InputParamList(p1, p2, p3, p4), + outputs = OutputParamList(o1)) + + +oncokb_CnaAnnotator <- addMeta( + oncokb_CnaAnnotator, + label = "oncokb_CnaAnnotator", + doc = "Annotate CNAs (such as gene amplifications or deletions) detected in cancer samples with information from the OncoKB knowledge base.", + inputLabels = c("input","output","clinic","token"), + inputDocs = c("Input CNS file","Output CNA file","Input Clinical file","oncokb_api_bear_token"), + outputLabels = c("ofile"), + outputDocs = c("Annotated output file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/oncokb/oncokb-annotator", + example = paste() + ) +) diff --git a/Rcwl/tl_oncokb_FusionAnnotator.R b/Rcwl/tl_oncokb_FusionAnnotator.R new file mode 100644 index 0000000..b17669c --- /dev/null +++ b/Rcwl/tl_oncokb_FusionAnnotator.R @@ -0,0 +1,27 @@ +p1 <- InputParam(id = "input", type = "File", prefix = "-i") +p2 <- InputParam(id = "output", type = "string", prefix = "-o") +p3 <- InputParam(id = "clinic", type = "File?", prefix = "-c") +p4 <- InputParam(id = "token", type = "string", prefix = "-b") +o1 <- OutputParam(id = "ofile", type = "File", glob = "$(inputs.output)") +req1 <- requireDocker("hubentu/oncokb-annotator") +oncokb_FusionAnnotator <- cwlProcess(baseCommand = c("python", "/opt/FusionAnnotator.py"), + requirements = list(req1), + inputs = InputParamList(p1, p2, p3, p4), + outputs = OutputParamList(o1)) + + +oncokb_FusionAnnotator <- addMeta( + oncokb_FusionAnnotator, + label = "oncokb_FusionAnnotator", + doc = "Annotate gene fusions identified in cancer samples with relevant clinical information from OncoKB.", + inputLabels = c("input","output","clinic","token"), + inputDocs = c("input Fusion file","output Fusion file","input clinical file","oncokb api bear token"), + outputLabels = c("ofile"), + outputDocs = c("Output annotaated file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/oncokb/oncokb-annotator", + example = paste() + ) +) diff --git a/Rcwl/tl_oncokb_MafAnnotator.R b/Rcwl/tl_oncokb_MafAnnotator.R new file mode 100644 index 0000000..78fc9aa --- /dev/null +++ b/Rcwl/tl_oncokb_MafAnnotator.R @@ -0,0 +1,27 @@ +p1 <- InputParam(id = "input", type = "File", prefix = "-i") +p2 <- InputParam(id = "output", type = "string", prefix = "-o") +p3 <- InputParam(id = "clinic", type = "File?", prefix = "-c") +p4 <- InputParam(id = "token", type = "string", prefix = "-b") +o1 <- OutputParam(id = "ofile", type = "File", glob = "$(inputs.output)") +req1 <- requireDocker("hubentu/oncokb-annotator") +oncokb_MafAnnotator <- cwlProcess(baseCommand = c("python", "/opt/MafAnnotator.py"), + requirements = list(req1), + inputs = InputParamList(p1, p2, p3, p4), + outputs = OutputParamList(o1)) + + +oncokb_MafAnnotator <- addMeta( + oncokb_MafAnnotator, + label = "oncokb_MafAnnotator", + doc = "Annotate somatic mutations in a MAF file with relevant clinical information from OncoKB.", + inputLabels = c("input","output","clinic","token"), + inputDocs = c("input MAF file","output MAF file","input clinical file","oncokb api bear token"), + outputLabels = c("ofile"), + outputDocs = c("Output file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/oncokb/oncokb-annotator", + example = paste() + ) +) diff --git a/Rcwl/tl_oncokb_StructuralVariantAnnotator.R b/Rcwl/tl_oncokb_StructuralVariantAnnotator.R new file mode 100644 index 0000000..66f9643 --- /dev/null +++ b/Rcwl/tl_oncokb_StructuralVariantAnnotator.R @@ -0,0 +1,28 @@ +p1 <- InputParam(id = "input", type = "File", prefix = "-i") +p2 <- InputParam(id = "output", type = "string", prefix = "-o") +p3 <- InputParam(id = "clinic", type = "File?", prefix = "-c") +p4 <- InputParam(id = "token", type = "string", prefix = "-b") +o1 <- OutputParam(id = "ofile", type = "File", glob = "$(inputs.output)") +req1 <- requireDocker("hubentu/oncokb-annotator") +oncokb_StructuralVariantAnnotator <- cwlProcess( + baseCommand = c("python", "/opt/StructuralVariantAnnotator.py"), + requirements = list(req1), + inputs = InputParamList(p1, p2, p3, p4), + outputs = OutputParamList(o1)) + + +oncokb_StructuralVariantAnnotator <- addMeta( + oncokb_StructuralVariantAnnotator, + label = "oncokb_StructuralVariantAnnotator", + doc = "Tool to annotate structural variants detected in cancer samples with information from OncoKB", + inputLabels = c("input","output","clinic","token"), + inputDocs = c("input MAF file","output MAF file","input clinical file","oncokb api bear token"), + outputLabels = c("ofile"), + outputDocs = c("Output structural variant file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/oncokb/oncokb-annotator", + example = paste() + ) +) diff --git a/Rcwl/tl_polysolver.R b/Rcwl/tl_polysolver.R index 6768fe9..f4998f3 100644 --- a/Rcwl/tl_polysolver.R +++ b/Rcwl/tl_polysolver.R @@ -18,10 +18,27 @@ o1 <- OutputParam(id = "hla", type = "File", glob = "*.hla.txt") req1 <- list(class = "DockerRequirement", dockerPull = "sachet/polysolver:v4") -polysolver <- cwlParam(baseCommand = c("bash", "/home/polysolver/scripts/shell_call_hla_type"), +polysolver <- cwlProcess(baseCommand = c("bash", "/home/polysolver/scripts/shell_call_hla_type"), requirements = list(req1), arguments = list( list(valueFrom = "$(runtime.outdir)", position = 7L) ), inputs = InputParamList(p1, p2, p3, p4, p5, p6), outputs = OutputParamList(o1)) + + +polysolver <- addMeta( + polysolver, + label = "polysolver", + doc = "Computational tool designed to accurately determine HLA (Human Leukocyte Antigen) types from next-generation sequencing (NGS) data, particularly from whole-exome sequencing (WES) or whole-genome sequencing (WGS) data.", + inputLabels = c("bam","race","includeFreq","build","format","insertCalc","outDir"), + inputDocs = c("path to the BAM file to be used for HLA typing","ethnicity of the individual (Caucasian, Black, Asian or Unknown)","flag indicating whether population-level allele frequencies should be used as priors (0 or 1)","reference genome used in the BAM file (hg18, hg19 or hg38)","fastq format (STDFQ, ILMFQ, ILM1.8 or SLXFQ; see Novoalign documentation)","flag indicating whether empirical insert size distribution should be used in the model (0 or 1)","output directory"), + outputLabels = c("hla"), + outputDocs = c("file containing the two inferred alleles for each of HLA-A, HLA-B and HLA-C"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://software.broadinstitute.org/cancer/cga/polysolver_run", + example = paste() + ) +) diff --git a/Rcwl/tl_pvacseq.R b/Rcwl/tl_pvacseq.R index adf0311..f03b3fb 100644 --- a/Rcwl/tl_pvacseq.R +++ b/Rcwl/tl_pvacseq.R @@ -14,7 +14,24 @@ o1 <- OutputParam(id = "Out", type = "Directory", glob = "$(inputs.outdir)") req1 <- list(class = "DockerRequirement", dockerPull = "griffithlab/pvactools") -pvacseq <- cwlParam(baseCommand = c("pvacseq", "run"), +pvacseq <- cwlProcess(baseCommand = c("pvacseq", "run"), requirements = list(req1), inputs = InputParamList(p1, p2, p3, p4, p5, p6, p7), outputs = OutputParamList(o1)) + + +pvacseq <- addMeta( + pvacseq, + label = "pvacseq", + doc = "pVACseq is a cancer immunotherapy pipeline for the identification of personalized Variant Antigens by Cancer Sequencing (pVACseq) that integrates tumor mutation and expression data (DNA- and RNA-Seq).", + inputLabels = c("ivcf","sample","allele","algorithms","outdir","length","phasedVcf"), + inputDocs = c("VEP-annotated single- or multi-sample VCF containing genotype, transcript, Wildtype protein sequence, and Frameshift protein sequence information.The VCF may be gzipped (requires tabix index).","The name of the tumor sample being processed. When processing a multi-sample VCF the sample name must be a sample ID in the input VCF #CHROM header line.","Name of the allele to use for epitope prediction. Multiple alleles can be specified using a comma- separated list. For a list of available alleles, use:`pvacseq valid_alleles`.","algorith used","The directory for writing all result files.","Length of MHC Class I subpeptides (neoepitopes) to predict. Multiple epitope lengths can be specified using a comma-separated list. Typical epitope lengths vary between 8-15. Required for Class I prediction algorithms. (default: [8, 9, 10, 11])","A VCF with phased proximal variant information. Must be gzipped and tabix indexed. (default: None)"), + outputLabels = c("Out"), + outputDocs = c("output of predicted neoantigens"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://pvactools.readthedocs.io/en/latest/pvacseq/getting_started.html#running-pvacseq-using-docker", + example = paste() + ) +) diff --git a/Rcwl/tl_rMATS.R b/Rcwl/tl_rMATS.R index 630660d..b8961d4 100644 --- a/Rcwl/tl_rMATS.R +++ b/Rcwl/tl_rMATS.R @@ -1,16 +1,55 @@ +# https://github.com/Xinglab/rmats-turbo +p1 <- InputParam(id = "bam1", type = "File[]", position = -1) +p2 <- InputParam(id = "bam2", type = "File[]", position = -1) +p3 <- InputParam(id = "type", type = "string", prefix = "-t", default = "paired") +p4 <- InputParam(id = "readLength", type = "int", prefix = "--readLength") +p5 <- InputParam(id = "gtf", type = "File", prefix = "--gtf") +p6 <- InputParam(id = "threads", type = "int?", prefix = "--nthread", default = 1L) +p7 <- InputParam(id = "tstat", type = "int?", prefix = "--tstat") +p8 <- InputParam(id = "tmp", type = "string", prefix = "--tmp", default = "tmp") +p9 <- InputParam(id = "libType", type = "string?", prefix = "--libType") +p10 <- InputParam(id = "varReadLength", type = "boolean?", prefix = "--variable-read-length") +p11 <- InputParam(id = "anchorLength", type = "int?", prefix = "--anchorLength") +p12 <- InputParam(id = "tophatAnchor", type = "int?", prefix = "--tophatAnchor") +p13 <- InputParam(id = "cstat", type = "float?", prefix = "--cstat") +p14 <- InputParam(id = "task", type = "string?", prefix = "--task") +p15 <- InputParam(id = "statoff", type = "boolean?", prefix = "--statoff") +p16 <- InputParam(id = "pairedStats", type = "boolean?", prefix = "--paired-stats") +p17 <- InputParam(id = "novelSS", type = "boolean?", prefix = "--novelSS") +p18 <- InputParam(id = "mil", type = "int?", prefix = "--mil") +p19 <- InputParam(id = "mel", type = "int?", prefix = "--mel") +p20 <- InputParam(id = "allowClipping", type = "boolean?", prefix = "--allow-clipping") +p21 <- InputParam(id = "fixedEvent", type = "Directory?", prefix = "--fixed-event-set") -p1 <- InputParam(id = "bam1", type = "File[]", itemSeparator = ",", position = 1) -p2 <- InputParam(id = "bam2", type = "File[]", itemSeparator = ",", position = 2) -p3 <- InputParam(id = "type", type = "string", position = 3, default = "paired") -p4 <- InputParam(id = "readLength", type = "int", position = 4) -p5 <- InputParam(id = "gtf", type = "File", position = 5) -p6 <- InputParam(id = "od", type = "string?", position = 6, default = "./") -p7 <- InputParam(id = "threads", type = "int", position = 7, default = 4L) -p8 <- InputParam(id = "tstat", type = "int?", position = 8, default = 4L) o1 <- OutputParam(id = "res", type = "File[]", glob = "*.txt") -req1 <- list(class = "DockerRequirement", - dockerPull = "hubentu/rmats") -rMATS <- cwlParam(baseCommand = "rmats_bam.sh", - requirements = list(req1), - inputs = InputParamList(p1, p2, p3, p4, p5, p6, p7, p8), - outputs = OutputParamList(o1)) +o2 <- OutputParam(id = "tmp", type = "Directory", glob = "$(inputs.tmp)") +req1 <- requireDocker("xinglab/rmats") +req2 <- requireJS() +req3 <- requireManifest("bam1", sep = ",") +req4 <- requireManifest("bam2", sep = ",") +req5 <- requireInitialWorkDir(listing = list(req3$listing[[1]], + req4$listing[[1]])) +rMATS_bam <- cwlProcess(baseCommand = "", + requirements = list(req1, req2, req5), + arguments = list("--b1", "bam1", "--b2", "bam2", "--od", "."), + inputs = InputParamList(p1, p2, p3, p4, p5, p6, p7, p8, p9, + p10, p11, p12, p13, p14, p15, p16, + p17, p18, p19, p20, p21), + outputs = OutputParamList(o1, o2)) + + +rMATS_bam <- addMeta( + rMATS_bam, + label = "rMATS_bam", + doc = "Tool to detect differential alternative splicing events from RNA-Seq data.", + inputLabels = c("bam1","bam2","type","readLength","gtf","threads","tstat","tmp","libType","varReadLength","anchorLength","tophatAnchor","cstat","task","statoff","pairedStats","novelSS","mil","mel","allowClipping","fixedEvent"), + inputDocs = c("A text file containing a comma separated list of the BAM files for sample_1. (Only if using BAM)","A text file containing a comma separated list of the BAM files for sample_2. (Only if using BAM)","Type of read used in the analysis: either 'paired' for paired-end data or 'single' for single-end data.Default: paired","The length of each read. Required parameter, with the value set according to the RNA-seq read length","An annotation of genes and transcripts in GTF format","The number of threads. The optimal number of threads should be equal to the number of CPU cores. Default: 1","The number of threads for the statistical model. If not set then the value of --nthread is used","The directory for intermediate output such as '.rmats' files from the prep step","Library type. Use fr-firststrand or fr-secondstrand for strand-specific data. Only relevant to the prep step, not the post step. Default: fr-unstranded","Allow reads with lengths that differ from --readLength to be processed. --readLength will still be used to determine IncFormLen and SkipFormLen","The 'anchor length' or 'overhang length' used when counting the number of reads spanning splice junctions. A minimum number of 'anchor length' nucleotides must be mapped to each end of a given splice junction. The minimum value is 1 and the default value is set to 1 to make use of all possible splice junction reads.","The 'anchor length' or 'overhang length' used in the aligner. At least 'anchor length' nucleotides must be mapped to each end of a given splice junction. The default is 1. (Only if using fastq)","The cutoff splicing difference. The cutoff used in the null hypothesis test for differential alternative splicing. The default is 0.0001 for 0.01% difference. Valid: 0 <= cutoff < 1. Does not apply to the paired stats model","Specify which step(s) of rMATS-turbo to run. Default:both. prep: preprocess BAM files and generate .rmats files. post: load .rmats files into memory, detect and count alternative splicing events, and calculate P value (if not --statoff). both: prep + post. inte (integrity): check that the BAM filenames recorded by the prep task(s) match the BAM filenames for the current command line. stat: run statistical test on existing output files","Skip the statistical analysis","Use the paired stats model","Enable detection of novel splice sites (unannotated splice sites). Default is no detection of novel splice sites","Minimum Intron Length. Only impacts --novels behavior. Default: 50","Maximum Exon Length. Only impacts --novelSS behavior.Default: 500","Allow alignments with soft or hard clipping to be used","A directory containing fromGTF.[AS].txt files to be used instead of detecting a new set of events"), + outputLabels = c("res","tmp"), + outputDocs = c("Alternative splice information","temporary file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/Xinglab/rmats-turbo", + example = paste() + ) +) diff --git a/Rcwl/tl_rMATS_bam.R b/Rcwl/tl_rMATS_bam.R new file mode 100644 index 0000000..3295087 --- /dev/null +++ b/Rcwl/tl_rMATS_bam.R @@ -0,0 +1,54 @@ +# https://github.com/Xinglab/rmats-turbo +p1 <- InputParam(id = "bam1", type = "File[]", position = -1) +p2 <- InputParam(id = "bam2", type = "File[]", position = -1) +p3 <- InputParam(id = "type", type = "string", prefix = "-t", default = "paired") +p4 <- InputParam(id = "readLength", type = "int", prefix = "--readLength") +p5 <- InputParam(id = "gtf", type = "File", prefix = "--gtf") +p6 <- InputParam(id = "threads", type = "int?", prefix = "--nthread", default = 1L) +p7 <- InputParam(id = "tstat", type = "int?", prefix = "--tstat") +p8 <- InputParam(id = "tmp", type = "string", prefix = "--tmp", default = "tmp") +p9 <- InputParam(id = "libType", type = "string?", prefix = "--libType") +p10 <- InputParam(id = "varReadLength", type = "boolean?", prefix = "--variable-read-length") +p11 <- InputParam(id = "anchorLength", type = "int?", prefix = "--anchorLength") +p12 <- InputParam(id = "cstat", type = "float?", prefix = "--cstat") +p13 <- InputParam(id = "task", type = "string?", prefix = "--task") +p14 <- InputParam(id = "statoff", type = "boolean?", prefix = "--statoff") +p15 <- InputParam(id = "pairedStats", type = "boolean?", prefix = "--paired-stats") +p16 <- InputParam(id = "novelSS", type = "boolean?", prefix = "--novelSS") +p17 <- InputParam(id = "mil", type = "int?", prefix = "--mil") +p18 <- InputParam(id = "mel", type = "int?", prefix = "--mel") +p19 <- InputParam(id = "fixedEvent", type = "Directory?", prefix = "--fixed-event-set") +p20 <- InputParam(id = "darts", type = "boolean?", prefix = "--darts-model") + +o1 <- OutputParam(id = "res", type = "File[]", glob = "*.txt") +o2 <- OutputParam(id = "tmpout", type = "Directory", glob = "$(inputs.tmp)") +req1 <- requireDocker("rmats_darts") +req2 <- requireJS() +req3 <- requireManifest("bam1", sep = ",") +req4 <- requireManifest("bam2", sep = ",") +req5 <- requireInitialWorkDir(listing = list(req3$listing[[1]], + req4$listing[[1]])) +rMATS_bam <- cwlProcess(baseCommand = c("python", "/rmats/rmats.py"), + requirements = list(req1, req2, req5), + arguments = list("--b1", "bam1", "--b2", "bam2", "--od", "."), + inputs = InputParamList(p1, p2, p3, p4, p5, p6, p7, p8, p9, + p10, p11, p12, p13, p14, p15, p16, + p17, p18, p19, p20), + outputs = OutputParamList(o1, o2)) + + +rMATS_bam <- addMeta( + rMATS_bam, + label = "rMATS_bam", + doc = "Tool to detect differential alternative splicing events from RNA-Seq data. with bam as input", + inputLabels = c("bam1","bam2","type","readLength","gtf","threads","tstat","tmp","libType","varReadLength","anchorLength","cstat","task","statoff","pairedStats","novelSS","mil","mel","fixedEvent","darts"), + inputDocs = c("A text file containing a comma separated list of the BAM files for sample_1. (Only if using BAM)","A text file containing a comma separated list of the BAM files for sample_2. (Only if using BAM)","Type of read used in the analysis: either 'paired' for paired-end data or 'single' for single-end data.Default: paired","The length of each read. Required parameter, with the value set according to the RNA-seq read length","An annotation of genes and transcripts in GTF format","The number of threads. The optimal number of threads should be equal to the number of CPU cores. Default: 1","The number of threads for the statistical model. If not set then the value of --nthread is used","The directory for intermediate output such as '.rmats' files from the prep step","Library type. Use fr-firststrand or fr-secondstrand for strand-specific data. Only relevant to the prep step, not the post step. Default: fr-unstranded","Allow reads with lengths that differ from --readLength to be processed. --readLength will still be used to determine IncFormLen and SkipFormLen","The 'anchor length' or 'overhang length' used when counting the number of reads spanning splice junctions. A minimum number of 'anchor length' nucleotides must be mapped to each end of a given splice junction. The minimum value is 1 and the default value is set to 1 to make use of all possible splice junction reads.","The cutoff splicing difference. The cutoff used in the null hypothesis test for differential alternative splicing. The default is 0.0001 for 0.01% difference. Valid: 0 <= cutoff < 1. Does not apply to the paired stats model","Specify which step(s) of rMATS-turbo to run. Default:both. prep: preprocess BAM files and generate .rmats files. post: load .rmats files into memory, detect and count alternative splicing events, and calculate P value (if not --statoff). both: prep + post. inte (integrity): check that the BAM filenames recorded by the prep task(s) match the BAM filenames for the current command line. stat: run statistical test on existing output files","Skip the statistical analysis","Use the paired stats model","Enable detection of novel splice sites (unannotated splice sites). Default is no detection of novel splice sites","Minimum Intron Length. Only impacts --novels behavior. Default: 50","Maximum Exon Length. Only impacts --novelSS behavior.Default: 500","Allow alignments with soft or hard clipping to be used","A directory containing fromGTF.[AS].txt files to be used instead of detecting a new set of events"), + outputLabels = c("res","tmpout"), + outputDocs = c("Alternative splice information","temporary file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/Xinglab/rmats-turbo", + example = paste() + ) +) diff --git a/Rcwl/tl_rMATS_fq.R b/Rcwl/tl_rMATS_fq.R new file mode 100644 index 0000000..0756bd7 --- /dev/null +++ b/Rcwl/tl_rMATS_fq.R @@ -0,0 +1,56 @@ +# https://github.com/Xinglab/rmats-turbo +p1 <- InputParam(id = "fq1", type = "File[]", position = -1) +p2 <- InputParam(id = "fq2", type = "File[]", position = -1) +p2i <- InputParam(id = "bindex", type = "Directory", prefix = "--bi") +p3 <- InputParam(id = "type", type = "string", prefix = "-t", default = "paired") +p4 <- InputParam(id = "readLength", type = "int", prefix = "--readLength") +p5 <- InputParam(id = "gtf", type = "File", prefix = "--gtf") +p6 <- InputParam(id = "threads", type = "int?", prefix = "--nthread", default = 1L) +p7 <- InputParam(id = "tstat", type = "int?", prefix = "--tstat") +p8 <- InputParam(id = "tmp", type = "string", prefix = "--tmp", default = "tmp") +p9 <- InputParam(id = "libType", type = "string?", prefix = "--libType") +p10 <- InputParam(id = "varReadLength", type = "boolean?", prefix = "--variable-read-length") +p11 <- InputParam(id = "anchorLength", type = "int?", prefix = "--anchorLength") +p12 <- InputParam(id = "tophatAnchor", type = "int?", prefix = "--tophatAnchor") +p13 <- InputParam(id = "cstat", type = "float?", prefix = "--cstat") +p14 <- InputParam(id = "task", type = "string?", prefix = "--task") +p15 <- InputParam(id = "statoff", type = "boolean?", prefix = "--statoff") +p16 <- InputParam(id = "pairedStats", type = "boolean?", prefix = "--paired-stats") +p17 <- InputParam(id = "novelSS", type = "boolean?", prefix = "--novelSS") +p18 <- InputParam(id = "mil", type = "int?", prefix = "--mil") +p19 <- InputParam(id = "mel", type = "int?", prefix = "--mel") +p20 <- InputParam(id = "allowClipping", type = "boolean?", prefix = "--allow-clipping") +p21 <- InputParam(id = "fixedEvent", type = "Directory?", prefix = "--fixed-event-set") + +o1 <- OutputParam(id = "res", type = "File[]", glob = "*.txt") +o2 <- OutputParam(id = "tmp", type = "Directory", glob = "$(inputs.tmp)") +req1 <- requireDocker("xinglab/rmats") +req2 <- requireJS() +req3 <- requireManifest("bam1", sep = ",") +req4 <- requireManifest("bam2", sep = ",") +req5 <- requireInitialWorkDir(listing = list(req3$listing[[1]], + req4$listing[[1]])) +rMATS_bam <- cwlProcess(baseCommand = "", + requirements = list(req1, req2, req5), + arguments = list("--b1", "bam1", "--b2", "bam2", "--od", "."), + inputs = InputParamList(p1, p2, p2i, p3, p4, p5, p6, p7, p8, p9, + p10, p11, p12, p13, p14, p15, p16, + p17, p18, p19, p20, p21), + outputs = OutputParamList(o1, o2)) + + +rMATS_bam <- addMeta( + rMATS_bam, + label = "rMATS_bam", + doc = "Tool to detect differential alternative splicing events from RNA-Seq data. with fastq as input", + inputLabels = c("fq1","fq2","bindex","type","readLength","gtf","threads","tstat","tmp","libType","varReadLength","anchorLength","tophatAnchor","cstat","task","statoff","pairedStats","novelSS","mil","mel","allowClipping","fixedEvent"), + inputDocs = c("fatq pair 1","fatq pair 2","The directory name of the STAR binary indices (name of the directory that contains the suffix array file).(Only if using fastq)","Type of read used in the analysis: either 'paired' for paired-end data or 'single' for single-end data.Default: paired","The length of each read. Required parameter, with the value set according to the RNA-seq read length","An annotation of genes and transcripts in GTF format","The number of threads. The optimal number of threads should be equal to the number of CPU cores. Default: 1","The number of threads for the statistical model. If not set then the value of --nthread is used","contains the intermediate files generated by the prep step:","Library type. Use fr-firststrand or fr-secondstrand for strand-specific data. Only relevant to the prep step, not the post step. Default: fr-unstranded","Allow reads with lengths that differ from --readLength to be processed. --readLength will still be used to determine IncFormLen and SkipFormLen","The 'anchor length' or 'overhang length' used when counting the number of reads spanning splice junctions. A minimum number of 'anchor length' nucleotides must be mapped to each end of a given splice junction. The minimum value is 1 and the default value is set to 1 to make use of all possible splice junction reads.","The 'anchor length' or 'overhang length' used in the aligner. At least 'anchor length' nucleotides must be mapped to each end of a given splice junction. The default is 1. (Only if using fastq)","The cutoff splicing difference. The cutoff used in the null hypothesis test for differential alternative splicing. The default is 0.0001 for 0.01% difference. Valid: 0 <= cutoff < 1. Does not apply to the paired stats model","Specify which step(s) of rMATS-turbo to run. Default: both. prep: preprocess BAM files and generate .rmats files. post: load .rmats files into memory, detect and count alternative splicing events, and calculate P value (if not --statoff). both: prep + post. inte (integrity): check that the BAM filenames recorded by the prep task(s) match the BAM filenames for the current command line. stat: run statistical test on existing output files","Skip the statistical analysis","Use the paired stats model","Enable detection of novel splice sites (unannotated splice sites). Default is no detection of novel splice sites","Minimum Intron Length. Only impacts --novels behavior. Default: 50","Maximum Exon Length. Only impacts --novelSS behavior. Default: 500","Allow alignments with soft or hard clipping to be used","A directory containing fromGTF.[AS].txt files to be used instead of detecting a new set of events"), + outputLabels = c("res","tmp"), + outputDocs = c("Alternative splice information","temporary file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/Xinglab/rmats-turbo", + example = paste() + ) +) diff --git a/Rcwl/tl_rMATS_task.R b/Rcwl/tl_rMATS_task.R new file mode 100644 index 0000000..52b5889 --- /dev/null +++ b/Rcwl/tl_rMATS_task.R @@ -0,0 +1,39 @@ +# https://github.com/Xinglab/rmats-turbo +p1 <- InputParam(id = "task", type = "string", prefix = "--task", default = "stat") +p2 <- InputParam(id = "outdir", type = "Directory", prefix = "--od") +p3 <- InputParam(id = "tmp", type = "string?", prefix = "--tmp", default = "tmp") +p4 <- InputParam(id = "darts", type = "boolean?", prefix = "--darts-model") +p5 <- InputParam(id = "threads", type = "int", prefix = "--nthread") +o1 <- OutputParam(id = "res", type = "File[]", glob = "$(inputs.outdir.basename)/*.txt") +req1 <- requireDocker("rmats_darts") +req2 <- list(class = "InitialWorkDirRequirement", + listing = list( + list(entry = "$(inputs.outdir)", + writable = TRUE))) +## req2 <- requireInitialWorkDir( +## listing = list( +## Dirent(entry = "$(inputs.outdir)", +## writable=TRUE, +## entryname = "workdir"))) +rMATS_task <- cwlProcess(cwlVersion = "v1.2", + baseCommand = c("python", "/rmats/rmats.py"), + requirements = list(req1, req2), + inputs = InputParamList(p1, p2, p3, p4, p5), + outputs = OutputParamList(o1)) + + +rMATS_task <- addMeta( + rMATS_task, + label = "rMATS_task", + doc = "Provide a flexible and efficient way to run the rMATS software on large RNA-Seq datasets in a distributed computing environment.", + inputLabels = c("task","outdir","tmp","darts","threads"), + inputDocs = c("Specify which step(s) of rMATS-turbo to run. Default:both. prep: preprocess BAM files and generate .rmats files. post: load .rmats files into memory, detect and count alternative splicing events, and calculate P value (if not --statoff). both: prep + post. inte (integrity): check that the BAM filenames recorded by the prep task(s) match the BAM filenames for the current command line. stat: run statistical test on existing output files","The directory for final output from the post step","The directory for intermediate output such as '.rmats' files from the prep step","Use the DARTS statistical model","The number of threads. The optimal number of threads should be equal to the number of CPU cores. Default: 1"), + outputLabels = c("res"), + outputDocs = c("Alternative splice information"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/Xinglab/rmats-turbo", + example = paste() + ) +) diff --git a/Rcwl/tl_rbamCoverage.R b/Rcwl/tl_rbamCoverage.R new file mode 100644 index 0000000..9188c29 --- /dev/null +++ b/Rcwl/tl_rbamCoverage.R @@ -0,0 +1,54 @@ +bamCov <- function(bam, bed, ct = "1000,10000"){ + library(GenomicAlignments) + bed <- read.table(bed) + gr <- GRanges(bed[,1], IRanges(bed[,2]+1, bed[,3])) + gr <- reduce(gr) + cov <- c() + for(i in 1:length(gr)){ + a1 <- readGAlignments(bam, param = ScanBamParam(which=gr[i])) + if(length(a1)>0){ + cr <- coverage(ranges(a1)) + if(length(cr) < end(gr[i])){ + cr <- c(cr, rep(0, end(gr[i]) - length(cr))) + } + cov1 <- cr[start(gr[i]):end(gr[i])] + cov <- c(cov, cov1) + } + } + cov <- unlist(RleList(cov)) + + ct <- as.integer(unlist(strsplit(ct, split = ","))) + cts <- sapply(ct, function(x)mean(cov>=x)) + csum <- c(mean(cov), cts) + csum <- rbind(csum) + colnames(csum) <- c("mean", paste0(">=", ct)) + write.csv(csum, paste0(sub(".bam", "", basename(bam)), "_cov.csv"), row.names=FALSE) +} + +p1 <- InputParam(id = "bam", type = "File", secondaryFile = ".bai", + prefix = "bam=", separate = FALSE, position = 1) +p2 <- InputParam(id = "bed", type = "File", + prefix = "bed=", separate = FALSE, position = 2) +p3 <- InputParam(id = "ct", type = "string[]", prefix = "ct=", + separate = FALSE, itemSeparator = ",", position = 3) +o1 <- OutputParam(id = "cov", type = "File", glob = "*_cov.csv") +rbamCoverage <- cwlProcess(baseCommand = bamCov, + inputs = InputParamList(p1, p2, p3), + outputs = OutputParamList(o1)) + + +rbamCoverage <- addMeta( + rbamCoverage, + label = "rbamCoverage", + doc = "Reads a BAM file to calculate the mean coverage and the fraction of bases meeting specified thresholds over genomic regions from a BED file.", + inputLabels = c("bam","bed","ct"), + inputDocs = c("A BAM file containing aligned sequencing reads.","A BED file specifying genomic regions of interest where coverage should be calculated","A string specifying coverage thresholds separated by commas"), + outputLabels = c("cov"), + outputDocs = c("Output csv file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/deeptools/deepTools", + example = paste() + ) +) diff --git a/Rcwl/tl_read_distribution.R b/Rcwl/tl_read_distribution.R index 91ad07c..3fe5309 100644 --- a/Rcwl/tl_read_distribution.R +++ b/Rcwl/tl_read_distribution.R @@ -1,11 +1,29 @@ ## read distribution -p1 <- InputParam(id = "bam", type = "File", prefix = "-i") +p1 <- InputParam(id = "bam", type = "File", prefix = "-i", secondaryFiles = ".bai") p2 <- InputParam(id = "bed", type = "File", prefix = "-r") o1 <- OutputParam(id = "distOut", type = "File", glob = "$(inputs.bam.nameroot).distribution.txt") -req1 <- list(class = "DockerRequirement", - dockerPull = "hubentu/rcwl-rnaseq") -read_distribution <- cwlParam(baseCommand = c("read_distribution.py"), +## req1 <- list(class = "DockerRequirement", +## dockerPull = "hubentu/rcwl-rnaseq") +req1 <- requireDocker("quay.io/biocontainers/rseqc:4.0.0--py38h4a8c8d9_1") +read_distribution <- cwlProcess(baseCommand = c("read_distribution.py"), requirements = list(req1), inputs = InputParamList(p1, p2), outputs = OutputParamList(o1), stdout = "$(inputs.bam.nameroot).distribution.txt") + + +read_distribution <- addMeta( + read_distribution, + label = "read_distribution", + doc = "Check reads distribution over exon, intron, UTR, intergenic ... etc", + inputLabels = c("bam","bed"), + inputDocs = c("Alignment file in BAM or SAM format.","Reference gene model in bed format."), + outputLabels = c("distOut"), + outputDocs = c("Read distribution output"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/Xinglab/rseqc", + example = paste() + ) +) diff --git a/Rcwl/tl_rnaseqc.R b/Rcwl/tl_rnaseqc.R new file mode 100644 index 0000000..605fe03 --- /dev/null +++ b/Rcwl/tl_rnaseqc.R @@ -0,0 +1,28 @@ +## https://github.com/getzlab/rnaseqc +p1 <- InputParam(id = "gtf", type="File", position=1) +p2 <- InputParam(id = "bam", type="File", position=2) +p3 <- InputParam(id = "bed", type="File?", prefix="--bed") +p4 <- InputParam(id = "out", type="string?", position=9, default=".") +o1 <- OutputParam(id = "qcOut", type="File[]", glob="$(inputs.bam.nameroot)*") +req1 <- requireDocker("gcr.io/broad-cga-aarong-gtex/rnaseqc:latest") +rnaseqc <- cwlProcess(baseCommand = "rnaseqc", + requirements = list(req1), + inputs = InputParamList(p1, p2, p3, p4), + outputs = OutputParamList(o1)) + + +rnaseqc <- addMeta( + rnaseqc, + label = "rnaseqc", + doc = "Tool to add multiple metrics designed to characterize sample quality across a wide range of RNA-seq protocols.", + inputLabels = c("gtf","bam","bed","out"), + inputDocs = c("The input GTF file containing features to check the bam against","The input SAM/BAM file containing reads to process","Optional input BED file containing non-overlapping exons used for fragment size calculations","Output directory"), + outputLabels = c("qcOut"), + outputDocs = c("QC metric files"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/getzlab/rnaseqc", + example = paste() + ) +) diff --git a/Rcwl/tl_runWDL.R b/Rcwl/tl_runWDL.R index 1eebe93..d33a30d 100644 --- a/Rcwl/tl_runWDL.R +++ b/Rcwl/tl_runWDL.R @@ -4,7 +4,24 @@ p2 <- InputParam(id = "run", type = "string", default = "run", position = 2) p3 <- InputParam(id = "wdl", type = "File", position = 3) p4 <- InputParam(id = "json", type = "File", position = 4, prefix = "-i") o1 <- OutputParam(id = "log", type = "File", glob="$(inputs.wdl.basename).log") -runWDL <- cwlParam(baseCommand = "java", +runWDL <- cwlProcess(baseCommand = "java", inputs = InputParamList(p1, p2, p3, p4), outputs = OutputParamList(o1), stdout = "$(inputs.wdl.basename).log") + + +runWDL <- addMeta( + runWDL, + label = "runWDL", + doc = "Run WDL", + inputLabels = c("cromwell","run","wdl","json"), + inputDocs = c("The path to the Cromwell JAR executable.","The command to run the workflow (run by default).","The WDL file defining the workflow to execute.","A JSON file specifying input values for the WDL workflow."), + outputLabels = c("log"), + outputDocs = c("The log file capturing the output of the Cromwell execution, named based on the WDL script file."), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/openwdl/wdl", + example = paste() + ) +) diff --git a/Rcwl/tl_salmon_index.R b/Rcwl/tl_salmon_index.R index 159901b..30066bd 100644 --- a/Rcwl/tl_salmon_index.R +++ b/Rcwl/tl_salmon_index.R @@ -11,8 +11,25 @@ p3 <- InputParam(id = "refFasta", type = "File", prefix = "-t", position = 3) p4 <- InputParam(id = "outPrefix", type = "string", prefix = "-i", position = 4) o1 <- OutputParam(id = "out1", type = "Directory", glob = "$(inputs.outPrefix)") -salmon_index <- cwlParam(baseCommand = c("salmon", "index"), +salmon_index <- cwlProcess(baseCommand = c("salmon", "index"), requirements = list(rep1, rep2), arguments = list("--type", "quasi"), inputs = InputParamList(p1, p2, p3, p4), outputs = OutputParamList(o1)) + + +salmon_index <- addMeta( + salmon_index, + label = "salmon_index", + doc = "Creates a salmon index.", + inputLabels = c("threadN","kmer","refFasta","outPrefix"), + inputDocs = c("Number of threads to use during indexing.","The size of k-mers that should be used for the quasi index.","Transcript fasta file.","salmon index."), + outputLabels = c("out1"), + outputDocs = c("Salmon index file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/COMBINE-lab/salmon", + example = paste() + ) +) diff --git a/Rcwl/tl_salmon_quant.R b/Rcwl/tl_salmon_quant.R index cf9a3f9..15879ff 100644 --- a/Rcwl/tl_salmon_quant.R +++ b/Rcwl/tl_salmon_quant.R @@ -12,12 +12,26 @@ p4 <- InputParam(id = "fq2", type = "File", prefix = "-2", position = 4) p5 <- InputParam(id = "outPrefix", type = "string", prefix = "-o", position = 5) o1 <- OutputParam(id = "out1", type = "Directory", glob = "$(inputs.outPrefix)") -salmon_quant <- cwlParam(baseCommand = c("salmon", "quant"), +salmon_quant <- cwlProcess(baseCommand = c("salmon", "quant"), requirements = list(rep1, rep2), arguments = list("-l", "A", - "--validateMappings", - "--seqBias", - "--gcBias", - "--posBias"), + "--validateMappings"), inputs = InputParamList(p1, p2, p3, p4, p5), outputs = OutputParamList(o1)) + + +salmon_quant <- addMeta( + salmon_quant, + label = "salmon_quant", + doc = "Perform dual-phase, selective-alignment-based estimation of transcript abundance from RNA-seq reads", + inputLabels = c("threadN","ref","fq1","fq2","outPrefix"), + inputDocs = c("The number of threads to use concurrently.","salmon index","File containing the #1 mates","File containing the #2 mates","Output quantification directory."), + outputLabels = c("out1"), + outputDocs = c("Quantification file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/COMBINE-lab/salmon", + example = paste() + ) +) diff --git a/Rcwl/tl_sam2bam.R b/Rcwl/tl_sam2bam.R index a701008..57ecdda 100644 --- a/Rcwl/tl_sam2bam.R +++ b/Rcwl/tl_sam2bam.R @@ -2,10 +2,27 @@ p1 <- InputParam(id = "sam", type = "File") o1 <- OutputParam(id = "bam", type = "File", glob = "$(inputs.sam.basename).bam") req2 <- list(class = "DockerRequirement", - dockerPull = "biocontainers/samtools:v1.7.0_cv3") -sam2bam <- cwlParam(baseCommand = c("samtools", "view"), + dockerPull = "quay.io/biocontainers/samtools:1.16.1--h6899075_1") +sam2bam <- cwlProcess(baseCommand = c("samtools", "view"), arguments = list("-b"), requirements = list(req2), inputs = InputParamList(p1), outputs = OutputParamList(o1), stdout = "$(inputs.sam.basename).bam") + + +sam2bam <- addMeta( + sam2bam, + label = "sam2bam", + doc = "Convert Sam to bam file", + inputLabels = c("sam"), + inputDocs = c("Input sam file"), + outputLabels = c("bam"), + outputDocs = c("Bam file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/samtools/samtools", + example = paste() + ) +) diff --git a/Rcwl/tl_samtools_collate.R b/Rcwl/tl_samtools_collate.R new file mode 100644 index 0000000..5b039f3 --- /dev/null +++ b/Rcwl/tl_samtools_collate.R @@ -0,0 +1,27 @@ +p1 <- InputParam(id = "fast", type = "boolean?", prefix = "-f") +p2 <- InputParam(id = "out", type = "string", prefix = "-o") +p3 <- InputParam(id = "threads", type = "int?", prefix = "--threads") +p4 <- InputParam(id = "bam", type = "File", position = 99) +o1 <- OutputParam(id = "obam", type = "File", glob = "$(inputs.out)") +req1 <- requireDocker("quay.io/biocontainers/samtools:1.16.1--h6899075_1") +samtools_collate <- cwlProcess(baseCommand = c("samtools", "collate"), + requirements = list(req1), + inputs = InputParamList(p1, p2, p3, p4), + outputs = OutputParamList(o1)) + + +samtools_collate <- addMeta( + samtools_collate, + label = "samtools_collate", + doc = "provide a fast, memory-efficient way to sort or group reads by their name without requiring a large amount of disk space or RAM", + inputLabels = c("fast","out","threads","bam"), + inputDocs = c("fast (only primary alignments)","output file name (use prefix if not set)","Number of additional threads to use [0]","Input bam file"), + outputLabels = c("obam"), + outputDocs = c("Output of BAM or CRAM file with reads approximately sorted by name"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/samtools/samtools", + example = paste() + ) +) diff --git a/Rcwl/tl_samtools_depth.R b/Rcwl/tl_samtools_depth.R index 8b0f37f..6ce509c 100644 --- a/Rcwl/tl_samtools_depth.R +++ b/Rcwl/tl_samtools_depth.R @@ -3,8 +3,25 @@ p1 <- InputParam(id = "bam", type = "File") o1 <- OutputParam(id = "pileup", type = "File", glob = "$(inputs.bam.nameroot).depth.txt") req1 <- list(class = "DockerRequirement", dockerPull = "biocontainers/samtools:v1.7.0_cv3") -samtools_depth <- cwlParam(baseCommand = c("samtools", "depth"), +samtools_depth <- cwlProcess(baseCommand = c("samtools", "depth"), requirements = list(req1), inputs = InputParamList(p1), outputs = OutputParamList(o1), stdout = "$(inputs.bam.nameroot).depth.txt") + + +samtools_depth <- addMeta( + samtools_depth, + label = "samtools_depth", + doc = "Tool to calculate the depth of coverage at each position in a BAM or CRAM file.", + inputLabels = c("bam"), + inputDocs = c("Input bam file"), + outputLabels = c("pileup"), + outputDocs = c("The primary output is a tab-delimited text file or standard output listing the coverage depth for each position in the reference genome."), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/samtools/samtools", + example = paste() + ) +) diff --git a/Rcwl/tl_samtools_faidx.R b/Rcwl/tl_samtools_faidx.R new file mode 100644 index 0000000..922812f --- /dev/null +++ b/Rcwl/tl_samtools_faidx.R @@ -0,0 +1,28 @@ +## bam faidx +p1 <- InputParam(id = "fa", type = "File", secondaryFiles = ".fai") +p2 <- InputParam(id = "region", type = "string", position = 1) +o1 <- OutputParam(id = "fout", type = "File", glob = "$(inputs.fa.nameroot)_$(inputs.region).fa") +req2 <- list(class = "DockerRequirement", + dockerPull = "quay.io/biocontainers/samtools:1.15--h1170115_1") +samtools_faidx <- cwlProcess(baseCommand = c("samtools", "faidx"), + requirements = list(req2), + inputs = InputParamList(p1, p2), + outputs = OutputParamList(o1), + stdout = "$(inputs.fa.nameroot)_$(inputs.region).fa") + + +samtools_faidx <- addMeta( + samtools_faidx, + label = "samtools_faidx", + doc = "Used to index a FASTA file", + inputLabels = c("fa","region"), + inputDocs = c("Input fasta file","File of regions. Format is chr:from-to. One per line."), + outputLabels = c("fout"), + outputDocs = c("Indexed file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/samtools/samtools", + example = paste() + ) +) diff --git a/Rcwl/tl_samtools_fastq.R b/Rcwl/tl_samtools_fastq.R new file mode 100644 index 0000000..796e9a3 --- /dev/null +++ b/Rcwl/tl_samtools_fastq.R @@ -0,0 +1,30 @@ +p1 <- InputParam(id = "fq1", type = "string", prefix = "-1") +p2 <- InputParam(id = "fq2", type = "string?", prefix = "-2") +p3 <- InputParam(id = "fq0", type = "string?", prefix = "-0") +p4 <- InputParam(id = "bam", type = "File", position = 99) +p5 <- InputParam(id = "threads", type = "int?", prefix = "--threads") +o1 <- OutputParam(id = "FQ1", type = "File", glob = "$(inputs.fq1)") +o2 <- OutputParam(id = "FQ2", type = "File?", glob = "$(inputs.fq2)") +o3 <- OutputParam(id = "FQ0", type = "File?", glob = "$(inputs.fq0)") +req1 <- requireDocker("quay.io/biocontainers/samtools:1.16.1--h6899075_1") +samtools_fastq <- cwlProcess(baseCommand = c("samtools", "fastq"), + requirements = list(req1), + inputs = InputParamList(p1, p2, p3, p4, p5), + outputs = OutputParamList(o1, o2, o3)) + + +samtools_fastq <- addMeta( + samtools_fastq, + label = "samtools_fastq", + doc = "Converts a SAM, BAM or CRAM to FASTQ format.", + inputLabels = c("fq1","fq2","fq0","bam","threads"), + inputDocs = c("write reads designated READ1 to FILE","write reads designated READ2 to FILE","write reads designated READ_OTHER to FILE","Input bam file","Number of additional threads to use [0]"), + outputLabels = c("FQ1","FQ2","FQ0"), + outputDocs = c("Fastq file 1","Fastq file 2","Fastq Other"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/samtools/samtools", + example = paste() + ) +) diff --git a/Rcwl/tl_samtools_flagstat.R b/Rcwl/tl_samtools_flagstat.R index d2f676b..a1fd4a6 100644 --- a/Rcwl/tl_samtools_flagstat.R +++ b/Rcwl/tl_samtools_flagstat.R @@ -2,9 +2,26 @@ p1 <- InputParam(id = "bam", type = "File") o1 <- OutputParam(id = "flagstat", type = "File", glob = "$(inputs.bam.nameroot).flagstat.txt") req2 <- list(class = "DockerRequirement", - dockerPull = "biocontainers/samtools:v1.7.0_cv3") -samtools_flagstat <- cwlParam(baseCommand = c("samtools", "flagstat"), + dockerPull = "quay.io/biocontainers/samtools:1.15--h1170115_1") +samtools_flagstat <- cwlProcess(baseCommand = c("samtools", "flagstat"), requirements = list(req2), inputs = InputParamList(p1), outputs = OutputParamList(o1), stdout = "$(inputs.bam.nameroot).flagstat.txt") + + +samtools_flagstat <- addMeta( + samtools_flagstat, + label = "samtools_flagstat", + doc = "Tool to provide a fast and comprehensive summary of the alignment statistics for a BAM or CRAM file", + inputLabels = c("bam"), + inputDocs = c("Input bam file"), + outputLabels = c("flagstat"), + outputDocs = c("Summary stats"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/samtools/samtools", + example = paste() + ) +) diff --git a/Rcwl/tl_samtools_index.R b/Rcwl/tl_samtools_index.R index 57a2bde..0a97a7d 100644 --- a/Rcwl/tl_samtools_index.R +++ b/Rcwl/tl_samtools_index.R @@ -3,10 +3,27 @@ p1 <- InputParam(id = "bam", type = "File", position = 1) o1 <- OutputParam(id = "idx", type = "File", glob = "$(inputs.bam.basename)", secondaryFiles = list(".bai")) req2 <- list(class = "DockerRequirement", - dockerPull = "biocontainers/samtools:v1.7.0_cv3") + dockerPull = "quay.io/biocontainers/samtools:1.12--h9aed4be_1") req3 <- list(class = "InitialWorkDirRequirement", listing = list("$(inputs.bam)")) -samtools_index <- cwlParam(baseCommand = c("samtools", "index"), +samtools_index <- cwlProcess(baseCommand = c("samtools", "index"), requirements = list(req2, req3), inputs = InputParamList(p1), outputs = OutputParamList(o1)) + + +samtools_index <- addMeta( + samtools_index, + label = "samtools_index", + doc = "Create an index for BAM or CRAM files", + inputLabels = c("bam"), + inputDocs = c("Input bam file"), + outputLabels = c("idx"), + outputDocs = c("Output index file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/samtools/samtools", + example = paste() + ) +) diff --git a/Rcwl/tl_samtools_merge.R b/Rcwl/tl_samtools_merge.R new file mode 100644 index 0000000..134c569 --- /dev/null +++ b/Rcwl/tl_samtools_merge.R @@ -0,0 +1,26 @@ +## samtools merge bams +p1 <- InputParam(id = "bam", type = "File[]", position = 99L) +p2 <- InputParam(id = "mbam", type = "string", position = 1L) +o1 <- OutputParam(id = "mBam", type = "File", glob = "$(inputs.mbam)") +req1 <- requireDocker("quay.io/biocontainers/samtools:1.12--h9aed4be_1") +samtools_merge <- cwlProcess(baseCommand = c("samtools", "merge"), + requirements = list(req1), + inputs = InputParamList(p1, p2), + outputs = OutputParamList(o1)) + + +samtools_merge <- addMeta( + samtools_merge, + label = "samtools_merge", + doc = "Combine multiple alignment files into one, maintaining the integrity of the data and preserving all alignment information.", + inputLabels = c("bam","mbam"), + inputDocs = c("Input bam file","Name of the merged bam file"), + outputLabels = c("mBam"), + outputDocs = c("Merged bam file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/samtools/samtools", + example = paste() + ) +) diff --git a/Rcwl/tl_samtools_mpileup.R b/Rcwl/tl_samtools_mpileup.R index c88df89..9d61ec1 100644 --- a/Rcwl/tl_samtools_mpileup.R +++ b/Rcwl/tl_samtools_mpileup.R @@ -6,8 +6,25 @@ p3 <- InputParam(id = "region", type = "File?", prefix = "-l") o1 <- OutputParam(id = "pileup", type = "File", glob = "$(inputs.bam.nameroot).pileup") req1 <- list(class = "DockerRequirement", dockerPull = "biocontainers/samtools:v1.7.0_cv3") -samtools_mpileup <- cwlParam(baseCommand = c("samtools", "mpileup"), +samtools_mpileup <- cwlProcess(baseCommand = c("samtools", "mpileup"), requirements = list(req1), inputs = InputParamList(p1, p2, p3), outputs = OutputParamList(o1), stdout = "$(inputs.bam.nameroot).pileup") + + +samtools_mpileup <- addMeta( + samtools_mpileup, + label = "samtools_mpileup", + doc = "Create a pileup format output that provides detailed information on the bases aligned to each reference position across multiple samples.", + inputLabels = c("bam","ref","region"), + inputDocs = c("Input bam file","faidx indexed reference sequence file","skip unlisted positions (chr pos) or regions (BED)"), + outputLabels = c("pileup"), + outputDocs = c("Pileup output"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/samtools/samtools", + example = paste() + ) +) diff --git a/Rcwl/tl_samtools_sort.R b/Rcwl/tl_samtools_sort.R new file mode 100644 index 0000000..80f57fd --- /dev/null +++ b/Rcwl/tl_samtools_sort.R @@ -0,0 +1,26 @@ +## samtools sort bam +p1 <- InputParam(id = "bam", type = "File") +p2 <- InputParam(id = "obam", type = "string", prefix = "-o") +o1 <- OutputParam(id = "sbam", type = "File", glob = "$(inputs.obam)") +req1 <- requireDocker("quay.io/biocontainers/samtools:1.12--h9aed4be_1") +samtools_sort <- cwlProcess(baseCommand = c("samtools", "sort"), + requirements = list(req1), + inputs = InputParamList(p1, p2), + outputs = OutputParamList(o1)) + + +samtools_sort <- addMeta( + samtools_sort, + label = "samtools_sort", + doc = "Rearrange the reads in a BAM, SAM, or CRAM file so that they are sorted either by their mapping coordinates (chromosome and position) or by their read names", + inputLabels = c("bam","obam"), + inputDocs = c("Input bam file","Name of the sorted bam file"), + outputLabels = c("sbam"), + outputDocs = c("Sorted bam file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/samtools/samtools", + example = paste() + ) +) diff --git a/Rcwl/tl_samtools_stats.R b/Rcwl/tl_samtools_stats.R index b9d30a9..4127047 100644 --- a/Rcwl/tl_samtools_stats.R +++ b/Rcwl/tl_samtools_stats.R @@ -3,8 +3,25 @@ p1 <- InputParam(id = "bam", type = "File") o1 <- OutputParam(id = "stats", type = "File", glob = "$(inputs.bam.nameroot).stats.txt") req2 <- list(class = "DockerRequirement", dockerPull = "biocontainers/samtools:v1.7.0_cv3") -samtools_stats <- cwlParam(baseCommand = c("samtools", "stats"), +samtools_stats <- cwlProcess(baseCommand = c("samtools", "stats"), requirements = list(req2), inputs = InputParamList(p1), outputs = OutputParamList(o1), stdout = "$(inputs.bam.nameroot).stats.txt") + + +samtools_stats <- addMeta( + samtools_stats, + label = "samtools_stats", + doc = "Provide a detailed statistical summary of the alignment data contained in BAM, SAM, or CRAM files", + inputLabels = c("bam"), + inputDocs = c("Input bam file"), + outputLabels = c("stats"), + outputDocs = c("Statistical summary"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/samtools/samtools", + example = paste() + ) +) diff --git a/Rcwl/tl_samtools_view.R b/Rcwl/tl_samtools_view.R new file mode 100644 index 0000000..fa7efe9 --- /dev/null +++ b/Rcwl/tl_samtools_view.R @@ -0,0 +1,38 @@ +## samtoolsm view +p1 <- InputParam(id = "bam", type = "File", position = 99, secondaryFiles = ".bai?") +p2 <- InputParam(id = "bed", type = "File?", prefix = "-L", position = 1) +p3 <- InputParam(id = "obam", type = "string", prefix = "-o", position = 2) +p4 <- InputParam(id = "region", type = "string?", position = 100) +p5 <- InputParam(id = "outb", type = "boolean?", prefix = "-b") +p6 <- InputParam(id = "exFlag", type = "int?", prefix = "-F") +## p6 <- InputParam(id = "exFlag", type = InputArrayParam(items = "string", prefix = "-F")) +p7 <- InputParam(id = "reqFlag", type = "int?", prefix = "-f") +## p7 <- InputParam(id = "reqFlag", type = InputArrayParam(items = "string", prefix = "-f")) +p8 <- InputParam(id = "qname", type = "File?", prefix = "-N") +p9 <- InputParam(id = "threads", type = "int?", prefix = "--threads") +p10 <- InputParam(id = "mapq", type = "int?", prefix = "-q") +o1 <- OutputParam(id = "oBam", type = "File", glob = "$(inputs.obam)") +req1 <- requireDocker("quay.io/biocontainers/samtools:1.16.1--h6899075_1") +samtools_view <- cwlProcess(cwlVersion="v1.2", + baseCommand = c("samtools", "view"), + requirements = list(req1), + inputs = InputParamList(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10), + outputs = OutputParamList(o1)) + + + +samtools_view <- addMeta( + samtools_view, + label = "samtools_view", + doc = "Enable flexible data manipulation for alignment files", + inputLabels = c("bam","bed","obam","region","outb","exFlag","reqFlag","qname","threads","mapq"), + inputDocs = c("Input bam file","Only output alignments overlapping the input BED FILE [null].","Output to FILE [stdout].","Region specifications after the input filename to restrict output to only those alignments","Output in the BAM format.","Do not output alignments with any bits set in FLAG present in the FLAG field. FLAG can be specified in hex by beginning with `0x' (i.e. /^0x[0-9A-F]+/), in octal by beginning with `0' (i.e. /^0[0-7]+/), as a decimal number not beginning with '0' or as a comma-separated list of flag names.","Only output alignments with all bits set in FLAG present in the FLAG field. FLAG can be specified in hex by beginning with `0x' (i.e. /^0x[0-9A-F]+/), in octal by beginning with `0' (i.e. /^0[0-7]+/), as a decimal number not beginning with '0' or as a comma-separated list of flag names.","Output only alignments with read names listed in FILE. If FILE starts with ^ then the operation is negated and only outputs alignment with read groups not listed in FILE. It is not permissible to mix both the filter-in and filter-out style syntax in the same command.","Number of BAM compression threads to use in addition to main thread [0].","Skip alignments with MAPQ smaller than INT [0]."), + outputLabels = c("oBam"), + outputDocs = c("Output bam file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/samtools/samtools", + example = paste() + ) +) diff --git a/Rcwl/tl_scar_HRD.R b/Rcwl/tl_scar_HRD.R new file mode 100644 index 0000000..438a0c9 --- /dev/null +++ b/Rcwl/tl_scar_HRD.R @@ -0,0 +1,28 @@ +scar_hrd <- function(seg, reference, seqz = TRUE, chr.in.names = FALSE){ + Sys.setenv(VROOM_CONNECTION_SIZE = 131072 * 10000) + ss <- scarHRD::scar_score(seg, reference = reference, seqz = seqz, chr.in.names = chr.in.names) + write.table(ss, "scarHRD.txt", row.names=FALSE, quote=FALSE, sep="\t") +} +p1 <- InputParam(id = "seg", type = "File", position = 1) +p2 <- InputParam(id = "reference", type = "string", position = 2) +o1 <- OutputParam(id = "HRD", type = "File", glob = "scarHRD.txt") +scar_HRD <- cwlProcess(baseCommand = scar_hrd, + inputs = InputParamList(p1, p2), + outputs = OutputParamList(o1)) + + +scar_HRD <- addMeta( + scar_HRD, + label = "scar_HRD", + doc = "Calculates the Homologous Recombination Deficiency (HRD) score", + inputLabels = c("seg","reference"), + inputDocs = c("Segmentation file (typically a tab-delimited text file) containing information about copy number alterations in the genome.","reference genome version (e.g., 'hg19' or 'hg38')"), + outputLabels = c("HRD"), + outputDocs = c("A text file containing the computed HRD scores"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/OSU-SRLab/scarHRD", + example = paste() + ) +) diff --git a/Rcwl/tl_seqtk_sample.R b/Rcwl/tl_seqtk_sample.R new file mode 100644 index 0000000..0e361e9 --- /dev/null +++ b/Rcwl/tl_seqtk_sample.R @@ -0,0 +1,31 @@ +## https://github.com/lh3/seqtk +p1 <- InputParam(id = "seq", type = "File", position = 1L) +p2 <- InputParam(id = "frac", type = "float?", position = 2L) +p3 <- InputParam(id = "num", type = "int?", position = 2L) +p4 <- InputParam(id = "seed", type = "int?", prefix = "-s") +p5 <- InputParam(id = "pass", type = "boolean?", prefix = "-2") +o1 <- OutputParam(id = "fq", type = "File", glob = "$(inputs.seq.nameroot)_s.fq") +req1 <- requireDocker("quay.io/biocontainers/seqtk:1.4--he4a0461_1") + +seqtk_sample <- cwlProcess(baseCommand = c("seqtk", "sample"), + requirements = list(req1), + inputs = InputParamList(p1, p2, p3, p4, p5), + outputs = OutputParamList(o1), + stdout = "$(inputs.seq.nameroot)_s.fq") + + +seqtk_sample <- addMeta( + seqtk_sample, + label = "seqtk_sample", + doc = "Randomly select and extract a subset of sequences from a given FASTA or FASTQ file.", + inputLabels = c("seq","frac","num","seed","pass"), + inputDocs = c("Sequence file","Fraction of seq to extract","Number of seq to extract","RNG seed [11]","2-pass mode: twice as slow but with much reduced memory"), + outputLabels = c("fq"), + outputDocs = c("Extracted file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/lh3/seqtk", + example = paste() + ) +) diff --git a/Rcwl/tl_seqz_binning.R b/Rcwl/tl_seqz_binning.R new file mode 100644 index 0000000..66194e0 --- /dev/null +++ b/Rcwl/tl_seqz_binning.R @@ -0,0 +1,26 @@ +p1 <- InputParam(id = "seqz", type = "File", prefix = "--seqz") +p2 <- InputParam(id = "window", type = "int", prefix = "-w") +p3 <- InputParam(id = "out", type = "string", prefix = "-o") +o1 <- OutputParam(id = "seqzs", type = "File", glob = "$(inputs.out)") +r1 <- requireDocker("quay.io/biocontainers/sequenza-utils:3.0.0--py39h67e14b5_5") +seqz_binning <- cwlProcess(baseCommand = c("sequenza-utils", "seqz_binning"), + requirements = list(r1), + inputs = InputParamList(p1, p2, p3), + outputs = OutputParamList(o1)) + + +seqz_binning <- addMeta( + seqz_binning, + label = "seqz_binning", + doc = "Group or 'bin' sequencing data into uniform windows across the genome.", + inputLabels = c("seqz","window","out"), + inputDocs = c("A seqz file.","Window size used for binning the original seqz file. Default is 50.","Output file '-' for STDOUT"), + outputLabels = c("seqzs"), + outputDocs = c("A binned dataset that contains averaged statistics over fixed-size genomic windows."), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "NA", + example = paste() + ) +) diff --git a/Rcwl/tl_sigproSS.R b/Rcwl/tl_sigproSS.R new file mode 100644 index 0000000..ce24f43 --- /dev/null +++ b/Rcwl/tl_sigproSS.R @@ -0,0 +1,26 @@ +# https://github.com/AlexandrovLab/SigProfilerSingleSample +p1 <- InputParam(id = "vcf", type = "File", position = 1) +o1 <- OutputParam(id = "out", type = "Directory", glob = "results") +req1 <- requireDocker("hubentu/sigpro:v2") + +sigproSS <- cwlProcess(baseCommand = c("python", "/usr/local/bin/spss.py"), + requirements = list(req1), + inputs = InputParamList(p1), + outputs = OutputParamList(o1)) + + +sigproSS <- addMeta( + sigproSS, + label = "sigproSS", + doc = "SigProfilerSingleSample allows attributing a known set of mutational signatures to an individual sample.", + inputLabels = c("vcf"), + inputDocs = c("Input vcf file"), + outputLabels = c("out"), + outputDocs = c("Output directory"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/AlexandrovLab/SigProfilerSimulator", + example = paste() + ) +) diff --git a/Rcwl/tl_somatic_combiner.R b/Rcwl/tl_somatic_combiner.R new file mode 100644 index 0000000..1337686 --- /dev/null +++ b/Rcwl/tl_somatic_combiner.R @@ -0,0 +1,37 @@ +## https://github.com/mingyi-wang/somatic-combiner +p1 <- InputParam(id = "vardict", type = "File?", prefix = "-D") +p2 <- InputParam(id = "lofreqSNV", type = "File?", prefix = "-l", secondaryFiles = ".tbi") +p3 <- InputParam(id = "lofreqIndel", type = "File?", prefix = "-L", secondaryFiles = ".tbi") +p4 <- InputParam(id = "mutect", type = "File?", prefix = "-m", secondaryFiles = ".tbi") +p5 <- InputParam(id = "mutect2", type = "File?", prefix = "-M", + secondaryFiles = list(pattern = ".tbi", required = FALSE)) +p6 <- InputParam(id = "strelkaSNV", type = "File?", prefix = "-s", secondaryFiles = ".tbi") +p7 <- InputParam(id = "strelkaIndel", type = "File?", prefix = "-S", secondaryFiles = ".tbi") +p8 <- InputParam(id = "muse", type = "File?", prefix = "-u") +p9 <- InputParam(id = "varscanSNV", type = "File?", prefix = "-v") +p10 <- InputParam(id = "varscanIndel", type = "File?", prefix = "-V") +p11 <- InputParam(id = "outvcf", type = "string", prefix = "-o") +o1 <- OutputParam(id = "ovcf", type = "File", glob = "$(inputs.outvcf)") +req1 <- requireDocker("hubentu/somatic_combiner") +somatic_combiner <- cwlProcess(cwlVersion = "v1.2", + baseCommand = "", + requirements = list(req1), + inputs = InputParamList(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11), + outputs = OutputParamList(o1)) + + +somatic_combiner <- addMeta( + somatic_combiner, + label = "somatic_combiner", + doc = "A consensus ensemble approach which can combine somatic variants VCFs generated from seven popular callers: LoFreq, MuSE, MuTect2, MuTect, Strelka, VarDict and VarScan.", + inputLabels = c("vardict","lofreqSNV","lofreqIndel","mutect","mutect2","strelkaSNV","strelkaIndel","muse","varscanSNV","varscanIndel","outvcf"), + inputDocs = c("Vardict VCF file","Lofreq SNV VCF file","Lofreq INDEL VCF file","Mutect VCF file","Mutect2 VCF file","Strelka SNV VCF file","Strelka INDEL VCF file","Muse VCF file","Varscan SNV VCF file","Varscan INDEL VCF file","Output VCF file"), + outputLabels = c("ovcf"), + outputDocs = c("Combined vcf file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/mingyi-wang/somatic-combiner", + example = paste() + ) +) diff --git a/Rcwl/tl_sortBam.R b/Rcwl/tl_sortBam.R index 1856de1..0fe1633 100644 --- a/Rcwl/tl_sortBam.R +++ b/Rcwl/tl_sortBam.R @@ -3,8 +3,25 @@ p1 <- InputParam(id = "bam", type = "File") o1 <- OutputParam(id = "sbam", type = "File", glob = "$(inputs.bam.nameroot).sorted.bam") req2 <- list(class = "DockerRequirement", dockerPull = "biocontainers/samtools:v1.7.0_cv3") -sortBam <- cwlParam(baseCommand = c("samtools", "sort"), +sortBam <- cwlProcess(baseCommand = c("samtools", "sort"), requirements = list(req2), inputs = InputParamList(p1), outputs = OutputParamList(o1), stdout = "$(inputs.bam.nameroot).sorted.bam") + + +sortBam <- addMeta( + sortBam, + label = "sortBam", + doc = "Sort alignments by leftmost coordinates, by read name when -n or -N are used, by tag contents with -t, or a minimiser-based collation order with -M.", + inputLabels = c("bam"), + inputDocs = c("Input bam file"), + outputLabels = c("sbam"), + outputDocs = c("Soerted bam file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/samtools/samtools", + example = paste() + ) +) diff --git a/Rcwl/tl_starFusion.R b/Rcwl/tl_starFusion.R index 508b181..acf6bf1 100644 --- a/Rcwl/tl_starFusion.R +++ b/Rcwl/tl_starFusion.R @@ -7,8 +7,25 @@ p4 <- InputParam(id = "odir", type = "string", prefix = "--output_dir") p5 <- InputParam(id = "cpu", type = "int", prefix = "--CPU") o1 <- OutputParam(id = "sout", type = "Directory", glob = "$(inputs.odir)") req1 <- list(class = "DockerRequirement", - dockerPull = "trinityctat/ctatfusion") -starFusion <- cwlParam(baseCommand = "/usr/local/src/STAR-Fusion/STAR-Fusion", + dockerPull = "trinityctat/starfusion") +starFusion <- cwlProcess(baseCommand = "/usr/local/src/STAR-Fusion/STAR-Fusion", requirements = list(req1), inputs = InputParamList(p1, p2, p3, p4, p5), outputs = OutputParamList(o1)) + + +starFusion <- addMeta( + starFusion, + label = "starFusion", + doc = "STAR-Fusion uses the STAR aligner to identify candidate fusion transcripts supported by Illumina reads.", + inputLabels = c("fq1","fq2","genomedir","odir","cpu"), + inputDocs = c("Specifies the left (or single-end) FASTQ file for the RNA-seq reads.","Specifies the right FASTQ file for paired-end RNA-seq reads.","directory containing the STAR-Fusion precompiled reference files, which include the STAR genome index, reference annotation, and other files needed for fusion detection.","Specifies the directory where STAR-Fusion will output the results.","Specifies the number of threads to use for the analysis, which can speed up the process."), + outputLabels = c("sout"), + outputDocs = c("list of predicted fusion transcripts identified by STAR-Fusion."), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/STAR-Fusion/STAR-Fusion/wiki", + example = paste() + ) +) diff --git a/Rcwl/tl_strelka.R b/Rcwl/tl_strelka.R index 7562aef..349a419 100644 --- a/Rcwl/tl_strelka.R +++ b/Rcwl/tl_strelka.R @@ -9,6 +9,7 @@ p4 <- InputParam(id = "callRegions", type = "File?", prefix = "--callRegions", secondaryFiles = ".tbi", position = 4) p5 <- InputParam(id = "indelCandidates", type = "File?", prefix = "--indelCandidates", position = 5) +p6 <- InputParam(id = "exome", type = "boolean", prefix = "--exome", default = TRUE) o1 <- OutputParam(id = "snvs", type = "File", glob = "strelkaRunDir/results/variants/somatic.snvs.vcf.gz", secondaryFiles = ".tbi") @@ -17,16 +18,33 @@ o2 <- OutputParam(id = "indels", type = "File", secondaryFiles = ".tbi") req1 <- list(class = "DockerRequirement", - dockerPull = "cmopipeline/strelka2_manta") + dockerPull = "quay.io/biocontainers/strelka:2.9.10--h9ee0642_1") req2 <- list(class = "ShellCommandRequirement") -strelka <- cwlParam(baseCommand = "configureStrelkaSomaticWorkflow.py", +strelka <- cwlProcess(baseCommand = "configureStrelkaSomaticWorkflow.py", requirements = list(req1, req2), arguments = list( - "--runDir", "strelkaRunDir", "--exome", - list(valueFrom = " && ", position = 6L), + "--runDir", "strelkaRunDir", + list(valueFrom = " && ", position = 6L, shellQuote = FALSE), list(valueFrom = "strelkaRunDir/runWorkflow.py", position = 7L), list(valueFrom = "-m", position = 8L), list(valueFrom = "local", position = 9L)), - inputs = InputParamList(p1, p2, p3, p4, p5), + inputs = InputParamList(p1, p2, p3, p4, p5, p6), outputs = OutputParamList(o1, o2)) + + +strelka <- addMeta( + strelka, + label = "strelka", + doc = "This script configures Strelka somatic small variant calling.You must specify an alignment file (BAM or CRAM) for each sample of a matched tumor-normal pair.", + inputLabels = c("tbam","nbam","ref","callRegions","indelCandidates","exome"), + inputDocs = c("Tumor sample BAM or CRAM file. [required] (no default)","Normal sample BAM or CRAM file. (no default)","samtools-indexed reference fasta file [required]","Optionally provide a bgzip-compressed/tabix-indexed BED file containing the set of regions to call.","Specify a VCF of candidate indel alleles.","Set options for exome or other targeted input: note in particular that this flag turns off high-depth filters"), + outputLabels = c("snvs","indels"), + outputDocs = c("SNV file","Indel file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/Illumina/strelka", + example = paste() + ) +) diff --git a/Rcwl/tl_strip_sam.R b/Rcwl/tl_strip_sam.R new file mode 100644 index 0000000..f95b10d --- /dev/null +++ b/Rcwl/tl_strip_sam.R @@ -0,0 +1,25 @@ +p1 <- InputParam(id = "sam", type = "File") +o1 <- OutputParam(id = "strip", type = "File", glob = "*_stripped.sam") +req1 <- requireInitialWorkDir(listing = list("$(inputs.sam)")) +req2 <- requireDocker("hubentu/rrbs") +strip_sam <- cwlProcess(baseCommand = c("bash", "/opt/strip_bismark_sam.sh"), + requirements = list(req1, req2), + inputs = InputParamList(p1), + outputs = OutputParamList(o1)) + + +strip_sam <- addMeta( + strip_sam, + label = "strip_sam", + doc = "Simplify and clean up the SAM (Sequence Alignment/Map) files generated by Bismark by removing non-essential information.", + inputLabels = c("sam"), + inputDocs = c("Input Sam file"), + outputLabels = c("strip"), + outputDocs = c("Cleaned up sam file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "NA", + example = paste() + ) +) diff --git a/Rcwl/tl_svaba_germline.R b/Rcwl/tl_svaba_germline.R new file mode 100644 index 0000000..d5ffe61 --- /dev/null +++ b/Rcwl/tl_svaba_germline.R @@ -0,0 +1,41 @@ +## https://github.com/walaj/svaba +p1 <- InputParam(id = "bam", type = "File", prefix = "-t", secondaryFiles = list(".bai?", "^.bai?")) +p2 <- InputParam(id = "mate", type = "int?", prefix = "-L") +p3 <- InputParam(id = "target", type = "File?", prefix = "-k") +p4 <- InputParam(id = "dbsnp", type = "File?", prefix = "-D", + secondaryFiles = "$(self.nameext == '.gz' ? self.basename+'.tbi' : self.basename+'.idx')") +p5 <- InputParam(id = "ref", type = "File", prefix = "-G", + secondaryFiles = c(".amb", ".ann", ".bwt", ".pac", ".sa", ".fai")) +p6 <- InputParam(id = "cores", type = "int", prefix = "-p", default = 4L) +p7 <- InputParam(id = "prefix", type = "string", prefix = "-a") +o1 <- OutputParam(id = "raw", type = "File", glob = "*.bps.txt.gz") +o2 <- OutputParam(id = "contig", type = "File", glob = "*.contigs.bam") +o3 <- OutputParam(id = "discordants", type = "File", glob = "*.discordant.txt.gz") +o4 <- OutputParam(id = "log", type = "File", glob = "*.log") +o5 <- OutputParam(id = "align", type = "File", glob = "*.alignments.txt.gz") +o6 <- OutputParam(id = "vcf", type = "File[]", glob = "*.vcf") +req1 <- requireDocker("hubentu/svaba:1.2.0-bin") +req2 <- requireJS() +svaba_germline <- cwlProcess(cwlVersion = "v1.2", + baseCommand = c("svaba", "run"), + arguments = list("-I"), + requirements = list(req1, req2), + inputs = InputParamList(p1, p2, p3, p4, p5, p6, p7), + outputs = OutputParamList(o1, o2, o3, o4, o5, o6)) + + +svaba_germline <- addMeta( + svaba_germline, + label = "svaba_germline", + doc = "tool used for detecting germline structural variations (SVs) and small insertions and deletions (indels) in DNA sequencing data.", + inputLabels = c("bam","mate","target","dbsnp","ref","cores","prefix"), + inputDocs = c("Case BAM/CRAM/SAM file (eg tumor). Can input multiple.","Minimum number of somatic reads required to attempt mate-region lookup [3]","Run on targeted intervals. Accepts BED file or Samtools-style string","DBsnp database (VCF) to compare indels against","Path to indexed reference genome to be used by BWA-MEM.","Use NUM threads to run svaba. Default: 1","String specifying the analysis ID to be used as part of ID common.Main input"), + outputLabels = c("raw","contig","discordants","log","align","vcf"), + outputDocs = c("Contains raw, unfiltered variant calls.","Assembled contigs around variant breakpoints, providing sequence context.","Lists of discordant reads that support potential structural variants.","Records details of the run, useful for troubleshooting and understanding the process.","Realigned reads around regions of interest to confirm variant calls.","The final set of detected variants in VCF format, used for downstream analysis."), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/walaj/svaba", + example = paste() + ) +) diff --git a/Rcwl/tl_svaba_somatic.R b/Rcwl/tl_svaba_somatic.R index feb6f03..e0a5f5f 100644 --- a/Rcwl/tl_svaba_somatic.R +++ b/Rcwl/tl_svaba_somatic.R @@ -1,20 +1,42 @@ ## https://github.com/walaj/svaba -p1 <- InputParam(id = "tbam", type = "File", prefix = "-t", secondaryFiles = ".bai") -p2 <- InputParam(id = "nbam", type = "File", prefix = "-n", secondaryFiles = ".bai") -p3 <- InputParam(id = "dbsnp", type = "File", prefix = "-D") -p4 <- InputParam(id = "ref", type = "File", prefix = "-G", +p1 <- InputParam(id = "tbam", type = "File", prefix = "-t", secondaryFiles = list(".bai?", "^.bai?")) +p2 <- InputParam(id = "nbam", type = "File", prefix = "-n", secondaryFiles = list(".bai?", "^.bai?")) +p3 <- InputParam(id = "target", type = "File?", prefix = "-k") +p4 <- InputParam(id = "dbsnp", type = "File", prefix = "-D", + secondaryFiles = "$(self.nameext == '.gz' ? self.basename+'.tbi' : self.basename+'.idx')") +p5 <- InputParam(id = "ref", type = "File", prefix = "-G", secondaryFiles = c(".amb", ".ann", ".bwt", ".pac", ".sa", ".fai")) -p5 <- InputParam(id = "cores", type = "int", prefix = "-p", default = 4L) +p6 <- InputParam(id = "cores", type = "int", prefix = "-p", default = 4L) +p7 <- InputParam(id = "prefix", type = "string", prefix = "-a") o1 <- OutputParam(id = "raw", type = "File", glob = "*.bps.txt.gz") o2 <- OutputParam(id = "contig", type = "File", glob = "*.contigs.bam") o3 <- OutputParam(id = "discordants", type = "File", glob = "*.discordant.txt.gz") o4 <- OutputParam(id = "log", type = "File", glob = "*.log") o5 <- OutputParam(id = "align", type = "File", glob = "*.alignments.txt.gz") -o6 <- OutputParam(id = "vcf", type = "File[]", glob = "*.vcf") -req1 <- list(class = "DockerRequirement", - dockerPull = "ken01nn/svaba") -svaba_somatic <- cwlParam(baseCommand = c("svaba", "run"), - requirements = list(req1), - arguments = list("-a", "somatic_run"), - inputs = InputParamList(p1, p2, p3, p4, p5), - outputs = OutputParamList(o1, o2, o3, o4, o5, o6)) +o6 <- OutputParam(id = "uvcf", type = "File[]", glob = "*unfiltered.*") +o7 <- OutputParam(id = "svcf", type = "File[]", glob = "*svaba.somatic*") +o8 <- OutputParam(id = "gvcf", type = "File[]", glob = "*svaba.germline*") +req1 <- requireDocker("hubentu/svaba:1.2.0-bin") +req2 <- requireJS() +svaba_somatic <- cwlProcess(cwlVersion = "v1.2", + baseCommand = c("svaba", "run"), + requirements = list(req1, req2), + inputs = InputParamList(p1, p2, p3, p4, p5, p6, p7), + outputs = OutputParamList(o1, o2, o3, o4, o5, o6, o7, o8)) + + +svaba_somatic <- addMeta( + svaba_somatic, + label = "svaba_somatic", + doc = "tool specifically designed for detecting somatic structural variants (SVs) and small insertions and deletions (indels) from paired tumor-normal DNA sequencing data.", + inputLabels = c("tbam","nbam","target","dbsnp","ref","cores","prefix"), + inputDocs = c("Case BAM/CRAM/SAM file (eg tumor). Can input multiple.","(optional) Control BAM/CRAM/SAM file (eg normal). Can input multiple.","Run on targeted intervals. Accepts BED file or Samtools-style string","DBsnp database (VCF) to compare indels against","Path to indexed reference genome to be used by BWA-MEM.","Use NUM threads to run svaba. Default: 1","String specifying the analysis ID to be used as part of ID common. Main input"), + outputLabels = c("raw","contig","discordants","log","align","uvcf","svcf","gvcf"), + outputDocs = c("Contains raw, unfiltered variant calls.","Contains assembled contigs generated around breakpoints of detected variants.","Lists discordant reads that support the detected structural variants.","A log file that records the progress and details of the analysis performed by svaba_somatic.","Contains realigned reads after local assembly around detected variant sites.","The unfiltered VCF file containing all small variants (SNVs and indels) detected in the somatic sample.","The filtered somatic VCF file containing structural variants (SVs) and indels detected in the tumor sample that are not present in the matched normal sample.","Germline VCF file containing variants detected in the normal (germline) sample."), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/walaj/svaba", + example = paste() + ) +) diff --git a/Rcwl/tl_tabix_index.R b/Rcwl/tl_tabix_index.R index af05c52..5137ab4 100644 --- a/Rcwl/tl_tabix_index.R +++ b/Rcwl/tl_tabix_index.R @@ -8,7 +8,24 @@ req1 <- list(class = "DockerRequirement", dockerPull = "biocontainers/tabix:v1.3.2-2-deb_cv1") req2 <- list(class = "InitialWorkDirRequirement", listing = list("$(inputs.tfile)")) -tabix_index <- cwlParam(baseCommand = "tabix", +tabix_index <- cwlProcess(baseCommand = "tabix", requirements = list(req1, req2), inputs = InputParamList(p1, p2), outputs = OutputParamList(o1)) + + +tabix_index <- addMeta( + tabix_index, + label = "tabix_index", + doc = "Tabix indexes a TAB-delimited genome position file in.tab.bgz and creates an index file", + inputLabels = c("tfile","type"), + inputDocs = c("Tab file","gff, bed, sam, vcf"), + outputLabels = c("idx"), + outputDocs = c("tab index file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/samtools/htslib", + example = paste() + ) +) diff --git a/Rcwl/tl_tar_c.R b/Rcwl/tl_tar_c.R new file mode 100644 index 0000000..136ff46 --- /dev/null +++ b/Rcwl/tl_tar_c.R @@ -0,0 +1,27 @@ +p1 <- InputParam(id = "create", type = "boolean?", prefix = "-c", position = 1, default = TRUE) +p2 <- InputParam(id = "compress", type = "boolean?", prefix = "-z", position = 2, default = TRUE) +p3 <- InputParam(id = "tar", type = "string", prefix = "-f", position = 3) +p4 <- InputParam(id = "files", type = list("File[]?", "File?"), position = 4) +p5 <- InputParam(id = "dir", type = "Directory[]?", position = 5) +o1 <- OutputParam(id = "tarfile", type = "File", glob = "$(inputs.tar)") + +tar_c <- cwlProcess(baseCommand = "tar", + inputs = InputParamList(p1, p2, p3, p4, p5), + outputs = OutputParamList(o1)) + + +tar_c <- addMeta( + tar_c, + label = "tar_c", + doc = "The tar command bundles multiple files and directories into a single file,", + inputLabels = c("create","compress","tar","files","dir"), + inputDocs = c("Create a new archive.","Compress or decompress using gzip.","name of the archive file","File list","Input directroty"), + outputLabels = c("tarfile"), + outputDocs = c("tar files"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "NA", + example = paste() + ) +) diff --git a/Rcwl/tl_trimRRBSdiversity.R b/Rcwl/tl_trimRRBSdiversity.R new file mode 100644 index 0000000..ecd4958 --- /dev/null +++ b/Rcwl/tl_trimRRBSdiversity.R @@ -0,0 +1,30 @@ +p1 <- InputParam(id = "fq1", type = "File", prefix = "-1") +p2 <- InputParam(id = "fq2", type = "File", prefix = "-2") +o1 <- OutputParam(id = "FQ1", type = "File", glob = "$(inputs.fq1.nameroot)_*") +o2 <- OutputParam(id = "FQ2", type = "File", glob = "$(inputs.fq2.nameroot)_*") +req1 <- requireInitialWorkDir(listing = list("$(inputs.fq1)", + "$(inputs.fq2)")) +req2 <- requireDocker("hubentu/rrbs") + +trimRRBSdiversity <- cwlProcess(baseCommand = c("python", + "/opt/trimRRBSdiversityAdaptCustomers.py"), + requirements = list(req1, req2), + inputs = InputParamList(p1, p2), + outputs = OutputParamList(o1, o2)) + + +trimRRBSdiversity <- addMeta( + trimRRBSdiversity, + label = "trimRRBSdiversity", + doc = "Given a set of paired end read files, performs the trimming for RRBS with diversity adapters. Make sure the pattern names are in quotations.", + inputLabels = c("fq1","fq2"), + inputDocs = c("pattern for forward read files","pattern for reverse read files"), + outputLabels = c("FQ1","FQ2"), + outputDocs = c("Trimmed forward read file","Trimmed reverse read file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "NA", + example = paste() + ) +) diff --git a/Rcwl/tl_trim_galore.R b/Rcwl/tl_trim_galore.R new file mode 100644 index 0000000..38d81c0 --- /dev/null +++ b/Rcwl/tl_trim_galore.R @@ -0,0 +1,31 @@ +p1 <- InputParam(id = "fq1", type = "File", position = 9) +p2 <- InputParam(id = "fq2", type = "File?", position = 10) +p3 <- InputParam(id = "a1", type = "string", prefix = "-a", default = "AGATCGGAAGAGC") +p4 <- InputParam(id = "a2", type = "string?", prefix = "-a2", default = "AAATCAAAAAAAC") +p5 <- InputParam(id = "paired", type = "boolean", prefix = "--paired", default = TRUE) +o1 <- OutputParam(id = "FQ1", type = "File", glob = "*_1.fq.gz") +o2 <- OutputParam(id = "FQ2", type = "File", glob = "*_2.fq.gz") +o3 <- OutputParam(id = "report", type = "File[]", glob = "*.txt") +req1 <- requireDocker("quay.io/biocontainers/trim-galore:0.6.7--hdfd78af_0") +trim_galore <- cwlProcess(baseCommand = "trim_galore", + arguments = list("-o", "./"), + requirements = list(req1), + inputs = InputParamList(p1, p2, p3, p4, p5), + outputs = OutputParamList(o1, o2, o3)) + + +trim_galore <- addMeta( + trim_galore, + label = "trim_galore", + doc = "Trim Galore is a wrapper around Cutadapt and FastQC to consistently apply adapter and quality trimming to FastQ files, with extra functionality for RRBS data.", + inputLabels = c("fq1","fq2","a1","a2","paired"), + inputDocs = c("Fastq file 1","Fastq file 2","Adapter sequence to be trimmed. If not specified explicitly, Trim Galore will try to auto-detect whether the Illumina universal, Nextera transposase or Illumina small RNA adapter sequence was used.","Optional adapter sequence to be trimmed off read 2 of paired-end files. This option requires '--paired' to be specified as well.","This option performs length trimming of quality/adapter/RRBS trimmed reads for paired-end files. To pass the validation test, both sequences of a sequence pair are required to have a certain minimum length which is governed by the option --length (see above)"), + outputLabels = c("FQ1","FQ2","report"), + outputDocs = c("Trimmed Fastq1","Trimmed Fastq 2","Quality metric"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/FelixKrueger/TrimGalore", + example = paste() + ) +) diff --git a/Rcwl/tl_vcf2bed.R b/Rcwl/tl_vcf2bed.R new file mode 100644 index 0000000..0d637f6 --- /dev/null +++ b/Rcwl/tl_vcf2bed.R @@ -0,0 +1,55 @@ +script <- " +vcf=$1 +fai=$2 +win=$3 + +vn=`basename $vcf .bed` +awk '{if($0 !~ \"^#\")print $1\"\\t\"$2-1\"\\t\"$2}' $vcf > vcfbed +bedtools slop -i vcfbed -b $win -g $fai > $vn.$win.bed +" +p1 <- InputParam(id = "vcf", type = "File", position = 1) +p2 <- InputParam(id = "fai", type = "File", position = 2) +p3 <- InputParam(id = "win", type = "int", position = 3) +o1 <- OutputParam(id = "bed", type = "File", glob = "*.bed") +req1 <- requireDocker("quay.io/biocontainers/bedtools:2.30.0--h7d7f7ad_2") +req2 <- requireShellScript(script) +vcf2bed <- cwlProcess(cwlVersion = "v1.2", + baseCommand = ShellScript(), + requirements = list(req1, req2), + inputs = InputParamList(p1, p2, p3), + outputs = OutputParamList(o1)) + +## vcfbed <- function(vcf, out, window = 200){ +## reg <- read.table(vcf, comment = "#", sep = "\t") +## bed <- cbind(reg[,1], reg[,2]-window, reg[,2]+window) +## bed <- unique(bed) +## write.table(bed, out, row.names = FALSE, col.names = FALSE, quote = FALSE, sep = "\t") +## } + +## i1 <- InputParam(id = "vcf", type = "File", prefix = "vcf=", separate = FALSE) +## i2 <- InputParam(id = "out", type = "string", prefix = "out=", separate = FALSE) +## i3 <- InputParam(id = "window", type = "int", prefix = "window=", separate = FALSE, +## default = 200L) +## o1 <- OutputParam(id = "bed", type = "File", glob = "$(inputs.out)") +## req1 <- requireDocker("hubentu/r-utils") +## vcf2bed <- cwlProcess(baseCommand = vcfbed, +## requirements = list(req1), +## inputs = InputParamList(i1, i2, i3), +## outputs = OutputParamList(o1)) + + +vcf2bed <- addMeta( + vcf2bed, + label = "vcf2bed", + doc = "Convert vcf file to bed file", + inputLabels = c("vcf","fai","win","out","window"), + inputDocs = c("Input vcf file","Genome index file (FAI) for chromosome size constraints.","Integer window size around each variant.","Name of the output","Integer window size around each variant."), + outputLabels = c("bed","bed"), + outputDocs = c("Output bed file","Output bed file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://github.com/arq5x/bedops", + example = paste() + ) +) diff --git a/Rcwl/tl_vcf_expression_annotator.R b/Rcwl/tl_vcf_expression_annotator.R index 0289ac9..86b5afe 100644 --- a/Rcwl/tl_vcf_expression_annotator.R +++ b/Rcwl/tl_vcf_expression_annotator.R @@ -12,8 +12,25 @@ o1 <- OutputParam(id = "oVcf", type = "File", glob = "$(inputs.ovcf)") req1 <- list(class = "DockerRequirement", dockerPull = "griffithlab/vatools:3.1.0") -vcf_expression_annotator <- cwlParam(baseCommand = "vcf-expression-annotator", +vcf_expression_annotator <- cwlProcess(baseCommand = "vcf-expression-annotator", requirements = list(req1), arguments = list("--ignore-transcript-version"), inputs = InputParamList(p1, p2, p3, p4, p5, p6, p7, p8), outputs = OutputParamList(o1)) + + +vcf_expression_annotator <- addMeta( + vcf_expression_annotator, + label = "vcf_expression_annotator", + doc = "The VCF Expression Annotator will take an output file from Cufflinks, Kallisto, or StringTie and add the data from that file to your VCF.", + inputLabels = c("ivcf","expression","etype","gtype","idCol","expCol","sample","ovcf"), + inputDocs = c("A VEP-annotated VCF file","A TSV file containing expression estimates {kallisto,stringtie,cufflinks,custom}","Describes the type of expression data associated with the variant","Describes the genotype of the variant in a given sample or individual","The column header in the expression_file for the column containing gene names/transcript ids. Required when using the `custom` format.","The column header in the expression_file for the column containing expression data.","If the input_vcf contains multiple samples, the name of the sample to annotate.","Path to write the output VCF file."), + outputLabels = c("oVcf"), + outputDocs = c("Annotated vcf file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "vatools.org", + example = paste() + ) +) diff --git a/Rcwl/tl_vcf_readcount_annotator.R b/Rcwl/tl_vcf_readcount_annotator.R index 8d31dc6..0738c1c 100644 --- a/Rcwl/tl_vcf_readcount_annotator.R +++ b/Rcwl/tl_vcf_readcount_annotator.R @@ -10,7 +10,24 @@ o1 <- OutputParam(id = "oVcf", type = "File", glob = "$(inputs.ovcf)") req1 <- list(class = "DockerRequirement", dockerPull = "griffithlab/vatools:3.1.0") -vcf_readcount_annotator <- cwlParam(baseCommand = "vcf-readcount-annotator", +vcf_readcount_annotator <- cwlProcess(baseCommand = "vcf-readcount-annotator", requirements = list(req1), inputs = InputParamList(p1, p2, p3, p4, p5, p6), outputs = OutputParamList(o1)) + + +vcf_readcount_annotator <- addMeta( + vcf_readcount_annotator, + label = "vcf_readcount_annotator", + doc = "annotate a VCF (Variant Call Format) file with read count information.", + inputLabels = c("ivcf","readcount","ntype","sample","vtype","ovcf"), + inputDocs = c("The input VCF file containing the variants to be annotated with read count information.","A file containing read count data, typically generated from a BAM file using tools like bam-readcount","Specifies whether the annotation should be performed in the context of normal (germline) samples.","If the input_vcf contains multiple samples, the name of the sample to annotate.","The type of variant to process. `snv` will only annotate SNVs.","Path to write the output VCF file."), + outputLabels = c("oVcf"), + outputDocs = c("Output vcf file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "vatools.org", + example = paste() + ) +) diff --git a/Rcwl/tl_vep.R b/Rcwl/tl_vep.R index 9851be6..6973b94 100644 --- a/Rcwl/tl_vep.R +++ b/Rcwl/tl_vep.R @@ -3,22 +3,36 @@ p1 <- InputParam(id = "ivcf", type = "File", prefix = "--input_file") p2 <- InputParam(id = "ovcf", type = "string", prefix = "--output_file") p3 <- InputParam(id = "ref", type = "File", prefix = "--fasta", secondaryFiles = ".fai") p4 <- InputParam(id = "cacheDir", type = "Directory", prefix = "--dir_cache") +p5 <- InputParam(id = "version", type = "string", prefix = "--cache_version") +p6 <- InputParam(id = "merged", type = "boolean?", prefix = "--merged") +p7 <- InputParam(id = "species", type = "string?", prefix = "--species") o1 <- OutputParam(id = "oVcf", type = "File", glob = "$(inputs.ovcf)") - -req1 <- list(class = "DockerRequirement", - dockerPull = "hubentu/ensembl-vep-plugins") + +req1 <- requireDocker("ensemblorg/ensembl-vep") ht1 <- list("cwltool:LoadListingRequirement"= list(loadListing = "no_listing")) ext <- list("$namespaces" = list(cwltool = "http://commonwl.org/cwltool#")) -vep <- cwlParam(baseCommand = "vep", +vep <- cwlProcess(baseCommand = "vep", requirements = list(req1), hints = ht1, - arguments = list("--format", "vcf", "--vcf", - "--symbol", "--terms", "SO", - "--tsl", "--hgvs", "--offline", - "--dir_plugins", "/opt/vep/src/VEP_plugins", - "--plugin", "Downstream", - "--plugin", "Wildtype"), - inputs = InputParamList(p1, p2, p3, p4), + arguments = list("--format", "vcf", "--vcf", "--cache", "--symbol", "--offline"), + inputs = InputParamList(p1, p2, p3, p4, p5, p6, p7), outputs = OutputParamList(o1), extensions = ext) + + +vep <- addMeta( + vep, + label = "vep", + doc = "Tool developed by the Ensembl project that is used to annotate genetic variants with information about their potential functional effects on genes, transcripts, and protein sequences.", + inputLabels = c("ivcf","ovcf","ref","cacheDir","version","merged","species"), + inputDocs = c("Input file","Output file","path to the FASTA file of the reference genome.","Specifies the directory where VEP will look for or store its cache files.","Indicates the version of the Ensembl cache to use.","Instructs VEP to use the merged Ensembl/Havana cache, which includes gene models from both Ensembl and Havana (now part of GENCODE).","Specifies the species for which the variants are being annotated."), + outputLabels = c("oVcf"), + outputDocs = c("Annotated vcf file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "http://useast.ensembl.org/info/docs/tools/vep/script/index.html", + example = paste() + ) +) diff --git a/Rcwl/tl_vep_plugin.R b/Rcwl/tl_vep_plugin.R new file mode 100644 index 0000000..1ef7bd4 --- /dev/null +++ b/Rcwl/tl_vep_plugin.R @@ -0,0 +1,41 @@ +## http://useast.ensembl.org/info/docs/tools/vep/script/index.html +p1 <- InputParam(id = "ivcf", type = "File", prefix = "--input_file") +p2 <- InputParam(id = "ovcf", type = "string", prefix = "--output_file") +p3 <- InputParam(id = "ref", type = "File", prefix = "--fasta", secondaryFiles = ".fai") +p4 <- InputParam(id = "cacheDir", type = "Directory", prefix = "--dir_cache") +o1 <- OutputParam(id = "oVcf", type = "File", glob = "$(inputs.ovcf)") + +req1 <- list(class = "DockerRequirement", + dockerPull = "hubentu/ensembl-vep-plugins") +ht1 <- list("cwltool:LoadListingRequirement"= + list(loadListing = "no_listing")) +ext <- list("$namespaces" = list(cwltool = "http://commonwl.org/cwltool#")) +vep_plugin <- cwlProcess(baseCommand = "vep", + requirements = list(req1), + hints = ht1, + arguments = list("--format", "vcf", "--vcf", + "--symbol", "--terms", "SO", + "--tsl", "--hgvs", "--offline", + "--dir_plugins", "/opt/vep/src/VEP_plugins", + "--plugin", "Downstream", + "--plugin", "Wildtype"), + inputs = InputParamList(p1, p2, p3, p4), + outputs = OutputParamList(o1), + extensions = ext) + + +vep_plugin <- addMeta( + vep_plugin, + label = "vep_plugin", + doc = "VEP plugins provide additional annotations and extend the functionality of the VEP tool.", + inputLabels = c("ivcf","ovcf","ref","cacheDir"), + inputDocs = c("Input VCF file","Name of output fie","Reference file","Specifies the directory where VEP will look for or store its cache files."), + outputLabels = c("oVcf"), + outputDocs = c("Output vcf file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "http://useast.ensembl.org/info/docs/tools/vep/script/index.html", + example = paste() + ) +) diff --git a/Rcwl/tl_vt_decompose.R b/Rcwl/tl_vt_decompose.R index 49f3489..828f20d 100644 --- a/Rcwl/tl_vt_decompose.R +++ b/Rcwl/tl_vt_decompose.R @@ -6,8 +6,25 @@ o1 <- OutputParam(id = "oVcf", type = "File", glob = "$(inputs.ovcf)") req1 <- list(class = "DockerRequirement", dockerPull = "hubentu/vt") -vt_decompose <- cwlParam(baseCommand = c("vt", "decompose"), +vt_decompose <- cwlProcess(baseCommand = c("vt", "decompose"), requirements = list(req1), arguments = list("-s"), inputs = InputParamList(p1, p2), outputs = OutputParamList(o1)) + + +vt_decompose <- addMeta( + vt_decompose, + label = "vt_decompose", + doc = "variant manipulation toolset used for processing and analyzing VCF (Variant Call Format) files.", + inputLabels = c("ivcf","ovcf"), + inputDocs = c("Input vcf file","Output vcf file"), + outputLabels = c("oVcf"), + outputDocs = c("Output manipulated vcf file"), + extensions = list( + author = "rworkflow team", + date = "09-08-24", + url = "https://genome.sph.umich.edu/wiki/Vt", + example = paste() + ) +) diff --git a/cwl/AnnPhaseVcf/AnnPhaseVcf.cwl b/cwl/AnnPhaseVcf/AnnPhaseVcf.cwl index 344521b..17ff1cb 100644 --- a/cwl/AnnPhaseVcf/AnnPhaseVcf.cwl +++ b/cwl/AnnPhaseVcf/AnnPhaseVcf.cwl @@ -1,103 +1,103 @@ -cwlVersion: v1.0 -class: Workflow -requirements: -- class: InlineJavascriptRequirement -- class: StepInputExpressionRequirement -- class: SubworkflowFeatureRequirement -hints: - cwltool:LoadListingRequirement: - loadListing: no_listing -inputs: - svcf: - type: File - gvcf: - type: File - secondaryFiles: .tbi - ref: - type: File - secondaryFiles: - - .fai - - $(self.nameroot).dict - VepDir: - type: Directory - tbam: - type: File - secondaryFiles: .bai - rbam: - type: File - secondaryFiles: .bai - tsample: - type: string - nsample: - type: string - rnaseqs: - type: File[] - kallistoIdx: - type: File - threads: - type: int - default: 16 -outputs: - annVcf: - type: File - outputSource: VCFexpression/ExpVcf - phasedVCF: - type: File - outputSource: PhaseVcf/pvcf -$namespaces: - cwltool: http://commonwl.org/cwltool# -steps: - VCFvep: - run: cwl/AnnPhaseVcf/VCFvep.cwl - in: - ivcf: svcf - ref: ref - cacheDir: VepDir - ovcf: - valueFrom: $(inputs.ivcf.nameroot)_vep.vcf - out: - - oVcf - dVCFcoverage: - run: cwl/AnnPhaseVcf/dVCFcoverage.cwl - in: - vcf: VCFvep/oVcf - bam: tbam - sample: - valueFrom: SAMPLE - ref: ref - out: - - outvcf - rVCFcoverage: - run: cwl/AnnPhaseVcf/rVCFcoverage.cwl - in: - vcf: dVCFcoverage/outvcf - bam: rbam - sample: - valueFrom: SAMPLE - ntype: - valueFrom: RNA - ref: ref - out: - - outvcf - VCFexpression: - run: cwl/AnnPhaseVcf/VCFexpression.cwl - in: - rnafqs: rnaseqs - kallistoIdx: kallistoIdx - svcf: rVCFcoverage/outvcf - threads: threads - out: - - ExpVcf - PhaseVcf: - run: cwl/AnnPhaseVcf/PhaseVcf.cwl - in: - gvariant: gvcf - svariant: VCFexpression/ExpVcf - bam: tbam - outvcf: - valueFrom: $(inputs.tsample)_phased.vcf - nsample: nsample - tsample: tsample - ref: ref - out: - - pvcf +cwlVersion: v1.0 +class: Workflow +requirements: +- class: InlineJavascriptRequirement +- class: StepInputExpressionRequirement +- class: SubworkflowFeatureRequirement +hints: + cwltool:LoadListingRequirement: + loadListing: no_listing +inputs: + svcf: + type: File + gvcf: + type: File + secondaryFiles: .tbi + ref: + type: File + secondaryFiles: + - .fai + - $(self.nameroot).dict + VepDir: + type: Directory + tbam: + type: File + secondaryFiles: .bai + rbam: + type: File + secondaryFiles: .bai + tsample: + type: string + nsample: + type: string + rnaseqs: + type: File[] + kallistoIdx: + type: File + threads: + type: int + default: 16 +outputs: + annVcf: + type: File + outputSource: VCFexpression/ExpVcf + phasedVCF: + type: File + outputSource: PhaseVcf/pvcf +$namespaces: + cwltool: http://commonwl.org/cwltool# +steps: + VCFvep: + run: VCFvep.cwl + in: + ivcf: svcf + ref: ref + cacheDir: VepDir + ovcf: + valueFrom: $(inputs.ivcf.nameroot)_vep.vcf + out: + - oVcf + dVCFcoverage: + run: dVCFcoverage.cwl + in: + vcf: VCFvep/oVcf + bam: tbam + sample: + valueFrom: SAMPLE + ref: ref + out: + - outvcf + rVCFcoverage: + run: rVCFcoverage.cwl + in: + vcf: dVCFcoverage/outvcf + bam: rbam + sample: + valueFrom: SAMPLE + ntype: + valueFrom: RNA + ref: ref + out: + - outvcf + VCFexpression: + run: VCFexpression.cwl + in: + rnafqs: rnaseqs + kallistoIdx: kallistoIdx + svcf: rVCFcoverage/outvcf + threads: threads + out: + - ExpVcf + PhaseVcf: + run: PhaseVcf.cwl + in: + gvariant: gvcf + svariant: VCFexpression/ExpVcf + bam: tbam + outvcf: + valueFrom: $(inputs.tsample)_phased.vcf + nsample: nsample + tsample: tsample + ref: ref + out: + - pvcf diff --git a/cwl/AnnPhaseVcf/AnnPhaseVcf.yml b/cwl/AnnPhaseVcf/AnnPhaseVcf.yml index 9ce47ff..6a00a1a 100644 --- a/cwl/AnnPhaseVcf/AnnPhaseVcf.yml +++ b/cwl/AnnPhaseVcf/AnnPhaseVcf.yml @@ -1 +1 @@ -threads: 16 +threads: 16 diff --git a/cwl/AnnPhaseVcf/PhaseVcf.cwl b/cwl/AnnPhaseVcf/PhaseVcf.cwl index 9488f52..d190623 100644 --- a/cwl/AnnPhaseVcf/PhaseVcf.cwl +++ b/cwl/AnnPhaseVcf/PhaseVcf.cwl @@ -1,106 +1,106 @@ -cwlVersion: v1.0 -class: Workflow -requirements: -- class: InlineJavascriptRequirement -- class: StepInputExpressionRequirement -- class: MultipleInputFeatureRequirement -inputs: - gvariant: - type: File - secondaryFiles: .tbi - svariant: - type: File - secondaryFiles: .tbi - ref: - type: File - secondaryFiles: - - .fai - - $(self.nameroot).dict - bam: - type: File - secondaryFiles: .bai - outvcf: - type: string - nsample: - type: string - tsample: - type: string -outputs: - pvcf: - type: File - outputSource: tabixIndex/idx -steps: - splitSample: - run: splitSample.cwl - in: - vcf: gvariant - sample: nsample - fout: - valueFrom: $(inputs.sample)_germline.vcf - genotype: - valueFrom: ^miss - exclude: - valueFrom: GT='0/0' - out: - - Fout - renameGVcf: - run: renameGVcf.cwl - in: - vcf: splitSample/Fout - ovcf: - valueFrom: $(inputs.vcf.nameroot)_g.vcf - NewName: tsample - out: - - oVcf - renameSVcf: - run: renameSVcf.cwl - in: - vcf: svariant - ovcf: - valueFrom: $(inputs.vcf.nameroot)_s.vcf - NewName: tsample - out: - - oVcf - combineVariants: - run: combineVariants.cwl - in: - variants: - - renameGVcf/oVcf - - renameSVcf/oVcf - ref: ref - ovcf: - valueFrom: combined_somatic_germline.vcf - out: - - oVcf - sortVcf: - run: sortVcf.cwl - in: - vcf: combineVariants/oVcf - ovcf: - valueFrom: $(inputs.vcf.nameroot)_sorted.vcf - out: - - oVcf - ReadBackedPhasing: - run: ReadBackedPhasing.cwl - in: - vcf: sortVcf/oVcf - bam: bam - ref: ref - region: sortVcf/oVcf - ovcf: outvcf - out: - - oVcf - bgzip: - run: bgzip.cwl - in: - ifile: ReadBackedPhasing/oVcf - out: - - zfile - tabixIndex: - run: tabixIndex.cwl - in: - tfile: bgzip/zfile - type: - valueFrom: vcf - out: - - idx +cwlVersion: v1.0 +class: Workflow +requirements: +- class: InlineJavascriptRequirement +- class: StepInputExpressionRequirement +- class: MultipleInputFeatureRequirement +inputs: + gvariant: + type: File + secondaryFiles: .tbi + svariant: + type: File + secondaryFiles: .tbi + ref: + type: File + secondaryFiles: + - .fai + - $(self.nameroot).dict + bam: + type: File + secondaryFiles: .bai + outvcf: + type: string + nsample: + type: string + tsample: + type: string +outputs: + pvcf: + type: File + outputSource: tabixIndex/idx +steps: + splitSample: + run: splitSample.cwl + in: + vcf: gvariant + sample: nsample + fout: + valueFrom: $(inputs.sample)_germline.vcf + genotype: + valueFrom: ^miss + exclude: + valueFrom: GT='0/0' + out: + - Fout + renameGVcf: + run: renameGVcf.cwl + in: + vcf: splitSample/Fout + ovcf: + valueFrom: $(inputs.vcf.nameroot)_g.vcf + NewName: tsample + out: + - oVcf + renameSVcf: + run: renameSVcf.cwl + in: + vcf: svariant + ovcf: + valueFrom: $(inputs.vcf.nameroot)_s.vcf + NewName: tsample + out: + - oVcf + combineVariants: + run: combineVariants.cwl + in: + variants: + - renameGVcf/oVcf + - renameSVcf/oVcf + ref: ref + ovcf: + valueFrom: combined_somatic_germline.vcf + out: + - oVcf + sortVcf: + run: sortVcf.cwl + in: + vcf: combineVariants/oVcf + ovcf: + valueFrom: $(inputs.vcf.nameroot)_sorted.vcf + out: + - oVcf + ReadBackedPhasing: + run: ReadBackedPhasing.cwl + in: + vcf: sortVcf/oVcf + bam: bam + ref: ref + region: sortVcf/oVcf + ovcf: outvcf + out: + - oVcf + bgzip: + run: bgzip.cwl + in: + ifile: ReadBackedPhasing/oVcf + out: + - zfile + tabixIndex: + run: tabixIndex.cwl + in: + tfile: bgzip/zfile + type: + valueFrom: vcf + out: + - idx diff --git a/cwl/AnnPhaseVcf/ReadBackedPhasing.cwl b/cwl/AnnPhaseVcf/ReadBackedPhasing.cwl index 05ab13c..a79c2e6 100644 --- a/cwl/AnnPhaseVcf/ReadBackedPhasing.cwl +++ b/cwl/AnnPhaseVcf/ReadBackedPhasing.cwl @@ -1,46 +1,46 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- java -- -jar -- /usr/GenomeAnalysisTK.jar -- -T -- ReadBackedPhasing -requirements: -- class: DockerRequirement - dockerPull: broadinstitute/gatk3:3.8-1 -inputs: - vcf: - type: File - inputBinding: - prefix: --variant - separate: true - bam: - type: File - secondaryFiles: .bai - inputBinding: - prefix: -I - separate: true - ref: - type: File - secondaryFiles: - - .fai - - $(self.nameroot).dict - inputBinding: - prefix: -R - separate: true - ovcf: - type: string - inputBinding: - prefix: -o - separate: true - region: - type: File - inputBinding: - prefix: -L - separate: true -outputs: - oVcf: - type: File - outputBinding: - glob: $(inputs.ovcf) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- java +- -jar +- /usr/GenomeAnalysisTK.jar +- -T +- ReadBackedPhasing +requirements: +- class: DockerRequirement + dockerPull: broadinstitute/gatk3:3.8-1 +inputs: + vcf: + type: File + inputBinding: + prefix: --variant + separate: true + bam: + type: File + secondaryFiles: .bai + inputBinding: + prefix: -I + separate: true + ref: + type: File + secondaryFiles: + - .fai + - $(self.nameroot).dict + inputBinding: + prefix: -R + separate: true + ovcf: + type: string + inputBinding: + prefix: -o + separate: true + region: + type: File + inputBinding: + prefix: -L + separate: true +outputs: + oVcf: + type: File + outputBinding: + glob: $(inputs.ovcf) diff --git a/cwl/AnnPhaseVcf/T2Gene.R b/cwl/AnnPhaseVcf/T2Gene.R index 1ba97ec..362020e 100644 --- a/cwl/AnnPhaseVcf/T2Gene.R +++ b/cwl/AnnPhaseVcf/T2Gene.R @@ -1,17 +1,15 @@ -.libPaths('/home/hq/R/x86_64-pc-linux-gnu-library/4.0') -suppressPackageStartupMessages(library(R.utils)) -suppressPackageStartupMessages(library(codetools)) -args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) -T2Gene <- -function(kexp){ - e1 <- read.table(kexp, header = TRUE, check.names = FALSE, - stringsAsFactors = FALSE, sep = "\t") - ids <- do.call(rbind, base::strsplit(e1$target_id, split = "\\|")) - tx2gene <- data.frame(ids[,1:2]) - gexp <- tximport::tximport(kexp, type = "kallisto", tx2gene = tx2gene, ignoreAfterBar=TRUE) - gExp <- data.frame(gene = sub("\\..*", "", rownames(gexp$abundance)), - abundance = gexp$abundance) - write.table(gExp, file = "abundance_gene.tsv", row.names = FALSE, - col.names = TRUE, quote = FALSE, sep = "\t") -} -do.call(T2Gene, args) +suppressPackageStartupMessages(library(R.utils)) +args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) +T2Gene <- +function(kexp){ + e1 <- read.table(kexp, header = TRUE, check.names = FALSE, + stringsAsFactors = FALSE, sep = "\t") + ids <- do.call(rbind, base::strsplit(e1$target_id, split = "\\|")) + tx2gene <- data.frame(ids[,1:2]) + gexp <- tximport::tximport(kexp, type = "kallisto", tx2gene = tx2gene, ignoreAfterBar=TRUE) + gExp <- data.frame(gene = sub("\\..*", "", rownames(gexp$abundance)), + abundance = gexp$abundance) + write.table(gExp, file = "abundance_gene.tsv", row.names = FALSE, + col.names = TRUE, quote = FALSE, sep = "\t") +} +do.call(T2Gene, args) diff --git a/cwl/AnnPhaseVcf/T2Gene.cwl b/cwl/AnnPhaseVcf/T2Gene.cwl index 22286d2..a89a824 100644 --- a/cwl/AnnPhaseVcf/T2Gene.cwl +++ b/cwl/AnnPhaseVcf/T2Gene.cwl @@ -1,16 +1,39 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- Rscript -- cwl/AnnPhaseVcf/T2Gene.R -inputs: - kexp: - type: File - inputBinding: - prefix: kexp= - separate: false -outputs: - gout: - type: File - outputBinding: - glob: abundance_gene.tsv +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: Rscript +requirements: +- class: InitialWorkDirRequirement + listing: + - entryname: T2Gene.R + entry: |- + suppressPackageStartupMessages(library(R.utils)) + args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) + T2Gene <- + function(kexp){ + e1 <- read.table(kexp, header = TRUE, check.names = FALSE, + stringsAsFactors = FALSE, sep = "\t") + ids <- do.call(rbind, base::strsplit(e1$target_id, split = "\\|")) + tx2gene <- data.frame(ids[,1:2]) + gexp <- tximport::tximport(kexp, type = "kallisto", tx2gene = tx2gene, ignoreAfterBar=TRUE) + gExp <- data.frame(gene = sub("\\..*", "", rownames(gexp$abundance)), + abundance = gexp$abundance) + write.table(gExp, file = "abundance_gene.tsv", row.names = FALSE, + col.names = TRUE, quote = FALSE, sep = "\t") + } + do.call(T2Gene, args) + writable: false +- class: DockerRequirement + dockerPull: quay.io/biocontainers/bioconductor-tximport:1.22.0--r41hdfd78af_0 +arguments: +- T2Gene.R +inputs: + kexp: + type: File + inputBinding: + prefix: kexp= + separate: false +outputs: + gout: + type: File + outputBinding: + glob: abundance_gene.tsv diff --git a/cwl/AnnPhaseVcf/VCFexpression.cwl b/cwl/AnnPhaseVcf/VCFexpression.cwl index 80f97c7..d2da62a 100644 --- a/cwl/AnnPhaseVcf/VCFexpression.cwl +++ b/cwl/AnnPhaseVcf/VCFexpression.cwl @@ -1,89 +1,89 @@ -cwlVersion: v1.0 -class: Workflow -requirements: -- class: InlineJavascriptRequirement -- class: StepInputExpressionRequirement -inputs: - rnafqs: - type: File[] - kallistoIdx: - type: File - threads: - type: int - default: 16 - svcf: - type: File -outputs: - ExpVcf: - type: File - secondaryFiles: .tbi - outputSource: tabixIndex/idx -steps: - kallistoQuant: - run: kallistoQuant.cwl - in: - fastq: rnafqs - index: kallistoIdx - threads: threads - out: - - h5 - - tsv - - info - cleanExp: - run: cleanExp.cwl - in: - afile: kallistoQuant/tsv - out: - - aout - vcfExpAnn: - run: vcfExpAnn.cwl - in: - ivcf: svcf - ovcf: - valueFrom: $(inputs.ivcf.nameroot)_ExpAnn.vcf - expression: cleanExp/aout - gtype: - valueFrom: transcript - etype: - valueFrom: kallisto - out: - - oVcf - T2Gene: - run: T2Gene.cwl - in: - kexp: kallistoQuant/tsv - out: - - gout - vcfgExpAnn: - run: vcfgExpAnn.cwl - in: - ivcf: vcfExpAnn/oVcf - ovcf: - source: - - svcf - valueFrom: $(self[0].nameroot)_gAnn.vcf - expression: T2Gene/gout - gtype: - valueFrom: gene - etype: - valueFrom: custom - idCol: - valueFrom: gene - expCol: - valueFrom: abundance - out: - - oVcf - bgzip: - run: bgzip.cwl - in: - ifile: vcfgExpAnn/oVcf - out: - - zfile - tabixIndex: - run: tabixIndex.cwl - in: - tfile: bgzip/zfile - type: - valueFrom: vcf - out: - - idx +cwlVersion: v1.0 +class: Workflow +requirements: +- class: InlineJavascriptRequirement +- class: StepInputExpressionRequirement +inputs: + rnafqs: + type: File[] + kallistoIdx: + type: File + threads: + type: int + default: 16 + svcf: + type: File +outputs: + ExpVcf: + type: File + secondaryFiles: .tbi + outputSource: tabixIndex/idx +steps: + kallistoQuant: + run: kallistoQuant.cwl + in: + fastq: rnafqs + index: kallistoIdx + threads: threads + out: + - h5 + - tsv + - info + cleanExp: + run: cleanExp.cwl + in: + afile: kallistoQuant/tsv + out: + - aout + vcfExpAnn: + run: vcfExpAnn.cwl + in: + ivcf: svcf + ovcf: + valueFrom: $(inputs.ivcf.nameroot)_ExpAnn.vcf + expression: cleanExp/aout + gtype: + valueFrom: transcript + etype: + valueFrom: kallisto + out: + - oVcf + T2Gene: + run: T2Gene.cwl + in: + kexp: kallistoQuant/tsv + out: + - gout + vcfgExpAnn: + run: vcfgExpAnn.cwl + in: + ivcf: vcfExpAnn/oVcf + ovcf: + source: + - svcf + valueFrom: $(self[0].nameroot)_gAnn.vcf + expression: T2Gene/gout + gtype: + valueFrom: gene + etype: + valueFrom: custom + idCol: + valueFrom: gene + expCol: + valueFrom: abundance + out: + - oVcf + bgzip: + run: bgzip.cwl + in: + ifile: vcfgExpAnn/oVcf + out: + - zfile + tabixIndex: + run: tabixIndex.cwl + in: + tfile: bgzip/zfile + type: + valueFrom: vcf + out: + - idx diff --git a/cwl/AnnPhaseVcf/VCFvep.cwl b/cwl/AnnPhaseVcf/VCFvep.cwl index 1e55b0f..d285c95 100644 --- a/cwl/AnnPhaseVcf/VCFvep.cwl +++ b/cwl/AnnPhaseVcf/VCFvep.cwl @@ -1,54 +1,54 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: vep -requirements: -- class: DockerRequirement - dockerPull: hubentu/ensembl-vep-plugins -hints: - cwltool:LoadListingRequirement: - loadListing: no_listing -arguments: -- --format -- vcf -- --vcf -- --symbol -- --terms -- SO -- --tsl -- --hgvs -- --offline -- --dir_plugins -- /opt/vep/src/VEP_plugins -- --plugin -- Downstream -- --plugin -- Wildtype -inputs: - ivcf: - type: File - inputBinding: - prefix: --input_file - separate: true - ovcf: - type: string - inputBinding: - prefix: --output_file - separate: true - ref: - type: File - secondaryFiles: .fai - inputBinding: - prefix: --fasta - separate: true - cacheDir: - type: Directory - inputBinding: - prefix: --dir_cache - separate: true -outputs: - oVcf: - type: File - outputBinding: - glob: $(inputs.ovcf) -$namespaces: - cwltool: http://commonwl.org/cwltool# +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: vep +requirements: +- class: DockerRequirement + dockerPull: hubentu/ensembl-vep-plugins +hints: + cwltool:LoadListingRequirement: + loadListing: no_listing +arguments: +- --format +- vcf +- --vcf +- --symbol +- --terms +- SO +- --tsl +- --hgvs +- --offline +- --dir_plugins +- /opt/vep/src/VEP_plugins +- --plugin +- Downstream +- --plugin +- Wildtype +inputs: + ivcf: + type: File + inputBinding: + prefix: --input_file + separate: true + ovcf: + type: string + inputBinding: + prefix: --output_file + separate: true + ref: + type: File + secondaryFiles: .fai + inputBinding: + prefix: --fasta + separate: true + cacheDir: + type: Directory + inputBinding: + prefix: --dir_cache + separate: true +outputs: + oVcf: + type: File + outputBinding: + glob: $(inputs.ovcf) +$namespaces: + cwltool: http://commonwl.org/cwltool# diff --git a/cwl/AnnPhaseVcf/bgzip.cwl b/cwl/AnnPhaseVcf/bgzip.cwl index 8d9129b..a3f9938 100644 --- a/cwl/AnnPhaseVcf/bgzip.cwl +++ b/cwl/AnnPhaseVcf/bgzip.cwl @@ -1,19 +1,19 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- bgzip -- -c -requirements: -- class: DockerRequirement - dockerPull: biocontainers/tabix:v1.3.2-2-deb_cv1 -inputs: - ifile: - type: File - inputBinding: - separate: true -outputs: - zfile: - type: File - outputBinding: - glob: $(inputs.ifile.basename).gz -stdout: $(inputs.ifile.basename).gz +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- bgzip +- -c +requirements: +- class: DockerRequirement + dockerPull: biocontainers/tabix:v1.3.2-2-deb_cv1 +inputs: + ifile: + type: File + inputBinding: + separate: true +outputs: + zfile: + type: File + outputBinding: + glob: $(inputs.ifile.basename).gz +stdout: $(inputs.ifile.basename).gz diff --git a/cwl/AnnPhaseVcf/cleanExp.R b/cwl/AnnPhaseVcf/cleanExp.R index 6290eb9..e9f4f6e 100644 --- a/cwl/AnnPhaseVcf/cleanExp.R +++ b/cwl/AnnPhaseVcf/cleanExp.R @@ -1,12 +1,10 @@ -.libPaths('/home/hq/R/x86_64-pc-linux-gnu-library/4.0') -suppressPackageStartupMessages(library(R.utils)) -suppressPackageStartupMessages(library(codetools)) -args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) -cleanExp <- -function(afile) { - exp1 <- read.table(afile, header = TRUE, stringsAsFactors = FALSE) - exp1[,1] <- sub("\\|ENSG.*", "", exp1[,1]) - write.table(exp1, file = "abundance_clean.tsv", - row.names = FALSE, quote = FALSE, sep = "\t") -} -do.call(cleanExp, args) +suppressPackageStartupMessages(library(R.utils)) +args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) +cleanExp <- +function(afile) { + exp1 <- read.table(afile, header = TRUE, stringsAsFactors = FALSE) + exp1[,1] <- sub("\\|ENSG.*", "", exp1[,1]) + write.table(exp1, file = "abundance_clean.tsv", + row.names = FALSE, quote = FALSE, sep = "\t") +} +do.call(cleanExp, args) diff --git a/cwl/AnnPhaseVcf/cleanExp.cwl b/cwl/AnnPhaseVcf/cleanExp.cwl index 3135778..b7deae5 100644 --- a/cwl/AnnPhaseVcf/cleanExp.cwl +++ b/cwl/AnnPhaseVcf/cleanExp.cwl @@ -1,16 +1,32 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- Rscript -- cwl/AnnPhaseVcf/cleanExp.R -inputs: - afile: - type: File - inputBinding: - prefix: afile= - separate: false -outputs: - aout: - type: File - outputBinding: - glob: abundance_clean.tsv +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: Rscript +requirements: +- class: InitialWorkDirRequirement + listing: + - entryname: cleanExp.R + entry: |- + suppressPackageStartupMessages(library(R.utils)) + args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) + cleanExp <- + function(afile) { + exp1 <- read.table(afile, header = TRUE, stringsAsFactors = FALSE) + exp1[,1] <- sub("\\|ENSG.*", "", exp1[,1]) + write.table(exp1, file = "abundance_clean.tsv", + row.names = FALSE, quote = FALSE, sep = "\t") + } + do.call(cleanExp, args) + writable: false +arguments: +- cleanExp.R +inputs: + afile: + type: File + inputBinding: + prefix: afile= + separate: false +outputs: + aout: + type: File + outputBinding: + glob: abundance_clean.tsv diff --git a/cwl/AnnPhaseVcf/combineVariants.cwl b/cwl/AnnPhaseVcf/combineVariants.cwl index d4dad3b..ce4f5a1 100644 --- a/cwl/AnnPhaseVcf/combineVariants.cwl +++ b/cwl/AnnPhaseVcf/combineVariants.cwl @@ -1,41 +1,41 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- java -- -jar -- /usr/GenomeAnalysisTK.jar -- -T -- CombineVariants -requirements: -- class: DockerRequirement - dockerPull: broadinstitute/gatk3:3.8-1 -arguments: -- --assumeIdenticalSamples -inputs: - variants: - type: - type: array - items: File - inputBinding: - prefix: --variant - separate: true - inputBinding: - separate: true - ref: - type: File - secondaryFiles: - - .fai - - $(self.nameroot).dict - inputBinding: - prefix: -R - separate: true - ovcf: - type: string - inputBinding: - prefix: -o - separate: true -outputs: - oVcf: - type: File - outputBinding: - glob: $(inputs.ovcf) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- java +- -jar +- /usr/GenomeAnalysisTK.jar +- -T +- CombineVariants +requirements: +- class: DockerRequirement + dockerPull: broadinstitute/gatk3:3.8-1 +arguments: +- --assumeIdenticalSamples +inputs: + variants: + type: + type: array + items: File + inputBinding: + prefix: --variant + separate: true + inputBinding: + separate: true + ref: + type: File + secondaryFiles: + - .fai + - $(self.nameroot).dict + inputBinding: + prefix: -R + separate: true + ovcf: + type: string + inputBinding: + prefix: -o + separate: true +outputs: + oVcf: + type: File + outputBinding: + glob: $(inputs.ovcf) diff --git a/cwl/AnnPhaseVcf/dVCFcoverage.cwl b/cwl/AnnPhaseVcf/dVCFcoverage.cwl index 0540ffd..0636e3f 100644 --- a/cwl/AnnPhaseVcf/dVCFcoverage.cwl +++ b/cwl/AnnPhaseVcf/dVCFcoverage.cwl @@ -1,67 +1,67 @@ -cwlVersion: v1.0 -class: Workflow -requirements: -- class: InlineJavascriptRequirement -- class: StepInputExpressionRequirement -- class: SubworkflowFeatureRequirement -inputs: - vcf: - type: File - sample: - type: string - bam: - type: File - secondaryFiles: .bai - ntype: - type: string - default: DNA - ref: - type: File - secondaryFiles: .fai -outputs: - outvcf: - type: File - outputSource: readcount_annotator_indel/oVcf -steps: - decompose: - run: decompose.cwl - in: - ivcf: vcf - ovcf: - valueFrom: $(inputs.ivcf.nameroot)_dc.vcf - out: - - oVcf - readcount: - run: readcount.cwl - in: - vcf: decompose/oVcf - sample: sample - ref: ref - bam: bam - out: - - snv - - indel - readcount_annotator_snv: - run: readcount_annotator_snv.cwl - in: - ivcf: decompose/oVcf - readcount: readcount/snv - ntype: ntype - sample: sample - ovcf: - valueFrom: $(inputs.ivcf.nameroot)_snv.vcf - out: - - oVcf - readcount_annotator_indel: - run: readcount_annotator_indel.cwl - in: - ivcf: readcount_annotator_snv/oVcf - readcount: readcount/indel - ntype: ntype - sample: sample - vtype: - valueFrom: indel - ovcf: - valueFrom: $(inputs.ivcf.nameroot)_indel.vcf - out: - - oVcf +cwlVersion: v1.0 +class: Workflow +requirements: +- class: InlineJavascriptRequirement +- class: StepInputExpressionRequirement +- class: SubworkflowFeatureRequirement +inputs: + vcf: + type: File + sample: + type: string + bam: + type: File + secondaryFiles: .bai + ntype: + type: string + default: DNA + ref: + type: File + secondaryFiles: .fai +outputs: + outvcf: + type: File + outputSource: readcount_annotator_indel/oVcf +steps: + decompose: + run: decompose.cwl + in: + ivcf: vcf + ovcf: + valueFrom: $(inputs.ivcf.nameroot)_dc.vcf + out: + - oVcf + readcount: + run: readcount.cwl + in: + vcf: decompose/oVcf + sample: sample + ref: ref + bam: bam + out: + - snv + - indel + readcount_annotator_snv: + run: readcount_annotator_snv.cwl + in: + ivcf: decompose/oVcf + readcount: readcount/snv + ntype: ntype + sample: sample + ovcf: + valueFrom: $(inputs.ivcf.nameroot)_snv.vcf + out: + - oVcf + readcount_annotator_indel: + run: readcount_annotator_indel.cwl + in: + ivcf: readcount_annotator_snv/oVcf + readcount: readcount/indel + ntype: ntype + sample: sample + vtype: + valueFrom: indel + ovcf: + valueFrom: $(inputs.ivcf.nameroot)_indel.vcf + out: + - oVcf diff --git a/cwl/AnnPhaseVcf/decompose.cwl b/cwl/AnnPhaseVcf/decompose.cwl index 4d3d142..0321a52 100644 --- a/cwl/AnnPhaseVcf/decompose.cwl +++ b/cwl/AnnPhaseVcf/decompose.cwl @@ -1,27 +1,27 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- vt -- decompose -requirements: -- class: DockerRequirement - dockerPull: hubentu/vt -arguments: -- -s -inputs: - ivcf: - type: File - inputBinding: - position: 1 - separate: true - ovcf: - type: string - inputBinding: - position: 2 - prefix: -o - separate: true -outputs: - oVcf: - type: File - outputBinding: - glob: $(inputs.ovcf) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- vt +- decompose +requirements: +- class: DockerRequirement + dockerPull: hubentu/vt +arguments: +- -s +inputs: + ivcf: + type: File + inputBinding: + position: 1 + separate: true + ovcf: + type: string + inputBinding: + position: 2 + prefix: -o + separate: true +outputs: + oVcf: + type: File + outputBinding: + glob: $(inputs.ovcf) diff --git a/cwl/AnnPhaseVcf/kallistoQuant.cwl b/cwl/AnnPhaseVcf/kallistoQuant.cwl index b57262f..e9bad11 100644 --- a/cwl/AnnPhaseVcf/kallistoQuant.cwl +++ b/cwl/AnnPhaseVcf/kallistoQuant.cwl @@ -1,39 +1,39 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- kallisto -- quant -requirements: -- class: DockerRequirement - dockerPull: zlskidmore/kallisto -arguments: -- -o -- ./ -inputs: - index: - type: File - inputBinding: - prefix: -i - separate: true - fastq: - type: File[] - inputBinding: - separate: true - threads: - type: int - inputBinding: - prefix: -t - separate: true -outputs: - h5: - type: File - outputBinding: - glob: abundance.h5 - tsv: - type: File - outputBinding: - glob: abundance.tsv - info: - type: File - outputBinding: - glob: run_info.json +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- kallisto +- quant +requirements: +- class: DockerRequirement + dockerPull: zlskidmore/kallisto +arguments: +- -o +- ./ +inputs: + index: + type: File + inputBinding: + prefix: -i + separate: true + fastq: + type: File[] + inputBinding: + separate: true + threads: + type: int + inputBinding: + prefix: -t + separate: true +outputs: + h5: + type: File + outputBinding: + glob: abundance.h5 + tsv: + type: File + outputBinding: + glob: abundance.tsv + info: + type: File + outputBinding: + glob: run_info.json diff --git a/cwl/AnnPhaseVcf/rVCFcoverage.cwl b/cwl/AnnPhaseVcf/rVCFcoverage.cwl index 0540ffd..0636e3f 100644 --- a/cwl/AnnPhaseVcf/rVCFcoverage.cwl +++ b/cwl/AnnPhaseVcf/rVCFcoverage.cwl @@ -1,67 +1,67 @@ -cwlVersion: v1.0 -class: Workflow -requirements: -- class: InlineJavascriptRequirement -- class: StepInputExpressionRequirement -- class: SubworkflowFeatureRequirement -inputs: - vcf: - type: File - sample: - type: string - bam: - type: File - secondaryFiles: .bai - ntype: - type: string - default: DNA - ref: - type: File - secondaryFiles: .fai -outputs: - outvcf: - type: File - outputSource: readcount_annotator_indel/oVcf -steps: - decompose: - run: decompose.cwl - in: - ivcf: vcf - ovcf: - valueFrom: $(inputs.ivcf.nameroot)_dc.vcf - out: - - oVcf - readcount: - run: readcount.cwl - in: - vcf: decompose/oVcf - sample: sample - ref: ref - bam: bam - out: - - snv - - indel - readcount_annotator_snv: - run: readcount_annotator_snv.cwl - in: - ivcf: decompose/oVcf - readcount: readcount/snv - ntype: ntype - sample: sample - ovcf: - valueFrom: $(inputs.ivcf.nameroot)_snv.vcf - out: - - oVcf - readcount_annotator_indel: - run: readcount_annotator_indel.cwl - in: - ivcf: readcount_annotator_snv/oVcf - readcount: readcount/indel - ntype: ntype - sample: sample - vtype: - valueFrom: indel - ovcf: - valueFrom: $(inputs.ivcf.nameroot)_indel.vcf - out: - - oVcf +cwlVersion: v1.0 +class: Workflow +requirements: +- class: InlineJavascriptRequirement +- class: StepInputExpressionRequirement +- class: SubworkflowFeatureRequirement +inputs: + vcf: + type: File + sample: + type: string + bam: + type: File + secondaryFiles: .bai + ntype: + type: string + default: DNA + ref: + type: File + secondaryFiles: .fai +outputs: + outvcf: + type: File + outputSource: readcount_annotator_indel/oVcf +steps: + decompose: + run: decompose.cwl + in: + ivcf: vcf + ovcf: + valueFrom: $(inputs.ivcf.nameroot)_dc.vcf + out: + - oVcf + readcount: + run: readcount.cwl + in: + vcf: decompose/oVcf + sample: sample + ref: ref + bam: bam + out: + - snv + - indel + readcount_annotator_snv: + run: readcount_annotator_snv.cwl + in: + ivcf: decompose/oVcf + readcount: readcount/snv + ntype: ntype + sample: sample + ovcf: + valueFrom: $(inputs.ivcf.nameroot)_snv.vcf + out: + - oVcf + readcount_annotator_indel: + run: readcount_annotator_indel.cwl + in: + ivcf: readcount_annotator_snv/oVcf + readcount: readcount/indel + ntype: ntype + sample: sample + vtype: + valueFrom: indel + ovcf: + valueFrom: $(inputs.ivcf.nameroot)_indel.vcf + out: + - oVcf diff --git a/cwl/AnnPhaseVcf/readcount.cwl b/cwl/AnnPhaseVcf/readcount.cwl index 8c1d310..2bb5533 100644 --- a/cwl/AnnPhaseVcf/readcount.cwl +++ b/cwl/AnnPhaseVcf/readcount.cwl @@ -1,46 +1,46 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- /usr/bin/python -- /usr/bin/bam_readcount_helper.py -requirements: -- class: DockerRequirement - dockerPull: mgibio/bam_readcount_helper-cwl:1.1.1 -arguments: -- valueFrom: NOPREFIX - position: 5 -- valueFrom: ./ - position: 6 - shellQuote: false -inputs: - vcf: - type: File - inputBinding: - position: 1 - separate: true - sample: - type: string - inputBinding: - position: 2 - separate: true - ref: - type: File - secondaryFiles: .fai - inputBinding: - position: 3 - separate: true - bam: - type: File - secondaryFiles: .bai - inputBinding: - position: 4 - separate: true -outputs: - snv: - type: File - outputBinding: - glob: $(inputs.sample)_bam_readcount_snv.tsv - indel: - type: File - outputBinding: - glob: $(inputs.sample)_bam_readcount_indel.tsv +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- /usr/bin/python +- /usr/bin/bam_readcount_helper.py +requirements: +- class: DockerRequirement + dockerPull: mgibio/bam_readcount_helper-cwl:1.1.1 +arguments: +- valueFrom: NOPREFIX + position: 5 +- valueFrom: ./ + position: 6 + shellQuote: false +inputs: + vcf: + type: File + inputBinding: + position: 1 + separate: true + sample: + type: string + inputBinding: + position: 2 + separate: true + ref: + type: File + secondaryFiles: .fai + inputBinding: + position: 3 + separate: true + bam: + type: File + secondaryFiles: .bai + inputBinding: + position: 4 + separate: true +outputs: + snv: + type: File + outputBinding: + glob: $(inputs.sample)_bam_readcount_snv.tsv + indel: + type: File + outputBinding: + glob: $(inputs.sample)_bam_readcount_indel.tsv diff --git a/cwl/AnnPhaseVcf/readcount_annotator_indel.cwl b/cwl/AnnPhaseVcf/readcount_annotator_indel.cwl index 5f271fe..bc8ad4e 100644 --- a/cwl/AnnPhaseVcf/readcount_annotator_indel.cwl +++ b/cwl/AnnPhaseVcf/readcount_annotator_indel.cwl @@ -1,44 +1,44 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: vcf-readcount-annotator -requirements: -- class: DockerRequirement - dockerPull: griffithlab/vatools:3.1.0 -inputs: - ivcf: - type: File - inputBinding: - position: 1 - separate: true - readcount: - type: File - inputBinding: - position: 2 - separate: true - ntype: - type: string - inputBinding: - position: 3 - separate: true - default: DNA - sample: - type: string? - inputBinding: - prefix: -s - separate: true - vtype: - type: string - inputBinding: - prefix: -t - separate: true - default: snv - ovcf: - type: string - inputBinding: - prefix: -o - separate: true -outputs: - oVcf: - type: File - outputBinding: - glob: $(inputs.ovcf) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: vcf-readcount-annotator +requirements: +- class: DockerRequirement + dockerPull: griffithlab/vatools:3.1.0 +inputs: + ivcf: + type: File + inputBinding: + position: 1 + separate: true + readcount: + type: File + inputBinding: + position: 2 + separate: true + ntype: + type: string + inputBinding: + position: 3 + separate: true + default: DNA + sample: + type: string? + inputBinding: + prefix: -s + separate: true + vtype: + type: string + inputBinding: + prefix: -t + separate: true + default: snv + ovcf: + type: string + inputBinding: + prefix: -o + separate: true +outputs: + oVcf: + type: File + outputBinding: + glob: $(inputs.ovcf) diff --git a/cwl/AnnPhaseVcf/readcount_annotator_snv.cwl b/cwl/AnnPhaseVcf/readcount_annotator_snv.cwl index 5f271fe..bc8ad4e 100644 --- a/cwl/AnnPhaseVcf/readcount_annotator_snv.cwl +++ b/cwl/AnnPhaseVcf/readcount_annotator_snv.cwl @@ -1,44 +1,44 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: vcf-readcount-annotator -requirements: -- class: DockerRequirement - dockerPull: griffithlab/vatools:3.1.0 -inputs: - ivcf: - type: File - inputBinding: - position: 1 - separate: true - readcount: - type: File - inputBinding: - position: 2 - separate: true - ntype: - type: string - inputBinding: - position: 3 - separate: true - default: DNA - sample: - type: string? - inputBinding: - prefix: -s - separate: true - vtype: - type: string - inputBinding: - prefix: -t - separate: true - default: snv - ovcf: - type: string - inputBinding: - prefix: -o - separate: true -outputs: - oVcf: - type: File - outputBinding: - glob: $(inputs.ovcf) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: vcf-readcount-annotator +requirements: +- class: DockerRequirement + dockerPull: griffithlab/vatools:3.1.0 +inputs: + ivcf: + type: File + inputBinding: + position: 1 + separate: true + readcount: + type: File + inputBinding: + position: 2 + separate: true + ntype: + type: string + inputBinding: + position: 3 + separate: true + default: DNA + sample: + type: string? + inputBinding: + prefix: -s + separate: true + vtype: + type: string + inputBinding: + prefix: -t + separate: true + default: snv + ovcf: + type: string + inputBinding: + prefix: -o + separate: true +outputs: + oVcf: + type: File + outputBinding: + glob: $(inputs.ovcf) diff --git a/cwl/AnnPhaseVcf/renameGVcf.cwl b/cwl/AnnPhaseVcf/renameGVcf.cwl index bf41fe8..49c5999 100644 --- a/cwl/AnnPhaseVcf/renameGVcf.cwl +++ b/cwl/AnnPhaseVcf/renameGVcf.cwl @@ -1,29 +1,29 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- picard -- RenameSampleInVcf -requirements: -- class: DockerRequirement - dockerPull: quay.io/biocontainers/picard:2.21.1--0 -inputs: - vcf: - type: File - inputBinding: - prefix: I= - separate: false - ovcf: - type: string - inputBinding: - prefix: O= - separate: false - NewName: - type: string - inputBinding: - prefix: NEW_SAMPLE_NAME= - separate: false -outputs: - oVcf: - type: File - outputBinding: - glob: $(inputs.ovcf) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- picard +- RenameSampleInVcf +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/picard:2.21.1--0 +inputs: + vcf: + type: File + inputBinding: + prefix: I= + separate: false + ovcf: + type: string + inputBinding: + prefix: O= + separate: false + NewName: + type: string + inputBinding: + prefix: NEW_SAMPLE_NAME= + separate: false +outputs: + oVcf: + type: File + outputBinding: + glob: $(inputs.ovcf) diff --git a/cwl/AnnPhaseVcf/renameSVcf.cwl b/cwl/AnnPhaseVcf/renameSVcf.cwl index bf41fe8..49c5999 100644 --- a/cwl/AnnPhaseVcf/renameSVcf.cwl +++ b/cwl/AnnPhaseVcf/renameSVcf.cwl @@ -1,29 +1,29 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- picard -- RenameSampleInVcf -requirements: -- class: DockerRequirement - dockerPull: quay.io/biocontainers/picard:2.21.1--0 -inputs: - vcf: - type: File - inputBinding: - prefix: I= - separate: false - ovcf: - type: string - inputBinding: - prefix: O= - separate: false - NewName: - type: string - inputBinding: - prefix: NEW_SAMPLE_NAME= - separate: false -outputs: - oVcf: - type: File - outputBinding: - glob: $(inputs.ovcf) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- picard +- RenameSampleInVcf +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/picard:2.21.1--0 +inputs: + vcf: + type: File + inputBinding: + prefix: I= + separate: false + ovcf: + type: string + inputBinding: + prefix: O= + separate: false + NewName: + type: string + inputBinding: + prefix: NEW_SAMPLE_NAME= + separate: false +outputs: + oVcf: + type: File + outputBinding: + glob: $(inputs.ovcf) diff --git a/cwl/AnnPhaseVcf/sortVcf.cwl b/cwl/AnnPhaseVcf/sortVcf.cwl index a0d8323..68b2bb7 100644 --- a/cwl/AnnPhaseVcf/sortVcf.cwl +++ b/cwl/AnnPhaseVcf/sortVcf.cwl @@ -1,31 +1,31 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- java -- -jar -- /usr/picard/picard.jar -- SortVcf -requirements: -- class: DockerRequirement - dockerPull: broadinstitute/picard -inputs: - vcf: - type: File - inputBinding: - prefix: I= - separate: false - ovcf: - type: string - inputBinding: - prefix: O= - separate: false - dict: - type: File? - inputBinding: - prefix: SD= - separate: false -outputs: - oVcf: - type: File - outputBinding: - glob: $(inputs.ovcf) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- java +- -jar +- /usr/picard/picard.jar +- SortVcf +requirements: +- class: DockerRequirement + dockerPull: broadinstitute/picard +inputs: + vcf: + type: File + inputBinding: + prefix: I= + separate: false + ovcf: + type: string + inputBinding: + prefix: O= + separate: false + dict: + type: File? + inputBinding: + prefix: SD= + separate: false +outputs: + oVcf: + type: File + outputBinding: + glob: $(inputs.ovcf) diff --git a/cwl/AnnPhaseVcf/splitSample.cwl b/cwl/AnnPhaseVcf/splitSample.cwl index 476bd81..4297877 100644 --- a/cwl/AnnPhaseVcf/splitSample.cwl +++ b/cwl/AnnPhaseVcf/splitSample.cwl @@ -1,60 +1,60 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- bcftools -- view -requirements: -- class: DockerRequirement - dockerPull: biocontainers/bcftools:v1.5_cv3 -inputs: - vcf: - type: File - inputBinding: - separate: true - filter: - type: string? - inputBinding: - prefix: -f - separate: true - default: PASS - fout: - type: string - inputBinding: - prefix: -o - separate: true - otype: - type: string? - inputBinding: - prefix: -O - separate: true - default: v - sample: - type: string? - inputBinding: - prefix: -s - separate: true - samplefile: - type: File? - inputBinding: - prefix: -S - separate: true - genotype: - type: string? - inputBinding: - prefix: -g - separate: true - include: - type: string? - inputBinding: - prefix: -i - separate: true - exclude: - type: string? - inputBinding: - prefix: -e - separate: true -outputs: - Fout: - type: File - outputBinding: - glob: $(inputs.fout) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- bcftools +- view +requirements: +- class: DockerRequirement + dockerPull: biocontainers/bcftools:v1.5_cv3 +inputs: + vcf: + type: File + inputBinding: + separate: true + filter: + type: string? + inputBinding: + prefix: -f + separate: true + default: PASS + fout: + type: string + inputBinding: + prefix: -o + separate: true + otype: + type: string? + inputBinding: + prefix: -O + separate: true + default: v + sample: + type: string? + inputBinding: + prefix: -s + separate: true + samplefile: + type: File? + inputBinding: + prefix: -S + separate: true + genotype: + type: string? + inputBinding: + prefix: -g + separate: true + include: + type: string? + inputBinding: + prefix: -i + separate: true + exclude: + type: string? + inputBinding: + prefix: -e + separate: true +outputs: + Fout: + type: File + outputBinding: + glob: $(inputs.fout) diff --git a/cwl/AnnPhaseVcf/tabixIndex.cwl b/cwl/AnnPhaseVcf/tabixIndex.cwl index f506ee0..591a0ea 100644 --- a/cwl/AnnPhaseVcf/tabixIndex.cwl +++ b/cwl/AnnPhaseVcf/tabixIndex.cwl @@ -1,28 +1,28 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: tabix -requirements: -- class: DockerRequirement - dockerPull: biocontainers/tabix:v1.3.2-2-deb_cv1 -- class: InitialWorkDirRequirement - listing: - - $(inputs.tfile) -inputs: - tfile: - type: File - inputBinding: - position: 1 - separate: true - type: - type: string - inputBinding: - prefix: -p - separate: true - default: vcf -outputs: - idx: - type: File - secondaryFiles: - - .tbi - outputBinding: - glob: $(inputs.tfile.basename) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: tabix +requirements: +- class: DockerRequirement + dockerPull: biocontainers/tabix:v1.3.2-2-deb_cv1 +- class: InitialWorkDirRequirement + listing: + - $(inputs.tfile) +inputs: + tfile: + type: File + inputBinding: + position: 1 + separate: true + type: + type: string + inputBinding: + prefix: -p + separate: true + default: vcf +outputs: + idx: + type: File + secondaryFiles: + - .tbi + outputBinding: + glob: $(inputs.tfile.basename) diff --git a/cwl/AnnPhaseVcf/vcfExpAnn.cwl b/cwl/AnnPhaseVcf/vcfExpAnn.cwl index bff7bd1..6dab26a 100644 --- a/cwl/AnnPhaseVcf/vcfExpAnn.cwl +++ b/cwl/AnnPhaseVcf/vcfExpAnn.cwl @@ -1,56 +1,56 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: vcf-expression-annotator -requirements: -- class: DockerRequirement - dockerPull: griffithlab/vatools:3.1.0 -arguments: -- --ignore-transcript-version -inputs: - ivcf: - type: File - inputBinding: - position: 1 - separate: true - expression: - type: File - inputBinding: - position: 2 - separate: true - etype: - type: string - inputBinding: - position: 3 - separate: true - default: kallisto - gtype: - type: string - inputBinding: - position: 4 - separate: true - default: transcript - idCol: - type: string? - inputBinding: - prefix: -i - separate: true - expCol: - type: string? - inputBinding: - prefix: -e - separate: true - sample: - type: string? - inputBinding: - prefix: -s - separate: true - ovcf: - type: string - inputBinding: - prefix: -o - separate: true -outputs: - oVcf: - type: File - outputBinding: - glob: $(inputs.ovcf) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: vcf-expression-annotator +requirements: +- class: DockerRequirement + dockerPull: griffithlab/vatools:3.1.0 +arguments: +- --ignore-transcript-version +inputs: + ivcf: + type: File + inputBinding: + position: 1 + separate: true + expression: + type: File + inputBinding: + position: 2 + separate: true + etype: + type: string + inputBinding: + position: 3 + separate: true + default: kallisto + gtype: + type: string + inputBinding: + position: 4 + separate: true + default: transcript + idCol: + type: string? + inputBinding: + prefix: -i + separate: true + expCol: + type: string? + inputBinding: + prefix: -e + separate: true + sample: + type: string? + inputBinding: + prefix: -s + separate: true + ovcf: + type: string + inputBinding: + prefix: -o + separate: true +outputs: + oVcf: + type: File + outputBinding: + glob: $(inputs.ovcf) diff --git a/cwl/AnnPhaseVcf/vcfgExpAnn.cwl b/cwl/AnnPhaseVcf/vcfgExpAnn.cwl index bff7bd1..6dab26a 100644 --- a/cwl/AnnPhaseVcf/vcfgExpAnn.cwl +++ b/cwl/AnnPhaseVcf/vcfgExpAnn.cwl @@ -1,56 +1,56 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: vcf-expression-annotator -requirements: -- class: DockerRequirement - dockerPull: griffithlab/vatools:3.1.0 -arguments: -- --ignore-transcript-version -inputs: - ivcf: - type: File - inputBinding: - position: 1 - separate: true - expression: - type: File - inputBinding: - position: 2 - separate: true - etype: - type: string - inputBinding: - position: 3 - separate: true - default: kallisto - gtype: - type: string - inputBinding: - position: 4 - separate: true - default: transcript - idCol: - type: string? - inputBinding: - prefix: -i - separate: true - expCol: - type: string? - inputBinding: - prefix: -e - separate: true - sample: - type: string? - inputBinding: - prefix: -s - separate: true - ovcf: - type: string - inputBinding: - prefix: -o - separate: true -outputs: - oVcf: - type: File - outputBinding: - glob: $(inputs.ovcf) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: vcf-expression-annotator +requirements: +- class: DockerRequirement + dockerPull: griffithlab/vatools:3.1.0 +arguments: +- --ignore-transcript-version +inputs: + ivcf: + type: File + inputBinding: + position: 1 + separate: true + expression: + type: File + inputBinding: + position: 2 + separate: true + etype: + type: string + inputBinding: + position: 3 + separate: true + default: kallisto + gtype: + type: string + inputBinding: + position: 4 + separate: true + default: transcript + idCol: + type: string? + inputBinding: + prefix: -i + separate: true + expCol: + type: string? + inputBinding: + prefix: -e + separate: true + sample: + type: string? + inputBinding: + prefix: -s + separate: true + ovcf: + type: string + inputBinding: + prefix: -o + separate: true +outputs: + oVcf: + type: File + outputBinding: + glob: $(inputs.ovcf) diff --git a/cwl/ApplyBQSR.cwl b/cwl/ApplyBQSR.cwl index 018b8fd..567e86b 100644 --- a/cwl/ApplyBQSR.cwl +++ b/cwl/ApplyBQSR.cwl @@ -1,37 +1,37 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- gatk -- ApplyBQSR -requirements: -- class: DockerRequirement - dockerPull: broadinstitute/gatk:latest -inputs: - bam: - type: File - inputBinding: - prefix: -I - separate: true - ref: - type: File - secondaryFiles: - - .fai - - $(self.nameroot).dict - inputBinding: - prefix: -R - separate: true - rtable: - type: File - inputBinding: - prefix: --bqsr-recal-file - separate: true - oBam: - type: string - inputBinding: - prefix: -O - separate: true -outputs: - Bam: - type: File - outputBinding: - glob: $(inputs.oBam) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- gatk +- ApplyBQSR +requirements: +- class: DockerRequirement + dockerPull: broadinstitute/gatk:latest +inputs: + bam: + type: File + inputBinding: + prefix: -I + separate: true + ref: + type: File + secondaryFiles: + - .fai + - $(self.nameroot).dict + inputBinding: + prefix: -R + separate: true + rtable: + type: File + inputBinding: + prefix: --bqsr-recal-file + separate: true + oBam: + type: string + inputBinding: + prefix: -O + separate: true +outputs: + Bam: + type: File + outputBinding: + glob: $(inputs.oBam) diff --git a/cwl/ApplyBQSR.yml b/cwl/ApplyBQSR.yml index 0967ef4..69a88e3 100644 --- a/cwl/ApplyBQSR.yml +++ b/cwl/ApplyBQSR.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/BaseRecal/ApplyBQSR.cwl b/cwl/BaseRecal/ApplyBQSR.cwl index 018b8fd..567e86b 100644 --- a/cwl/BaseRecal/ApplyBQSR.cwl +++ b/cwl/BaseRecal/ApplyBQSR.cwl @@ -1,37 +1,37 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- gatk -- ApplyBQSR -requirements: -- class: DockerRequirement - dockerPull: broadinstitute/gatk:latest -inputs: - bam: - type: File - inputBinding: - prefix: -I - separate: true - ref: - type: File - secondaryFiles: - - .fai - - $(self.nameroot).dict - inputBinding: - prefix: -R - separate: true - rtable: - type: File - inputBinding: - prefix: --bqsr-recal-file - separate: true - oBam: - type: string - inputBinding: - prefix: -O - separate: true -outputs: - Bam: - type: File - outputBinding: - glob: $(inputs.oBam) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- gatk +- ApplyBQSR +requirements: +- class: DockerRequirement + dockerPull: broadinstitute/gatk:latest +inputs: + bam: + type: File + inputBinding: + prefix: -I + separate: true + ref: + type: File + secondaryFiles: + - .fai + - $(self.nameroot).dict + inputBinding: + prefix: -R + separate: true + rtable: + type: File + inputBinding: + prefix: --bqsr-recal-file + separate: true + oBam: + type: string + inputBinding: + prefix: -O + separate: true +outputs: + Bam: + type: File + outputBinding: + glob: $(inputs.oBam) diff --git a/cwl/BaseRecal/BaseRecal.cwl b/cwl/BaseRecal/BaseRecal.cwl index 920b1da..52b427c 100644 --- a/cwl/BaseRecal/BaseRecal.cwl +++ b/cwl/BaseRecal/BaseRecal.cwl @@ -1,71 +1,70 @@ -cwlVersion: v1.0 -class: Workflow -requirements: -- class: StepInputExpressionRequirement -- class: InlineJavascriptRequirement -inputs: - bam: - type: File - ref: - type: File - secondaryFiles: - - .fai - - $(self.nameroot).dict - knowSites: - type: - type: array - items: File - inputBinding: - separate: true - secondaryFiles: .idx - oBam: - type: string -outputs: - rcBam: - type: File - secondaryFiles: .bai - outputSource: samtools_index/idx - flagstat: - type: File - outputSource: samtools_flagstat/flagstat - stats: - type: File - outputSource: samtools_stats/stats -steps: - BaseRecalibrator: - run: cwl/BaseRecal/BaseRecalibrator.cwl - in: - bam: bam - ref: ref - knowSites: knowSites - recal: - valueFrom: $(inputs.bam.nameroot).recal.txt - out: - - rtable - ApplyBQSR: - run: cwl/BaseRecal/ApplyBQSR.cwl - in: - bam: bam - ref: ref - rtable: BaseRecalibrator/rtable - oBam: oBam - out: - - Bam - samtools_index: - run: cwl/BaseRecal/samtools_index.cwl - in: - bam: ApplyBQSR/Bam - out: - - idx - samtools_flagstat: - run: cwl/BaseRecal/samtools_flagstat.cwl - in: - bam: ApplyBQSR/Bam - out: - - flagstat - samtools_stats: - run: cwl/BaseRecal/samtools_stats.cwl - in: - bam: ApplyBQSR/Bam - out: - - stats +cwlVersion: v1.0 +class: Workflow +requirements: +- class: StepInputExpressionRequirement +- class: InlineJavascriptRequirement +- class: InlineJavascriptRequirement +inputs: + bam: + type: File + ref: + type: File + secondaryFiles: + - .fai + - $(self.nameroot).dict + knowSites: + type: + type: array + items: File + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + oBam: + type: string +outputs: + rcBam: + type: File + secondaryFiles: .bai + outputSource: samtools_index/idx + flagstat: + type: File + outputSource: samtools_flagstat/flagstat + stats: + type: File + outputSource: samtools_stats/stats +steps: + BaseRecalibrator: + run: BaseRecalibrator.cwl + in: + bam: bam + ref: ref + knowSites: knowSites + recal: + valueFrom: $(inputs.bam.nameroot).recal.txt + out: + - rtable + ApplyBQSR: + run: ApplyBQSR.cwl + in: + bam: bam + ref: ref + rtable: BaseRecalibrator/rtable + oBam: oBam + out: + - Bam + samtools_index: + run: samtools_index.cwl + in: + bam: ApplyBQSR/Bam + out: + - idx + samtools_flagstat: + run: samtools_flagstat.cwl + in: + bam: ApplyBQSR/Bam + out: + - flagstat + samtools_stats: + run: samtools_stats.cwl + in: + bam: ApplyBQSR/Bam + out: + - stats diff --git a/cwl/BaseRecal/BaseRecal.yml b/cwl/BaseRecal/BaseRecal.yml index 0967ef4..69a88e3 100644 --- a/cwl/BaseRecal/BaseRecal.yml +++ b/cwl/BaseRecal/BaseRecal.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/BaseRecal/BaseRecalibrator.cwl b/cwl/BaseRecal/BaseRecalibrator.cwl index 0353c15..f92210e 100644 --- a/cwl/BaseRecal/BaseRecalibrator.cwl +++ b/cwl/BaseRecal/BaseRecalibrator.cwl @@ -1,42 +1,43 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- gatk -- BaseRecalibrator -requirements: -- class: DockerRequirement - dockerPull: broadinstitute/gatk:latest -inputs: - bam: - type: File - inputBinding: - prefix: -I - separate: true - ref: - type: File - secondaryFiles: - - .fai - - $(self.nameroot).dict - inputBinding: - prefix: -R - separate: true - knowSites: - type: - type: array - items: File - inputBinding: - prefix: --known-sites - separate: true - secondaryFiles: .idx - inputBinding: - separate: true - recal: - type: string - inputBinding: - prefix: -O - separate: true -outputs: - rtable: - type: File - outputBinding: - glob: $(inputs.recal) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- gatk +- BaseRecalibrator +requirements: +- class: DockerRequirement + dockerPull: broadinstitute/gatk:latest +- class: InlineJavascriptRequirement +inputs: + bam: + type: File + inputBinding: + prefix: -I + separate: true + ref: + type: File + secondaryFiles: + - .fai + - $(self.nameroot).dict + inputBinding: + prefix: -R + separate: true + knowSites: + type: + type: array + items: File + inputBinding: + prefix: --known-sites + separate: true + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + inputBinding: + separate: true + recal: + type: string + inputBinding: + prefix: -O + separate: true +outputs: + rtable: + type: File + outputBinding: + glob: $(inputs.recal) diff --git a/cwl/BaseRecal/samtools_flagstat.cwl b/cwl/BaseRecal/samtools_flagstat.cwl index 3c68178..000949d 100644 --- a/cwl/BaseRecal/samtools_flagstat.cwl +++ b/cwl/BaseRecal/samtools_flagstat.cwl @@ -1,19 +1,19 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- samtools -- flagstat -requirements: -- class: DockerRequirement - dockerPull: biocontainers/samtools:v1.7.0_cv3 -inputs: - bam: - type: File - inputBinding: - separate: true -outputs: - flagstat: - type: File - outputBinding: - glob: $(inputs.bam.nameroot).flagstat.txt -stdout: $(inputs.bam.nameroot).flagstat.txt +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- flagstat +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.15--h1170115_1 +inputs: + bam: + type: File + inputBinding: + separate: true +outputs: + flagstat: + type: File + outputBinding: + glob: $(inputs.bam.nameroot).flagstat.txt +stdout: $(inputs.bam.nameroot).flagstat.txt diff --git a/cwl/BaseRecal/samtools_index.cwl b/cwl/BaseRecal/samtools_index.cwl index f80966b..e779867 100644 --- a/cwl/BaseRecal/samtools_index.cwl +++ b/cwl/BaseRecal/samtools_index.cwl @@ -1,24 +1,24 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- samtools -- index -requirements: -- class: DockerRequirement - dockerPull: biocontainers/samtools:v1.7.0_cv3 -- class: InitialWorkDirRequirement - listing: - - $(inputs.bam) -inputs: - bam: - type: File - inputBinding: - position: 1 - separate: true -outputs: - idx: - type: File - secondaryFiles: - - .bai - outputBinding: - glob: $(inputs.bam.basename) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- index +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.12--h9aed4be_1 +- class: InitialWorkDirRequirement + listing: + - $(inputs.bam) +inputs: + bam: + type: File + inputBinding: + position: 1 + separate: true +outputs: + idx: + type: File + secondaryFiles: + - .bai + outputBinding: + glob: $(inputs.bam.basename) diff --git a/cwl/BaseRecal/samtools_stats.cwl b/cwl/BaseRecal/samtools_stats.cwl index a5709bd..c054631 100644 --- a/cwl/BaseRecal/samtools_stats.cwl +++ b/cwl/BaseRecal/samtools_stats.cwl @@ -1,19 +1,19 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- samtools -- stats -requirements: -- class: DockerRequirement - dockerPull: biocontainers/samtools:v1.7.0_cv3 -inputs: - bam: - type: File - inputBinding: - separate: true -outputs: - stats: - type: File - outputBinding: - glob: $(inputs.bam.nameroot).stats.txt -stdout: $(inputs.bam.nameroot).stats.txt +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- stats +requirements: +- class: DockerRequirement + dockerPull: biocontainers/samtools:v1.7.0_cv3 +inputs: + bam: + type: File + inputBinding: + separate: true +outputs: + stats: + type: File + outputBinding: + glob: $(inputs.bam.nameroot).stats.txt +stdout: $(inputs.bam.nameroot).stats.txt diff --git a/cwl/BaseRecalibrator.cwl b/cwl/BaseRecalibrator.cwl index 0353c15..f92210e 100644 --- a/cwl/BaseRecalibrator.cwl +++ b/cwl/BaseRecalibrator.cwl @@ -1,42 +1,43 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- gatk -- BaseRecalibrator -requirements: -- class: DockerRequirement - dockerPull: broadinstitute/gatk:latest -inputs: - bam: - type: File - inputBinding: - prefix: -I - separate: true - ref: - type: File - secondaryFiles: - - .fai - - $(self.nameroot).dict - inputBinding: - prefix: -R - separate: true - knowSites: - type: - type: array - items: File - inputBinding: - prefix: --known-sites - separate: true - secondaryFiles: .idx - inputBinding: - separate: true - recal: - type: string - inputBinding: - prefix: -O - separate: true -outputs: - rtable: - type: File - outputBinding: - glob: $(inputs.recal) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- gatk +- BaseRecalibrator +requirements: +- class: DockerRequirement + dockerPull: broadinstitute/gatk:latest +- class: InlineJavascriptRequirement +inputs: + bam: + type: File + inputBinding: + prefix: -I + separate: true + ref: + type: File + secondaryFiles: + - .fai + - $(self.nameroot).dict + inputBinding: + prefix: -R + separate: true + knowSites: + type: + type: array + items: File + inputBinding: + prefix: --known-sites + separate: true + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + inputBinding: + separate: true + recal: + type: string + inputBinding: + prefix: -O + separate: true +outputs: + rtable: + type: File + outputBinding: + glob: $(inputs.recal) diff --git a/cwl/BaseRecalibrator.yml b/cwl/BaseRecalibrator.yml index 0967ef4..69a88e3 100644 --- a/cwl/BaseRecalibrator.yml +++ b/cwl/BaseRecalibrator.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/BedToIntervalList.cwl b/cwl/BedToIntervalList.cwl index 10a50b4..976d80f 100644 --- a/cwl/BedToIntervalList.cwl +++ b/cwl/BedToIntervalList.cwl @@ -1,29 +1,29 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- picard -- BedToIntervalList -requirements: -- class: DockerRequirement - dockerPull: quay.io/biocontainers/picard:2.21.1--0 -inputs: - bed: - type: File - inputBinding: - prefix: I= - separate: false - SD: - type: File - inputBinding: - prefix: SD= - separate: false - out: - type: string - inputBinding: - prefix: O= - separate: false -outputs: - intval: - type: File - outputBinding: - glob: $(inputs.out) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- picard +- BedToIntervalList +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/picard:2.21.1--0 +inputs: + bed: + type: File + inputBinding: + prefix: I= + separate: false + SD: + type: File + inputBinding: + prefix: SD= + separate: false + out: + type: string + inputBinding: + prefix: O= + separate: false +outputs: + intval: + type: File + outputBinding: + glob: $(inputs.out) diff --git a/cwl/BedToIntervalList.yml b/cwl/BedToIntervalList.yml index 0967ef4..69a88e3 100644 --- a/cwl/BedToIntervalList.yml +++ b/cwl/BedToIntervalList.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/bwaAlign/bwa.cwl b/cwl/BwaAlign/bwa.cwl similarity index 91% rename from cwl/bwaAlign/bwa.cwl rename to cwl/BwaAlign/bwa.cwl index 03d69d3..7b63bc4 100644 --- a/cwl/bwaAlign/bwa.cwl +++ b/cwl/BwaAlign/bwa.cwl @@ -1,48 +1,48 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- bwa -- mem -requirements: -- class: DockerRequirement - dockerPull: biocontainers/bwa:v0.7.17-3-deb_cv1 -inputs: - threads: - type: int - inputBinding: - position: 1 - prefix: -t - separate: true - RG: - type: string - inputBinding: - position: 2 - prefix: -R - separate: true - Ref: - type: File - secondaryFiles: - - .amb - - .ann - - .bwt - - .pac - - .sa - inputBinding: - position: 3 - separate: true - FQ1: - type: File - inputBinding: - position: 4 - separate: true - FQ2: - type: File? - inputBinding: - position: 5 - separate: true -outputs: - sam: - type: File - outputBinding: - glob: '*.sam' -stdout: bwaOutput.sam +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- bwa +- mem +requirements: +- class: DockerRequirement + dockerPull: biocontainers/bwa:v0.7.17-3-deb_cv1 +inputs: + threads: + type: int + inputBinding: + position: 1 + prefix: -t + separate: true + RG: + type: string? + inputBinding: + position: 2 + prefix: -R + separate: true + Ref: + type: File + secondaryFiles: + - .amb + - .ann + - .bwt + - .pac + - .sa + inputBinding: + position: 3 + separate: true + FQ1: + type: File + inputBinding: + position: 4 + separate: true + FQ2: + type: File? + inputBinding: + position: 5 + separate: true +outputs: + sam: + type: File + outputBinding: + glob: '*.sam' +stdout: bwaOutput.sam diff --git a/cwl/BwaAlign/bwaAlign.cwl b/cwl/BwaAlign/bwaAlign.cwl new file mode 100644 index 0000000..7faf4df --- /dev/null +++ b/cwl/BwaAlign/bwaAlign.cwl @@ -0,0 +1,61 @@ +cwlVersion: v1.0 +class: Workflow +requirements: +- class: StepInputExpressionRequirement +inputs: + threads: + type: int + RG: + type: string + Ref: + type: File + secondaryFiles: + - .amb + - .ann + - .bwt + - .pac + - .sa + FQ1: + type: File + FQ2: + type: File? +outputs: + Bam: + type: File + outputSource: sortBam/sbam + Idx: + type: File + outputSource: idxBam/idx +steps: + bwa: + run: bwa.cwl + in: + threads: threads + RG: RG + Ref: Ref + FQ1: FQ1 + FQ2: FQ2 + out: + - sam + sam2bam: + run: sam2bam.cwl + in: + bam: bwa/sam + obam: + valueFrom: $(inputs.bam.nameroot).bam + out: + - oBam + sortBam: + run: sortBam.cwl + in: + bam: sam2bam/oBam + obam: + valueFrom: $(inputs.bam.nameroot)_sort.bam + out: + - sbam + idxBam: + run: idxBam.cwl + in: + bam: sortBam/sbam + out: + - idx diff --git a/cwl/bwaAlign/bwaAlign.yml b/cwl/BwaAlign/bwaAlign.yml similarity index 75% rename from cwl/bwaAlign/bwaAlign.yml rename to cwl/BwaAlign/bwaAlign.yml index 0967ef4..69a88e3 100644 --- a/cwl/bwaAlign/bwaAlign.yml +++ b/cwl/BwaAlign/bwaAlign.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/bwaAlign/idxBam.cwl b/cwl/BwaAlign/idxBam.cwl similarity index 81% rename from cwl/bwaAlign/idxBam.cwl rename to cwl/BwaAlign/idxBam.cwl index f80966b..e779867 100644 --- a/cwl/bwaAlign/idxBam.cwl +++ b/cwl/BwaAlign/idxBam.cwl @@ -1,24 +1,24 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- samtools -- index -requirements: -- class: DockerRequirement - dockerPull: biocontainers/samtools:v1.7.0_cv3 -- class: InitialWorkDirRequirement - listing: - - $(inputs.bam) -inputs: - bam: - type: File - inputBinding: - position: 1 - separate: true -outputs: - idx: - type: File - secondaryFiles: - - .bai - outputBinding: - glob: $(inputs.bam.basename) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- index +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.12--h9aed4be_1 +- class: InitialWorkDirRequirement + listing: + - $(inputs.bam) +inputs: + bam: + type: File + inputBinding: + position: 1 + separate: true +outputs: + idx: + type: File + secondaryFiles: + - .bai + outputBinding: + glob: $(inputs.bam.basename) diff --git a/cwl/BwaAlign/sam2bam.cwl b/cwl/BwaAlign/sam2bam.cwl new file mode 100644 index 0000000..48b492e --- /dev/null +++ b/cwl/BwaAlign/sam2bam.cwl @@ -0,0 +1,67 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- view +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.16.1--h6899075_1 +inputs: + bam: + type: File + secondaryFiles: .bai + inputBinding: + position: 99 + separate: true + bed: + type: File? + inputBinding: + position: 1 + prefix: -L + separate: true + obam: + type: string + inputBinding: + position: 2 + prefix: -o + separate: true + region: + type: string? + inputBinding: + position: 100 + separate: true + outb: + type: boolean? + inputBinding: + prefix: -b + separate: true + exFlag: + type: int? + inputBinding: + prefix: -F + separate: true + reqFlag: + type: int? + inputBinding: + prefix: -f + separate: true + qname: + type: File? + inputBinding: + prefix: -N + separate: true + threads: + type: int? + inputBinding: + prefix: --threads + separate: true + mapq: + type: int? + inputBinding: + prefix: -q + separate: true +outputs: + oBam: + type: File + outputBinding: + glob: $(inputs.obam) diff --git a/cwl/BwaAlign/sortBam.cwl b/cwl/BwaAlign/sortBam.cwl new file mode 100644 index 0000000..be772d7 --- /dev/null +++ b/cwl/BwaAlign/sortBam.cwl @@ -0,0 +1,23 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- sort +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.12--h9aed4be_1 +inputs: + bam: + type: File + inputBinding: + separate: true + obam: + type: string + inputBinding: + prefix: -o + separate: true +outputs: + sbam: + type: File + outputBinding: + glob: $(inputs.obam) diff --git a/cwl/COMPSRA.cwl b/cwl/COMPSRA.cwl new file mode 100644 index 0000000..a016898 --- /dev/null +++ b/cwl/COMPSRA.cwl @@ -0,0 +1,58 @@ +cwlVersion: v1.2 +class: CommandLineTool +baseCommand: +- java +- -jar +- /opt/COMPSRA.jar +requirements: +- class: DockerRequirement + dockerPull: hubentu/compsra +- class: InitialWorkDirRequirement + listing: + - entry: $(inputs.DB) + entryname: $('bundle_v1/') +- class: InlineJavascriptRequirement +arguments: +- -qc +- -rb +- '4' +- -rh +- '20' +- -rt +- '20' +- -rr +- '20' +- -rlh +- '8,17' +- -aln +- -mt +- star +- -ann +- -ac +- '1,2,3,4,5,6' +- -out +- '.' +inputs: + fq: + type: File + inputBinding: + prefix: -in + separate: true + adapt: + type: string + inputBinding: + prefix: -ra + separate: true + ref: + type: string + inputBinding: + prefix: -ref + separate: true + default: hg38 + DB: + type: Directory +outputs: + outdir: + type: Directory + outputBinding: + glob: $(inputs.fq.nameroot.split('.')[0]) diff --git a/cwl/COMPSRA.yml b/cwl/COMPSRA.yml new file mode 100644 index 0000000..92be5a9 --- /dev/null +++ b/cwl/COMPSRA.yml @@ -0,0 +1 @@ +ref: hg38 diff --git a/cwl/COMPSRA_rn/COMPSRA_rn.cwl b/cwl/COMPSRA_rn/COMPSRA_rn.cwl new file mode 100644 index 0000000..396d1a9 --- /dev/null +++ b/cwl/COMPSRA_rn/COMPSRA_rn.cwl @@ -0,0 +1,34 @@ +cwlVersion: v1.0 +class: Workflow +inputs: + samplefq: + type: string + fq: + type: File + adapt: + type: string + ref: + type: string + DB: + type: Directory +outputs: + out: + type: Directory + outputSource: compsra/outdir +steps: + copy: + run: copy.cwl + in: + file1: fq + file2: samplefq + out: + - cpfile + compsra: + run: compsra.cwl + in: + fq: copy/cpfile + adapt: adapt + ref: ref + DB: DB + out: + - outdir diff --git a/cwl/pl_vcfExpression.yml b/cwl/COMPSRA_rn/COMPSRA_rn.yml similarity index 75% rename from cwl/pl_vcfExpression.yml rename to cwl/COMPSRA_rn/COMPSRA_rn.yml index 0967ef4..69a88e3 100644 --- a/cwl/pl_vcfExpression.yml +++ b/cwl/COMPSRA_rn/COMPSRA_rn.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/COMPSRA_rn/compsra.cwl b/cwl/COMPSRA_rn/compsra.cwl new file mode 100644 index 0000000..a016898 --- /dev/null +++ b/cwl/COMPSRA_rn/compsra.cwl @@ -0,0 +1,58 @@ +cwlVersion: v1.2 +class: CommandLineTool +baseCommand: +- java +- -jar +- /opt/COMPSRA.jar +requirements: +- class: DockerRequirement + dockerPull: hubentu/compsra +- class: InitialWorkDirRequirement + listing: + - entry: $(inputs.DB) + entryname: $('bundle_v1/') +- class: InlineJavascriptRequirement +arguments: +- -qc +- -rb +- '4' +- -rh +- '20' +- -rt +- '20' +- -rr +- '20' +- -rlh +- '8,17' +- -aln +- -mt +- star +- -ann +- -ac +- '1,2,3,4,5,6' +- -out +- '.' +inputs: + fq: + type: File + inputBinding: + prefix: -in + separate: true + adapt: + type: string + inputBinding: + prefix: -ra + separate: true + ref: + type: string + inputBinding: + prefix: -ref + separate: true + default: hg38 + DB: + type: Directory +outputs: + outdir: + type: Directory + outputBinding: + glob: $(inputs.fq.nameroot.split('.')[0]) diff --git a/cwl/COMPSRA_rn/copy.cwl b/cwl/COMPSRA_rn/copy.cwl new file mode 100644 index 0000000..3fcedd3 --- /dev/null +++ b/cwl/COMPSRA_rn/copy.cwl @@ -0,0 +1,29 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: cp +inputs: + file1: + type: + - File + - Directory + inputBinding: + position: 2 + separate: true + file2: + type: string + inputBinding: + position: 3 + separate: true + folder: + type: boolean? + inputBinding: + position: 1 + prefix: -r + separate: true +outputs: + cpfile: + type: + - File + - Directory + outputBinding: + glob: $(inputs.file2) diff --git a/cwl/CREST.cwl b/cwl/CREST.cwl new file mode 100644 index 0000000..16673c6 --- /dev/null +++ b/cwl/CREST.cwl @@ -0,0 +1,47 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: /opt/CREST/CREST.sh +requirements: +- class: DockerRequirement + dockerPull: hubentu/crest +inputs: + tbam: + type: File + secondaryFiles: .bai + inputBinding: + position: 1 + separate: true + gbam: + type: File + secondaryFiles: .bai + inputBinding: + position: 2 + separate: true + ref: + type: File + secondaryFiles: .fai + inputBinding: + position: 3 + separate: true + bit: + type: File + inputBinding: + position: 4 + separate: true + host: + type: string + inputBinding: + position: 5 + separate: true + default: localhost + port: + type: int + inputBinding: + position: 6 + separate: true + default: 2345 +outputs: + predSV: + type: File + outputBinding: + glob: $(inputs.tbam.basename).predSV.txt diff --git a/cwl/CREST.yml b/cwl/CREST.yml new file mode 100644 index 0000000..2bbb892 --- /dev/null +++ b/cwl/CREST.yml @@ -0,0 +1,2 @@ +host: localhost +port: 2345 diff --git a/cwl/CalculateContamination.cwl b/cwl/CalculateContamination.cwl index 90ec005..8df26f0 100644 --- a/cwl/CalculateContamination.cwl +++ b/cwl/CalculateContamination.cwl @@ -1,29 +1,38 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- gatk -- CalculateContamination -requirements: -- class: DockerRequirement - dockerPull: broadinstitute/gatk:latest -inputs: - ttable: - type: File - inputBinding: - prefix: -I - separate: true - ntable: - type: File - inputBinding: - prefix: -matched - separate: true - cont: - type: string - inputBinding: - prefix: -O - separate: true -outputs: - cout: - type: File - outputBinding: - glob: $(inputs.cont) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- gatk +- CalculateContamination +requirements: +- class: DockerRequirement + dockerPull: broadinstitute/gatk:latest +inputs: + ttable: + type: File + inputBinding: + prefix: -I + separate: true + ntable: + type: File + inputBinding: + prefix: -matched + separate: true + cont: + type: string + inputBinding: + prefix: -O + separate: true + seg: + type: string + inputBinding: + prefix: -segments + separate: true +outputs: + Cout: + type: File + outputBinding: + glob: $(inputs.cont) + Seg: + type: File + outputBinding: + glob: $(inputs.seg) diff --git a/cwl/CalculateContamination.yml b/cwl/CalculateContamination.yml index 0967ef4..69a88e3 100644 --- a/cwl/CalculateContamination.yml +++ b/cwl/CalculateContamination.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/Cat.cwl b/cwl/Cat.cwl index 6c60e62..29de400 100644 --- a/cwl/Cat.cwl +++ b/cwl/Cat.cwl @@ -1,15 +1,15 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: cat -inputs: - infiles: - type: File[] - inputBinding: - separate: true - outfile: - type: string - default: catout.txt -outputs: - output: - type: stdout -stdout: $(inputs.outfile) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: cat +inputs: + infiles: + type: File[] + inputBinding: + separate: true + outfile: + type: string + default: catout.txt +outputs: + output: + type: stdout +stdout: $(inputs.outfile) diff --git a/cwl/Cat.yml b/cwl/Cat.yml index 52fdea5..dd93587 100644 --- a/cwl/Cat.yml +++ b/cwl/Cat.yml @@ -1 +1 @@ -outfile: catout.txt +outfile: catout.txt diff --git a/cwl/ColSeqArtifact.cwl b/cwl/ColSeqArtifact.cwl index 5784cea..ff3a632 100644 --- a/cwl/ColSeqArtifact.cwl +++ b/cwl/ColSeqArtifact.cwl @@ -1,35 +1,35 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- gatk -- CollectSequencingArtifactMetrics -requirements: -- class: DockerRequirement - dockerPull: broadinstitute/gatk:latest -inputs: - bam: - type: File - inputBinding: - prefix: -I - separate: true - ref: - type: File - inputBinding: - prefix: -R - separate: true - ext: - type: string - inputBinding: - prefix: --FILE_EXTENSION - separate: true - default: .txt - art: - type: string - inputBinding: - prefix: -O - separate: true -outputs: - aout: - type: File - outputBinding: - glob: $(inputs.art).pre_adapter_detail_metrics.txt +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- gatk +- CollectSequencingArtifactMetrics +requirements: +- class: DockerRequirement + dockerPull: broadinstitute/gatk:latest +inputs: + bam: + type: File + inputBinding: + prefix: -I + separate: true + ref: + type: File + inputBinding: + prefix: -R + separate: true + ext: + type: string + inputBinding: + prefix: --FILE_EXTENSION + separate: true + default: .txt + art: + type: string + inputBinding: + prefix: -O + separate: true +outputs: + aout: + type: File + outputBinding: + glob: $(inputs.art).pre_adapter_detail_metrics.txt diff --git a/cwl/ColSeqArtifact.yml b/cwl/ColSeqArtifact.yml index ed5e4fd..823b18c 100644 --- a/cwl/ColSeqArtifact.yml +++ b/cwl/ColSeqArtifact.yml @@ -1 +1 @@ -ext: .txt +ext: .txt diff --git a/cwl/CollectGcBiasMetrics.cwl b/cwl/CollectGcBiasMetrics.cwl new file mode 100644 index 0000000..a7bc497 --- /dev/null +++ b/cwl/CollectGcBiasMetrics.cwl @@ -0,0 +1,48 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- picard +- CollectGcBiasMetrics +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/picard:2.26.4--hdfd78af_0 +inputs: + bam: + type: File + inputBinding: + prefix: I= + separate: false + ref: + type: File + secondaryFiles: .fai + inputBinding: + prefix: R= + separate: false + gc: + type: string + inputBinding: + prefix: O= + separate: false + chart: + type: string + inputBinding: + prefix: CHART= + separate: false + summary: + type: string + inputBinding: + prefix: S= + separate: false +outputs: + GC: + type: File + outputBinding: + glob: $(inputs.gc) + Chart: + type: File + outputBinding: + glob: $(inputs.chart) + Summary: + type: File + outputBinding: + glob: $(inputs.summary) diff --git a/cwl/CombineGVCFs.R~.yml b/cwl/CollectGcBiasMetrics.yml similarity index 75% rename from cwl/CombineGVCFs.R~.yml rename to cwl/CollectGcBiasMetrics.yml index 0967ef4..69a88e3 100644 --- a/cwl/CombineGVCFs.R~.yml +++ b/cwl/CollectGcBiasMetrics.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/CollectInsertSizeMetrics.cwl b/cwl/CollectInsertSizeMetrics.cwl new file mode 100644 index 0000000..0a0db2e --- /dev/null +++ b/cwl/CollectInsertSizeMetrics.cwl @@ -0,0 +1,33 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- picard +- CollectInsertSizeMetrics +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/picard:2.21.1--0 +inputs: + bam: + type: File + inputBinding: + prefix: I= + separate: false + metrics: + type: string + inputBinding: + prefix: O= + separate: false + hist: + type: string + inputBinding: + prefix: H= + separate: false +outputs: + Metrics: + type: File + outputBinding: + glob: $(inputs.metrics) + Hist: + type: File + outputBinding: + glob: $(inputs.hist) diff --git a/cwl/CollectInsertSizeMetrics.yml b/cwl/CollectInsertSizeMetrics.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/CollectInsertSizeMetrics.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/CombineGVCFs.cwl b/cwl/CombineGVCFs.cwl index 5310b2c..07022d1 100644 --- a/cwl/CombineGVCFs.cwl +++ b/cwl/CombineGVCFs.cwl @@ -1,38 +1,38 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- gatk -- CombineGVCFs -requirements: -- class: DockerRequirement - dockerPull: broadinstitute/gatk:latest -inputs: - vcfs: - type: - type: array - items: File - inputBinding: - separate: true - secondaryFiles: .idx - inputBinding: - prefix: --variant - separate: true - Ref: - type: File - secondaryFiles: - - .fai - - $(self.nameroot).dict - inputBinding: - prefix: -R - separate: true - ovcf: - type: string - inputBinding: - prefix: -O - separate: true -outputs: - vcf: - type: File - secondaryFiles: .idx - outputBinding: - glob: $(inputs.vout) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- gatk +- CombineGVCFs +requirements: +- class: DockerRequirement + dockerPull: broadinstitute/gatk:latest +inputs: + vcfs: + type: + type: array + items: File + inputBinding: + prefix: --variant + separate: true + secondaryFiles: .tbi + inputBinding: + separate: true + Ref: + type: File + secondaryFiles: + - .fai + - $(self.nameroot).dict + inputBinding: + prefix: -R + separate: true + ovcf: + type: string + inputBinding: + prefix: -O + separate: true +outputs: + vcf: + type: File + secondaryFiles: .idx + outputBinding: + glob: $(inputs.ovcf) diff --git a/cwl/CombineGVCFs.yml b/cwl/CombineGVCFs.yml index 0967ef4..69a88e3 100644 --- a/cwl/CombineGVCFs.yml +++ b/cwl/CombineGVCFs.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/CombineGenotypeGVCFs/CombineGVCFs.cwl b/cwl/CombineGenotypeGVCFs/CombineGVCFs.cwl index 5310b2c..07022d1 100644 --- a/cwl/CombineGenotypeGVCFs/CombineGVCFs.cwl +++ b/cwl/CombineGenotypeGVCFs/CombineGVCFs.cwl @@ -1,38 +1,38 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- gatk -- CombineGVCFs -requirements: -- class: DockerRequirement - dockerPull: broadinstitute/gatk:latest -inputs: - vcfs: - type: - type: array - items: File - inputBinding: - separate: true - secondaryFiles: .idx - inputBinding: - prefix: --variant - separate: true - Ref: - type: File - secondaryFiles: - - .fai - - $(self.nameroot).dict - inputBinding: - prefix: -R - separate: true - ovcf: - type: string - inputBinding: - prefix: -O - separate: true -outputs: - vcf: - type: File - secondaryFiles: .idx - outputBinding: - glob: $(inputs.vout) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- gatk +- CombineGVCFs +requirements: +- class: DockerRequirement + dockerPull: broadinstitute/gatk:latest +inputs: + vcfs: + type: + type: array + items: File + inputBinding: + prefix: --variant + separate: true + secondaryFiles: .tbi + inputBinding: + separate: true + Ref: + type: File + secondaryFiles: + - .fai + - $(self.nameroot).dict + inputBinding: + prefix: -R + separate: true + ovcf: + type: string + inputBinding: + prefix: -O + separate: true +outputs: + vcf: + type: File + secondaryFiles: .idx + outputBinding: + glob: $(inputs.ovcf) diff --git a/cwl/CombineGenotypeGVCFs/CombineGenotypeGVCFs.cwl b/cwl/CombineGenotypeGVCFs/CombineGenotypeGVCFs.cwl index 4324538..ec621a7 100644 --- a/cwl/CombineGenotypeGVCFs/CombineGenotypeGVCFs.cwl +++ b/cwl/CombineGenotypeGVCFs/CombineGenotypeGVCFs.cwl @@ -1,44 +1,42 @@ -cwlVersion: v1.0 -class: Workflow -requirements: -- class: StepInputExpressionRequirement -- class: InlineJavascriptRequirement -inputs: - vcfs: - type: - type: array - items: File - inputBinding: - separate: true - secondaryFiles: .idx - Ref: - type: File - secondaryFiles: - - .fai - - $(self.nameroot).dict - out: - type: string -outputs: - VCF: - type: File - secondaryFiles: .idx - outputSource: GenotypeGVCFs/vcf -steps: - CombineGVCFs: - run: cwl/CombineGenotypeGVCFs/CombineGVCFs.cwl - in: - vcfs: vcfs - Ref: Ref - ovcf: - source: out - valueFrom: $(self).g.vcf - out: - - vcf - GenotypeGVCFs: - run: cwl/CombineGenotypeGVCFs/GenotypeGVCFs.cwl - in: - variant: CombineGVCFs/cvcf - ref: Ref - vout: out - out: - - vcf +cwlVersion: v1.0 +class: Workflow +requirements: +- class: StepInputExpressionRequirement +- class: InlineJavascriptRequirement +inputs: + vcfs: + type: + type: array + items: File + secondaryFiles: .tbi + Ref: + type: File + secondaryFiles: + - .fai + - $(self.nameroot).dict + out: + type: string +outputs: + VCF: + type: File + secondaryFiles: .idx + outputSource: GenotypeGVCFs/vcf +steps: + CombineGVCFs: + run: CombineGVCFs.cwl + in: + vcfs: vcfs + Ref: Ref + ovcf: + source: out + valueFrom: $(self).g.vcf + out: + - vcf + GenotypeGVCFs: + run: GenotypeGVCFs.cwl + in: + variant: CombineGVCFs/vcf + ref: Ref + vout: out + out: + - vcf diff --git a/cwl/CombineGenotypeGVCFs/CombineGenotypeGVCFs.yml b/cwl/CombineGenotypeGVCFs/CombineGenotypeGVCFs.yml index 0967ef4..69a88e3 100644 --- a/cwl/CombineGenotypeGVCFs/CombineGenotypeGVCFs.yml +++ b/cwl/CombineGenotypeGVCFs/CombineGenotypeGVCFs.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/CombineGenotypeGVCFs/GenotypeGVCFs.cwl b/cwl/CombineGenotypeGVCFs/GenotypeGVCFs.cwl index 32f5618..71a0524 100644 --- a/cwl/CombineGenotypeGVCFs/GenotypeGVCFs.cwl +++ b/cwl/CombineGenotypeGVCFs/GenotypeGVCFs.cwl @@ -1,34 +1,34 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- gatk -- GenotypeGVCFs -requirements: -- class: DockerRequirement - dockerPull: broadinstitute/gatk:latest -inputs: - variant: - type: File - secondaryFiles: .idx - inputBinding: - prefix: -V - separate: true - ref: - type: File - secondaryFiles: - - .fai - - $(self.nameroot).dict - inputBinding: - prefix: -R - separate: true - vout: - type: string - inputBinding: - prefix: -O - separate: true -outputs: - vcf: - type: File - secondaryFiles: .idx - outputBinding: - glob: $(inputs.vout) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- gatk +- GenotypeGVCFs +requirements: +- class: DockerRequirement + dockerPull: broadinstitute/gatk:latest +inputs: + variant: + type: File + secondaryFiles: .idx + inputBinding: + prefix: -V + separate: true + ref: + type: File + secondaryFiles: + - .fai + - $(self.nameroot).dict + inputBinding: + prefix: -R + separate: true + vout: + type: string + inputBinding: + prefix: -O + separate: true +outputs: + vcf: + type: File + secondaryFiles: .idx + outputBinding: + glob: $(inputs.vout) diff --git a/cwl/CombineVariants.cwl b/cwl/CombineVariants.cwl index d4dad3b..ce4f5a1 100644 --- a/cwl/CombineVariants.cwl +++ b/cwl/CombineVariants.cwl @@ -1,41 +1,41 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- java -- -jar -- /usr/GenomeAnalysisTK.jar -- -T -- CombineVariants -requirements: -- class: DockerRequirement - dockerPull: broadinstitute/gatk3:3.8-1 -arguments: -- --assumeIdenticalSamples -inputs: - variants: - type: - type: array - items: File - inputBinding: - prefix: --variant - separate: true - inputBinding: - separate: true - ref: - type: File - secondaryFiles: - - .fai - - $(self.nameroot).dict - inputBinding: - prefix: -R - separate: true - ovcf: - type: string - inputBinding: - prefix: -o - separate: true -outputs: - oVcf: - type: File - outputBinding: - glob: $(inputs.ovcf) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- java +- -jar +- /usr/GenomeAnalysisTK.jar +- -T +- CombineVariants +requirements: +- class: DockerRequirement + dockerPull: broadinstitute/gatk3:3.8-1 +arguments: +- --assumeIdenticalSamples +inputs: + variants: + type: + type: array + items: File + inputBinding: + prefix: --variant + separate: true + inputBinding: + separate: true + ref: + type: File + secondaryFiles: + - .fai + - $(self.nameroot).dict + inputBinding: + prefix: -R + separate: true + ovcf: + type: string + inputBinding: + prefix: -o + separate: true +outputs: + oVcf: + type: File + outputBinding: + glob: $(inputs.ovcf) diff --git a/cwl/CombineVariants.yml b/cwl/CombineVariants.yml index 0967ef4..69a88e3 100644 --- a/cwl/CombineVariants.yml +++ b/cwl/CombineVariants.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/DepthOfCoverage.cwl b/cwl/DepthOfCoverage.cwl index 2fe0e19..c1d4eca 100644 --- a/cwl/DepthOfCoverage.cwl +++ b/cwl/DepthOfCoverage.cwl @@ -1,57 +1,57 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- java -- -jar -- /usr/GenomeAnalysisTK.jar -- -T -- DepthOfCoverage -requirements: -- class: DockerRequirement - dockerPull: broadinstitute/gatk3:3.8-1 -arguments: -- -omitBaseOutput -inputs: - bam: - type: File - secondaryFiles: .bai - inputBinding: - prefix: -I - separate: true - prefix: - type: string - inputBinding: - prefix: -o - separate: true - region: - type: File - inputBinding: - prefix: -L - separate: true - ref: - type: File - secondaryFiles: - - .fai - - $(self.nameroot).dict - inputBinding: - prefix: -R - separate: true - ct: - type: - type: array - items: int - inputBinding: - prefix: -ct - separate: true - inputBinding: - separate: true - default: - - 1 - - 10 - - 20 - - 30 -outputs: - out: - type: File - outputBinding: - glob: $(inputs.prefix).sample_summary +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- java +- -jar +- /usr/GenomeAnalysisTK.jar +- -T +- DepthOfCoverage +requirements: +- class: DockerRequirement + dockerPull: broadinstitute/gatk3:3.8-1 +arguments: +- -omitBaseOutput +inputs: + bam: + type: File + secondaryFiles: .bai + inputBinding: + prefix: -I + separate: true + prefix: + type: string + inputBinding: + prefix: -o + separate: true + region: + type: File + inputBinding: + prefix: -L + separate: true + ref: + type: File + secondaryFiles: + - .fai + - $(self.nameroot).dict + inputBinding: + prefix: -R + separate: true + ct: + type: + type: array + items: int + inputBinding: + prefix: -ct + separate: true + inputBinding: + separate: true + default: + - 1 + - 10 + - 20 + - 30 +outputs: + out: + type: File + outputBinding: + glob: $(inputs.prefix).sample_summary diff --git a/cwl/DepthOfCoverage.yml b/cwl/DepthOfCoverage.yml index af1613f..824eb60 100644 --- a/cwl/DepthOfCoverage.yml +++ b/cwl/DepthOfCoverage.yml @@ -1,5 +1,5 @@ -ct: -- 1 -- 10 -- 20 -- 30 +ct: +- 1 +- 10 +- 20 +- 30 diff --git a/cwl/DepthOfCoverage4.cwl b/cwl/DepthOfCoverage4.cwl new file mode 100644 index 0000000..4fda4a2 --- /dev/null +++ b/cwl/DepthOfCoverage4.cwl @@ -0,0 +1,54 @@ +cwlVersion: v1.2 +class: CommandLineTool +baseCommand: +- gatk +- DepthOfCoverage +requirements: +- class: DockerRequirement + dockerPull: broadinstitute/gatk:latest +inputs: + bam: + type: File + secondaryFiles: + - .bai? + - ^.bai? + inputBinding: + prefix: -I + separate: true + prefix: + type: string + inputBinding: + prefix: -O + separate: true + region: + type: File + inputBinding: + prefix: -L + separate: true + ref: + type: File + secondaryFiles: + - .fai + - ^.dict + inputBinding: + prefix: -R + separate: true + ct: + type: + type: array + items: int + inputBinding: + prefix: --summary-coverage-threshold + separate: true + inputBinding: + separate: true + default: + - 1 + - 10 + - 20 + - 30 +outputs: + out: + type: File + outputBinding: + glob: $(inputs.prefix).sample_summary diff --git a/cwl/DepthOfCoverage4.yml b/cwl/DepthOfCoverage4.yml new file mode 100644 index 0000000..824eb60 --- /dev/null +++ b/cwl/DepthOfCoverage4.yml @@ -0,0 +1,5 @@ +ct: +- 1 +- 10 +- 20 +- 30 diff --git a/cwl/DropletUtils.R b/cwl/DropletUtils.R index 9ddadce..efae91e 100644 --- a/cwl/DropletUtils.R +++ b/cwl/DropletUtils.R @@ -1,31 +1,30 @@ -.libPaths('/home/hq/R/x86_64-pc-linux-gnu-library/4.0') -suppressPackageStartupMessages(library(R.utils)) -suppressPackageStartupMessages(library(codetools)) -args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) -args[["lower"]] <- as.integer(args[["lower"]]) -args[["df"]] <- as.integer(args[["df"]]) -DropletUtils <- -function(dir.name, lower=100, df=20, ...) { - library(DropletUtils) - dir.name <- file.path(dir.name, "Gene/raw") - sce <- read10xCounts(dir.name, ...) - br.out <- barcodeRanks(assay(sce), lower=lower, df=df) - o <- order(br.out$rank) - e.out <- emptyDrops(assay(sce)) - is.cell <- e.out$FDR <= 0.01 - pdf(file = "diagnostics.pdf") - plot(br.out$rank, br.out$total, log="xy", xlab="Rank", ylab="Total", - main = "Barcode Ranks") - lines(br.out$rank[o], br.out$fitted[o], col="red") - abline(h=metadata(br.out)$knee, col="dodgerblue", lty=2) - abline(h=metadata(br.out)$inflection, col="forestgreen", lty=2) - legend("bottomleft", lty=2, col=c("dodgerblue", "forestgreen"), - legend=c("knee", "inflection")) - plot(e.out$Total, -e.out$LogProb, col=ifelse(is.cell, "red", "black"), - xlab="Total UMI count", ylab="-Log Probability", - main = "Empty Droplets") - dev.off() - sce1 <- sce[, which(is.cell == "TRUE")] - saveRDS(sce1, file = "sce_filtered.rds") -} -do.call(DropletUtils, args) +.libPaths(c('/projects/rpci/songliu/qhu/miniconda3/envs/r-base/lib/R/library')) +suppressPackageStartupMessages(library(R.utils)) +args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) +args[["lower"]] <- as.integer(args[["lower"]]) +args[["df"]] <- as.integer(args[["df"]]) +DropletUtils <- +function(dir.name, lower=100, df=20, ...) { + library(DropletUtils) + dir.name <- file.path(dir.name, "Gene/raw") + sce <- read10xCounts(dir.name, ...) + br.out <- barcodeRanks(assay(sce), lower=lower, df=df) + o <- order(br.out$rank) + e.out <- emptyDrops(assay(sce)) + is.cell <- e.out$FDR <= 0.01 + pdf(file = "diagnostics.pdf") + plot(br.out$rank, br.out$total, log="xy", xlab="Rank", ylab="Total", + main = "Barcode Ranks") + lines(br.out$rank[o], br.out$fitted[o], col="red") + abline(h=metadata(br.out)$knee, col="dodgerblue", lty=2) + abline(h=metadata(br.out)$inflection, col="forestgreen", lty=2) + legend("bottomleft", lty=2, col=c("dodgerblue", "forestgreen"), + legend=c("knee", "inflection")) + plot(e.out$Total, -e.out$LogProb, col=ifelse(is.cell, "red", "black"), + xlab="Total UMI count", ylab="-Log Probability", + main = "Empty Droplets") + dev.off() + sce1 <- sce[, which(is.cell == "TRUE")] + saveRDS(sce1, file = "sce_filtered.rds") +} +do.call(DropletUtils, args) diff --git a/cwl/DropletUtils.cwl b/cwl/DropletUtils.cwl index 22635e2..96aa1df 100644 --- a/cwl/DropletUtils.cwl +++ b/cwl/DropletUtils.cwl @@ -1,32 +1,53 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- Rscript -- cwl/DropletUtils.R -inputs: - dirname: - type: Directory - inputBinding: - prefix: dir.name= - separate: false - lower: - type: int - inputBinding: - prefix: lower= - separate: false - default: 100 - df: - type: int - inputBinding: - prefix: df= - separate: false - default: 20 -outputs: - plots: - type: File - outputBinding: - glob: '*.pdf' - outsce: - type: File - outputBinding: - glob: '*.rds' +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: Rscript +requirements: +- class: InitialWorkDirRequirement + listing: + - entryname: DropletUtils.R + entry: ".libPaths(c('/projects/rpci/songliu/qhu/miniconda3/envs/r-base/lib/R/library'))\nsuppressPackageStartupMessages(library(R.utils))\nargs + <- commandArgs(trailingOnly = TRUE, asValues = TRUE)\nargs[[\"lower\"]] <- as.integer(args[[\"lower\"]])\nargs[[\"df\"]] + <- as.integer(args[[\"df\"]])\nDropletUtils <-\nfunction(dir.name, lower=100, + df=20, ...) { \n library(DropletUtils)\n dir.name <- file.path(dir.name, + \"Gene/raw\")\n sce <- read10xCounts(dir.name, ...)\n br.out <- barcodeRanks(assay(sce), + lower=lower, df=df)\n o <- order(br.out$rank)\n e.out <- emptyDrops(assay(sce))\n + \ is.cell <- e.out$FDR <= 0.01\n pdf(file = \"diagnostics.pdf\")\n plot(br.out$rank, + br.out$total, log=\"xy\", xlab=\"Rank\", ylab=\"Total\",\n main = \"Barcode + Ranks\")\n lines(br.out$rank[o], br.out$fitted[o], col=\"red\")\n abline(h=metadata(br.out)$knee, + col=\"dodgerblue\", lty=2)\n abline(h=metadata(br.out)$inflection, col=\"forestgreen\", + lty=2)\n legend(\"bottomleft\", lty=2, col=c(\"dodgerblue\", \"forestgreen\"),\n + \ legend=c(\"knee\", \"inflection\"))\n plot(e.out$Total, -e.out$LogProb, + col=ifelse(is.cell, \"red\", \"black\"),\n xlab=\"Total UMI count\", + ylab=\"-Log Probability\",\n main = \"Empty Droplets\")\n dev.off()\n + \ sce1 <- sce[, which(is.cell == \"TRUE\")]\n saveRDS(sce1, file = \"sce_filtered.rds\")\n}\ndo.call(DropletUtils, + args)" + writable: false +arguments: +- DropletUtils.R +inputs: + dirname: + type: Directory + inputBinding: + prefix: dir.name= + separate: false + lower: + type: int + inputBinding: + prefix: lower= + separate: false + default: 100 + df: + type: int + inputBinding: + prefix: df= + separate: false + default: 20 +outputs: + plots: + type: File + outputBinding: + glob: '*.pdf' + outsce: + type: File + outputBinding: + glob: '*.rds' diff --git a/cwl/DropletUtils.yml b/cwl/DropletUtils.yml index 1c8a15c..6849cde 100644 --- a/cwl/DropletUtils.yml +++ b/cwl/DropletUtils.yml @@ -1,2 +1,2 @@ -lower: 100 -df: 20 +lower: 100 +df: 20 diff --git a/cwl/FilterMutectCalls.cwl b/cwl/FilterMutectCalls.cwl index a956658..f30ae4b 100644 --- a/cwl/FilterMutectCalls.cwl +++ b/cwl/FilterMutectCalls.cwl @@ -1,40 +1,50 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- gatk -- FilterMutectCalls -requirements: -- class: DockerRequirement - dockerPull: broadinstitute/gatk:latest -inputs: - vcf: - type: File - secondaryFiles: - - .idx - - .stats - inputBinding: - prefix: -V - separate: true - cont: - type: File - inputBinding: - prefix: --contamination-table - separate: true - fvcf: - type: string - inputBinding: - prefix: -O - separate: true - ref: - type: File - secondaryFiles: - - .fai - - $(self.nameroot).dict - inputBinding: - prefix: -R - separate: true -outputs: - fout: - type: File - outputBinding: - glob: $(inputs.fvcf) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- gatk +- FilterMutectCalls +requirements: +- class: DockerRequirement + dockerPull: broadinstitute/gatk:latest +inputs: + vcf: + type: File + secondaryFiles: + - .idx + - .stats + inputBinding: + prefix: -V + separate: true + cont: + type: File + inputBinding: + prefix: --contamination-table + separate: true + seg: + type: File + inputBinding: + prefix: --tumor-segmentation + separate: true + lro: + type: File + inputBinding: + prefix: --ob-priors + separate: true + fvcf: + type: string + inputBinding: + prefix: -O + separate: true + ref: + type: File + secondaryFiles: + - .fai + - ^.dict + inputBinding: + prefix: -R + separate: true +outputs: + fout: + type: File + outputBinding: + glob: $(inputs.fvcf) diff --git a/cwl/FilterMutectCalls.yml b/cwl/FilterMutectCalls.yml index 0967ef4..69a88e3 100644 --- a/cwl/FilterMutectCalls.yml +++ b/cwl/FilterMutectCalls.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/FilterOBias.cwl b/cwl/FilterOBias.cwl index c1f45d4..723797a 100644 --- a/cwl/FilterOBias.cwl +++ b/cwl/FilterOBias.cwl @@ -1,38 +1,38 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- gatk -- FilterByOrientationBias -requirements: -- class: DockerRequirement - dockerPull: broadinstitute/gatk:latest -inputs: - vcf: - type: File - inputBinding: - prefix: -V - separate: true - art: - type: File - inputBinding: - prefix: -P - separate: true - mode: - type: - type: array - items: string - inputBinding: - prefix: --artifact-modes - separate: true - inputBinding: - separate: true - avcf: - type: string - inputBinding: - prefix: -O - separate: true -outputs: - fout: - type: File - outputBinding: - glob: $(inputs.avcf) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- gatk +- FilterByOrientationBias +requirements: +- class: DockerRequirement + dockerPull: broadinstitute/gatk:latest +inputs: + vcf: + type: File + inputBinding: + prefix: -V + separate: true + art: + type: File + inputBinding: + prefix: -P + separate: true + mode: + type: + type: array + items: string + inputBinding: + prefix: --artifact-modes + separate: true + inputBinding: + separate: true + avcf: + type: string + inputBinding: + prefix: -O + separate: true +outputs: + fout: + type: File + outputBinding: + glob: $(inputs.avcf) diff --git a/cwl/FilterOBias.yml b/cwl/FilterOBias.yml index 0967ef4..69a88e3 100644 --- a/cwl/FilterOBias.yml +++ b/cwl/FilterOBias.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/Funcotator.cwl b/cwl/Funcotator.cwl index be55c6c..107c9af 100644 --- a/cwl/Funcotator.cwl +++ b/cwl/Funcotator.cwl @@ -1,51 +1,51 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- gatk -- Funcotator -requirements: -- class: DockerRequirement - dockerPull: broadinstitute/gatk:latest -arguments: -- --remove-filtered-variants -inputs: - vcf: - type: File - inputBinding: - prefix: -V - separate: true - ref: - type: File - secondaryFiles: - - .fai - - $(self.nameroot).dict - inputBinding: - prefix: -R - separate: true - outf: - type: string - inputBinding: - prefix: --output-file-format - separate: true - default: MAF - dsource: - type: Directory - inputBinding: - prefix: --data-sources-path - separate: true - version: - type: string - inputBinding: - prefix: --ref-version - separate: true - default: hg19 - maf: - type: string - inputBinding: - prefix: -O - separate: true -outputs: - mout: - type: File - outputBinding: - glob: $(inputs.maf) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- gatk +- Funcotator +requirements: +- class: DockerRequirement + dockerPull: broadinstitute/gatk:latest +arguments: +- --remove-filtered-variants +inputs: + vcf: + type: File + inputBinding: + prefix: -V + separate: true + ref: + type: File + secondaryFiles: + - .fai + - $(self.nameroot).dict + inputBinding: + prefix: -R + separate: true + outf: + type: string + inputBinding: + prefix: --output-file-format + separate: true + default: MAF + dsource: + type: Directory + inputBinding: + prefix: --data-sources-path + separate: true + version: + type: string + inputBinding: + prefix: --ref-version + separate: true + default: hg19 + maf: + type: string + inputBinding: + prefix: -O + separate: true +outputs: + mout: + type: File + outputBinding: + glob: $(inputs.maf) diff --git a/cwl/Funcotator.yml b/cwl/Funcotator.yml index eafcd4e..73f580a 100644 --- a/cwl/Funcotator.yml +++ b/cwl/Funcotator.yml @@ -1,2 +1,2 @@ -outf: MAF -version: hg19 +outf: MAF +version: hg19 diff --git a/cwl/GAlign/GAlign.cwl b/cwl/GAlign/GAlign.cwl index d72017f..aa19382 100644 --- a/cwl/GAlign/GAlign.cwl +++ b/cwl/GAlign/GAlign.cwl @@ -1,69 +1,80 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- Rscript -- -e -- args <- commandArgs(TRUE); splitList <- function(s)as.list(unlist(strsplit(s, split - = ','))); template <- args[1]; input1 <- jsonlite::fromJSON(template, simplifyVector=FALSE); - input1$ConvertPairedFastQsToUnmappedBamWf.readgroup_name <- splitList(args[2]); - input1$ConvertPairedFastQsToUnmappedBamWf.sample_name <- splitList(args[3]); input1$ConvertPairedFastQsToUnmappedBamWf.fastq_1 - <- splitList(args[4]); input1$ConvertPairedFastQsToUnmappedBamWf.fastq_2 <- splitList(args[5]); - input1$ConvertPairedFastQsToUnmappedBamWf.ubam_list_name <- splitList(args[3])[[1]][1]; - input1$ConvertPairedFastQsToUnmappedBamWf.library_name <- splitList(args[6]); input1$ConvertPairedFastQsToUnmappedBamWf.platform_unit - <- splitList(args[7]); input1$ConvertPairedFastQsToUnmappedBamWf.run_date <- list(rep(as.character(Sys.Date()), - lengths(splitList(args[2])))); input1$ConvertPairedFastQsToUnmappedBamWf.platform_name - <- splitList(args[8]); input1$ConvertPairedFastQsToUnmappedBamWf.sequencing_center - <- splitList(args[9]); cat(jsonlite::toJSON(input1, pretty = TRUE, auto_unbox = - T)) -inputs: - tmpl: - type: File - inputBinding: - position: 1 - separate: true - fastq1: - type: string - inputBinding: - position: 4 - separate: true - fastq2: - type: string - inputBinding: - position: 5 - separate: true - readGroup: - type: string - inputBinding: - position: 2 - separate: true - sampleName: - type: string - inputBinding: - position: 3 - separate: true - library: - type: string - inputBinding: - position: 6 - separate: true - platunit: - type: string - inputBinding: - position: 7 - separate: true - platform: - type: string - inputBinding: - position: 8 - separate: true - center: - type: string - inputBinding: - position: 9 - separate: true -outputs: - jsonOut: - type: File - outputBinding: - glob: tmpl1.json -stdout: tmpl1.json +cwlVersion: v1.0 +class: Workflow +inputs: + fastq1: + type: string + fastq2: + type: string + readGroup: + type: string + sampleName: + type: string + library: + type: string + platunit: + type: string + platform: + type: string + center: + type: string + tmpl1: + type: File + wdl1: + type: File + tmpl2: + type: File + wdl2: + type: File + cromwell: + type: File +outputs: + bamlog: + type: File + outputSource: align/log + outdir: + type: Directory + outputSource: mvOut/OutDir +steps: + fqJson: + run: fqJson.cwl + in: + tmpl: tmpl1 + fastq1: fastq1 + fastq2: fastq2 + readGroup: readGroup + sampleName: sampleName + library: library + platunit: platunit + platform: platform + center: center + out: + - jsonOut + fq2ubam: + run: fq2ubam.cwl + in: + cromwell: cromwell + wdl: wdl1 + json: fqJson/jsonOut + out: + - log + ubam2bamJson: + run: ubam2bamJson.cwl + in: + fqlog: fq2ubam/log + template: tmpl2 + out: + - json + align: + run: align.cwl + in: + cromwell: cromwell + wdl: wdl2 + json: ubam2bamJson/json + out: + - log + mvOut: + run: mvOut.cwl + in: + logFile: align/log + out: + - OutDir diff --git a/cwl/GAlign/GAlign.yml b/cwl/GAlign/GAlign.yml index 0967ef4..69a88e3 100644 --- a/cwl/GAlign/GAlign.yml +++ b/cwl/GAlign/GAlign.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/GAlign/align.cwl b/cwl/GAlign/align.cwl index c947ce1..171aed0 100644 --- a/cwl/GAlign/align.cwl +++ b/cwl/GAlign/align.cwl @@ -1,33 +1,33 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: java -inputs: - cromwell: - type: File - inputBinding: - position: 1 - prefix: -jar - separate: true - run: - type: string - inputBinding: - position: 2 - separate: true - default: run - wdl: - type: File - inputBinding: - position: 3 - separate: true - json: - type: File - inputBinding: - position: 4 - prefix: -i - separate: true -outputs: - log: - type: File - outputBinding: - glob: $(inputs.wdl.basename).log -stdout: $(inputs.wdl.basename).log +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: java +inputs: + cromwell: + type: File + inputBinding: + position: 1 + prefix: -jar + separate: true + run: + type: string + inputBinding: + position: 2 + separate: true + default: run + wdl: + type: File + inputBinding: + position: 3 + separate: true + json: + type: File + inputBinding: + position: 4 + prefix: -i + separate: true +outputs: + log: + type: File + outputBinding: + glob: $(inputs.wdl.basename).log +stdout: $(inputs.wdl.basename).log diff --git a/cwl/GAlign/fq2ubam.cwl b/cwl/GAlign/fq2ubam.cwl index c947ce1..171aed0 100644 --- a/cwl/GAlign/fq2ubam.cwl +++ b/cwl/GAlign/fq2ubam.cwl @@ -1,33 +1,33 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: java -inputs: - cromwell: - type: File - inputBinding: - position: 1 - prefix: -jar - separate: true - run: - type: string - inputBinding: - position: 2 - separate: true - default: run - wdl: - type: File - inputBinding: - position: 3 - separate: true - json: - type: File - inputBinding: - position: 4 - prefix: -i - separate: true -outputs: - log: - type: File - outputBinding: - glob: $(inputs.wdl.basename).log -stdout: $(inputs.wdl.basename).log +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: java +inputs: + cromwell: + type: File + inputBinding: + position: 1 + prefix: -jar + separate: true + run: + type: string + inputBinding: + position: 2 + separate: true + default: run + wdl: + type: File + inputBinding: + position: 3 + separate: true + json: + type: File + inputBinding: + position: 4 + prefix: -i + separate: true +outputs: + log: + type: File + outputBinding: + glob: $(inputs.wdl.basename).log +stdout: $(inputs.wdl.basename).log diff --git a/cwl/GAlign/fqJson.cwl b/cwl/GAlign/fqJson.cwl index d72017f..fefbf53 100644 --- a/cwl/GAlign/fqJson.cwl +++ b/cwl/GAlign/fqJson.cwl @@ -1,69 +1,69 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- Rscript -- -e -- args <- commandArgs(TRUE); splitList <- function(s)as.list(unlist(strsplit(s, split - = ','))); template <- args[1]; input1 <- jsonlite::fromJSON(template, simplifyVector=FALSE); - input1$ConvertPairedFastQsToUnmappedBamWf.readgroup_name <- splitList(args[2]); - input1$ConvertPairedFastQsToUnmappedBamWf.sample_name <- splitList(args[3]); input1$ConvertPairedFastQsToUnmappedBamWf.fastq_1 - <- splitList(args[4]); input1$ConvertPairedFastQsToUnmappedBamWf.fastq_2 <- splitList(args[5]); - input1$ConvertPairedFastQsToUnmappedBamWf.ubam_list_name <- splitList(args[3])[[1]][1]; - input1$ConvertPairedFastQsToUnmappedBamWf.library_name <- splitList(args[6]); input1$ConvertPairedFastQsToUnmappedBamWf.platform_unit - <- splitList(args[7]); input1$ConvertPairedFastQsToUnmappedBamWf.run_date <- list(rep(as.character(Sys.Date()), - lengths(splitList(args[2])))); input1$ConvertPairedFastQsToUnmappedBamWf.platform_name - <- splitList(args[8]); input1$ConvertPairedFastQsToUnmappedBamWf.sequencing_center - <- splitList(args[9]); cat(jsonlite::toJSON(input1, pretty = TRUE, auto_unbox = - T)) -inputs: - tmpl: - type: File - inputBinding: - position: 1 - separate: true - fastq1: - type: string - inputBinding: - position: 4 - separate: true - fastq2: - type: string - inputBinding: - position: 5 - separate: true - readGroup: - type: string - inputBinding: - position: 2 - separate: true - sampleName: - type: string - inputBinding: - position: 3 - separate: true - library: - type: string - inputBinding: - position: 6 - separate: true - platunit: - type: string - inputBinding: - position: 7 - separate: true - platform: - type: string - inputBinding: - position: 8 - separate: true - center: - type: string - inputBinding: - position: 9 - separate: true -outputs: - jsonOut: - type: File - outputBinding: - glob: tmpl1.json -stdout: tmpl1.json +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- Rscript +- -e +- args <- commandArgs(TRUE); splitList <- function(s)as.list(unlist(strsplit(s, split + = ','))); template <- args[1]; input1 <- jsonlite::fromJSON(template, simplifyVector=FALSE); + input1$ConvertPairedFastQsToUnmappedBamWf.readgroup_name <- splitList(args[2]); + input1$ConvertPairedFastQsToUnmappedBamWf.sample_name <- splitList(args[3]); input1$ConvertPairedFastQsToUnmappedBamWf.fastq_1 + <- splitList(args[4]); input1$ConvertPairedFastQsToUnmappedBamWf.fastq_2 <- splitList(args[5]); + input1$ConvertPairedFastQsToUnmappedBamWf.ubam_list_name <- splitList(args[3])[[1]][1]; + input1$ConvertPairedFastQsToUnmappedBamWf.library_name <- splitList(args[6]); input1$ConvertPairedFastQsToUnmappedBamWf.platform_unit + <- splitList(args[7]); input1$ConvertPairedFastQsToUnmappedBamWf.run_date <- list(rep(as.character(Sys.Date()), + lengths(splitList(args[2])))); input1$ConvertPairedFastQsToUnmappedBamWf.platform_name + <- splitList(args[8]); input1$ConvertPairedFastQsToUnmappedBamWf.sequencing_center + <- splitList(args[9]); cat(jsonlite::toJSON(input1, pretty = TRUE, auto_unbox = + T)) +inputs: + tmpl: + type: File + inputBinding: + position: 1 + separate: true + fastq1: + type: string + inputBinding: + position: 4 + separate: true + fastq2: + type: string + inputBinding: + position: 5 + separate: true + readGroup: + type: string + inputBinding: + position: 2 + separate: true + sampleName: + type: string + inputBinding: + position: 3 + separate: true + library: + type: string + inputBinding: + position: 6 + separate: true + platunit: + type: string + inputBinding: + position: 7 + separate: true + platform: + type: string + inputBinding: + position: 8 + separate: true + center: + type: string + inputBinding: + position: 9 + separate: true +outputs: + jsonOut: + type: File + outputBinding: + glob: tmpl1.json +stdout: tmpl1.json diff --git a/cwl/GAlign/mvOut.R b/cwl/GAlign/mvOut.R index 236950d..9c21925 100644 --- a/cwl/GAlign/mvOut.R +++ b/cwl/GAlign/mvOut.R @@ -1,15 +1,14 @@ -suppressPackageStartupMessages(library(R.utils)) -suppressPackageStartupMessages(library(codetools)) -args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) -mvOut <- -function(logFile){ - log1 <- readLines(logFile) - startn <- grep('Final Outputs:', log1)+1 - endn <- grep('}$', log1) - endn <- endn[endn > startn][1] - logOut <- jsonlite::fromJSON(log1[startn:endn]) - logOut <- logOut[lengths(logOut)>0] - dir.create('output', showWarnings = FALSE) - lapply(logOut, function(x)file.rename(x, file.path('output', basename(x)))) -} -do.call(mvOut, args) +suppressPackageStartupMessages(library(R.utils)) +args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) +mvOut <- +function(logFile){ + log1 <- readLines(logFile) + startn <- grep('Final Outputs:', log1)+1 + endn <- grep('}$', log1) + endn <- endn[endn > startn][1] + logOut <- jsonlite::fromJSON(log1[startn:endn]) + logOut <- logOut[lengths(logOut)>0] + dir.create('output', showWarnings = FALSE) + lapply(logOut, function(x)file.rename(x, file.path('output', basename(x)))) +} +do.call(mvOut, args) diff --git a/cwl/GAlign/mvOut.cwl b/cwl/GAlign/mvOut.cwl index 9537380..f0ce137 100644 --- a/cwl/GAlign/mvOut.cwl +++ b/cwl/GAlign/mvOut.cwl @@ -1,17 +1,37 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- Rscript -- cwl/GAlign/mvOut.R -id: mvOut -inputs: - logFile: - type: File - inputBinding: - prefix: logFile= - separate: false -outputs: - OutDir: - type: Directory - outputBinding: - glob: output +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: Rscript +requirements: +- class: InitialWorkDirRequirement + listing: + - entryname: mvOut.R + entry: |- + suppressPackageStartupMessages(library(R.utils)) + args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) + mvOut <- + function(logFile){ + log1 <- readLines(logFile) + startn <- grep('Final Outputs:', log1)+1 + endn <- grep('}$', log1) + endn <- endn[endn > startn][1] + logOut <- jsonlite::fromJSON(log1[startn:endn]) + logOut <- logOut[lengths(logOut)>0] + dir.create('output', showWarnings = FALSE) + lapply(logOut, function(x)file.rename(x, file.path('output', basename(x)))) + } + do.call(mvOut, args) + writable: false +arguments: +- mvOut.R +id: mvOut +inputs: + logFile: + type: File + inputBinding: + prefix: logFile= + separate: false +outputs: + OutDir: + type: Directory + outputBinding: + glob: output diff --git a/cwl/GAlign/ubam2bamJson.cwl b/cwl/GAlign/ubam2bamJson.cwl index 9996a95..b25951f 100644 --- a/cwl/GAlign/ubam2bamJson.cwl +++ b/cwl/GAlign/ubam2bamJson.cwl @@ -1,29 +1,29 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- Rscript -- -e -- args <- commandArgs(TRUE); fqlog <- args[1]; tmpl <- args[2]; log1 <- readLines(fqlog); - startn <- grep('Final Outputs:', log1)+1; endn <- grep('}$', log1)[1]; ubamOut <- - jsonlite::fromJSON(log1[startn:endn]); sampleName <- sub('.list', '', basename(ubamOut$ConvertPairedFastQsToUnmappedBamWf.unmapped_bam_list)); - json1 <- jsonlite::fromJSON(tmpl); json1$PreProcessingForVariantDiscovery_GATK4.sample_name - <- sampleName; json1$PreProcessingForVariantDiscovery_GATK4.flowcell_unmapped_bams_list - <- ubamOut$ConvertPairedFastQsToUnmappedBamWf.unmapped_bam_list; cat(jsonlite::toJSON(json1, - pretty = TRUE, auto_unbox = T)) -inputs: - fqlog: - type: File - inputBinding: - position: 1 - separate: true - template: - type: File - inputBinding: - position: 2 - separate: true -outputs: - json: - type: File - outputBinding: - glob: temp2.json -stdout: temp2.json +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- Rscript +- -e +- args <- commandArgs(TRUE); fqlog <- args[1]; tmpl <- args[2]; log1 <- readLines(fqlog); + startn <- grep('Final Outputs:', log1)+1; endn <- grep('}$', log1)[1]; ubamOut <- + jsonlite::fromJSON(log1[startn:endn]); sampleName <- sub('.list', '', basename(ubamOut$ConvertPairedFastQsToUnmappedBamWf.unmapped_bam_list)); + json1 <- jsonlite::fromJSON(tmpl); json1$PreProcessingForVariantDiscovery_GATK4.sample_name + <- sampleName; json1$PreProcessingForVariantDiscovery_GATK4.flowcell_unmapped_bams_list + <- ubamOut$ConvertPairedFastQsToUnmappedBamWf.unmapped_bam_list; cat(jsonlite::toJSON(json1, + pretty = TRUE, auto_unbox = T)) +inputs: + fqlog: + type: File + inputBinding: + position: 1 + separate: true + template: + type: File + inputBinding: + position: 2 + separate: true +outputs: + json: + type: File + outputBinding: + glob: temp2.json +stdout: temp2.json diff --git a/cwl/GPoN/GPoN.cwl b/cwl/GPoN/GPoN.cwl index ebd8540..c4de404 100644 --- a/cwl/GPoN/GPoN.cwl +++ b/cwl/GPoN/GPoN.cwl @@ -1,44 +1,44 @@ -cwlVersion: v1.0 -class: Workflow -inputs: - nvcf: - type: - type: array - items: File - inputBinding: - separate: true - secondaryFiles: .idx - Ref: - type: File - secondaryFiles: - - .fai - - $(self.nameroot).dict - interval: - type: File - pvcf: - type: string - gresource: - type: File? - secondaryFiles: .idx -outputs: - Pvcf: - type: File - outputSource: PoN/pout -steps: - GenomicsDB: - run: cwl/GPoN/GenomicsDB.cwl - in: - vcf: nvcf - Ref: Ref - intervals: interval - out: - - dbout - PoN: - run: cwl/GPoN/PoN.cwl - in: - db: GenomicsDB/dbout - Ref: Ref - pon: pvcf - gresource: gresource - out: - - pout +cwlVersion: v1.0 +class: Workflow +requirements: +- class: InlineJavascriptRequirement +inputs: + nvcf: + type: + type: array + items: File + secondaryFiles: .idx + Ref: + type: File + secondaryFiles: + - .fai + - ^.dict + interval: + type: File + pvcf: + type: string + gresource: + type: File? + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' +outputs: + Pvcf: + type: File + outputSource: PoN/pout +steps: + GenomicsDB: + run: GenomicsDB.cwl + in: + vcf: nvcf + Ref: Ref + intervals: interval + out: + - dbout + PoN: + run: PoN.cwl + in: + db: GenomicsDB/dbout + Ref: Ref + pon: pvcf + gresource: gresource + out: + - pout diff --git a/cwl/GPoN/GPoN.yml b/cwl/GPoN/GPoN.yml index 0967ef4..69a88e3 100644 --- a/cwl/GPoN/GPoN.yml +++ b/cwl/GPoN/GPoN.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/GPoN/GenomicsDB.cwl b/cwl/GPoN/GenomicsDB.cwl index f657036..ff15bcc 100644 --- a/cwl/GPoN/GenomicsDB.cwl +++ b/cwl/GPoN/GenomicsDB.cwl @@ -1,45 +1,45 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- gatk -- GenomicsDBImport -requirements: -- class: DockerRequirement - dockerPull: broadinstitute/gatk:latest -arguments: -- --merge-input-intervals -inputs: - vcf: - type: - type: array - items: File - inputBinding: - prefix: -V - separate: true - secondaryFiles: .idx - inputBinding: - separate: true - Ref: - type: File - secondaryFiles: - - .fai - - $(self.nameroot).dict - inputBinding: - prefix: -R - separate: true - db: - type: string - inputBinding: - prefix: --genomicsdb-workspace-path - separate: true - default: pon_db - intervals: - type: File - inputBinding: - prefix: -L - separate: true -outputs: - dbout: - type: Directory - outputBinding: - glob: $(inputs.db) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- gatk +- GenomicsDBImport +requirements: +- class: DockerRequirement + dockerPull: broadinstitute/gatk:latest +arguments: +- --merge-input-intervals +inputs: + vcf: + type: + type: array + items: File + inputBinding: + prefix: -V + separate: true + secondaryFiles: .idx + inputBinding: + separate: true + Ref: + type: File + secondaryFiles: + - .fai + - ^.dict + inputBinding: + prefix: -R + separate: true + db: + type: string + inputBinding: + prefix: --genomicsdb-workspace-path + separate: true + default: pon_db + intervals: + type: File + inputBinding: + prefix: -L + separate: true +outputs: + dbout: + type: Directory + outputBinding: + glob: $(inputs.db) diff --git a/cwl/GPoN/PoN.cwl b/cwl/GPoN/PoN.cwl index bbe14df..ca75172 100644 --- a/cwl/GPoN/PoN.cwl +++ b/cwl/GPoN/PoN.cwl @@ -1,48 +1,51 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- gatk -- CreateSomaticPanelOfNormals -requirements: -- class: DockerRequirement - dockerPull: broadinstitute/gatk:latest -- class: EnvVarRequirement - envDef: - TILEDB_DISABLE_FILE_LOCKING: '1' -arguments: -- -V -inputs: - db: - type: Directory - inputBinding: - position: 1 - prefix: gendb:// - separate: false - Ref: - type: File - secondaryFiles: - - .fai - - $(self.nameroot).dict - inputBinding: - position: 2 - prefix: -R - separate: true - pon: - type: string - inputBinding: - position: 3 - prefix: -O - separate: true - gresource: - type: File? - secondaryFiles: .idx - inputBinding: - position: 4 - prefix: --germline-resource - separate: true -outputs: - pout: - type: File - secondaryFiles: .idx - outputBinding: - glob: $(inputs.pon) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- gatk +- CreateSomaticPanelOfNormals +requirements: +- class: DockerRequirement + dockerPull: broadinstitute/gatk:latest +- class: EnvVarRequirement + envDef: + TILEDB_DISABLE_FILE_LOCKING: '1' +- class: InlineJavascriptRequirement +arguments: +- --min-sample-count +- '1' +- -V +inputs: + db: + type: Directory + inputBinding: + position: 1 + prefix: gendb:// + separate: false + Ref: + type: File + secondaryFiles: + - .fai + - ^.dict + inputBinding: + position: 2 + prefix: -R + separate: true + pon: + type: string + inputBinding: + position: 3 + prefix: -O + separate: true + gresource: + type: File? + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + inputBinding: + position: 4 + prefix: --germline-resource + separate: true +outputs: + pout: + type: File + secondaryFiles: .idx + outputBinding: + glob: $(inputs.pon) diff --git a/cwl/GenomicsDB.cwl b/cwl/GenomicsDB.cwl index f657036..ff15bcc 100644 --- a/cwl/GenomicsDB.cwl +++ b/cwl/GenomicsDB.cwl @@ -1,45 +1,45 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- gatk -- GenomicsDBImport -requirements: -- class: DockerRequirement - dockerPull: broadinstitute/gatk:latest -arguments: -- --merge-input-intervals -inputs: - vcf: - type: - type: array - items: File - inputBinding: - prefix: -V - separate: true - secondaryFiles: .idx - inputBinding: - separate: true - Ref: - type: File - secondaryFiles: - - .fai - - $(self.nameroot).dict - inputBinding: - prefix: -R - separate: true - db: - type: string - inputBinding: - prefix: --genomicsdb-workspace-path - separate: true - default: pon_db - intervals: - type: File - inputBinding: - prefix: -L - separate: true -outputs: - dbout: - type: Directory - outputBinding: - glob: $(inputs.db) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- gatk +- GenomicsDBImport +requirements: +- class: DockerRequirement + dockerPull: broadinstitute/gatk:latest +arguments: +- --merge-input-intervals +inputs: + vcf: + type: + type: array + items: File + inputBinding: + prefix: -V + separate: true + secondaryFiles: .idx + inputBinding: + separate: true + Ref: + type: File + secondaryFiles: + - .fai + - ^.dict + inputBinding: + prefix: -R + separate: true + db: + type: string + inputBinding: + prefix: --genomicsdb-workspace-path + separate: true + default: pon_db + intervals: + type: File + inputBinding: + prefix: -L + separate: true +outputs: + dbout: + type: Directory + outputBinding: + glob: $(inputs.db) diff --git a/cwl/GenomicsDB.yml b/cwl/GenomicsDB.yml index cc89f88..a262fea 100644 --- a/cwl/GenomicsDB.yml +++ b/cwl/GenomicsDB.yml @@ -1 +1 @@ -db: pon_db +db: pon_db diff --git a/cwl/GenotypeGVCFs.cwl b/cwl/GenotypeGVCFs.cwl index 32f5618..71a0524 100644 --- a/cwl/GenotypeGVCFs.cwl +++ b/cwl/GenotypeGVCFs.cwl @@ -1,34 +1,34 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- gatk -- GenotypeGVCFs -requirements: -- class: DockerRequirement - dockerPull: broadinstitute/gatk:latest -inputs: - variant: - type: File - secondaryFiles: .idx - inputBinding: - prefix: -V - separate: true - ref: - type: File - secondaryFiles: - - .fai - - $(self.nameroot).dict - inputBinding: - prefix: -R - separate: true - vout: - type: string - inputBinding: - prefix: -O - separate: true -outputs: - vcf: - type: File - secondaryFiles: .idx - outputBinding: - glob: $(inputs.vout) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- gatk +- GenotypeGVCFs +requirements: +- class: DockerRequirement + dockerPull: broadinstitute/gatk:latest +inputs: + variant: + type: File + secondaryFiles: .idx + inputBinding: + prefix: -V + separate: true + ref: + type: File + secondaryFiles: + - .fai + - $(self.nameroot).dict + inputBinding: + prefix: -R + separate: true + vout: + type: string + inputBinding: + prefix: -O + separate: true +outputs: + vcf: + type: File + secondaryFiles: .idx + outputBinding: + glob: $(inputs.vout) diff --git a/cwl/GenotypeGVCFs.yml b/cwl/GenotypeGVCFs.yml index 0967ef4..69a88e3 100644 --- a/cwl/GenotypeGVCFs.yml +++ b/cwl/GenotypeGVCFs.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/GetPileupSummaries.cwl b/cwl/GetPileupSummaries.cwl index 0bddce1..ceb59cd 100644 --- a/cwl/GetPileupSummaries.cwl +++ b/cwl/GetPileupSummaries.cwl @@ -1,36 +1,38 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- gatk -- GetPileupSummaries -requirements: -- class: DockerRequirement - dockerPull: broadinstitute/gatk:latest -inputs: - bam: - type: File - inputBinding: - prefix: -I - separate: true - vcf: - type: File - secondaryFiles: .idx - inputBinding: - prefix: -V - separate: true - interval: - type: File - secondaryFiles: .idx - inputBinding: - prefix: -L - separate: true - pileup: - type: string - inputBinding: - prefix: -O - separate: true -outputs: - pout: - type: File - outputBinding: - glob: $(inputs.pileup) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- gatk +- GetPileupSummaries +requirements: +- class: DockerRequirement + dockerPull: broadinstitute/gatk:latest +- class: InlineJavascriptRequirement +inputs: + bam: + type: File + secondaryFiles: .bai + inputBinding: + prefix: -I + separate: true + vcf: + type: File + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + inputBinding: + prefix: -V + separate: true + interval: + type: File + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + inputBinding: + prefix: -L + separate: true + pileup: + type: string + inputBinding: + prefix: -O + separate: true +outputs: + pout: + type: File + outputBinding: + glob: $(inputs.pileup) diff --git a/cwl/GetPileupSummaries.yml b/cwl/GetPileupSummaries.yml index 0967ef4..69a88e3 100644 --- a/cwl/GetPileupSummaries.yml +++ b/cwl/GetPileupSummaries.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/HaplotypeCaller.cwl b/cwl/HaplotypeCaller.cwl index 528c3bb..af0e435 100644 --- a/cwl/HaplotypeCaller.cwl +++ b/cwl/HaplotypeCaller.cwl @@ -1,51 +1,51 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- gatk -- HaplotypeCaller -requirements: -- class: DockerRequirement - dockerPull: broadinstitute/gatk:latest -inputs: - bam: - type: File - secondaryFiles: .bai - inputBinding: - prefix: -I - separate: true - interval: - type: File - inputBinding: - prefix: -L - separate: true - ref: - type: File - secondaryFiles: - - .fai - - $(self.nameroot).dict - inputBinding: - prefix: -R - separate: true - gout: - type: string - inputBinding: - prefix: -O - separate: true - emit: - type: string - inputBinding: - prefix: -ERC - separate: true - default: GVCF - downsampling: - type: int - inputBinding: - prefix: --max-reads-per-alignment-start - separate: true - default: 50 -outputs: - gvcf: - type: File - secondaryFiles: .idx - outputBinding: - glob: $(inputs.gout) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- gatk +- HaplotypeCaller +requirements: +- class: DockerRequirement + dockerPull: broadinstitute/gatk:latest +inputs: + bam: + type: File + secondaryFiles: .bai + inputBinding: + prefix: -I + separate: true + interval: + type: File + inputBinding: + prefix: -L + separate: true + ref: + type: File + secondaryFiles: + - .fai + - $(self.nameroot).dict + inputBinding: + prefix: -R + separate: true + gout: + type: string + inputBinding: + prefix: -O + separate: true + emit: + type: string + inputBinding: + prefix: -ERC + separate: true + default: GVCF + downsampling: + type: int + inputBinding: + prefix: --max-reads-per-alignment-start + separate: true + default: 50 +outputs: + gvcf: + type: File + secondaryFiles: .idx + outputBinding: + glob: $(inputs.gout) diff --git a/cwl/HaplotypeCaller.yml b/cwl/HaplotypeCaller.yml index aa629fc..263a5f5 100644 --- a/cwl/HaplotypeCaller.yml +++ b/cwl/HaplotypeCaller.yml @@ -1,2 +1,2 @@ -emit: GVCF -downsampling: 50 +emit: GVCF +downsampling: 50 diff --git a/cwl/CombineGVCFs.R~.cwl b/cwl/LearnReadOrientationModel.cwl similarity index 53% rename from cwl/CombineGVCFs.R~.cwl rename to cwl/LearnReadOrientationModel.cwl index 32f5618..8989b81 100644 --- a/cwl/CombineGVCFs.R~.cwl +++ b/cwl/LearnReadOrientationModel.cwl @@ -1,34 +1,25 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- gatk -- GenotypeGVCFs -requirements: -- class: DockerRequirement - dockerPull: broadinstitute/gatk:latest -inputs: - variant: - type: File - secondaryFiles: .idx - inputBinding: - prefix: -V - separate: true - ref: - type: File - secondaryFiles: - - .fai - - $(self.nameroot).dict - inputBinding: - prefix: -R - separate: true - vout: - type: string - inputBinding: - prefix: -O - separate: true -outputs: - vcf: - type: File - secondaryFiles: .idx - outputBinding: - glob: $(inputs.vout) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- gatk +- LearnReadOrientationModel +requirements: +- class: DockerRequirement + dockerPull: broadinstitute/gatk:latest +inputs: + f1r2: + type: File + inputBinding: + prefix: -I + separate: true + romodel: + type: string + inputBinding: + prefix: -O + separate: true + default: read-orientation-model.tar.gz +outputs: + rofile: + type: File + outputBinding: + glob: $(inputs.romodel) diff --git a/cwl/LearnReadOrientationModel.yml b/cwl/LearnReadOrientationModel.yml new file mode 100644 index 0000000..a394870 --- /dev/null +++ b/cwl/LearnReadOrientationModel.yml @@ -0,0 +1 @@ +romodel: read-orientation-model.tar.gz diff --git a/cwl/LoFreq.cwl b/cwl/LoFreq.cwl index 233822d..26d6b2a 100644 --- a/cwl/LoFreq.cwl +++ b/cwl/LoFreq.cwl @@ -1,65 +1,72 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- lofreq -- somatic -requirements: -- class: DockerRequirement - dockerPull: andreaswilm/lofreq:v2.1.2 -inputs: - tbam: - type: File - secondaryFiles: .bai - inputBinding: - prefix: -t - separate: true - nbam: - type: File - secondaryFiles: .bai - inputBinding: - prefix: -n - separate: true - ref: - type: File - secondaryFiles: .fai - inputBinding: - prefix: -f - separate: true - region: - type: File - inputBinding: - prefix: -l - separate: true - dbsnp: - type: File - secondaryFiles: .tbi - inputBinding: - prefix: -d - separate: true - out: - type: string - inputBinding: - prefix: -o - separate: true - threads: - type: int - inputBinding: - prefix: --threads - separate: true -outputs: - snp: - type: File - outputBinding: - glob: $(inputs.out)somatic_final.snvs.vcf.gz - snpdb: - type: File - outputBinding: - glob: $(inputs.out)somatic_final_minus-dbsnp.snvs.vcf.gz - indel: - type: File - outputBinding: - glob: $(inputs.out)somatic_final.indels.vcf.gz - indeldb: - type: File - outputBinding: - glob: $(inputs.out)somatic_final_minus-dbsnp.indels.vcf.gz +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- lofreq +- somatic +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/lofreq:2.1.5--py37h916d2e8_4 +- class: InlineJavascriptRequirement +arguments: +- --call-indels +inputs: + tbam: + type: File + secondaryFiles: .bai + inputBinding: + prefix: -t + separate: true + nbam: + type: File + secondaryFiles: .bai + inputBinding: + prefix: -n + separate: true + ref: + type: File + secondaryFiles: .fai + inputBinding: + prefix: -f + separate: true + region: + type: File + inputBinding: + prefix: -l + separate: true + dbsnp: + type: File + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + inputBinding: + prefix: -d + separate: true + out: + type: string + inputBinding: + prefix: -o + separate: true + threads: + type: int + inputBinding: + prefix: --threads + separate: true +outputs: + snp: + type: File + secondaryFiles: .tbi + outputBinding: + glob: $(inputs.out)somatic_final.snvs.vcf.gz + snpdb: + type: File + secondaryFiles: .tbi + outputBinding: + glob: $(inputs.out)somatic_final_minus-dbsnp.snvs.vcf.gz + indel: + type: File + secondaryFiles: .tbi + outputBinding: + glob: $(inputs.out)somatic_final.indels.vcf.gz + indeldb: + type: File + secondaryFiles: .tbi + outputBinding: + glob: $(inputs.out)somatic_final_minus-dbsnp.indels.vcf.gz diff --git a/cwl/LoFreq.yml b/cwl/LoFreq.yml index 0967ef4..69a88e3 100644 --- a/cwl/LoFreq.yml +++ b/cwl/LoFreq.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/LoFreqPL/LoFreqPL.cwl b/cwl/LoFreqPL/LoFreqPL.cwl new file mode 100644 index 0000000..c64ccba --- /dev/null +++ b/cwl/LoFreqPL/LoFreqPL.cwl @@ -0,0 +1,66 @@ +cwlVersion: v1.0 +class: Workflow +requirements: +- class: SubworkflowFeatureRequirement +inputs: + tbam: + type: File + secondaryFiles: .bai + nbam: + type: File + secondaryFiles: .bai + ref: + type: File + secondaryFiles: .fai + region: + type: File + dbsnp: + type: File + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + out: + type: string + threads: + type: int +outputs: + snp: + type: File + outputSource: lofreqCall/snp + snpdb: + type: File + outputSource: lofreqCall/snpdb + indel: + type: File + outputSource: lofreqCall/indel + indeldb: + type: File + outputSource: lofreqCall/indeldb +steps: + tbamR: + run: tbamR.cwl + in: + ref: ref + bam: tbam + out: + - ibam + nbamR: + run: nbamR.cwl + in: + ref: ref + bam: nbam + out: + - ibam + lofreqCall: + run: lofreqCall.cwl + in: + tbam: tbamR/ibam + nbam: nbamR/ibam + ref: ref + region: region + dbsnp: dbsnp + out: out + threads: threads + out: + - snp + - snpdb + - indel + - indeldb diff --git a/cwl/LoFreqPL/LoFreqPL.yml b/cwl/LoFreqPL/LoFreqPL.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/LoFreqPL/LoFreqPL.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/LoFreqPL/bamIdx.cwl b/cwl/LoFreqPL/bamIdx.cwl new file mode 100644 index 0000000..e779867 --- /dev/null +++ b/cwl/LoFreqPL/bamIdx.cwl @@ -0,0 +1,24 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- index +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.12--h9aed4be_1 +- class: InitialWorkDirRequirement + listing: + - $(inputs.bam) +inputs: + bam: + type: File + inputBinding: + position: 1 + separate: true +outputs: + idx: + type: File + secondaryFiles: + - .bai + outputBinding: + glob: $(inputs.bam.basename) diff --git a/cwl/LoFreqPL/indelq.cwl b/cwl/LoFreqPL/indelq.cwl new file mode 100644 index 0000000..c743277 --- /dev/null +++ b/cwl/LoFreqPL/indelq.cwl @@ -0,0 +1,32 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- lofreq +- indelqual +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/lofreq:2.1.5--py37h916d2e8_4 +arguments: +- --dindel +- --verbose +inputs: + ref: + type: File + secondaryFiles: .fai + inputBinding: + position: 1 + prefix: -f + separate: true + bam: + type: File + inputBinding: + position: 2 + separate: true + ibam: + type: string +outputs: + obam: + type: File + outputBinding: + glob: $(inputs.ibam) +stdout: $(inputs.ibam) diff --git a/cwl/LoFreqPL/lofreqCall.cwl b/cwl/LoFreqPL/lofreqCall.cwl new file mode 100644 index 0000000..26d6b2a --- /dev/null +++ b/cwl/LoFreqPL/lofreqCall.cwl @@ -0,0 +1,72 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- lofreq +- somatic +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/lofreq:2.1.5--py37h916d2e8_4 +- class: InlineJavascriptRequirement +arguments: +- --call-indels +inputs: + tbam: + type: File + secondaryFiles: .bai + inputBinding: + prefix: -t + separate: true + nbam: + type: File + secondaryFiles: .bai + inputBinding: + prefix: -n + separate: true + ref: + type: File + secondaryFiles: .fai + inputBinding: + prefix: -f + separate: true + region: + type: File + inputBinding: + prefix: -l + separate: true + dbsnp: + type: File + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + inputBinding: + prefix: -d + separate: true + out: + type: string + inputBinding: + prefix: -o + separate: true + threads: + type: int + inputBinding: + prefix: --threads + separate: true +outputs: + snp: + type: File + secondaryFiles: .tbi + outputBinding: + glob: $(inputs.out)somatic_final.snvs.vcf.gz + snpdb: + type: File + secondaryFiles: .tbi + outputBinding: + glob: $(inputs.out)somatic_final_minus-dbsnp.snvs.vcf.gz + indel: + type: File + secondaryFiles: .tbi + outputBinding: + glob: $(inputs.out)somatic_final.indels.vcf.gz + indeldb: + type: File + secondaryFiles: .tbi + outputBinding: + glob: $(inputs.out)somatic_final_minus-dbsnp.indels.vcf.gz diff --git a/cwl/LoFreqPL/nbamR.cwl b/cwl/LoFreqPL/nbamR.cwl new file mode 100644 index 0000000..de7c8b1 --- /dev/null +++ b/cwl/LoFreqPL/nbamR.cwl @@ -0,0 +1,49 @@ +cwlVersion: v1.0 +class: Workflow +requirements: +- class: StepInputExpressionRequirement +inputs: + ref: + type: File + secondaryFiles: .fai + bam: + type: File + secondaryFiles: .bai +outputs: + ibam: + type: File + secondaryFiles: .bai + outputSource: bamIdx/idx +steps: + realign: + run: realign.cwl + in: + ref: ref + bam: bam + vbam: + valueFrom: $(inputs.bam.nameroot)_v.bam + out: + - obam + sortBam: + run: sortBam.cwl + in: + bam: realign/obam + obam: + valueFrom: $(inputs.bam.nameroot)_sort.bam + out: + - sbam + indelq: + run: indelq.cwl + in: + ref: ref + bam: sortBam/sbam + ibam: + valueFrom: $(inputs.bam.nameroot)_i.bam + out: + - obam + bamIdx: + run: bamIdx.cwl + in: + bam: indelq/obam + out: + - idx diff --git a/cwl/LoFreqPL/realign.cwl b/cwl/LoFreqPL/realign.cwl new file mode 100644 index 0000000..c4c6c2b --- /dev/null +++ b/cwl/LoFreqPL/realign.cwl @@ -0,0 +1,32 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- lofreq +- viterbi +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/lofreq:2.1.5--py37h916d2e8_4 +arguments: +- --verbose +inputs: + ref: + type: File + secondaryFiles: .fai + inputBinding: + position: 1 + prefix: -f + separate: true + bam: + type: File + secondaryFiles: .bai + inputBinding: + position: 2 + separate: true + vbam: + type: string +outputs: + obam: + type: File + outputBinding: + glob: $(inputs.vbam) +stdout: $(inputs.vbam) diff --git a/cwl/LoFreqPL/sortBam.cwl b/cwl/LoFreqPL/sortBam.cwl new file mode 100644 index 0000000..be772d7 --- /dev/null +++ b/cwl/LoFreqPL/sortBam.cwl @@ -0,0 +1,23 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- sort +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.12--h9aed4be_1 +inputs: + bam: + type: File + inputBinding: + separate: true + obam: + type: string + inputBinding: + prefix: -o + separate: true +outputs: + sbam: + type: File + outputBinding: + glob: $(inputs.obam) diff --git a/cwl/LoFreqPL/tbamR.cwl b/cwl/LoFreqPL/tbamR.cwl new file mode 100644 index 0000000..de7c8b1 --- /dev/null +++ b/cwl/LoFreqPL/tbamR.cwl @@ -0,0 +1,49 @@ +cwlVersion: v1.0 +class: Workflow +requirements: +- class: StepInputExpressionRequirement +inputs: + ref: + type: File + secondaryFiles: .fai + bam: + type: File + secondaryFiles: .bai +outputs: + ibam: + type: File + secondaryFiles: .bai + outputSource: bamIdx/idx +steps: + realign: + run: realign.cwl + in: + ref: ref + bam: bam + vbam: + valueFrom: $(inputs.bam.nameroot)_v.bam + out: + - obam + sortBam: + run: sortBam.cwl + in: + bam: realign/obam + obam: + valueFrom: $(inputs.bam.nameroot)_sort.bam + out: + - sbam + indelq: + run: indelq.cwl + in: + ref: ref + bam: sortBam/sbam + ibam: + valueFrom: $(inputs.bam.nameroot)_i.bam + out: + - obam + bamIdx: + run: bamIdx.cwl + in: + bam: indelq/obam + out: + - idx diff --git a/cwl/LoFreqSI/LoFreqSI.cwl b/cwl/LoFreqSI/LoFreqSI.cwl new file mode 100644 index 0000000..c64ccba --- /dev/null +++ b/cwl/LoFreqSI/LoFreqSI.cwl @@ -0,0 +1,66 @@ +cwlVersion: v1.0 +class: Workflow +requirements: +- class: SubworkflowFeatureRequirement +inputs: + tbam: + type: File + secondaryFiles: .bai + nbam: + type: File + secondaryFiles: .bai + ref: + type: File + secondaryFiles: .fai + region: + type: File + dbsnp: + type: File + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + out: + type: string + threads: + type: int +outputs: + snp: + type: File + outputSource: lofreqCall/snp + snpdb: + type: File + outputSource: lofreqCall/snpdb + indel: + type: File + outputSource: lofreqCall/indel + indeldb: + type: File + outputSource: lofreqCall/indeldb +steps: + tbamR: + run: tbamR.cwl + in: + ref: ref + bam: tbam + out: + - ibam + nbamR: + run: nbamR.cwl + in: + ref: ref + bam: nbam + out: + - ibam + lofreqCall: + run: lofreqCall.cwl + in: + tbam: tbamR/ibam + nbam: nbamR/ibam + ref: ref + region: region + dbsnp: dbsnp + out: out + threads: threads + out: + - snp + - snpdb + - indel + - indeldb diff --git a/cwl/LoFreqSI/LoFreqSI.yml b/cwl/LoFreqSI/LoFreqSI.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/LoFreqSI/LoFreqSI.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/LoFreqSI/bamIdx.cwl b/cwl/LoFreqSI/bamIdx.cwl new file mode 100644 index 0000000..e779867 --- /dev/null +++ b/cwl/LoFreqSI/bamIdx.cwl @@ -0,0 +1,24 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- index +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.12--h9aed4be_1 +- class: InitialWorkDirRequirement + listing: + - $(inputs.bam) +inputs: + bam: + type: File + inputBinding: + position: 1 + separate: true +outputs: + idx: + type: File + secondaryFiles: + - .bai + outputBinding: + glob: $(inputs.bam.basename) diff --git a/cwl/LoFreqSI/indelq.cwl b/cwl/LoFreqSI/indelq.cwl new file mode 100644 index 0000000..c743277 --- /dev/null +++ b/cwl/LoFreqSI/indelq.cwl @@ -0,0 +1,32 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- lofreq +- indelqual +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/lofreq:2.1.5--py37h916d2e8_4 +arguments: +- --dindel +- --verbose +inputs: + ref: + type: File + secondaryFiles: .fai + inputBinding: + position: 1 + prefix: -f + separate: true + bam: + type: File + inputBinding: + position: 2 + separate: true + ibam: + type: string +outputs: + obam: + type: File + outputBinding: + glob: $(inputs.ibam) +stdout: $(inputs.ibam) diff --git a/cwl/LoFreqSI/lofreqCall.cwl b/cwl/LoFreqSI/lofreqCall.cwl new file mode 100644 index 0000000..26d6b2a --- /dev/null +++ b/cwl/LoFreqSI/lofreqCall.cwl @@ -0,0 +1,72 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- lofreq +- somatic +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/lofreq:2.1.5--py37h916d2e8_4 +- class: InlineJavascriptRequirement +arguments: +- --call-indels +inputs: + tbam: + type: File + secondaryFiles: .bai + inputBinding: + prefix: -t + separate: true + nbam: + type: File + secondaryFiles: .bai + inputBinding: + prefix: -n + separate: true + ref: + type: File + secondaryFiles: .fai + inputBinding: + prefix: -f + separate: true + region: + type: File + inputBinding: + prefix: -l + separate: true + dbsnp: + type: File + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + inputBinding: + prefix: -d + separate: true + out: + type: string + inputBinding: + prefix: -o + separate: true + threads: + type: int + inputBinding: + prefix: --threads + separate: true +outputs: + snp: + type: File + secondaryFiles: .tbi + outputBinding: + glob: $(inputs.out)somatic_final.snvs.vcf.gz + snpdb: + type: File + secondaryFiles: .tbi + outputBinding: + glob: $(inputs.out)somatic_final_minus-dbsnp.snvs.vcf.gz + indel: + type: File + secondaryFiles: .tbi + outputBinding: + glob: $(inputs.out)somatic_final.indels.vcf.gz + indeldb: + type: File + secondaryFiles: .tbi + outputBinding: + glob: $(inputs.out)somatic_final_minus-dbsnp.indels.vcf.gz diff --git a/cwl/LoFreqSI/nbamR.cwl b/cwl/LoFreqSI/nbamR.cwl new file mode 100644 index 0000000..1e982a3 --- /dev/null +++ b/cwl/LoFreqSI/nbamR.cwl @@ -0,0 +1,32 @@ +cwlVersion: v1.0 +class: Workflow +requirements: +- class: StepInputExpressionRequirement +inputs: + ref: + type: File + secondaryFiles: .fai + bam: + type: File + secondaryFiles: .bai +outputs: + ibam: + type: File + secondaryFiles: .bai + outputSource: bamIdx/idx +steps: + indelq: + run: indelq.cwl + in: + ref: ref + bam: bam + ibam: + valueFrom: $(inputs.bam.nameroot)_i.bam + out: + - obam + bamIdx: + run: bamIdx.cwl + in: + bam: indelq/obam + out: + - idx diff --git a/cwl/LoFreqSI/tbamR.cwl b/cwl/LoFreqSI/tbamR.cwl new file mode 100644 index 0000000..1e982a3 --- /dev/null +++ b/cwl/LoFreqSI/tbamR.cwl @@ -0,0 +1,32 @@ +cwlVersion: v1.0 +class: Workflow +requirements: +- class: StepInputExpressionRequirement +inputs: + ref: + type: File + secondaryFiles: .fai + bam: + type: File + secondaryFiles: .bai +outputs: + ibam: + type: File + secondaryFiles: .bai + outputSource: bamIdx/idx +steps: + indelq: + run: indelq.cwl + in: + ref: ref + bam: bam + ibam: + valueFrom: $(inputs.bam.nameroot)_i.bam + out: + - obam + bamIdx: + run: bamIdx.cwl + in: + bam: indelq/obam + out: + - idx diff --git a/cwl/MergeVcf_MMS.R b/cwl/MergeVcf_MMS.R new file mode 100644 index 0000000..47271c0 --- /dev/null +++ b/cwl/MergeVcf_MMS.R @@ -0,0 +1,25 @@ +.libPaths(c('/projects/rpci/songliu/qhu/miniconda3/envs/r-base/lib/R/library')) +suppressPackageStartupMessages(library(R.utils)) +args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) +MergeVcf_MMS <- +function(vcf_mt, vcf_ms, vcf_ss, vcf_si, id_t, id_n, outvcf){ + library(VariantCombiner) + ## merge mutect and muse + v_m <- MergeSomatic(vcf_mt, vcf_ms, sources = c("mutect2", "MuSE"), + GENO = c(GT = 1, DP = 1, AD = 1), + id_t = id_t, id_n = id_n, pass_only = TRUE) + ## merge strelka snv and indel + v1 <- readVcf(vcf_ss) + v2 <- readVcf(vcf_si) + v1a <- strelka_snv(v1) + v2a <- strelka_indel(v2) + v_s <- MergeSomatic(v1a, v2a, sources = c("strelka2", "strelka2"), + GENO = c(GT = 1, DP = 1, AD = 1), + id_t = id_t, id_n = id_n, pass_only = TRUE) + + vm <- MergeSomatic(v_m, v_s, sources = c("", ""), + GENO = c(GT = 1, DP = 1, AD = 1), + id_t = id_t, id_n = id_n) + writeVcf(vm, outvcf) +} +do.call(MergeVcf_MMS, args) diff --git a/cwl/MergeVcf_MMS.cwl b/cwl/MergeVcf_MMS.cwl new file mode 100644 index 0000000..02ab946 --- /dev/null +++ b/cwl/MergeVcf_MMS.cwl @@ -0,0 +1,79 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: Rscript +requirements: +- class: InitialWorkDirRequirement + listing: + - entryname: MergeVcf_MMS.R + entry: |- + .libPaths(c('/projects/rpci/songliu/qhu/miniconda3/envs/r-base/lib/R/library')) + suppressPackageStartupMessages(library(R.utils)) + args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) + MergeVcf_MMS <- + function(vcf_mt, vcf_ms, vcf_ss, vcf_si, id_t, id_n, outvcf){ + library(VariantCombiner) + ## merge mutect and muse + v_m <- MergeSomatic(vcf_mt, vcf_ms, sources = c("mutect2", "MuSE"), + GENO = c(GT = 1, DP = 1, AD = 1), + id_t = id_t, id_n = id_n, pass_only = TRUE) + ## merge strelka snv and indel + v1 <- readVcf(vcf_ss) + v2 <- readVcf(vcf_si) + v1a <- strelka_snv(v1) + v2a <- strelka_indel(v2) + v_s <- MergeSomatic(v1a, v2a, sources = c("strelka2", "strelka2"), + GENO = c(GT = 1, DP = 1, AD = 1), + id_t = id_t, id_n = id_n, pass_only = TRUE) + + vm <- MergeSomatic(v_m, v_s, sources = c("", ""), + GENO = c(GT = 1, DP = 1, AD = 1), + id_t = id_t, id_n = id_n) + writeVcf(vm, outvcf) + } + do.call(MergeVcf_MMS, args) + writable: false +- class: DockerRequirement + dockerPull: hubentu/variantcombiner +arguments: +- MergeVcf_MMS.R +inputs: + mutect: + type: File + inputBinding: + prefix: vcf_mt= + separate: false + muse: + type: File + inputBinding: + prefix: vcf_ms= + separate: false + strelka_s: + type: File + inputBinding: + prefix: vcf_ss= + separate: false + strelka_i: + type: File + inputBinding: + prefix: vcf_si= + separate: false + id_t: + type: string + inputBinding: + prefix: id_t= + separate: false + id_n: + type: string + inputBinding: + prefix: id_n= + separate: false + outvcf: + type: string + inputBinding: + prefix: outvcf= + separate: false +outputs: + ovcf: + type: File + outputBinding: + glob: $(inputs.outvcf) diff --git a/cwl/MergeVcf_MMS.yml b/cwl/MergeVcf_MMS.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/MergeVcf_MMS.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/MuSE.cwl b/cwl/MuSE.cwl index 3ecbaa4..6d6e0ad 100644 --- a/cwl/MuSE.cwl +++ b/cwl/MuSE.cwl @@ -1,80 +1,83 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- MuSEv1.0rc_submission_c039ffa -- call -requirements: -- class: DockerRequirement - dockerPull: marghoob/muse:1.0rc_c -- class: ShellCommandRequirement -arguments: -- -O -- output -- valueFrom: ' && ' - position: 5 -- valueFrom: MuSEv1.0rc_submission_c039ffa - position: 6 -- valueFrom: sump - position: 7 -- valueFrom: -I - position: 8 -- valueFrom: output.MuSE.txt - position: 9 -inputs: - tbam: - type: File - secondaryFiles: .bai - inputBinding: - position: 1 - separate: true - nbam: - type: File - secondaryFiles: .bai - inputBinding: - position: 2 - separate: true - ref: - type: File - secondaryFiles: .fai - inputBinding: - position: 3 - prefix: -f - separate: true - region: - type: File? - inputBinding: - position: 4 - prefix: -l - separate: true - dbsnp: - type: File - secondaryFiles: .tbi - inputBinding: - position: 10 - prefix: -D - separate: true - vcf: - type: string - inputBinding: - position: 11 - prefix: -O - separate: true - exome: - type: boolean - inputBinding: - position: 12 - prefix: -E - separate: true - default: true - genome: - type: boolean - inputBinding: - position: 12 - prefix: -G - separate: true - default: false -outputs: - outVcf: - type: File - outputBinding: - glob: $(inputs.vcf) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- MuSE +- call +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/muse:1.0.rc--h2e03b76_5 +- class: ShellCommandRequirement +- class: InlineJavascriptRequirement +arguments: +- -O +- output +- valueFrom: ' && ' + position: 5 + shellQuote: false +- valueFrom: MuSE + position: 6 +- valueFrom: sump + position: 7 +- valueFrom: -I + position: 8 +- valueFrom: output.MuSE.txt + position: 9 +inputs: + tbam: + type: File + secondaryFiles: .bai + inputBinding: + position: 1 + separate: true + nbam: + type: File + secondaryFiles: .bai + inputBinding: + position: 2 + separate: true + ref: + type: File + secondaryFiles: .fai + inputBinding: + position: 3 + prefix: -f + separate: true + region: + type: File? + inputBinding: + position: 4 + prefix: -l + separate: true + dbsnp: + type: File + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + inputBinding: + position: 10 + prefix: -D + separate: true + vcf: + type: string + inputBinding: + position: 11 + prefix: -O + separate: true + exome: + type: boolean + inputBinding: + position: 12 + prefix: -E + separate: true + default: true + genome: + type: boolean + inputBinding: + position: 12 + prefix: -G + separate: true + default: false +outputs: + outVcf: + type: File + secondaryFiles: .tbi? + outputBinding: + glob: $(inputs.vcf) diff --git a/cwl/MuSE.yml b/cwl/MuSE.yml index 9f1c1db..7c781fa 100644 --- a/cwl/MuSE.yml +++ b/cwl/MuSE.yml @@ -1,2 +1,2 @@ -exome: true -genome: false +exome: true +genome: false diff --git a/cwl/MuSE_scatter/MuSE_scatter.cwl b/cwl/MuSE_scatter/MuSE_scatter.cwl new file mode 100644 index 0000000..e6c5f23 --- /dev/null +++ b/cwl/MuSE_scatter/MuSE_scatter.cwl @@ -0,0 +1,72 @@ +cwlVersion: v1.2 +class: Workflow +requirements: +- class: ScatterFeatureRequirement +- class: StepInputExpressionRequirement +- class: InlineJavascriptRequirement +inputs: + tbam: + type: File + secondaryFiles: + - .bai? + - ^.bai? + nbam: + type: File + secondaryFiles: + - .bai? + - ^.bai? + region: + type: File[] + dbsnp: + type: File + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + ref: + type: File + secondaryFiles: .fai + vcf: + type: string +outputs: + ovcf: + type: File + outputSource: normVcf/Fout +steps: + MuSEchr: + run: MuSEchr.cwl + in: + tbam: tbam + nbam: nbam + dbsnp: dbsnp + vcf: vcf + ref: ref + exome: + valueFrom: $(false) + genome: + valueFrom: $(true) + region: region + out: + - outVcf + scatter: region + scatterMethod: dotproduct + mergeVcf: + run: mergeVcf.cwl + in: + ovcf: vcf + vcfs: MuSEchr/outVcf + out: + - Fout + sortVcf: + run: sortVcf.cwl + in: + ovcf: vcf + vcf: mergeVcf/Fout + out: + - Fout + normVcf: + run: normVcf.cwl + in: + ovcf: vcf + vcf: sortVcf/Fout + dup: + valueFrom: none + out: + - Fout diff --git a/cwl/MuSE_scatter/MuSE_scatter.yml b/cwl/MuSE_scatter/MuSE_scatter.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/MuSE_scatter/MuSE_scatter.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/MuSE_scatter/MuSEchr.cwl b/cwl/MuSE_scatter/MuSEchr.cwl new file mode 100644 index 0000000..e620001 --- /dev/null +++ b/cwl/MuSE_scatter/MuSEchr.cwl @@ -0,0 +1,87 @@ +cwlVersion: v1.2 +class: CommandLineTool +baseCommand: +- MuSE +- call +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/muse:1.0.rc--0 +- class: ShellCommandRequirement +- class: InlineJavascriptRequirement +arguments: +- -O +- output +- valueFrom: ' && ' + position: 5 + shellQuote: false +- valueFrom: MuSE + position: 6 +- valueFrom: sump + position: 7 +- valueFrom: -I + position: 8 +- valueFrom: output.MuSE.txt + position: 9 +inputs: + tbam: + type: File + secondaryFiles: + - .bai? + - ^.bai? + inputBinding: + position: 1 + separate: true + nbam: + type: File + secondaryFiles: + - .bai + - ^.bai? + inputBinding: + position: 2 + separate: true + ref: + type: File + secondaryFiles: .fai + inputBinding: + position: 3 + prefix: -f + separate: true + region: + type: File? + inputBinding: + position: 4 + prefix: -l + separate: true + dbsnp: + type: File + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + inputBinding: + position: 10 + prefix: -D + separate: true + vcf: + type: string + inputBinding: + position: 11 + prefix: -O + separate: true + exome: + type: boolean + inputBinding: + position: 12 + prefix: -E + separate: true + default: true + genome: + type: boolean + inputBinding: + position: 12 + prefix: -G + separate: true + default: false +outputs: + outVcf: + type: File + secondaryFiles: .tbi? + outputBinding: + glob: $(inputs.vcf) diff --git a/cwl/MuSE_scatter/mergeVcf.cwl b/cwl/MuSE_scatter/mergeVcf.cwl new file mode 100644 index 0000000..93933c2 --- /dev/null +++ b/cwl/MuSE_scatter/mergeVcf.cwl @@ -0,0 +1,40 @@ +cwlVersion: v1.2 +class: CommandLineTool +baseCommand: +- bcftools +- concat +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/bcftools:1.13--h3a49de5_0 +inputs: + ovcf: + type: string + inputBinding: + prefix: -o + separate: true + vcfs: + type: File[]? + secondaryFiles: tbi? + inputBinding: + separate: true + type: + type: string? + inputBinding: + prefix: -O + separate: true + overlap: + type: boolean? + inputBinding: + prefix: -a + separate: true + vfile: + type: File? + inputBinding: + prefix: -f + separate: true +outputs: + Fout: + type: File + secondaryFiles: .tbi? + outputBinding: + glob: $(inputs.ovcf) diff --git a/cwl/Mutect2PL/FilterOBias.cwl b/cwl/MuSE_scatter/normVcf.cwl similarity index 51% rename from cwl/Mutect2PL/FilterOBias.cwl rename to cwl/MuSE_scatter/normVcf.cwl index c1f45d4..ba5d7ec 100644 --- a/cwl/Mutect2PL/FilterOBias.cwl +++ b/cwl/MuSE_scatter/normVcf.cwl @@ -1,38 +1,35 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- gatk -- FilterByOrientationBias -requirements: -- class: DockerRequirement - dockerPull: broadinstitute/gatk:latest -inputs: - vcf: - type: File - inputBinding: - prefix: -V - separate: true - art: - type: File - inputBinding: - prefix: -P - separate: true - mode: - type: - type: array - items: string - inputBinding: - prefix: --artifact-modes - separate: true - inputBinding: - separate: true - avcf: - type: string - inputBinding: - prefix: -O - separate: true -outputs: - fout: - type: File - outputBinding: - glob: $(inputs.avcf) +cwlVersion: v1.2 +class: CommandLineTool +baseCommand: +- bcftools +- norm +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/bcftools:1.13--h3a49de5_0 +inputs: + ovcf: + type: string + inputBinding: + prefix: -o + separate: true + vcf: + type: File + secondaryFiles: .tbi? + inputBinding: + separate: true + type: + type: string? + inputBinding: + prefix: -O + separate: true + dup: + type: string? + inputBinding: + prefix: -d + separate: true +outputs: + Fout: + type: File + secondaryFiles: .tbi? + outputBinding: + glob: $(inputs.ovcf) diff --git a/cwl/MuSE_scatter/sortVcf.cwl b/cwl/MuSE_scatter/sortVcf.cwl new file mode 100644 index 0000000..a1cf4b8 --- /dev/null +++ b/cwl/MuSE_scatter/sortVcf.cwl @@ -0,0 +1,30 @@ +cwlVersion: v1.2 +class: CommandLineTool +baseCommand: +- bcftools +- sort +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/bcftools:1.13--h3a49de5_0 +inputs: + ovcf: + type: string + inputBinding: + prefix: -o + separate: true + vcf: + type: File + secondaryFiles: .tbi? + inputBinding: + separate: true + type: + type: string? + inputBinding: + prefix: -O + separate: true +outputs: + Fout: + type: File + secondaryFiles: .tbi? + outputBinding: + glob: $(inputs.ovcf) diff --git a/cwl/MuSEv2.cwl b/cwl/MuSEv2.cwl new file mode 100644 index 0000000..e620001 --- /dev/null +++ b/cwl/MuSEv2.cwl @@ -0,0 +1,87 @@ +cwlVersion: v1.2 +class: CommandLineTool +baseCommand: +- MuSE +- call +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/muse:1.0.rc--0 +- class: ShellCommandRequirement +- class: InlineJavascriptRequirement +arguments: +- -O +- output +- valueFrom: ' && ' + position: 5 + shellQuote: false +- valueFrom: MuSE + position: 6 +- valueFrom: sump + position: 7 +- valueFrom: -I + position: 8 +- valueFrom: output.MuSE.txt + position: 9 +inputs: + tbam: + type: File + secondaryFiles: + - .bai? + - ^.bai? + inputBinding: + position: 1 + separate: true + nbam: + type: File + secondaryFiles: + - .bai + - ^.bai? + inputBinding: + position: 2 + separate: true + ref: + type: File + secondaryFiles: .fai + inputBinding: + position: 3 + prefix: -f + separate: true + region: + type: File? + inputBinding: + position: 4 + prefix: -l + separate: true + dbsnp: + type: File + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + inputBinding: + position: 10 + prefix: -D + separate: true + vcf: + type: string + inputBinding: + position: 11 + prefix: -O + separate: true + exome: + type: boolean + inputBinding: + position: 12 + prefix: -E + separate: true + default: true + genome: + type: boolean + inputBinding: + position: 12 + prefix: -G + separate: true + default: false +outputs: + outVcf: + type: File + secondaryFiles: .tbi? + outputBinding: + glob: $(inputs.vcf) diff --git a/cwl/MuSEv2.yml b/cwl/MuSEv2.yml new file mode 100644 index 0000000..7c781fa --- /dev/null +++ b/cwl/MuSEv2.yml @@ -0,0 +1,2 @@ +exome: true +genome: false diff --git a/cwl/MutSigCV.cwl b/cwl/MutSigCV.cwl new file mode 100644 index 0000000..5474447 --- /dev/null +++ b/cwl/MutSigCV.cwl @@ -0,0 +1,37 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: gp_MutSigCV +requirements: +- class: DockerRequirement + dockerPull: genepattern/docker-mutsigcv:2a +inputs: + maf: + type: File + inputBinding: + position: 1 + separate: true + coverage: + type: File + inputBinding: + position: 2 + separate: true + covar: + type: File + inputBinding: + position: 3 + separate: true + sig: + type: string + inputBinding: + position: 4 + separate: true + dict: + type: File + inputBinding: + position: 5 + separate: true +outputs: + sigout: + type: File + outputBinding: + glob: $(inputs.sig).sig_genes.txt diff --git a/cwl/MutSigCV.yml b/cwl/MutSigCV.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/MutSigCV.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/Mutect2.cwl b/cwl/Mutect2.cwl index 65b1450..2e82964 100644 --- a/cwl/Mutect2.cwl +++ b/cwl/Mutect2.cwl @@ -1,64 +1,80 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- gatk -- Mutect2 -requirements: -- class: DockerRequirement - dockerPull: broadinstitute/gatk:4.1.3.0 -inputs: - tbam: - type: File - secondaryFiles: .bai - inputBinding: - prefix: -I - separate: true - nbam: - type: File? - secondaryFiles: .bai - inputBinding: - prefix: -I - separate: true - Ref: - type: File - secondaryFiles: - - .fai - - $(self.nameroot).dict - inputBinding: - prefix: -R - separate: true - normal: - type: string? - inputBinding: - prefix: -normal - separate: true - germline: - type: File? - secondaryFiles: .idx - inputBinding: - prefix: --germline-resource - separate: true - pon: - type: File? - secondaryFiles: .idx - inputBinding: - prefix: --panel-of-normals - separate: true - interval: - type: File? - inputBinding: - prefix: -L - separate: true - out: - type: string - inputBinding: - prefix: -O - separate: true -outputs: - vout: - type: File - secondaryFiles: - - .idx - - .stats - outputBinding: - glob: $(inputs.out) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- gatk +- Mutect2 +requirements: +- class: DockerRequirement + dockerPull: broadinstitute/gatk:latest +- class: InlineJavascriptRequirement +inputs: + tbam: + type: File + secondaryFiles: .bai + inputBinding: + prefix: -I + separate: true + nbam: + type: File? + secondaryFiles: .bai + inputBinding: + prefix: -I + separate: true + Ref: + type: File + secondaryFiles: + - .fai + - ^.dict + inputBinding: + prefix: -R + separate: true + normal: + type: string? + inputBinding: + prefix: -normal + separate: true + germline: + type: File? + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + inputBinding: + prefix: --germline-resource + separate: true + pon: + type: File? + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + inputBinding: + prefix: --panel-of-normals + separate: true + interval: + type: File? + inputBinding: + prefix: -L + separate: true + out: + type: string + inputBinding: + prefix: -O + separate: true + f1r2: + type: string? + inputBinding: + prefix: --f1r2-tar-gz + separate: true + default: f1r2.tar.gz + threads: + type: int? + inputBinding: + prefix: --native-pair-hmm-threads + separate: true +outputs: + vout: + type: File + secondaryFiles: + - .idx + - .stats + outputBinding: + glob: $(inputs.out) + F1r2: + type: File + outputBinding: + glob: $(inputs.f1r2) diff --git a/cwl/Mutect2.yml b/cwl/Mutect2.yml index 0967ef4..0ffa2af 100644 --- a/cwl/Mutect2.yml +++ b/cwl/Mutect2.yml @@ -1 +1 @@ -{} +f1r2: f1r2.tar.gz diff --git a/cwl/Mutect2PL/CalculateContamination.cwl b/cwl/Mutect2PL/CalculateContamination.cwl index 90ec005..8df26f0 100644 --- a/cwl/Mutect2PL/CalculateContamination.cwl +++ b/cwl/Mutect2PL/CalculateContamination.cwl @@ -1,29 +1,38 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- gatk -- CalculateContamination -requirements: -- class: DockerRequirement - dockerPull: broadinstitute/gatk:latest -inputs: - ttable: - type: File - inputBinding: - prefix: -I - separate: true - ntable: - type: File - inputBinding: - prefix: -matched - separate: true - cont: - type: string - inputBinding: - prefix: -O - separate: true -outputs: - cout: - type: File - outputBinding: - glob: $(inputs.cont) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- gatk +- CalculateContamination +requirements: +- class: DockerRequirement + dockerPull: broadinstitute/gatk:latest +inputs: + ttable: + type: File + inputBinding: + prefix: -I + separate: true + ntable: + type: File + inputBinding: + prefix: -matched + separate: true + cont: + type: string + inputBinding: + prefix: -O + separate: true + seg: + type: string + inputBinding: + prefix: -segments + separate: true +outputs: + Cout: + type: File + outputBinding: + glob: $(inputs.cont) + Seg: + type: File + outputBinding: + glob: $(inputs.seg) diff --git a/cwl/Mutect2PL/FilterMutectCalls.cwl b/cwl/Mutect2PL/FilterMutectCalls.cwl index a956658..f30ae4b 100644 --- a/cwl/Mutect2PL/FilterMutectCalls.cwl +++ b/cwl/Mutect2PL/FilterMutectCalls.cwl @@ -1,40 +1,50 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- gatk -- FilterMutectCalls -requirements: -- class: DockerRequirement - dockerPull: broadinstitute/gatk:latest -inputs: - vcf: - type: File - secondaryFiles: - - .idx - - .stats - inputBinding: - prefix: -V - separate: true - cont: - type: File - inputBinding: - prefix: --contamination-table - separate: true - fvcf: - type: string - inputBinding: - prefix: -O - separate: true - ref: - type: File - secondaryFiles: - - .fai - - $(self.nameroot).dict - inputBinding: - prefix: -R - separate: true -outputs: - fout: - type: File - outputBinding: - glob: $(inputs.fvcf) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- gatk +- FilterMutectCalls +requirements: +- class: DockerRequirement + dockerPull: broadinstitute/gatk:latest +inputs: + vcf: + type: File + secondaryFiles: + - .idx + - .stats + inputBinding: + prefix: -V + separate: true + cont: + type: File + inputBinding: + prefix: --contamination-table + separate: true + seg: + type: File + inputBinding: + prefix: --tumor-segmentation + separate: true + lro: + type: File + inputBinding: + prefix: --ob-priors + separate: true + fvcf: + type: string + inputBinding: + prefix: -O + separate: true + ref: + type: File + secondaryFiles: + - .fai + - ^.dict + inputBinding: + prefix: -R + separate: true +outputs: + fout: + type: File + outputBinding: + glob: $(inputs.fvcf) diff --git a/cwl/Mutect2PL/GetPileupSummariesN.cwl b/cwl/Mutect2PL/GetPileupSummariesN.cwl index 0bddce1..ceb59cd 100644 --- a/cwl/Mutect2PL/GetPileupSummariesN.cwl +++ b/cwl/Mutect2PL/GetPileupSummariesN.cwl @@ -1,36 +1,38 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- gatk -- GetPileupSummaries -requirements: -- class: DockerRequirement - dockerPull: broadinstitute/gatk:latest -inputs: - bam: - type: File - inputBinding: - prefix: -I - separate: true - vcf: - type: File - secondaryFiles: .idx - inputBinding: - prefix: -V - separate: true - interval: - type: File - secondaryFiles: .idx - inputBinding: - prefix: -L - separate: true - pileup: - type: string - inputBinding: - prefix: -O - separate: true -outputs: - pout: - type: File - outputBinding: - glob: $(inputs.pileup) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- gatk +- GetPileupSummaries +requirements: +- class: DockerRequirement + dockerPull: broadinstitute/gatk:latest +- class: InlineJavascriptRequirement +inputs: + bam: + type: File + secondaryFiles: .bai + inputBinding: + prefix: -I + separate: true + vcf: + type: File + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + inputBinding: + prefix: -V + separate: true + interval: + type: File + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + inputBinding: + prefix: -L + separate: true + pileup: + type: string + inputBinding: + prefix: -O + separate: true +outputs: + pout: + type: File + outputBinding: + glob: $(inputs.pileup) diff --git a/cwl/Mutect2PL/GetPileupSummariesT.cwl b/cwl/Mutect2PL/GetPileupSummariesT.cwl index 0bddce1..ceb59cd 100644 --- a/cwl/Mutect2PL/GetPileupSummariesT.cwl +++ b/cwl/Mutect2PL/GetPileupSummariesT.cwl @@ -1,36 +1,38 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- gatk -- GetPileupSummaries -requirements: -- class: DockerRequirement - dockerPull: broadinstitute/gatk:latest -inputs: - bam: - type: File - inputBinding: - prefix: -I - separate: true - vcf: - type: File - secondaryFiles: .idx - inputBinding: - prefix: -V - separate: true - interval: - type: File - secondaryFiles: .idx - inputBinding: - prefix: -L - separate: true - pileup: - type: string - inputBinding: - prefix: -O - separate: true -outputs: - pout: - type: File - outputBinding: - glob: $(inputs.pileup) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- gatk +- GetPileupSummaries +requirements: +- class: DockerRequirement + dockerPull: broadinstitute/gatk:latest +- class: InlineJavascriptRequirement +inputs: + bam: + type: File + secondaryFiles: .bai + inputBinding: + prefix: -I + separate: true + vcf: + type: File + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + inputBinding: + prefix: -V + separate: true + interval: + type: File + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + inputBinding: + prefix: -L + separate: true + pileup: + type: string + inputBinding: + prefix: -O + separate: true +outputs: + pout: + type: File + outputBinding: + glob: $(inputs.pileup) diff --git a/cwl/Mutect2PL/LearnReadOrientationModel.cwl b/cwl/Mutect2PL/LearnReadOrientationModel.cwl new file mode 100644 index 0000000..8989b81 --- /dev/null +++ b/cwl/Mutect2PL/LearnReadOrientationModel.cwl @@ -0,0 +1,25 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- gatk +- LearnReadOrientationModel +requirements: +- class: DockerRequirement + dockerPull: broadinstitute/gatk:latest +inputs: + f1r2: + type: File + inputBinding: + prefix: -I + separate: true + romodel: + type: string + inputBinding: + prefix: -O + separate: true + default: read-orientation-model.tar.gz +outputs: + rofile: + type: File + outputBinding: + glob: $(inputs.romodel) diff --git a/cwl/Mutect2PL/Mutect2.cwl b/cwl/Mutect2PL/Mutect2.cwl index 65b1450..2e82964 100644 --- a/cwl/Mutect2PL/Mutect2.cwl +++ b/cwl/Mutect2PL/Mutect2.cwl @@ -1,64 +1,80 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- gatk -- Mutect2 -requirements: -- class: DockerRequirement - dockerPull: broadinstitute/gatk:4.1.3.0 -inputs: - tbam: - type: File - secondaryFiles: .bai - inputBinding: - prefix: -I - separate: true - nbam: - type: File? - secondaryFiles: .bai - inputBinding: - prefix: -I - separate: true - Ref: - type: File - secondaryFiles: - - .fai - - $(self.nameroot).dict - inputBinding: - prefix: -R - separate: true - normal: - type: string? - inputBinding: - prefix: -normal - separate: true - germline: - type: File? - secondaryFiles: .idx - inputBinding: - prefix: --germline-resource - separate: true - pon: - type: File? - secondaryFiles: .idx - inputBinding: - prefix: --panel-of-normals - separate: true - interval: - type: File? - inputBinding: - prefix: -L - separate: true - out: - type: string - inputBinding: - prefix: -O - separate: true -outputs: - vout: - type: File - secondaryFiles: - - .idx - - .stats - outputBinding: - glob: $(inputs.out) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- gatk +- Mutect2 +requirements: +- class: DockerRequirement + dockerPull: broadinstitute/gatk:latest +- class: InlineJavascriptRequirement +inputs: + tbam: + type: File + secondaryFiles: .bai + inputBinding: + prefix: -I + separate: true + nbam: + type: File? + secondaryFiles: .bai + inputBinding: + prefix: -I + separate: true + Ref: + type: File + secondaryFiles: + - .fai + - ^.dict + inputBinding: + prefix: -R + separate: true + normal: + type: string? + inputBinding: + prefix: -normal + separate: true + germline: + type: File? + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + inputBinding: + prefix: --germline-resource + separate: true + pon: + type: File? + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + inputBinding: + prefix: --panel-of-normals + separate: true + interval: + type: File? + inputBinding: + prefix: -L + separate: true + out: + type: string + inputBinding: + prefix: -O + separate: true + f1r2: + type: string? + inputBinding: + prefix: --f1r2-tar-gz + separate: true + default: f1r2.tar.gz + threads: + type: int? + inputBinding: + prefix: --native-pair-hmm-threads + separate: true +outputs: + vout: + type: File + secondaryFiles: + - .idx + - .stats + outputBinding: + glob: $(inputs.out) + F1r2: + type: File + outputBinding: + glob: $(inputs.f1r2) diff --git a/cwl/Mutect2PL/Mutect2PL.cwl b/cwl/Mutect2PL/Mutect2PL.cwl index 5a8d6ef..3cd9005 100644 --- a/cwl/Mutect2PL/Mutect2PL.cwl +++ b/cwl/Mutect2PL/Mutect2PL.cwl @@ -1,151 +1,137 @@ -cwlVersion: v1.0 -class: Workflow -requirements: -- class: InlineJavascriptRequirement -- class: StepInputExpressionRequirement -- class: MultipleInputFeatureRequirement -inputs: - tbam: - type: File - secondaryFiles: .bai - nbam: - type: File - secondaryFiles: .bai - Ref: - type: File - secondaryFiles: - - .fai - - $(self.nameroot).dict - normal: - type: string - tumor: - type: string - gresource: - type: File - secondaryFiles: .idx - pon: - type: File - secondaryFiles: .idx - interval: - type: File - comvcf: - type: File - secondaryFiles: .idx - artMode: - type: - type: array - items: string - inputBinding: - separate: true - default: - - G/T - - C/T - filter: - type: string - default: PASS -outputs: - filterVCF: - type: File - outputSource: FilterOBias/fout - passVCF: - type: File - outputSource: bcfview/Fout - conTable: - type: File - outputSource: CalculateContamination/cout - artTable: - type: File - outputSource: ColSeqArtifact/aout -steps: - Mutect2: - run: cwl/Mutect2PL/Mutect2.cwl - in: - tbam: tbam - nbam: nbam - Ref: Ref - normal: normal - germline: gresource - pon: pon - interval: interval - out: - source: - - normal - - tumor - valueFrom: $(self[0]).$(self[1]) - out: - - vout - GetPileupSummariesT: - run: cwl/Mutect2PL/GetPileupSummariesT.cwl - in: - bam: tbam - vcf: comvcf - interval: comvcf - pileup: - valueFrom: $(inputs.bam.nameroot).ptable - out: - - pout - GetPileupSummariesN: - run: cwl/Mutect2PL/GetPileupSummariesN.cwl - in: - bam: nbam - vcf: comvcf - interval: comvcf - pileup: - valueFrom: $(inputs.bam.nameroot).ptable - out: - - pout - CalculateContamination: - run: cwl/Mutect2PL/CalculateContamination.cwl - in: - ttable: GetPileupSummariesT/pout - ntable: GetPileupSummariesN/pout - cont: - source: - - tumor - valueFrom: $(self[0]).contamination.table - out: - - cout - FilterMutectCalls: - run: cwl/Mutect2PL/FilterMutectCalls.cwl - in: - vcf: Mutect2/vout - cont: CalculateContamination/cout - ref: Ref - fvcf: - source: - - normal - - tumor - valueFrom: $(self[0]).$(self[1]).ctfiltered.vcf - out: - - fout - ColSeqArtifact: - run: cwl/Mutect2PL/ColSeqArtifact.cwl - in: - bam: tbam - ref: Ref - art: - valueFrom: $(inputs.bam.nameroot).art - out: - - aout - FilterOBias: - run: cwl/Mutect2PL/FilterOBias.cwl - in: - vcf: FilterMutectCalls/fout - art: ColSeqArtifact/aout - mode: artMode - avcf: - source: - - normal - - tumor - valueFrom: $(self[0]).$(self[1]).ctfiltered.obfiltered.vcf - out: - - fout - bcfview: - run: cwl/Mutect2PL/bcfview.cwl - in: - vcf: FilterOBias/fout - filter: filter - fout: - valueFrom: $(inputs.vcf.nameroot).PASS.vcf - out: - - Fout +cwlVersion: v1.0 +class: Workflow +requirements: +- class: InlineJavascriptRequirement +- class: StepInputExpressionRequirement +- class: MultipleInputFeatureRequirement +inputs: + tbam: + type: File + secondaryFiles: .bai + nbam: + type: File + secondaryFiles: .bai + Ref: + type: File + secondaryFiles: + - .fai + - ^.dict + normal: + type: string + tumor: + type: string + gresource: + type: File + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + pon: + type: File + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + interval: + type: File + comvcf: + type: File + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + filter: + type: string + default: PASS + threads: + type: int? +outputs: + filterVCF: + type: File + outputSource: FilterMutectCalls/fout + passVCF: + type: File + outputSource: bcfview/Fout + conTable: + type: File + outputSource: CalculateContamination/Cout + segment: + type: File + outputSource: CalculateContamination/Seg +steps: + Mutect2: + run: Mutect2.cwl + in: + tbam: tbam + nbam: nbam + Ref: Ref + normal: normal + germline: gresource + pon: pon + interval: interval + threads: threads + out: + source: + - normal + - tumor + valueFrom: $(self[0]).$(self[1]) + out: + - vout + - F1r2 + GetPileupSummariesT: + run: GetPileupSummariesT.cwl + in: + bam: tbam + vcf: comvcf + interval: comvcf + pileup: + valueFrom: $(inputs.bam.nameroot).ptable + out: + - pout + GetPileupSummariesN: + run: GetPileupSummariesN.cwl + in: + bam: nbam + vcf: comvcf + interval: comvcf + pileup: + valueFrom: $(inputs.bam.nameroot).ptable + out: + - pout + CalculateContamination: + run: CalculateContamination.cwl + in: + ttable: GetPileupSummariesT/pout + ntable: GetPileupSummariesN/pout + cont: + source: + - tumor + valueFrom: $(self).contamination.table + seg: + source: + - tumor + valueFrom: $(self).segments + out: + - Cout + - Seg + LearnReadOrientationModel: + run: LearnReadOrientationModel.cwl + in: + f1r2: Mutect2/F1r2 + out: + - rofile + FilterMutectCalls: + run: FilterMutectCalls.cwl + in: + vcf: Mutect2/vout + cont: CalculateContamination/Cout + seg: CalculateContamination/Seg + lro: LearnReadOrientationModel/rofile + ref: Ref + fvcf: + source: + - normal + - tumor + valueFrom: $(self[0]).$(self[1]).filtered.vcf + out: + - fout + bcfview: + run: bcfview.cwl + in: + vcf: FilterMutectCalls/fout + filter: filter + fout: + valueFrom: $(inputs.vcf.nameroot).PASS.vcf + out: + - Fout diff --git a/cwl/Mutect2PL/Mutect2PL.yml b/cwl/Mutect2PL/Mutect2PL.yml index 646c99d..2dd822c 100644 --- a/cwl/Mutect2PL/Mutect2PL.yml +++ b/cwl/Mutect2PL/Mutect2PL.yml @@ -1,4 +1 @@ -artMode: -- G/T -- C/T -filter: PASS +filter: PASS diff --git a/cwl/Mutect2PL/bcfview.cwl b/cwl/Mutect2PL/bcfview.cwl index 476bd81..4297877 100644 --- a/cwl/Mutect2PL/bcfview.cwl +++ b/cwl/Mutect2PL/bcfview.cwl @@ -1,60 +1,60 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- bcftools -- view -requirements: -- class: DockerRequirement - dockerPull: biocontainers/bcftools:v1.5_cv3 -inputs: - vcf: - type: File - inputBinding: - separate: true - filter: - type: string? - inputBinding: - prefix: -f - separate: true - default: PASS - fout: - type: string - inputBinding: - prefix: -o - separate: true - otype: - type: string? - inputBinding: - prefix: -O - separate: true - default: v - sample: - type: string? - inputBinding: - prefix: -s - separate: true - samplefile: - type: File? - inputBinding: - prefix: -S - separate: true - genotype: - type: string? - inputBinding: - prefix: -g - separate: true - include: - type: string? - inputBinding: - prefix: -i - separate: true - exclude: - type: string? - inputBinding: - prefix: -e - separate: true -outputs: - Fout: - type: File - outputBinding: - glob: $(inputs.fout) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- bcftools +- view +requirements: +- class: DockerRequirement + dockerPull: biocontainers/bcftools:v1.5_cv3 +inputs: + vcf: + type: File + inputBinding: + separate: true + filter: + type: string? + inputBinding: + prefix: -f + separate: true + default: PASS + fout: + type: string + inputBinding: + prefix: -o + separate: true + otype: + type: string? + inputBinding: + prefix: -O + separate: true + default: v + sample: + type: string? + inputBinding: + prefix: -s + separate: true + samplefile: + type: File? + inputBinding: + prefix: -S + separate: true + genotype: + type: string? + inputBinding: + prefix: -g + separate: true + include: + type: string? + inputBinding: + prefix: -i + separate: true + exclude: + type: string? + inputBinding: + prefix: -e + separate: true +outputs: + Fout: + type: File + outputBinding: + glob: $(inputs.fout) diff --git a/cwl/Mutect2_gatk3.cwl b/cwl/Mutect2_gatk3.cwl index 3a63dd5..33932bc 100644 --- a/cwl/Mutect2_gatk3.cwl +++ b/cwl/Mutect2_gatk3.cwl @@ -1,65 +1,65 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- java -- -jar -- /usr/GenomeAnalysisTK.jar -- -T -- MuTect2 -requirements: -- class: DockerRequirement - dockerPull: broadinstitute/gatk3:3.8-1 -inputs: - tbam: - type: File - secondaryFiles: .bai - inputBinding: - prefix: -I:tumor - separate: true - nbam: - type: File? - secondaryFiles: .bai - inputBinding: - prefix: -I:normal - separate: true - Ref: - type: File - secondaryFiles: - - .fai - - $(self.nameroot).dict - inputBinding: - prefix: -R - separate: true - dbSNP: - type: File? - secondaryFiles: .idx - inputBinding: - prefix: --dbsnp - separate: true - cosmic: - type: File? - secondaryFiles: .idx - inputBinding: - prefix: --cosmic - separate: true - interval: - type: File? - inputBinding: - prefix: -L - separate: true - out: - type: string - inputBinding: - prefix: -o - separate: true - nct: - type: int? - inputBinding: - prefix: -nct - separate: true -outputs: - vout: - type: File - secondaryFiles: .idx - outputBinding: - glob: $(inputs.out) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- java +- -jar +- /usr/GenomeAnalysisTK.jar +- -T +- MuTect2 +requirements: +- class: DockerRequirement + dockerPull: broadinstitute/gatk3:3.8-1 +inputs: + tbam: + type: File + secondaryFiles: .bai + inputBinding: + prefix: -I:tumor + separate: true + nbam: + type: File? + secondaryFiles: .bai + inputBinding: + prefix: -I:normal + separate: true + Ref: + type: File + secondaryFiles: + - .fai + - $(self.nameroot).dict + inputBinding: + prefix: -R + separate: true + dbSNP: + type: File? + secondaryFiles: .idx + inputBinding: + prefix: --dbsnp + separate: true + cosmic: + type: File? + secondaryFiles: .idx + inputBinding: + prefix: --cosmic + separate: true + interval: + type: File? + inputBinding: + prefix: -L + separate: true + out: + type: string + inputBinding: + prefix: -o + separate: true + nct: + type: int? + inputBinding: + prefix: -nct + separate: true +outputs: + vout: + type: File + secondaryFiles: .idx + outputBinding: + glob: $(inputs.out) diff --git a/cwl/Mutect2_gatk3.yml b/cwl/Mutect2_gatk3.yml index 0967ef4..69a88e3 100644 --- a/cwl/Mutect2_gatk3.yml +++ b/cwl/Mutect2_gatk3.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/Nirvana.cwl b/cwl/Nirvana.cwl new file mode 100644 index 0000000..3f15353 --- /dev/null +++ b/cwl/Nirvana.cwl @@ -0,0 +1,40 @@ +cwlVersion: v1.2 +class: CommandLineTool +baseCommand: +- dotnet +- /opt/nirvana/Nirvana.dll +requirements: +- class: DockerRequirement + dockerPull: annotation/nirvana:3.14 +arguments: +- -c +- valueFrom: $(inputs.cache.path)/Both +inputs: + cache: + type: Directory + sd: + type: Directory + inputBinding: + prefix: --sd + separate: true + ref: + type: File + inputBinding: + prefix: -r + separate: true + prefix: + type: string + inputBinding: + prefix: -o + separate: true + vcf: + type: File + inputBinding: + prefix: -i + separate: true +outputs: + out: + type: File + secondaryFiles: .jsi + outputBinding: + glob: $(inputs.prefix).json.gz diff --git a/cwl/Nirvana.yml b/cwl/Nirvana.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/Nirvana.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/Nirvana_download.cwl b/cwl/Nirvana_download.cwl new file mode 100644 index 0000000..e99edbc --- /dev/null +++ b/cwl/Nirvana_download.cwl @@ -0,0 +1,22 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- dotnet +- /opt/nirvana/Downloader.dll +requirements: +- class: DockerRequirement + dockerPull: annotation/nirvana:3.14 +arguments: +- -o +- ./ +inputs: + genome: + type: string + inputBinding: + prefix: --ga + separate: true +outputs: + data: + type: Directory[] + outputBinding: + glob: '*' diff --git a/cwl/Nirvana_download.yml b/cwl/Nirvana_download.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/Nirvana_download.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/PoN.cwl b/cwl/PoN.cwl index bbe14df..ca75172 100644 --- a/cwl/PoN.cwl +++ b/cwl/PoN.cwl @@ -1,48 +1,51 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- gatk -- CreateSomaticPanelOfNormals -requirements: -- class: DockerRequirement - dockerPull: broadinstitute/gatk:latest -- class: EnvVarRequirement - envDef: - TILEDB_DISABLE_FILE_LOCKING: '1' -arguments: -- -V -inputs: - db: - type: Directory - inputBinding: - position: 1 - prefix: gendb:// - separate: false - Ref: - type: File - secondaryFiles: - - .fai - - $(self.nameroot).dict - inputBinding: - position: 2 - prefix: -R - separate: true - pon: - type: string - inputBinding: - position: 3 - prefix: -O - separate: true - gresource: - type: File? - secondaryFiles: .idx - inputBinding: - position: 4 - prefix: --germline-resource - separate: true -outputs: - pout: - type: File - secondaryFiles: .idx - outputBinding: - glob: $(inputs.pon) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- gatk +- CreateSomaticPanelOfNormals +requirements: +- class: DockerRequirement + dockerPull: broadinstitute/gatk:latest +- class: EnvVarRequirement + envDef: + TILEDB_DISABLE_FILE_LOCKING: '1' +- class: InlineJavascriptRequirement +arguments: +- --min-sample-count +- '1' +- -V +inputs: + db: + type: Directory + inputBinding: + position: 1 + prefix: gendb:// + separate: false + Ref: + type: File + secondaryFiles: + - .fai + - ^.dict + inputBinding: + position: 2 + prefix: -R + separate: true + pon: + type: string + inputBinding: + position: 3 + prefix: -O + separate: true + gresource: + type: File? + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + inputBinding: + position: 4 + prefix: --germline-resource + separate: true +outputs: + pout: + type: File + secondaryFiles: .idx + outputBinding: + glob: $(inputs.pon) diff --git a/cwl/PoN.yml b/cwl/PoN.yml index 0967ef4..69a88e3 100644 --- a/cwl/PoN.yml +++ b/cwl/PoN.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/RSeQC/RSeQC.cwl b/cwl/RSeQC/RSeQC.cwl index 394b96d..ab8d104 100644 --- a/cwl/RSeQC/RSeQC.cwl +++ b/cwl/RSeQC/RSeQC.cwl @@ -1,54 +1,54 @@ -cwlVersion: v1.0 -class: Workflow -requirements: -- class: StepInputExpressionRequirement -inputs: - bam: - type: File - secondaryFiles: .bai - gtf: - type: File -outputs: - distribution: - type: File - outputSource: r_distribution/distOut - gCovP: - type: File - outputSource: gCoverage/gCovPDF - gCovT: - type: File - outputSource: gCoverage/gCovTXT -steps: - gtfToGenePred: - run: cwl/RSeQC/gtfToGenePred.cwl - in: - gtf: gtf - gPred: - valueFrom: $(inputs.gtf.nameroot).genePred - out: - - genePred - genePredToBed: - run: cwl/RSeQC/genePredToBed.cwl - in: - genePred: gtfToGenePred/genePred - Bed: - valueFrom: $(inputs.genePred.nameroot).bed - out: - - bed - r_distribution: - run: cwl/RSeQC/r_distribution.cwl - in: - bam: bam - bed: genePredToBed/bed - out: - - distOut - gCoverage: - run: cwl/RSeQC/gCoverage.cwl - in: - bam: bam - bed: genePredToBed/bed - prefix: - valueFrom: $(inputs.bam.nameroot) - out: - - gCovPDF - - gCovTXT +cwlVersion: v1.0 +class: Workflow +requirements: +- class: StepInputExpressionRequirement +inputs: + bam: + type: File + secondaryFiles: .bai + gtf: + type: File +outputs: + distribution: + type: File + outputSource: r_distribution/distOut + gCovP: + type: File + outputSource: gCoverage/gCovPDF + gCovT: + type: File + outputSource: gCoverage/gCovTXT +steps: + gtfToGenePred: + run: gtfToGenePred.cwl + in: + gtf: gtf + gPred: + valueFrom: $(inputs.gtf.nameroot).genePred + out: + - genePred + genePredToBed: + run: genePredToBed.cwl + in: + genePred: gtfToGenePred/genePred + Bed: + valueFrom: $(inputs.genePred.nameroot).bed + out: + - bed + r_distribution: + run: r_distribution.cwl + in: + bam: bam + bed: genePredToBed/bed + out: + - distOut + gCoverage: + run: gCoverage.cwl + in: + bam: bam + bed: genePredToBed/bed + prefix: + valueFrom: $(inputs.bam.nameroot) + out: + - gCovPDF + - gCovTXT diff --git a/cwl/RSeQC/RSeQC.yml b/cwl/RSeQC/RSeQC.yml index 0967ef4..69a88e3 100644 --- a/cwl/RSeQC/RSeQC.yml +++ b/cwl/RSeQC/RSeQC.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/RSeQC/gCoverage.cwl b/cwl/RSeQC/gCoverage.cwl index 62142c2..b494888 100644 --- a/cwl/RSeQC/gCoverage.cwl +++ b/cwl/RSeQC/gCoverage.cwl @@ -1,32 +1,32 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: geneBody_coverage.py -requirements: -- class: DockerRequirement - dockerPull: hubentu/rcwl-rnaseq -inputs: - bam: - type: File - secondaryFiles: .bai - inputBinding: - prefix: -i - separate: true - bed: - type: File - inputBinding: - prefix: -r - separate: true - prefix: - type: string - inputBinding: - prefix: -o - separate: true -outputs: - gCovPDF: - type: File - outputBinding: - glob: '*.geneBodyCoverage.curves.pdf' - gCovTXT: - type: File - outputBinding: - glob: '*.geneBodyCoverage.txt' +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: geneBody_coverage.py +requirements: +- class: DockerRequirement + dockerPull: hubentu/rcwl-rnaseq +inputs: + bam: + type: File + secondaryFiles: .bai + inputBinding: + prefix: -i + separate: true + bed: + type: File + inputBinding: + prefix: -r + separate: true + prefix: + type: string + inputBinding: + prefix: -o + separate: true +outputs: + gCovPDF: + type: File + outputBinding: + glob: '*.geneBodyCoverage.curves.pdf' + gCovTXT: + type: File + outputBinding: + glob: '*.geneBodyCoverage.txt' diff --git a/cwl/RSeQC/genePredToBed.cwl b/cwl/RSeQC/genePredToBed.cwl index da07d22..33ff2a7 100644 --- a/cwl/RSeQC/genePredToBed.cwl +++ b/cwl/RSeQC/genePredToBed.cwl @@ -1,22 +1,22 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: genePredToBed -requirements: -- class: DockerRequirement - dockerPull: hubentu/rcwl-rnaseq -inputs: - genePred: - type: File - inputBinding: - position: 1 - separate: true - Bed: - type: string - inputBinding: - position: 2 - separate: true -outputs: - bed: - type: File - outputBinding: - glob: $(inputs.Bed) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: genePredToBed +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/ucsc-genepredtobed:377--h0b8a92a_4 +inputs: + genePred: + type: File + inputBinding: + position: 1 + separate: true + Bed: + type: string + inputBinding: + position: 2 + separate: true +outputs: + bed: + type: File + outputBinding: + glob: $(inputs.Bed) diff --git a/cwl/RSeQC/gtfToGenePred.cwl b/cwl/RSeQC/gtfToGenePred.cwl index 59fd07a..d14f104 100644 --- a/cwl/RSeQC/gtfToGenePred.cwl +++ b/cwl/RSeQC/gtfToGenePred.cwl @@ -1,22 +1,24 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: gtfToGenePred -requirements: -- class: DockerRequirement - dockerPull: hubentu/rcwl-rnaseq -inputs: - gtf: - type: File - inputBinding: - position: 1 - separate: true - gPred: - type: string - inputBinding: - position: 2 - separate: true -outputs: - genePred: - type: File - outputBinding: - glob: $(inputs.gPred) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: gtfToGenePred +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/ucsc-gtftogenepred:377--h0b8a92a_4 +arguments: +- -genePredExt +inputs: + gtf: + type: File + inputBinding: + position: 1 + separate: true + gPred: + type: string + inputBinding: + position: 2 + separate: true +outputs: + genePred: + type: File + outputBinding: + glob: $(inputs.gPred) diff --git a/cwl/RSeQC/r_distribution.cwl b/cwl/RSeQC/r_distribution.cwl index d311e10..30c1c65 100644 --- a/cwl/RSeQC/r_distribution.cwl +++ b/cwl/RSeQC/r_distribution.cwl @@ -1,23 +1,24 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: read_distribution.py -requirements: -- class: DockerRequirement - dockerPull: hubentu/rcwl-rnaseq -inputs: - bam: - type: File - inputBinding: - prefix: -i - separate: true - bed: - type: File - inputBinding: - prefix: -r - separate: true -outputs: - distOut: - type: File - outputBinding: - glob: $(inputs.bam.nameroot).distribution.txt -stdout: $(inputs.bam.nameroot).distribution.txt +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: read_distribution.py +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/rseqc:4.0.0--py38h4a8c8d9_1 +inputs: + bam: + type: File + secondaryFiles: .bai + inputBinding: + prefix: -i + separate: true + bed: + type: File + inputBinding: + prefix: -r + separate: true +outputs: + distOut: + type: File + outputBinding: + glob: $(inputs.bam.nameroot).distribution.txt +stdout: $(inputs.bam.nameroot).distribution.txt diff --git a/cwl/ReadBackedPhasing.cwl b/cwl/ReadBackedPhasing.cwl index 05ab13c..a79c2e6 100644 --- a/cwl/ReadBackedPhasing.cwl +++ b/cwl/ReadBackedPhasing.cwl @@ -1,46 +1,46 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- java -- -jar -- /usr/GenomeAnalysisTK.jar -- -T -- ReadBackedPhasing -requirements: -- class: DockerRequirement - dockerPull: broadinstitute/gatk3:3.8-1 -inputs: - vcf: - type: File - inputBinding: - prefix: --variant - separate: true - bam: - type: File - secondaryFiles: .bai - inputBinding: - prefix: -I - separate: true - ref: - type: File - secondaryFiles: - - .fai - - $(self.nameroot).dict - inputBinding: - prefix: -R - separate: true - ovcf: - type: string - inputBinding: - prefix: -o - separate: true - region: - type: File - inputBinding: - prefix: -L - separate: true -outputs: - oVcf: - type: File - outputBinding: - glob: $(inputs.ovcf) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- java +- -jar +- /usr/GenomeAnalysisTK.jar +- -T +- ReadBackedPhasing +requirements: +- class: DockerRequirement + dockerPull: broadinstitute/gatk3:3.8-1 +inputs: + vcf: + type: File + inputBinding: + prefix: --variant + separate: true + bam: + type: File + secondaryFiles: .bai + inputBinding: + prefix: -I + separate: true + ref: + type: File + secondaryFiles: + - .fai + - $(self.nameroot).dict + inputBinding: + prefix: -R + separate: true + ovcf: + type: string + inputBinding: + prefix: -o + separate: true + region: + type: File + inputBinding: + prefix: -L + separate: true +outputs: + oVcf: + type: File + outputBinding: + glob: $(inputs.ovcf) diff --git a/cwl/ReadBackedPhasing.yml b/cwl/ReadBackedPhasing.yml index 0967ef4..69a88e3 100644 --- a/cwl/ReadBackedPhasing.yml +++ b/cwl/ReadBackedPhasing.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/RenameSampleInVcf.cwl b/cwl/RenameSampleInVcf.cwl index bf41fe8..49c5999 100644 --- a/cwl/RenameSampleInVcf.cwl +++ b/cwl/RenameSampleInVcf.cwl @@ -1,29 +1,29 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- picard -- RenameSampleInVcf -requirements: -- class: DockerRequirement - dockerPull: quay.io/biocontainers/picard:2.21.1--0 -inputs: - vcf: - type: File - inputBinding: - prefix: I= - separate: false - ovcf: - type: string - inputBinding: - prefix: O= - separate: false - NewName: - type: string - inputBinding: - prefix: NEW_SAMPLE_NAME= - separate: false -outputs: - oVcf: - type: File - outputBinding: - glob: $(inputs.ovcf) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- picard +- RenameSampleInVcf +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/picard:2.21.1--0 +inputs: + vcf: + type: File + inputBinding: + prefix: I= + separate: false + ovcf: + type: string + inputBinding: + prefix: O= + separate: false + NewName: + type: string + inputBinding: + prefix: NEW_SAMPLE_NAME= + separate: false +outputs: + oVcf: + type: File + outputBinding: + glob: $(inputs.ovcf) diff --git a/cwl/RenameSampleInVcf.yml b/cwl/RenameSampleInVcf.yml index 0967ef4..69a88e3 100644 --- a/cwl/RenameSampleInVcf.yml +++ b/cwl/RenameSampleInVcf.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/ReorderSam.cwl b/cwl/ReorderSam.cwl new file mode 100644 index 0000000..6cef751 --- /dev/null +++ b/cwl/ReorderSam.cwl @@ -0,0 +1,29 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- picard +- ReorderSam +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/picard:2.21.1--0 +inputs: + ibam: + type: File + inputBinding: + prefix: I= + separate: false + obam: + type: string + inputBinding: + prefix: O= + separate: false + dict: + type: File + inputBinding: + prefix: SD= + separate: false +outputs: + rBam: + type: File + outputBinding: + glob: $(inputs.obam) diff --git a/cwl/ReorderSam.yml b/cwl/ReorderSam.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/ReorderSam.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/Rsplit.R b/cwl/Rsplit.R index ff4690f..accc632 100644 --- a/cwl/Rsplit.R +++ b/cwl/Rsplit.R @@ -1,25 +1,24 @@ -.libPaths('/home/hq/R/x86_64-pc-linux-gnu-library/4.0') -suppressPackageStartupMessages(library(R.utils)) -suppressPackageStartupMessages(library(codetools)) -args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) -Rsplit <- -function(files, columns, cnames = NULL, outfile, sep = "\t", isep = ",", - fixName = TRUE){ - files <- strsplit(files, split = isep)[[1]] - columns <- strsplit(columns, split = isep)[[1]] - expL <- lapply(files, function(x){ - exp1 <- read.table(x, sep = sep, header = TRUE, row.names = 1, - check.names = FALSE, colClasses = "character") - if(fixName){ - rownames(exp1) <- sub("\\|.*", "", rownames(exp1)) - } - exp1[, columns, drop = F] - }) - Exp <- do.call(cbind, expL) - if(!is.null(cnames)){ - cnames <- strsplit(cnames, split = isep)[[1]] - colnames(Exp) <- cnames - } - write.table(Exp, file = outfile, quote = FALSE, sep = sep) -} -do.call(Rsplit, args) +.libPaths(c('/projects/rpci/songliu/qhu/miniconda3/envs/r-base/lib/R/library')) +suppressPackageStartupMessages(library(R.utils)) +args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) +Rsplit <- +function(files, columns, cnames = NULL, outfile, sep = "\t", isep = ",", + fixName = TRUE){ + files <- strsplit(files, split = isep)[[1]] + columns <- strsplit(columns, split = isep)[[1]] + expL <- lapply(files, function(x){ + exp1 <- read.table(x, sep = sep, header = TRUE, row.names = 1, + check.names = FALSE, colClasses = "character") + if(fixName){ + rownames(exp1) <- sub("\\|.*", "", rownames(exp1)) + } + exp1[, columns, drop = F] + }) + Exp <- do.call(cbind, expL) + if(!is.null(cnames)){ + cnames <- strsplit(cnames, split = isep)[[1]] + colnames(Exp) <- cnames + } + write.table(Exp, file = outfile, quote = FALSE, sep = sep) +} +do.call(Rsplit, args) diff --git a/cwl/Rsplit.cwl b/cwl/Rsplit.cwl index fb452d6..befeeeb 100644 --- a/cwl/Rsplit.cwl +++ b/cwl/Rsplit.cwl @@ -1,32 +1,62 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- Rscript -- cwl/Rsplit.R -inputs: - files: - type: File[] - inputBinding: - prefix: files= - separate: false - itemSeparator: ',' - columns: - type: string - inputBinding: - prefix: columns= - separate: false - cnames: - type: string? - inputBinding: - prefix: cnames= - separate: false - outfile: - type: string - inputBinding: - prefix: outfile= - separate: false -outputs: - outFile: - type: File - outputBinding: - glob: $(inputs.outfile) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: Rscript +requirements: +- class: InitialWorkDirRequirement + listing: + - entryname: Rsplit.R + entry: |- + .libPaths(c('/projects/rpci/songliu/qhu/miniconda3/envs/r-base/lib/R/library')) + suppressPackageStartupMessages(library(R.utils)) + args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) + Rsplit <- + function(files, columns, cnames = NULL, outfile, sep = "\t", isep = ",", + fixName = TRUE){ + files <- strsplit(files, split = isep)[[1]] + columns <- strsplit(columns, split = isep)[[1]] + expL <- lapply(files, function(x){ + exp1 <- read.table(x, sep = sep, header = TRUE, row.names = 1, + check.names = FALSE, colClasses = "character") + if(fixName){ + rownames(exp1) <- sub("\\|.*", "", rownames(exp1)) + } + exp1[, columns, drop = F] + }) + Exp <- do.call(cbind, expL) + if(!is.null(cnames)){ + cnames <- strsplit(cnames, split = isep)[[1]] + colnames(Exp) <- cnames + } + write.table(Exp, file = outfile, quote = FALSE, sep = sep) + } + do.call(Rsplit, args) + writable: false +arguments: +- Rsplit.R +inputs: + files: + type: File[] + inputBinding: + prefix: files= + separate: false + itemSeparator: ',' + columns: + type: string + inputBinding: + prefix: columns= + separate: false + cnames: + type: string? + inputBinding: + prefix: cnames= + separate: false + outfile: + type: string + inputBinding: + prefix: outfile= + separate: false +outputs: + outFile: + type: File + outputBinding: + glob: $(inputs.outfile) diff --git a/cwl/Rsplit.yml b/cwl/Rsplit.yml index 0967ef4..69a88e3 100644 --- a/cwl/Rsplit.yml +++ b/cwl/Rsplit.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/STAR.cwl b/cwl/STAR.cwl index f8bdeff..b1612f6 100644 --- a/cwl/STAR.cwl +++ b/cwl/STAR.cwl @@ -1,64 +1,64 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: STAR -requirements: -- class: DockerRequirement - dockerPull: quay.io/biocontainers/star:2.7.3a--0 -arguments: -- --outFilterMultimapNmax -- '3' -- --outSAMunmapped -- Within -- --outFilterMismatchNmax -- '2' -- --outSAMstrandField -- intronMotif -- --readFilesCommand -- zcat -- --outSAMtype -- BAM -- SortedByCoordinate -- --twopassMode -- Basic -- --quantMode -- GeneCounts -inputs: - prefix: - type: string - inputBinding: - prefix: --outFileNamePrefix - separate: true - readFilesIn: - type: File[] - inputBinding: - prefix: --readFilesIn - separate: true - genomeDir: - type: Directory - inputBinding: - prefix: --genomeDir - separate: true - sjdbGTFfile: - type: File - inputBinding: - prefix: --sjdbGTFfile - separate: true - runThreadN: - type: int - inputBinding: - prefix: --runThreadN - separate: true - default: 1 -outputs: - outBAM: - type: File - outputBinding: - glob: '*.bam' - outLog: - type: File - outputBinding: - glob: '*Log.final.out' - outCount: - type: File - outputBinding: - glob: '*ReadsPerGene.out.tab' +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: STAR +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/star:2.7.9a--h9ee0642_0 +arguments: +- --outSAMunmapped +- Within +- --outSAMstrandField +- intronMotif +- --outSAMtype +- BAM +- SortedByCoordinate +- --twopassMode +- Basic +- --quantMode +- GeneCounts +inputs: + prefix: + type: string + inputBinding: + prefix: --outFileNamePrefix + separate: true + readFilesIn: + type: File[] + inputBinding: + prefix: --readFilesIn + separate: true + genomeDir: + type: Directory + inputBinding: + prefix: --genomeDir + separate: true + sjdbGTFfile: + type: File + inputBinding: + prefix: --sjdbGTFfile + separate: true + runThreadN: + type: int + inputBinding: + prefix: --runThreadN + separate: true + default: 1 + readFileCommand: + type: string + inputBinding: + prefix: --readFilesCommand + separate: true + default: zcat +outputs: + outBAM: + type: File + outputBinding: + glob: '*.bam' + outLog: + type: File + outputBinding: + glob: '*Log.final.out' + outCount: + type: File + outputBinding: + glob: '*ReadsPerGene.out.tab' diff --git a/cwl/STAR.yml b/cwl/STAR.yml index 33759e5..22db481 100644 --- a/cwl/STAR.yml +++ b/cwl/STAR.yml @@ -1 +1,2 @@ -runThreadN: 1 +runThreadN: 1 +readFileCommand: zcat diff --git a/cwl/STAR_FFPE.cwl b/cwl/STAR_FFPE.cwl new file mode 100644 index 0000000..f33572d --- /dev/null +++ b/cwl/STAR_FFPE.cwl @@ -0,0 +1,113 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: STAR +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/star:2.7.9a--h9ee0642_0 +arguments: +- --outSAMattrRGline +- '-' +- --alignIntronMax +- '1000000' +- --alignIntronMin +- '20' +- --alignMatesGapMax +- '1000000' +- --alignSJDBoverhangMin +- '1' +- --alignSJoverhangMin +- '8' +- --alignSoftClipAtReferenceEnds +- 'Yes' +- --chimJunctionOverhangMin +- '15' +- --chimMainSegmentMultNmax +- '1' +- --chimOutType +- Junctions +- WithinBAM +- SoftClip +- --chimSegmentMin +- '15' +- --genomeLoad +- NoSharedMemory +- --limitSjdbInsertNsj +- '1200000' +- --outFilterIntronMotifs +- None +- --outFilterMatchNminOverLread +- '0.33' +- --outFilterMismatchNmax +- '999' +- --outFilterMismatchNoverLmax +- '0.1' +- --outFilterMultimapNmax +- '20' +- --outFilterScoreMinOverLread +- '0.33' +- --outFilterType +- BySJout +- --outSAMattributes +- NH +- HI +- AS +- nM +- NM +- ch +- --outSAMstrandField +- intronMotif +- --outSAMtype +- BAM +- Unsorted +- --outSAMunmapped +- Within +- --quantMode +- GeneCounts +- --readFilesCommand +- zcat +- --twopassMode +- Basic +inputs: + prefix: + type: string + inputBinding: + prefix: --outFileNamePrefix + separate: true + readFilesIn: + type: File[] + inputBinding: + prefix: --readFilesIn + separate: true + genomeDir: + type: Directory + inputBinding: + prefix: --genomeDir + separate: true + sjdbGTFfile: + type: File + inputBinding: + prefix: --sjdbGTFfile + separate: true + runThreadN: + type: int + inputBinding: + prefix: --runThreadN + separate: true + default: 1 +outputs: + outBAM: + type: File + outputBinding: + glob: '*Aligned.out.bam' + outLog: + type: File + outputBinding: + glob: '*Log.final.out' + outCount: + type: File + outputBinding: + glob: '*ReadsPerGene.out.tab' + junction: + type: File + outputBinding: + glob: '*Chimeric.out.junction' diff --git a/cwl/STAR_FFPE.yml b/cwl/STAR_FFPE.yml new file mode 100644 index 0000000..bef4eab --- /dev/null +++ b/cwl/STAR_FFPE.yml @@ -0,0 +1 @@ +runThreadN: 1 diff --git a/cwl/STAR_rMATS.cwl b/cwl/STAR_rMATS.cwl new file mode 100644 index 0000000..e0b8c2b --- /dev/null +++ b/cwl/STAR_rMATS.cwl @@ -0,0 +1,86 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: STAR +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/star:2.7.9a--h9ee0642_0 +arguments: +- --outSAMunmapped +- Within +- --outSAMstrandField +- intronMotif +- --outSAMtype +- BAM +- SortedByCoordinate +- --quantMode +- GeneCounts +inputs: + prefix: + type: string + inputBinding: + prefix: --outFileNamePrefix + separate: true + readFilesIn: + type: File[] + inputBinding: + prefix: --readFilesIn + separate: true + genomeDir: + type: Directory + inputBinding: + prefix: --genomeDir + separate: true + sjdbGTFfile: + type: File + inputBinding: + prefix: --sjdbGTFfile + separate: true + runThreadN: + type: int + inputBinding: + prefix: --runThreadN + separate: true + default: 1 + readFilesCommand: + type: string? + inputBinding: + prefix: --readFilesCommand + separate: true + twopass: + type: string? + inputBinding: + prefix: --twopassMode + separate: true + chimSegmentMin: + type: int? + inputBinding: + prefix: --chimSegmentMin + separate: true + outFilterMismatchNmax: + type: int? + inputBinding: + prefix: --outFilterMismatchNmax + separate: true + alignIntronMax: + type: int? + inputBinding: + prefix: --alignIntronMax + separate: true + alignSJDBoverhangMin: + type: int? + inputBinding: + prefix: --alignSJDBoverhangMin + separate: true +outputs: + outBAM: + type: File + outputBinding: + glob: '*.bam' + outLog: + type: File + outputBinding: + glob: '*Log.final.out' + outCount: + type: File + outputBinding: + glob: '*ReadsPerGene.out.tab' diff --git a/cwl/STAR_rMATS.yml b/cwl/STAR_rMATS.yml new file mode 100644 index 0000000..bef4eab --- /dev/null +++ b/cwl/STAR_rMATS.yml @@ -0,0 +1 @@ +runThreadN: 1 diff --git a/cwl/STARindex.cwl b/cwl/STARindex.cwl index a449586..034709b 100644 --- a/cwl/STARindex.cwl +++ b/cwl/STARindex.cwl @@ -1,37 +1,37 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: STAR -requirements: -- class: DockerRequirement - dockerPull: quay.io/biocontainers/star:2.7.5a--0 -arguments: -- --runMode -- genomeGenerate -inputs: - genomeDir: - type: string - inputBinding: - prefix: --genomeDir - separate: true - default: STARindex - genomeFastaFiles: - type: File - inputBinding: - prefix: --genomeFastaFiles - separate: true - sjdbGTFfile: - type: File - inputBinding: - prefix: --sjdbGTFfile - separate: true - runThreadN: - type: int - inputBinding: - prefix: --runThreadN - separate: true - default: 4 -outputs: - outIndex: - type: Directory - outputBinding: - glob: $(inputs.genomeDir) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: STAR +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/star:2.7.10a--h9ee0642_0 +arguments: +- --runMode +- genomeGenerate +inputs: + genomeDir: + type: string + inputBinding: + prefix: --genomeDir + separate: true + default: STARindex + genomeFastaFiles: + type: File + inputBinding: + prefix: --genomeFastaFiles + separate: true + sjdbGTFfile: + type: File + inputBinding: + prefix: --sjdbGTFfile + separate: true + runThreadN: + type: int + inputBinding: + prefix: --runThreadN + separate: true + default: 4 +outputs: + outIndex: + type: Directory + outputBinding: + glob: $(inputs.genomeDir) diff --git a/cwl/STARindex.yml b/cwl/STARindex.yml index 9ac8be7..78d0e4a 100644 --- a/cwl/STARindex.yml +++ b/cwl/STARindex.yml @@ -1,2 +1,2 @@ -genomeDir: STARindex -runThreadN: 4 +genomeDir: STARindex +runThreadN: 4 diff --git a/cwl/STARsolo.cwl b/cwl/STARsolo.cwl index 0ae6f7a..3f1b8c9 100644 --- a/cwl/STARsolo.cwl +++ b/cwl/STARsolo.cwl @@ -1,72 +1,103 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: STAR -requirements: -- class: DockerRequirement - dockerPull: quay.io/biocontainers/star:2.7.5a--0 -arguments: -- --readFilesCommand -- zcat -- --soloUMIfiltering -- MultiGeneUMI -- --soloCBmatchWLtype -- 1MM_multi_pseudocounts -inputs: - readFilesIn_cdna: - type: File[] - inputBinding: - position: 1 - prefix: --readFilesIn - separate: true - itemSeparator: ',' - readFilesIn_cb: - type: File[] - inputBinding: - position: 2 - separate: true - itemSeparator: ',' - genomeDir: - type: Directory - inputBinding: - prefix: --genomeDir - separate: true - whiteList: - type: File - inputBinding: - prefix: --soloCBwhitelist - separate: true - soloType: - type: string - inputBinding: - prefix: --soloType - separate: true - default: CB_UMI_Simple - soloUMIlen: - type: string - inputBinding: - prefix: --soloUMIlen - separate: true - default: '12' - runThreadN: - type: int - inputBinding: - prefix: --runThreadN - separate: true - default: 1 -outputs: - outAlign: - type: File - outputBinding: - glob: '*.sam' - outLog: - type: File[] - outputBinding: - glob: Log* - SJ: - type: File - outputBinding: - glob: SJ.out.tab - Solo: - type: Directory - outputBinding: - glob: Solo.out +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: STAR +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/star:2.7.10a--h9ee0642_0 +arguments: +- --outSAMtype +- BAM +- SortedByCoordinate +- --soloUMIfiltering +- MultiGeneUMI +- --soloCBmatchWLtype +- 1MM_multi_pseudocounts +inputs: + readFilesIn_cdna: + type: File[] + inputBinding: + position: 1 + prefix: --readFilesIn + separate: true + itemSeparator: ',' + readFilesIn_cb: + type: File[] + inputBinding: + position: 2 + separate: true + itemSeparator: ',' + genomeDir: + type: Directory + inputBinding: + prefix: --genomeDir + separate: true + whiteList: + type: File + inputBinding: + prefix: --soloCBwhitelist + separate: true + soloType: + type: string + inputBinding: + prefix: --soloType + separate: true + default: Droplet + soloUMIlen: + type: string + inputBinding: + prefix: --soloUMIlen + separate: true + default: '12' + soloCellFilter: + type: string + inputBinding: + prefix: --soloCellFilter + separate: true + outSAMattributes: + type: string[] + inputBinding: + prefix: outSAMattributes + separate: true + default: + - NH + - HI + - nM + - AS + - CR + - UR + - CB + - UB + - GX + - GN + - sS + - sQ + - sM + readFilesCommand: + type: string + inputBinding: + prefix: --readFilesCommand + separate: true + default: zcat + runThreadN: + type: int + inputBinding: + prefix: --runThreadN + separate: true + default: 1 +outputs: + outAlign: + type: File + outputBinding: + glob: '*.bam' + outLog: + type: File[] + outputBinding: + glob: Log* + SJ: + type: File + outputBinding: + glob: SJ.out.tab + Solo: + type: Directory + outputBinding: + glob: Solo.out diff --git a/cwl/STARsolo.yml b/cwl/STARsolo.yml index e983ca6..f3266f5 100644 --- a/cwl/STARsolo.yml +++ b/cwl/STARsolo.yml @@ -1,3 +1,18 @@ -soloType: CB_UMI_Simple -soloUMIlen: '12' -runThreadN: 1 +soloType: Droplet +soloUMIlen: '12' +outSAMattributes: +- NH +- HI +- nM +- AS +- CR +- UR +- CB +- UB +- GX +- GN +- sS +- sQ +- sM +readFilesCommand: zcat +runThreadN: 1 diff --git a/cwl/STARsolo2sce/STARsolo.cwl b/cwl/STARsolo2sce/STARsolo.cwl new file mode 100644 index 0000000..3f1b8c9 --- /dev/null +++ b/cwl/STARsolo2sce/STARsolo.cwl @@ -0,0 +1,103 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: STAR +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/star:2.7.10a--h9ee0642_0 +arguments: +- --outSAMtype +- BAM +- SortedByCoordinate +- --soloUMIfiltering +- MultiGeneUMI +- --soloCBmatchWLtype +- 1MM_multi_pseudocounts +inputs: + readFilesIn_cdna: + type: File[] + inputBinding: + position: 1 + prefix: --readFilesIn + separate: true + itemSeparator: ',' + readFilesIn_cb: + type: File[] + inputBinding: + position: 2 + separate: true + itemSeparator: ',' + genomeDir: + type: Directory + inputBinding: + prefix: --genomeDir + separate: true + whiteList: + type: File + inputBinding: + prefix: --soloCBwhitelist + separate: true + soloType: + type: string + inputBinding: + prefix: --soloType + separate: true + default: Droplet + soloUMIlen: + type: string + inputBinding: + prefix: --soloUMIlen + separate: true + default: '12' + soloCellFilter: + type: string + inputBinding: + prefix: --soloCellFilter + separate: true + outSAMattributes: + type: string[] + inputBinding: + prefix: outSAMattributes + separate: true + default: + - NH + - HI + - nM + - AS + - CR + - UR + - CB + - UB + - GX + - GN + - sS + - sQ + - sM + readFilesCommand: + type: string + inputBinding: + prefix: --readFilesCommand + separate: true + default: zcat + runThreadN: + type: int + inputBinding: + prefix: --runThreadN + separate: true + default: 1 +outputs: + outAlign: + type: File + outputBinding: + glob: '*.bam' + outLog: + type: File[] + outputBinding: + glob: Log* + SJ: + type: File + outputBinding: + glob: SJ.out.tab + Solo: + type: Directory + outputBinding: + glob: Solo.out diff --git a/cwl/STARsolo2sce/STARsolo2sce.cwl b/cwl/STARsolo2sce/STARsolo2sce.cwl new file mode 100644 index 0000000..16592bd --- /dev/null +++ b/cwl/STARsolo2sce/STARsolo2sce.cwl @@ -0,0 +1,46 @@ +cwlVersion: v1.0 +class: Workflow +inputs: + fastq_cdna: + type: File[] + fastq_cb: + type: File[] + genomeDir: + type: Directory + whiteList: + type: File + runThreadN: + type: int + soloCellFilter: + type: string +outputs: + sam: + type: File + outputSource: STARsolo/outAlign + Solo: + type: Directory + outputSource: STARsolo/Solo + sce: + type: File + outputSource: counts2sce/outsce +steps: + STARsolo: + run: STARsolo.cwl + in: + readFilesIn_cdna: fastq_cdna + readFilesIn_cb: fastq_cb + genomeDir: genomeDir + whiteList: whiteList + soloCellFilter: soloCellFilter + runThreadN: runThreadN + out: + - outAlign + - outLog + - SJ + - Solo + counts2sce: + run: counts2sce.cwl + in: + dirname: STARsolo/Solo + out: + - outsce diff --git a/cwl/STARsolo2sce/STARsolo2sce.yml b/cwl/STARsolo2sce/STARsolo2sce.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/STARsolo2sce/STARsolo2sce.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/STARsolo2sce/counts2sce.R b/cwl/STARsolo2sce/counts2sce.R new file mode 100644 index 0000000..d9853f4 --- /dev/null +++ b/cwl/STARsolo2sce/counts2sce.R @@ -0,0 +1,10 @@ +suppressPackageStartupMessages(library(R.utils)) +args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) +counts2sce <- +function(dir.name, ...) { + library(DropletUtils) + dir.name <- file.path(dir.name, "Gene/filtered") + sce <- read10xCounts(dir.name, ...) + saveRDS(sce, file = "counts_sce.rds") +} +do.call(counts2sce, args) diff --git a/cwl/STARsolo2sce/counts2sce.cwl b/cwl/STARsolo2sce/counts2sce.cwl new file mode 100644 index 0000000..75f8d8a --- /dev/null +++ b/cwl/STARsolo2sce/counts2sce.cwl @@ -0,0 +1,25 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: Rscript +requirements: +- class: InitialWorkDirRequirement + listing: + - entryname: counts2sce.R + entry: "suppressPackageStartupMessages(library(R.utils))\nargs <- commandArgs(trailingOnly + = TRUE, asValues = TRUE)\ncounts2sce <-\nfunction(dir.name, ...) { \n library(DropletUtils)\n + \ dir.name <- file.path(dir.name, \"Gene/filtered\")\n sce <- read10xCounts(dir.name, + ...)\n saveRDS(sce, file = \"counts_sce.rds\")\n}\ndo.call(counts2sce, args)" + writable: false +arguments: +- counts2sce.R +inputs: + dirname: + type: Directory + inputBinding: + prefix: dir.name= + separate: false +outputs: + outsce: + type: File + outputBinding: + glob: '*.rds' diff --git a/cwl/STARsoloDropletUtils/DropletUtils.R b/cwl/STARsoloDropletUtils/DropletUtils.R index 9ddadce..bfe99b6 100644 --- a/cwl/STARsoloDropletUtils/DropletUtils.R +++ b/cwl/STARsoloDropletUtils/DropletUtils.R @@ -1,31 +1,29 @@ -.libPaths('/home/hq/R/x86_64-pc-linux-gnu-library/4.0') -suppressPackageStartupMessages(library(R.utils)) -suppressPackageStartupMessages(library(codetools)) -args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) -args[["lower"]] <- as.integer(args[["lower"]]) -args[["df"]] <- as.integer(args[["df"]]) -DropletUtils <- -function(dir.name, lower=100, df=20, ...) { - library(DropletUtils) - dir.name <- file.path(dir.name, "Gene/raw") - sce <- read10xCounts(dir.name, ...) - br.out <- barcodeRanks(assay(sce), lower=lower, df=df) - o <- order(br.out$rank) - e.out <- emptyDrops(assay(sce)) - is.cell <- e.out$FDR <= 0.01 - pdf(file = "diagnostics.pdf") - plot(br.out$rank, br.out$total, log="xy", xlab="Rank", ylab="Total", - main = "Barcode Ranks") - lines(br.out$rank[o], br.out$fitted[o], col="red") - abline(h=metadata(br.out)$knee, col="dodgerblue", lty=2) - abline(h=metadata(br.out)$inflection, col="forestgreen", lty=2) - legend("bottomleft", lty=2, col=c("dodgerblue", "forestgreen"), - legend=c("knee", "inflection")) - plot(e.out$Total, -e.out$LogProb, col=ifelse(is.cell, "red", "black"), - xlab="Total UMI count", ylab="-Log Probability", - main = "Empty Droplets") - dev.off() - sce1 <- sce[, which(is.cell == "TRUE")] - saveRDS(sce1, file = "sce_filtered.rds") -} -do.call(DropletUtils, args) +suppressPackageStartupMessages(library(R.utils)) +args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) +args[["lower"]] <- as.integer(args[["lower"]]) +args[["df"]] <- as.integer(args[["df"]]) +DropletUtils <- +function(dir.name, lower=100, df=20, ...) { + library(DropletUtils) + dir.name <- file.path(dir.name, "Gene/raw") + sce <- read10xCounts(dir.name, ...) + br.out <- barcodeRanks(assay(sce), lower=lower, df=df) + o <- order(br.out$rank) + e.out <- emptyDrops(assay(sce)) + is.cell <- e.out$FDR <= 0.01 + pdf(file = "diagnostics.pdf") + plot(br.out$rank, br.out$total, log="xy", xlab="Rank", ylab="Total", + main = "Barcode Ranks") + lines(br.out$rank[o], br.out$fitted[o], col="red") + abline(h=metadata(br.out)$knee, col="dodgerblue", lty=2) + abline(h=metadata(br.out)$inflection, col="forestgreen", lty=2) + legend("bottomleft", lty=2, col=c("dodgerblue", "forestgreen"), + legend=c("knee", "inflection")) + plot(e.out$Total, -e.out$LogProb, col=ifelse(is.cell, "red", "black"), + xlab="Total UMI count", ylab="-Log Probability", + main = "Empty Droplets") + dev.off() + sce1 <- sce[, which(is.cell == "TRUE")] + saveRDS(sce1, file = "sce_filtered.rds") +} +do.call(DropletUtils, args) diff --git a/cwl/STARsoloDropletUtils/DropletUtils.cwl b/cwl/STARsoloDropletUtils/DropletUtils.cwl index 02ac162..cb90088 100644 --- a/cwl/STARsoloDropletUtils/DropletUtils.cwl +++ b/cwl/STARsoloDropletUtils/DropletUtils.cwl @@ -1,32 +1,53 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- Rscript -- cwl/STARsoloDropletUtils/DropletUtils.R -inputs: - dirname: - type: Directory - inputBinding: - prefix: dir.name= - separate: false - lower: - type: int - inputBinding: - prefix: lower= - separate: false - default: 100 - df: - type: int - inputBinding: - prefix: df= - separate: false - default: 20 -outputs: - plots: - type: File - outputBinding: - glob: '*.pdf' - outsce: - type: File - outputBinding: - glob: '*.rds' +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: Rscript +requirements: +- class: InitialWorkDirRequirement + listing: + - entryname: DropletUtils.R + entry: "suppressPackageStartupMessages(library(R.utils))\nargs <- commandArgs(trailingOnly + = TRUE, asValues = TRUE)\nargs[[\"lower\"]] <- as.integer(args[[\"lower\"]])\nargs[[\"df\"]] + <- as.integer(args[[\"df\"]])\nDropletUtils <-\nfunction(dir.name, lower=100, + df=20, ...) { \n library(DropletUtils)\n dir.name <- file.path(dir.name, + \"Gene/raw\")\n sce <- read10xCounts(dir.name, ...)\n br.out <- barcodeRanks(assay(sce), + lower=lower, df=df)\n o <- order(br.out$rank)\n e.out <- emptyDrops(assay(sce))\n + \ is.cell <- e.out$FDR <= 0.01\n pdf(file = \"diagnostics.pdf\")\n plot(br.out$rank, + br.out$total, log=\"xy\", xlab=\"Rank\", ylab=\"Total\",\n main = \"Barcode + Ranks\")\n lines(br.out$rank[o], br.out$fitted[o], col=\"red\")\n abline(h=metadata(br.out)$knee, + col=\"dodgerblue\", lty=2)\n abline(h=metadata(br.out)$inflection, col=\"forestgreen\", + lty=2)\n legend(\"bottomleft\", lty=2, col=c(\"dodgerblue\", \"forestgreen\"),\n + \ legend=c(\"knee\", \"inflection\"))\n plot(e.out$Total, -e.out$LogProb, + col=ifelse(is.cell, \"red\", \"black\"),\n xlab=\"Total UMI count\", + ylab=\"-Log Probability\",\n main = \"Empty Droplets\")\n dev.off()\n + \ sce1 <- sce[, which(is.cell == \"TRUE\")]\n saveRDS(sce1, file = \"sce_filtered.rds\")\n}\ndo.call(DropletUtils, + args)" + writable: false +arguments: +- DropletUtils.R +inputs: + dirname: + type: Directory + inputBinding: + prefix: dir.name= + separate: false + lower: + type: int + inputBinding: + prefix: lower= + separate: false + default: 100 + df: + type: int + inputBinding: + prefix: df= + separate: false + default: 20 +outputs: + plots: + type: File + outputBinding: + glob: '*.pdf' + outsce: + type: File + outputBinding: + glob: '*.rds' diff --git a/cwl/STARsoloDropletUtils/STARsolo.cwl b/cwl/STARsoloDropletUtils/STARsolo.cwl index 0ae6f7a..3f1b8c9 100644 --- a/cwl/STARsoloDropletUtils/STARsolo.cwl +++ b/cwl/STARsoloDropletUtils/STARsolo.cwl @@ -1,72 +1,103 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: STAR -requirements: -- class: DockerRequirement - dockerPull: quay.io/biocontainers/star:2.7.5a--0 -arguments: -- --readFilesCommand -- zcat -- --soloUMIfiltering -- MultiGeneUMI -- --soloCBmatchWLtype -- 1MM_multi_pseudocounts -inputs: - readFilesIn_cdna: - type: File[] - inputBinding: - position: 1 - prefix: --readFilesIn - separate: true - itemSeparator: ',' - readFilesIn_cb: - type: File[] - inputBinding: - position: 2 - separate: true - itemSeparator: ',' - genomeDir: - type: Directory - inputBinding: - prefix: --genomeDir - separate: true - whiteList: - type: File - inputBinding: - prefix: --soloCBwhitelist - separate: true - soloType: - type: string - inputBinding: - prefix: --soloType - separate: true - default: CB_UMI_Simple - soloUMIlen: - type: string - inputBinding: - prefix: --soloUMIlen - separate: true - default: '12' - runThreadN: - type: int - inputBinding: - prefix: --runThreadN - separate: true - default: 1 -outputs: - outAlign: - type: File - outputBinding: - glob: '*.sam' - outLog: - type: File[] - outputBinding: - glob: Log* - SJ: - type: File - outputBinding: - glob: SJ.out.tab - Solo: - type: Directory - outputBinding: - glob: Solo.out +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: STAR +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/star:2.7.10a--h9ee0642_0 +arguments: +- --outSAMtype +- BAM +- SortedByCoordinate +- --soloUMIfiltering +- MultiGeneUMI +- --soloCBmatchWLtype +- 1MM_multi_pseudocounts +inputs: + readFilesIn_cdna: + type: File[] + inputBinding: + position: 1 + prefix: --readFilesIn + separate: true + itemSeparator: ',' + readFilesIn_cb: + type: File[] + inputBinding: + position: 2 + separate: true + itemSeparator: ',' + genomeDir: + type: Directory + inputBinding: + prefix: --genomeDir + separate: true + whiteList: + type: File + inputBinding: + prefix: --soloCBwhitelist + separate: true + soloType: + type: string + inputBinding: + prefix: --soloType + separate: true + default: Droplet + soloUMIlen: + type: string + inputBinding: + prefix: --soloUMIlen + separate: true + default: '12' + soloCellFilter: + type: string + inputBinding: + prefix: --soloCellFilter + separate: true + outSAMattributes: + type: string[] + inputBinding: + prefix: outSAMattributes + separate: true + default: + - NH + - HI + - nM + - AS + - CR + - UR + - CB + - UB + - GX + - GN + - sS + - sQ + - sM + readFilesCommand: + type: string + inputBinding: + prefix: --readFilesCommand + separate: true + default: zcat + runThreadN: + type: int + inputBinding: + prefix: --runThreadN + separate: true + default: 1 +outputs: + outAlign: + type: File + outputBinding: + glob: '*.bam' + outLog: + type: File[] + outputBinding: + glob: Log* + SJ: + type: File + outputBinding: + glob: SJ.out.tab + Solo: + type: Directory + outputBinding: + glob: Solo.out diff --git a/cwl/STARsoloDropletUtils/STARsoloDropletUtils.cwl b/cwl/STARsoloDropletUtils/STARsoloDropletUtils.cwl index 5af6c23..411bd47 100644 --- a/cwl/STARsoloDropletUtils/STARsoloDropletUtils.cwl +++ b/cwl/STARsoloDropletUtils/STARsoloDropletUtils.cwl @@ -1,47 +1,50 @@ -cwlVersion: v1.0 -class: Workflow -inputs: - fastq_cdna: - type: File[] - fastq_cb: - type: File[] - genomeDir: - type: Directory - whiteList: - type: File - runThreadN: - type: int -outputs: - sam: - type: File - outputSource: STARsolo/outAlign - Solo: - type: Directory - outputSource: STARsolo/Solo - sce: - type: File - outputSource: DropletUtils/outsce - plots: - type: File - outputSource: DropletUtils/plots -steps: - STARsolo: - run: cwl/STARsoloDropletUtils/STARsolo.cwl - in: - readFilesIn_cdna: fastq_cdna - readFilesIn_cb: fastq_cb - genomeDir: genomeDir - whiteList: whiteList - runThreadN: runThreadN - out: - - outAlign - - outLog - - SJ - - Solo - DropletUtils: - run: cwl/STARsoloDropletUtils/DropletUtils.cwl - in: - dirname: STARsolo/Solo - out: - - plots - - outsce +cwlVersion: v1.0 +class: Workflow +inputs: + fastq_cdna: + type: File[] + fastq_cb: + type: File[] + genomeDir: + type: Directory + whiteList: + type: File + runThreadN: + type: int + soloCellFilter: + type: string +outputs: + sam: + type: File + outputSource: STARsolo/outAlign + Solo: + type: Directory + outputSource: STARsolo/Solo + sce: + type: File + outputSource: DropletUtils/outsce + plots: + type: File + outputSource: DropletUtils/plots +steps: + STARsolo: + run: STARsolo.cwl + in: + readFilesIn_cdna: fastq_cdna + readFilesIn_cb: fastq_cb + genomeDir: genomeDir + whiteList: whiteList + soloCellFilter: soloCellFilter + runThreadN: runThreadN + out: + - outAlign + - outLog + - SJ + - Solo + DropletUtils: + run: DropletUtils.cwl + in: + dirname: STARsolo/Solo + out: + - plots + - outsce diff --git a/cwl/STARsoloDropletUtils/STARsoloDropletUtils.yml b/cwl/STARsoloDropletUtils/STARsoloDropletUtils.yml index 0967ef4..69a88e3 100644 --- a/cwl/STARsoloDropletUtils/STARsoloDropletUtils.yml +++ b/cwl/STARsoloDropletUtils/STARsoloDropletUtils.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/SUPPA/SUPPA.cwl b/cwl/SUPPA/SUPPA.cwl index fcc6096..060df71 100644 --- a/cwl/SUPPA/SUPPA.cwl +++ b/cwl/SUPPA/SUPPA.cwl @@ -1,131 +1,131 @@ -cwlVersion: v1.0 -class: Workflow -requirements: -- class: MultipleInputFeatureRequirement -- class: InlineJavascriptRequirement -- class: StepInputExpressionRequirement -inputs: - quant: - type: File[] - qcolumn: - type: string - default: TPM - qcnames: - type: string - gtf: - type: File - group1: - type: string - group2: - type: string - method: - type: string - default: empirical -outputs: - res: - type: File[] - outputSource: diffSplice/outFile -steps: - quantMerge: - run: cwl/SUPPA/quantMerge.cwl - in: - files: quant - columns: qcolumn - cnames: qcnames - outfile: - valueFrom: iso_tpm.txt - out: - - outFile - genEvents: - run: cwl/SUPPA/genEvents.cwl - in: - gtf: gtf - outfile: - valueFrom: events - out: - - outGTF - - outIOE - mergeEvents: - run: cwl/SUPPA/mergeEvents.cwl - in: - files: genEvents/outIOE - outfile: - valueFrom: merged.ioe - out: - - out - psiPerEvent: - run: cwl/SUPPA/psiPerEvent.cwl - in: - ioe: mergeEvents/out - exp: quantMerge/outFile - outfile: - valueFrom: events - out: - - outFile - splitEventsG1: - run: cwl/SUPPA/splitEventsG1.cwl - in: - files: - source: - - psiPerEvent/outFile - linkMerge: merge_flattened - outfile: - valueFrom: group1.psi - columns: group1 - out: - - outFile - splitEventsG2: - run: cwl/SUPPA/splitEventsG2.cwl - in: - files: - source: - - psiPerEvent/outFile - linkMerge: merge_flattened - outfile: - valueFrom: group2.psi - columns: group2 - out: - - outFile - splitExpG1: - run: cwl/SUPPA/splitExpG1.cwl - in: - files: - source: - - quantMerge/outFile - linkMerge: merge_flattened - outfile: - valueFrom: group1.tpm - columns: group1 - out: - - outFile - splitExpG2: - run: cwl/SUPPA/splitExpG2.cwl - in: - files: - source: - - quantMerge/outFile - linkMerge: merge_flattened - outfile: - valueFrom: group2.tpm - columns: group2 - out: - - outFile - diffSplice: - run: cwl/SUPPA/diffSplice.cwl - in: - iox: mergeEvents/out - method: method - psi: - source: - - splitEventsG1/outFile - - splitEventsG2/outFile - linkMerge: merge_flattened - exp: - source: - - splitExpG1/outFile - - splitExpG2/outFile - linkMerge: merge_flattened - output: - valueFrom: diffSplice - out: - - outFile +cwlVersion: v1.0 +class: Workflow +requirements: +- class: MultipleInputFeatureRequirement +- class: InlineJavascriptRequirement +- class: StepInputExpressionRequirement +inputs: + quant: + type: File[] + qcolumn: + type: string + default: TPM + qcnames: + type: string + gtf: + type: File + group1: + type: string + group2: + type: string + method: + type: string + default: empirical +outputs: + res: + type: File[] + outputSource: diffSplice/outFile +steps: + quantMerge: + run: quantMerge.cwl + in: + files: quant + columns: qcolumn + cnames: qcnames + outfile: + valueFrom: iso_tpm.txt + out: + - outFile + genEvents: + run: genEvents.cwl + in: + gtf: gtf + outfile: + valueFrom: events + out: + - outGTF + - outIOE + mergeEvents: + run: mergeEvents.cwl + in: + files: genEvents/outIOE + outfile: + valueFrom: merged.ioe + out: + - out + psiPerEvent: + run: psiPerEvent.cwl + in: + ioe: mergeEvents/out + exp: quantMerge/outFile + outfile: + valueFrom: events + out: + - outFile + splitEventsG1: + run: splitEventsG1.cwl + in: + files: + source: + - psiPerEvent/outFile + linkMerge: merge_flattened + outfile: + valueFrom: group1.psi + columns: group1 + out: + - outFile + splitEventsG2: + run: splitEventsG2.cwl + in: + files: + source: + - psiPerEvent/outFile + linkMerge: merge_flattened + outfile: + valueFrom: group2.psi + columns: group2 + out: + - outFile + splitExpG1: + run: splitExpG1.cwl + in: + files: + source: + - quantMerge/outFile + linkMerge: merge_flattened + outfile: + valueFrom: group1.tpm + columns: group1 + out: + - outFile + splitExpG2: + run: splitExpG2.cwl + in: + files: + source: + - quantMerge/outFile + linkMerge: merge_flattened + outfile: + valueFrom: group2.tpm + columns: group2 + out: + - outFile + diffSplice: + run: diffSplice.cwl + in: + iox: mergeEvents/out + method: method + psi: + source: + - splitEventsG1/outFile + - splitEventsG2/outFile + linkMerge: merge_flattened + exp: + source: + - splitExpG1/outFile + - splitExpG2/outFile + linkMerge: merge_flattened + output: + valueFrom: diffSplice + out: + - outFile diff --git a/cwl/SUPPA/SUPPA.yml b/cwl/SUPPA/SUPPA.yml index 94fed6a..2566adf 100644 --- a/cwl/SUPPA/SUPPA.yml +++ b/cwl/SUPPA/SUPPA.yml @@ -1,2 +1,2 @@ -qcolumn: TPM -method: empirical +qcolumn: TPM +method: empirical diff --git a/cwl/SUPPA/diffSplice.cwl b/cwl/SUPPA/diffSplice.cwl index 56c5771..74a24c2 100644 --- a/cwl/SUPPA/diffSplice.cwl +++ b/cwl/SUPPA/diffSplice.cwl @@ -1,52 +1,52 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- python -- /opt/SUPPA/suppa.py -- diffSplice -requirements: -- class: DockerRequirement - dockerPull: hubentu/suppa -inputs: - method: - type: string - inputBinding: - prefix: -m - separate: true - iox: - type: File - inputBinding: - prefix: -i - separate: true - psi: - type: File[] - inputBinding: - prefix: -p - separate: true - exp: - type: File[] - inputBinding: - prefix: -e - separate: true - output: - type: string - inputBinding: - prefix: -o - separate: true - gc: - type: boolean - inputBinding: - prefix: -gc - separate: true - default: true - paired: - type: boolean - inputBinding: - prefix: -pa - separate: true - default: false -outputs: - outFile: - type: File[] - outputBinding: - glob: $(inputs.output)* +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- python +- /opt/SUPPA/suppa.py +- diffSplice +requirements: +- class: DockerRequirement + dockerPull: hubentu/suppa +inputs: + method: + type: string + inputBinding: + prefix: -m + separate: true + iox: + type: File + inputBinding: + prefix: -i + separate: true + psi: + type: File[] + inputBinding: + prefix: -p + separate: true + exp: + type: File[] + inputBinding: + prefix: -e + separate: true + output: + type: string + inputBinding: + prefix: -o + separate: true + gc: + type: boolean + inputBinding: + prefix: -gc + separate: true + default: true + paired: + type: boolean + inputBinding: + prefix: -pa + separate: true + default: false +outputs: + outFile: + type: File[] + outputBinding: + glob: $(inputs.output)* diff --git a/cwl/SUPPA/genEvents.cwl b/cwl/SUPPA/genEvents.cwl index 0cf9362..93f1664 100644 --- a/cwl/SUPPA/genEvents.cwl +++ b/cwl/SUPPA/genEvents.cwl @@ -1,44 +1,44 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- python -- /opt/SUPPA/suppa.py -- generateEvents -requirements: -- class: DockerRequirement - dockerPull: hubentu/suppa -- class: ShellCommandRequirement -inputs: - gtf: - type: File - inputBinding: - prefix: -i - separate: true - outfile: - type: string - inputBinding: - prefix: -o - separate: true - default: event - events: - type: string - inputBinding: - prefix: -e - separate: true - shellQuote: false - default: SE SS MX RI FL - format: - type: string - inputBinding: - prefix: -f - separate: true - default: ioe -outputs: - outGTF: - type: File[] - outputBinding: - glob: $(inputs.outfile)_*_strict.gtf - outIOE: - type: File[] - outputBinding: - glob: $(inputs.outfile)_*_strict.ioe +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- python +- /opt/SUPPA/suppa.py +- generateEvents +requirements: +- class: DockerRequirement + dockerPull: hubentu/suppa +- class: ShellCommandRequirement +inputs: + gtf: + type: File + inputBinding: + prefix: -i + separate: true + outfile: + type: string + inputBinding: + prefix: -o + separate: true + default: event + events: + type: string + inputBinding: + prefix: -e + separate: true + shellQuote: false + default: SE SS MX RI FL + format: + type: string + inputBinding: + prefix: -f + separate: true + default: ioe +outputs: + outGTF: + type: File[] + outputBinding: + glob: $(inputs.outfile)_*_strict.gtf + outIOE: + type: File[] + outputBinding: + glob: $(inputs.outfile)_*_strict.ioe diff --git a/cwl/SUPPA/mergeEvents.cwl b/cwl/SUPPA/mergeEvents.cwl index 57381b3..1692488 100644 --- a/cwl/SUPPA/mergeEvents.cwl +++ b/cwl/SUPPA/mergeEvents.cwl @@ -1,19 +1,19 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: awk -arguments: -- FNR==1 && NR!=1 { while (/^
/) getline; } 1 {print} -inputs: - files: - type: File[] - inputBinding: - separate: true - outfile: - type: string - default: merged.txt -outputs: - out: - type: File - outputBinding: - glob: $(inputs.outfile) -stdout: $(inputs.outfile) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: awk +arguments: +- FNR==1 && NR!=1 { while (/^
/) getline; } 1 {print} +inputs: + files: + type: File[] + inputBinding: + separate: true + outfile: + type: string + default: merged.txt +outputs: + out: + type: File + outputBinding: + glob: $(inputs.outfile) +stdout: $(inputs.outfile) diff --git a/cwl/SUPPA/psiPerEvent.cwl b/cwl/SUPPA/psiPerEvent.cwl index 04a3d2e..c8e3f36 100644 --- a/cwl/SUPPA/psiPerEvent.cwl +++ b/cwl/SUPPA/psiPerEvent.cwl @@ -1,30 +1,30 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- python -- /opt/SUPPA/suppa.py -- psiPerEvent -requirements: -- class: DockerRequirement - dockerPull: hubentu/suppa -inputs: - ioe: - type: File - inputBinding: - prefix: -i - separate: true - exp: - type: File - inputBinding: - prefix: -e - separate: true - outfile: - type: string - inputBinding: - prefix: -o - separate: true -outputs: - outFile: - type: File[] - outputBinding: - glob: $(inputs.outfile).psi +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- python +- /opt/SUPPA/suppa.py +- psiPerEvent +requirements: +- class: DockerRequirement + dockerPull: hubentu/suppa +inputs: + ioe: + type: File + inputBinding: + prefix: -i + separate: true + exp: + type: File + inputBinding: + prefix: -e + separate: true + outfile: + type: string + inputBinding: + prefix: -o + separate: true +outputs: + outFile: + type: File[] + outputBinding: + glob: $(inputs.outfile).psi diff --git a/cwl/SUPPA/quantMerge.R b/cwl/SUPPA/quantMerge.R index 96a05c6..05eca41 100644 --- a/cwl/SUPPA/quantMerge.R +++ b/cwl/SUPPA/quantMerge.R @@ -1,25 +1,23 @@ -.libPaths('/home/hq/R/x86_64-pc-linux-gnu-library/4.0') -suppressPackageStartupMessages(library(R.utils)) -suppressPackageStartupMessages(library(codetools)) -args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) -quantMerge <- -function(files, columns, cnames = NULL, outfile, sep = "\t", isep = ",", - fixName = TRUE){ - files <- strsplit(files, split = isep)[[1]] - columns <- strsplit(columns, split = isep)[[1]] - expL <- lapply(files, function(x){ - exp1 <- read.table(x, sep = sep, header = TRUE, row.names = 1, - check.names = FALSE, colClasses = "character") - if(fixName){ - rownames(exp1) <- sub("\\|.*", "", rownames(exp1)) - } - exp1[, columns, drop = F] - }) - Exp <- do.call(cbind, expL) - if(!is.null(cnames)){ - cnames <- strsplit(cnames, split = isep)[[1]] - colnames(Exp) <- cnames - } - write.table(Exp, file = outfile, quote = FALSE, sep = sep) -} -do.call(quantMerge, args) +suppressPackageStartupMessages(library(R.utils)) +args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) +quantMerge <- +function(files, columns, cnames = NULL, outfile, sep = "\t", isep = ",", + fixName = TRUE){ + files <- strsplit(files, split = isep)[[1]] + columns <- strsplit(columns, split = isep)[[1]] + expL <- lapply(files, function(x){ + exp1 <- read.table(x, sep = sep, header = TRUE, row.names = 1, + check.names = FALSE, colClasses = "character") + if(fixName){ + rownames(exp1) <- sub("\\|.*", "", rownames(exp1)) + } + exp1[, columns, drop = F] + }) + Exp <- do.call(cbind, expL) + if(!is.null(cnames)){ + cnames <- strsplit(cnames, split = isep)[[1]] + colnames(Exp) <- cnames + } + write.table(Exp, file = outfile, quote = FALSE, sep = sep) +} +do.call(quantMerge, args) diff --git a/cwl/SUPPA/quantMerge.cwl b/cwl/SUPPA/quantMerge.cwl index 02219e4..6ce45ea 100644 --- a/cwl/SUPPA/quantMerge.cwl +++ b/cwl/SUPPA/quantMerge.cwl @@ -1,32 +1,61 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- Rscript -- cwl/SUPPA/quantMerge.R -inputs: - files: - type: File[] - inputBinding: - prefix: files= - separate: false - itemSeparator: ',' - columns: - type: string - inputBinding: - prefix: columns= - separate: false - cnames: - type: string? - inputBinding: - prefix: cnames= - separate: false - outfile: - type: string - inputBinding: - prefix: outfile= - separate: false -outputs: - outFile: - type: File - outputBinding: - glob: $(inputs.outfile) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: Rscript +requirements: +- class: InitialWorkDirRequirement + listing: + - entryname: quantMerge.R + entry: |- + suppressPackageStartupMessages(library(R.utils)) + args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) + quantMerge <- + function(files, columns, cnames = NULL, outfile, sep = "\t", isep = ",", + fixName = TRUE){ + files <- strsplit(files, split = isep)[[1]] + columns <- strsplit(columns, split = isep)[[1]] + expL <- lapply(files, function(x){ + exp1 <- read.table(x, sep = sep, header = TRUE, row.names = 1, + check.names = FALSE, colClasses = "character") + if(fixName){ + rownames(exp1) <- sub("\\|.*", "", rownames(exp1)) + } + exp1[, columns, drop = F] + }) + Exp <- do.call(cbind, expL) + if(!is.null(cnames)){ + cnames <- strsplit(cnames, split = isep)[[1]] + colnames(Exp) <- cnames + } + write.table(Exp, file = outfile, quote = FALSE, sep = sep) + } + do.call(quantMerge, args) + writable: false +arguments: +- quantMerge.R +inputs: + files: + type: File[] + inputBinding: + prefix: files= + separate: false + itemSeparator: ',' + columns: + type: string + inputBinding: + prefix: columns= + separate: false + cnames: + type: string? + inputBinding: + prefix: cnames= + separate: false + outfile: + type: string + inputBinding: + prefix: outfile= + separate: false +outputs: + outFile: + type: File + outputBinding: + glob: $(inputs.outfile) diff --git a/cwl/SUPPA/splitEventsG1.R b/cwl/SUPPA/splitEventsG1.R index b9d89da..751eae0 100644 --- a/cwl/SUPPA/splitEventsG1.R +++ b/cwl/SUPPA/splitEventsG1.R @@ -1,25 +1,23 @@ -.libPaths('/home/hq/R/x86_64-pc-linux-gnu-library/4.0') -suppressPackageStartupMessages(library(R.utils)) -suppressPackageStartupMessages(library(codetools)) -args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) -splitEventsG1 <- -function(files, columns, cnames = NULL, outfile, sep = "\t", isep = ",", - fixName = TRUE){ - files <- strsplit(files, split = isep)[[1]] - columns <- strsplit(columns, split = isep)[[1]] - expL <- lapply(files, function(x){ - exp1 <- read.table(x, sep = sep, header = TRUE, row.names = 1, - check.names = FALSE, colClasses = "character") - if(fixName){ - rownames(exp1) <- sub("\\|.*", "", rownames(exp1)) - } - exp1[, columns, drop = F] - }) - Exp <- do.call(cbind, expL) - if(!is.null(cnames)){ - cnames <- strsplit(cnames, split = isep)[[1]] - colnames(Exp) <- cnames - } - write.table(Exp, file = outfile, quote = FALSE, sep = sep) -} -do.call(splitEventsG1, args) +suppressPackageStartupMessages(library(R.utils)) +args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) +splitEventsG1 <- +function(files, columns, cnames = NULL, outfile, sep = "\t", isep = ",", + fixName = TRUE){ + files <- strsplit(files, split = isep)[[1]] + columns <- strsplit(columns, split = isep)[[1]] + expL <- lapply(files, function(x){ + exp1 <- read.table(x, sep = sep, header = TRUE, row.names = 1, + check.names = FALSE, colClasses = "character") + if(fixName){ + rownames(exp1) <- sub("\\|.*", "", rownames(exp1)) + } + exp1[, columns, drop = F] + }) + Exp <- do.call(cbind, expL) + if(!is.null(cnames)){ + cnames <- strsplit(cnames, split = isep)[[1]] + colnames(Exp) <- cnames + } + write.table(Exp, file = outfile, quote = FALSE, sep = sep) +} +do.call(splitEventsG1, args) diff --git a/cwl/SUPPA/splitEventsG1.cwl b/cwl/SUPPA/splitEventsG1.cwl index 8907177..a67f07f 100644 --- a/cwl/SUPPA/splitEventsG1.cwl +++ b/cwl/SUPPA/splitEventsG1.cwl @@ -1,32 +1,61 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- Rscript -- cwl/SUPPA/splitEventsG1.R -inputs: - files: - type: File[] - inputBinding: - prefix: files= - separate: false - itemSeparator: ',' - columns: - type: string - inputBinding: - prefix: columns= - separate: false - cnames: - type: string? - inputBinding: - prefix: cnames= - separate: false - outfile: - type: string - inputBinding: - prefix: outfile= - separate: false -outputs: - outFile: - type: File - outputBinding: - glob: $(inputs.outfile) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: Rscript +requirements: +- class: InitialWorkDirRequirement + listing: + - entryname: splitEventsG1.R + entry: |- + suppressPackageStartupMessages(library(R.utils)) + args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) + splitEventsG1 <- + function(files, columns, cnames = NULL, outfile, sep = "\t", isep = ",", + fixName = TRUE){ + files <- strsplit(files, split = isep)[[1]] + columns <- strsplit(columns, split = isep)[[1]] + expL <- lapply(files, function(x){ + exp1 <- read.table(x, sep = sep, header = TRUE, row.names = 1, + check.names = FALSE, colClasses = "character") + if(fixName){ + rownames(exp1) <- sub("\\|.*", "", rownames(exp1)) + } + exp1[, columns, drop = F] + }) + Exp <- do.call(cbind, expL) + if(!is.null(cnames)){ + cnames <- strsplit(cnames, split = isep)[[1]] + colnames(Exp) <- cnames + } + write.table(Exp, file = outfile, quote = FALSE, sep = sep) + } + do.call(splitEventsG1, args) + writable: false +arguments: +- splitEventsG1.R +inputs: + files: + type: File[] + inputBinding: + prefix: files= + separate: false + itemSeparator: ',' + columns: + type: string + inputBinding: + prefix: columns= + separate: false + cnames: + type: string? + inputBinding: + prefix: cnames= + separate: false + outfile: + type: string + inputBinding: + prefix: outfile= + separate: false +outputs: + outFile: + type: File + outputBinding: + glob: $(inputs.outfile) diff --git a/cwl/SUPPA/splitEventsG2.R b/cwl/SUPPA/splitEventsG2.R index d2ef2a3..e5f7a3e 100644 --- a/cwl/SUPPA/splitEventsG2.R +++ b/cwl/SUPPA/splitEventsG2.R @@ -1,25 +1,23 @@ -.libPaths('/home/hq/R/x86_64-pc-linux-gnu-library/4.0') -suppressPackageStartupMessages(library(R.utils)) -suppressPackageStartupMessages(library(codetools)) -args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) -splitEventsG2 <- -function(files, columns, cnames = NULL, outfile, sep = "\t", isep = ",", - fixName = TRUE){ - files <- strsplit(files, split = isep)[[1]] - columns <- strsplit(columns, split = isep)[[1]] - expL <- lapply(files, function(x){ - exp1 <- read.table(x, sep = sep, header = TRUE, row.names = 1, - check.names = FALSE, colClasses = "character") - if(fixName){ - rownames(exp1) <- sub("\\|.*", "", rownames(exp1)) - } - exp1[, columns, drop = F] - }) - Exp <- do.call(cbind, expL) - if(!is.null(cnames)){ - cnames <- strsplit(cnames, split = isep)[[1]] - colnames(Exp) <- cnames - } - write.table(Exp, file = outfile, quote = FALSE, sep = sep) -} -do.call(splitEventsG2, args) +suppressPackageStartupMessages(library(R.utils)) +args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) +splitEventsG2 <- +function(files, columns, cnames = NULL, outfile, sep = "\t", isep = ",", + fixName = TRUE){ + files <- strsplit(files, split = isep)[[1]] + columns <- strsplit(columns, split = isep)[[1]] + expL <- lapply(files, function(x){ + exp1 <- read.table(x, sep = sep, header = TRUE, row.names = 1, + check.names = FALSE, colClasses = "character") + if(fixName){ + rownames(exp1) <- sub("\\|.*", "", rownames(exp1)) + } + exp1[, columns, drop = F] + }) + Exp <- do.call(cbind, expL) + if(!is.null(cnames)){ + cnames <- strsplit(cnames, split = isep)[[1]] + colnames(Exp) <- cnames + } + write.table(Exp, file = outfile, quote = FALSE, sep = sep) +} +do.call(splitEventsG2, args) diff --git a/cwl/SUPPA/splitEventsG2.cwl b/cwl/SUPPA/splitEventsG2.cwl index b389459..0373d41 100644 --- a/cwl/SUPPA/splitEventsG2.cwl +++ b/cwl/SUPPA/splitEventsG2.cwl @@ -1,32 +1,61 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- Rscript -- cwl/SUPPA/splitEventsG2.R -inputs: - files: - type: File[] - inputBinding: - prefix: files= - separate: false - itemSeparator: ',' - columns: - type: string - inputBinding: - prefix: columns= - separate: false - cnames: - type: string? - inputBinding: - prefix: cnames= - separate: false - outfile: - type: string - inputBinding: - prefix: outfile= - separate: false -outputs: - outFile: - type: File - outputBinding: - glob: $(inputs.outfile) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: Rscript +requirements: +- class: InitialWorkDirRequirement + listing: + - entryname: splitEventsG2.R + entry: |- + suppressPackageStartupMessages(library(R.utils)) + args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) + splitEventsG2 <- + function(files, columns, cnames = NULL, outfile, sep = "\t", isep = ",", + fixName = TRUE){ + files <- strsplit(files, split = isep)[[1]] + columns <- strsplit(columns, split = isep)[[1]] + expL <- lapply(files, function(x){ + exp1 <- read.table(x, sep = sep, header = TRUE, row.names = 1, + check.names = FALSE, colClasses = "character") + if(fixName){ + rownames(exp1) <- sub("\\|.*", "", rownames(exp1)) + } + exp1[, columns, drop = F] + }) + Exp <- do.call(cbind, expL) + if(!is.null(cnames)){ + cnames <- strsplit(cnames, split = isep)[[1]] + colnames(Exp) <- cnames + } + write.table(Exp, file = outfile, quote = FALSE, sep = sep) + } + do.call(splitEventsG2, args) + writable: false +arguments: +- splitEventsG2.R +inputs: + files: + type: File[] + inputBinding: + prefix: files= + separate: false + itemSeparator: ',' + columns: + type: string + inputBinding: + prefix: columns= + separate: false + cnames: + type: string? + inputBinding: + prefix: cnames= + separate: false + outfile: + type: string + inputBinding: + prefix: outfile= + separate: false +outputs: + outFile: + type: File + outputBinding: + glob: $(inputs.outfile) diff --git a/cwl/SUPPA/splitExpG1.R b/cwl/SUPPA/splitExpG1.R index d5a67c8..46c490c 100644 --- a/cwl/SUPPA/splitExpG1.R +++ b/cwl/SUPPA/splitExpG1.R @@ -1,25 +1,23 @@ -.libPaths('/home/hq/R/x86_64-pc-linux-gnu-library/4.0') -suppressPackageStartupMessages(library(R.utils)) -suppressPackageStartupMessages(library(codetools)) -args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) -splitExpG1 <- -function(files, columns, cnames = NULL, outfile, sep = "\t", isep = ",", - fixName = TRUE){ - files <- strsplit(files, split = isep)[[1]] - columns <- strsplit(columns, split = isep)[[1]] - expL <- lapply(files, function(x){ - exp1 <- read.table(x, sep = sep, header = TRUE, row.names = 1, - check.names = FALSE, colClasses = "character") - if(fixName){ - rownames(exp1) <- sub("\\|.*", "", rownames(exp1)) - } - exp1[, columns, drop = F] - }) - Exp <- do.call(cbind, expL) - if(!is.null(cnames)){ - cnames <- strsplit(cnames, split = isep)[[1]] - colnames(Exp) <- cnames - } - write.table(Exp, file = outfile, quote = FALSE, sep = sep) -} -do.call(splitExpG1, args) +suppressPackageStartupMessages(library(R.utils)) +args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) +splitExpG1 <- +function(files, columns, cnames = NULL, outfile, sep = "\t", isep = ",", + fixName = TRUE){ + files <- strsplit(files, split = isep)[[1]] + columns <- strsplit(columns, split = isep)[[1]] + expL <- lapply(files, function(x){ + exp1 <- read.table(x, sep = sep, header = TRUE, row.names = 1, + check.names = FALSE, colClasses = "character") + if(fixName){ + rownames(exp1) <- sub("\\|.*", "", rownames(exp1)) + } + exp1[, columns, drop = F] + }) + Exp <- do.call(cbind, expL) + if(!is.null(cnames)){ + cnames <- strsplit(cnames, split = isep)[[1]] + colnames(Exp) <- cnames + } + write.table(Exp, file = outfile, quote = FALSE, sep = sep) +} +do.call(splitExpG1, args) diff --git a/cwl/SUPPA/splitExpG1.cwl b/cwl/SUPPA/splitExpG1.cwl index 9b82783..8641369 100644 --- a/cwl/SUPPA/splitExpG1.cwl +++ b/cwl/SUPPA/splitExpG1.cwl @@ -1,32 +1,61 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- Rscript -- cwl/SUPPA/splitExpG1.R -inputs: - files: - type: File[] - inputBinding: - prefix: files= - separate: false - itemSeparator: ',' - columns: - type: string - inputBinding: - prefix: columns= - separate: false - cnames: - type: string? - inputBinding: - prefix: cnames= - separate: false - outfile: - type: string - inputBinding: - prefix: outfile= - separate: false -outputs: - outFile: - type: File - outputBinding: - glob: $(inputs.outfile) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: Rscript +requirements: +- class: InitialWorkDirRequirement + listing: + - entryname: splitExpG1.R + entry: |- + suppressPackageStartupMessages(library(R.utils)) + args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) + splitExpG1 <- + function(files, columns, cnames = NULL, outfile, sep = "\t", isep = ",", + fixName = TRUE){ + files <- strsplit(files, split = isep)[[1]] + columns <- strsplit(columns, split = isep)[[1]] + expL <- lapply(files, function(x){ + exp1 <- read.table(x, sep = sep, header = TRUE, row.names = 1, + check.names = FALSE, colClasses = "character") + if(fixName){ + rownames(exp1) <- sub("\\|.*", "", rownames(exp1)) + } + exp1[, columns, drop = F] + }) + Exp <- do.call(cbind, expL) + if(!is.null(cnames)){ + cnames <- strsplit(cnames, split = isep)[[1]] + colnames(Exp) <- cnames + } + write.table(Exp, file = outfile, quote = FALSE, sep = sep) + } + do.call(splitExpG1, args) + writable: false +arguments: +- splitExpG1.R +inputs: + files: + type: File[] + inputBinding: + prefix: files= + separate: false + itemSeparator: ',' + columns: + type: string + inputBinding: + prefix: columns= + separate: false + cnames: + type: string? + inputBinding: + prefix: cnames= + separate: false + outfile: + type: string + inputBinding: + prefix: outfile= + separate: false +outputs: + outFile: + type: File + outputBinding: + glob: $(inputs.outfile) diff --git a/cwl/SUPPA/splitExpG2.R b/cwl/SUPPA/splitExpG2.R index 10d85ac..a74dfa4 100644 --- a/cwl/SUPPA/splitExpG2.R +++ b/cwl/SUPPA/splitExpG2.R @@ -1,25 +1,23 @@ -.libPaths('/home/hq/R/x86_64-pc-linux-gnu-library/4.0') -suppressPackageStartupMessages(library(R.utils)) -suppressPackageStartupMessages(library(codetools)) -args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) -splitExpG2 <- -function(files, columns, cnames = NULL, outfile, sep = "\t", isep = ",", - fixName = TRUE){ - files <- strsplit(files, split = isep)[[1]] - columns <- strsplit(columns, split = isep)[[1]] - expL <- lapply(files, function(x){ - exp1 <- read.table(x, sep = sep, header = TRUE, row.names = 1, - check.names = FALSE, colClasses = "character") - if(fixName){ - rownames(exp1) <- sub("\\|.*", "", rownames(exp1)) - } - exp1[, columns, drop = F] - }) - Exp <- do.call(cbind, expL) - if(!is.null(cnames)){ - cnames <- strsplit(cnames, split = isep)[[1]] - colnames(Exp) <- cnames - } - write.table(Exp, file = outfile, quote = FALSE, sep = sep) -} -do.call(splitExpG2, args) +suppressPackageStartupMessages(library(R.utils)) +args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) +splitExpG2 <- +function(files, columns, cnames = NULL, outfile, sep = "\t", isep = ",", + fixName = TRUE){ + files <- strsplit(files, split = isep)[[1]] + columns <- strsplit(columns, split = isep)[[1]] + expL <- lapply(files, function(x){ + exp1 <- read.table(x, sep = sep, header = TRUE, row.names = 1, + check.names = FALSE, colClasses = "character") + if(fixName){ + rownames(exp1) <- sub("\\|.*", "", rownames(exp1)) + } + exp1[, columns, drop = F] + }) + Exp <- do.call(cbind, expL) + if(!is.null(cnames)){ + cnames <- strsplit(cnames, split = isep)[[1]] + colnames(Exp) <- cnames + } + write.table(Exp, file = outfile, quote = FALSE, sep = sep) +} +do.call(splitExpG2, args) diff --git a/cwl/SUPPA/splitExpG2.cwl b/cwl/SUPPA/splitExpG2.cwl index 7d92a99..26c1257 100644 --- a/cwl/SUPPA/splitExpG2.cwl +++ b/cwl/SUPPA/splitExpG2.cwl @@ -1,32 +1,61 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- Rscript -- cwl/SUPPA/splitExpG2.R -inputs: - files: - type: File[] - inputBinding: - prefix: files= - separate: false - itemSeparator: ',' - columns: - type: string - inputBinding: - prefix: columns= - separate: false - cnames: - type: string? - inputBinding: - prefix: cnames= - separate: false - outfile: - type: string - inputBinding: - prefix: outfile= - separate: false -outputs: - outFile: - type: File - outputBinding: - glob: $(inputs.outfile) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: Rscript +requirements: +- class: InitialWorkDirRequirement + listing: + - entryname: splitExpG2.R + entry: |- + suppressPackageStartupMessages(library(R.utils)) + args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) + splitExpG2 <- + function(files, columns, cnames = NULL, outfile, sep = "\t", isep = ",", + fixName = TRUE){ + files <- strsplit(files, split = isep)[[1]] + columns <- strsplit(columns, split = isep)[[1]] + expL <- lapply(files, function(x){ + exp1 <- read.table(x, sep = sep, header = TRUE, row.names = 1, + check.names = FALSE, colClasses = "character") + if(fixName){ + rownames(exp1) <- sub("\\|.*", "", rownames(exp1)) + } + exp1[, columns, drop = F] + }) + Exp <- do.call(cbind, expL) + if(!is.null(cnames)){ + cnames <- strsplit(cnames, split = isep)[[1]] + colnames(Exp) <- cnames + } + write.table(Exp, file = outfile, quote = FALSE, sep = sep) + } + do.call(splitExpG2, args) + writable: false +arguments: +- splitExpG2.R +inputs: + files: + type: File[] + inputBinding: + prefix: files= + separate: false + itemSeparator: ',' + columns: + type: string + inputBinding: + prefix: columns= + separate: false + cnames: + type: string? + inputBinding: + prefix: cnames= + separate: false + outfile: + type: string + inputBinding: + prefix: outfile= + separate: false +outputs: + outFile: + type: File + outputBinding: + glob: $(inputs.outfile) diff --git a/cwl/SUPPA_diffSplice.cwl b/cwl/SUPPA_diffSplice.cwl index 56c5771..74a24c2 100644 --- a/cwl/SUPPA_diffSplice.cwl +++ b/cwl/SUPPA_diffSplice.cwl @@ -1,52 +1,52 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- python -- /opt/SUPPA/suppa.py -- diffSplice -requirements: -- class: DockerRequirement - dockerPull: hubentu/suppa -inputs: - method: - type: string - inputBinding: - prefix: -m - separate: true - iox: - type: File - inputBinding: - prefix: -i - separate: true - psi: - type: File[] - inputBinding: - prefix: -p - separate: true - exp: - type: File[] - inputBinding: - prefix: -e - separate: true - output: - type: string - inputBinding: - prefix: -o - separate: true - gc: - type: boolean - inputBinding: - prefix: -gc - separate: true - default: true - paired: - type: boolean - inputBinding: - prefix: -pa - separate: true - default: false -outputs: - outFile: - type: File[] - outputBinding: - glob: $(inputs.output)* +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- python +- /opt/SUPPA/suppa.py +- diffSplice +requirements: +- class: DockerRequirement + dockerPull: hubentu/suppa +inputs: + method: + type: string + inputBinding: + prefix: -m + separate: true + iox: + type: File + inputBinding: + prefix: -i + separate: true + psi: + type: File[] + inputBinding: + prefix: -p + separate: true + exp: + type: File[] + inputBinding: + prefix: -e + separate: true + output: + type: string + inputBinding: + prefix: -o + separate: true + gc: + type: boolean + inputBinding: + prefix: -gc + separate: true + default: true + paired: + type: boolean + inputBinding: + prefix: -pa + separate: true + default: false +outputs: + outFile: + type: File[] + outputBinding: + glob: $(inputs.output)* diff --git a/cwl/SUPPA_diffSplice.yml b/cwl/SUPPA_diffSplice.yml index cc5e0cb..46ba6df 100644 --- a/cwl/SUPPA_diffSplice.yml +++ b/cwl/SUPPA_diffSplice.yml @@ -1,2 +1,2 @@ -gc: true -paired: false +gc: true +paired: false diff --git a/cwl/SUPPA_generateEvents.cwl b/cwl/SUPPA_generateEvents.cwl index 0cf9362..93f1664 100644 --- a/cwl/SUPPA_generateEvents.cwl +++ b/cwl/SUPPA_generateEvents.cwl @@ -1,44 +1,44 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- python -- /opt/SUPPA/suppa.py -- generateEvents -requirements: -- class: DockerRequirement - dockerPull: hubentu/suppa -- class: ShellCommandRequirement -inputs: - gtf: - type: File - inputBinding: - prefix: -i - separate: true - outfile: - type: string - inputBinding: - prefix: -o - separate: true - default: event - events: - type: string - inputBinding: - prefix: -e - separate: true - shellQuote: false - default: SE SS MX RI FL - format: - type: string - inputBinding: - prefix: -f - separate: true - default: ioe -outputs: - outGTF: - type: File[] - outputBinding: - glob: $(inputs.outfile)_*_strict.gtf - outIOE: - type: File[] - outputBinding: - glob: $(inputs.outfile)_*_strict.ioe +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- python +- /opt/SUPPA/suppa.py +- generateEvents +requirements: +- class: DockerRequirement + dockerPull: hubentu/suppa +- class: ShellCommandRequirement +inputs: + gtf: + type: File + inputBinding: + prefix: -i + separate: true + outfile: + type: string + inputBinding: + prefix: -o + separate: true + default: event + events: + type: string + inputBinding: + prefix: -e + separate: true + shellQuote: false + default: SE SS MX RI FL + format: + type: string + inputBinding: + prefix: -f + separate: true + default: ioe +outputs: + outGTF: + type: File[] + outputBinding: + glob: $(inputs.outfile)_*_strict.gtf + outIOE: + type: File[] + outputBinding: + glob: $(inputs.outfile)_*_strict.ioe diff --git a/cwl/SUPPA_generateEvents.yml b/cwl/SUPPA_generateEvents.yml index a57221c..ac9bcc5 100644 --- a/cwl/SUPPA_generateEvents.yml +++ b/cwl/SUPPA_generateEvents.yml @@ -1,3 +1,3 @@ -outfile: event -events: SE SS MX RI FL -format: ioe +outfile: event +events: SE SS MX RI FL +format: ioe diff --git a/cwl/SUPPA_multipleFieldSelection.cwl b/cwl/SUPPA_multipleFieldSelection.cwl index 87e3390..5b6fc6d 100644 --- a/cwl/SUPPA_multipleFieldSelection.cwl +++ b/cwl/SUPPA_multipleFieldSelection.cwl @@ -1,38 +1,38 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- python -- /opt/SUPPA/multipleFieldSelection.py -requirements: -- class: DockerRequirement - dockerPull: hubentu/suppa -inputs: - inputFiles: - type: File[] - inputBinding: - prefix: -i - separate: true - key: - type: int - inputBinding: - prefix: -k - separate: true - field: - type: int - inputBinding: - prefix: -f - separate: true - outfile: - type: string - inputBinding: - prefix: -o - separate: true - noheader: - type: boolean? - inputBinding: - separate: true -outputs: - outFile: - type: File - outputBinding: - glob: $(inputs.outfile) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- python +- /opt/SUPPA/multipleFieldSelection.py +requirements: +- class: DockerRequirement + dockerPull: hubentu/suppa +inputs: + inputFiles: + type: File[] + inputBinding: + prefix: -i + separate: true + key: + type: int + inputBinding: + prefix: -k + separate: true + field: + type: int + inputBinding: + prefix: -f + separate: true + outfile: + type: string + inputBinding: + prefix: -o + separate: true + noheader: + type: boolean? + inputBinding: + separate: true +outputs: + outFile: + type: File + outputBinding: + glob: $(inputs.outfile) diff --git a/cwl/SUPPA_multipleFieldSelection.yml b/cwl/SUPPA_multipleFieldSelection.yml index 0967ef4..69a88e3 100644 --- a/cwl/SUPPA_multipleFieldSelection.yml +++ b/cwl/SUPPA_multipleFieldSelection.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/SUPPA_psiPerEvent.cwl b/cwl/SUPPA_psiPerEvent.cwl index 04a3d2e..c8e3f36 100644 --- a/cwl/SUPPA_psiPerEvent.cwl +++ b/cwl/SUPPA_psiPerEvent.cwl @@ -1,30 +1,30 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- python -- /opt/SUPPA/suppa.py -- psiPerEvent -requirements: -- class: DockerRequirement - dockerPull: hubentu/suppa -inputs: - ioe: - type: File - inputBinding: - prefix: -i - separate: true - exp: - type: File - inputBinding: - prefix: -e - separate: true - outfile: - type: string - inputBinding: - prefix: -o - separate: true -outputs: - outFile: - type: File[] - outputBinding: - glob: $(inputs.outfile).psi +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- python +- /opt/SUPPA/suppa.py +- psiPerEvent +requirements: +- class: DockerRequirement + dockerPull: hubentu/suppa +inputs: + ioe: + type: File + inputBinding: + prefix: -i + separate: true + exp: + type: File + inputBinding: + prefix: -e + separate: true + outfile: + type: string + inputBinding: + prefix: -o + separate: true +outputs: + outFile: + type: File[] + outputBinding: + glob: $(inputs.outfile).psi diff --git a/cwl/SUPPA_psiPerEvent.yml b/cwl/SUPPA_psiPerEvent.yml index 0967ef4..69a88e3 100644 --- a/cwl/SUPPA_psiPerEvent.yml +++ b/cwl/SUPPA_psiPerEvent.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/SVE.cwl b/cwl/SVE.cwl index 13cc341..29a0fd6 100644 --- a/cwl/SVE.cwl +++ b/cwl/SVE.cwl @@ -1,35 +1,35 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: /software/SVE/scripts/auto.py -requirements: -- class: DockerRequirement - dockerPull: timothyjamesbecker/sve -inputs: - fqs: - type: File[] - inputBinding: - prefix: -f - separate: true - itemSeparator: ',' - ref: - type: File - secondaryFiles: .fai - inputBinding: - prefix: -r - separate: true - outdir: - type: string - inputBinding: - prefix: -o - separate: true - threads: - type: int - inputBinding: - prefix: -T - separate: true - default: 4 -outputs: - outs: - type: Directory - outputBinding: - glob: $(inputs.outdir) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: /software/SVE/scripts/auto.py +requirements: +- class: DockerRequirement + dockerPull: timothyjamesbecker/sve +inputs: + fqs: + type: File[] + inputBinding: + prefix: -f + separate: true + itemSeparator: ',' + ref: + type: File + secondaryFiles: .fai + inputBinding: + prefix: -r + separate: true + outdir: + type: string + inputBinding: + prefix: -o + separate: true + threads: + type: int + inputBinding: + prefix: -T + separate: true + default: 4 +outputs: + outs: + type: Directory + outputBinding: + glob: $(inputs.outdir) diff --git a/cwl/SVE.yml b/cwl/SVE.yml index e49aef6..bf19c2b 100644 --- a/cwl/SVE.yml +++ b/cwl/SVE.yml @@ -1 +1 @@ -threads: 4 +threads: 4 diff --git a/cwl/SVE_VP.cwl b/cwl/SVE_VP.cwl index caf15f5..af91431 100644 --- a/cwl/SVE_VP.cwl +++ b/cwl/SVE_VP.cwl @@ -1,37 +1,37 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: /software/SVE/scripts/variant_processor.py -requirements: -- class: DockerRequirement - dockerPull: timothyjamesbecker/sve -inputs: - bam: - type: File - secondaryFiles: .bai - inputBinding: - prefix: -b - separate: true - ref: - type: File - secondaryFiles: - - .fai - - $(self.nameroot).dict - inputBinding: - prefix: -r - separate: true - outdir: - type: string - inputBinding: - prefix: -o - separate: true - tools: - type: string - inputBinding: - prefix: -s - separate: true - default: breakdancer,cnmops,gatk_haplo,delly,lumpy,cnvnator,breakseq,tigra,genome_strip,hydra -outputs: - outs: - type: Directory - outputBinding: - glob: $(inputs.outdir) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: /software/SVE/scripts/variant_processor.py +requirements: +- class: DockerRequirement + dockerPull: timothyjamesbecker/sve +inputs: + bam: + type: File + secondaryFiles: .bai + inputBinding: + prefix: -b + separate: true + ref: + type: File + secondaryFiles: + - .fai + - $(self.nameroot).dict + inputBinding: + prefix: -r + separate: true + outdir: + type: string + inputBinding: + prefix: -o + separate: true + tools: + type: string + inputBinding: + prefix: -s + separate: true + default: breakdancer,cnmops,gatk_haplo,delly,lumpy,cnvnator,breakseq,tigra,genome_strip,hydra +outputs: + outs: + type: Directory + outputBinding: + glob: $(inputs.outdir) diff --git a/cwl/SVE_VP.yml b/cwl/SVE_VP.yml index 8b1cb9f..e03a4d2 100644 --- a/cwl/SVE_VP.yml +++ b/cwl/SVE_VP.yml @@ -1 +1 @@ -tools: breakdancer,cnmops,gatk_haplo,delly,lumpy,cnvnator,breakseq,tigra,genome_strip,hydra +tools: breakdancer,cnmops,gatk_haplo,delly,lumpy,cnvnator,breakseq,tigra,genome_strip,hydra diff --git a/cwl/SamToFastq.cwl b/cwl/SamToFastq.cwl index f219fb1..bca1772 100644 --- a/cwl/SamToFastq.cwl +++ b/cwl/SamToFastq.cwl @@ -1,33 +1,33 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- picard -- SamToFastq -requirements: -- class: DockerRequirement - dockerPull: quay.io/biocontainers/picard:2.21.1--0 -inputs: - bam: - type: File - inputBinding: - prefix: I= - separate: false - fq1: - type: string - inputBinding: - prefix: F= - separate: false - fq2: - type: string - inputBinding: - prefix: F2= - separate: false -outputs: - FQ1: - type: File - outputBinding: - glob: $(inputs.fq1) - FQ2: - type: File - outputBinding: - glob: $(inputs.fq2) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- picard +- SamToFastq +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/picard:2.21.1--0 +inputs: + bam: + type: File + inputBinding: + prefix: I= + separate: false + fq1: + type: string + inputBinding: + prefix: F= + separate: false + fq2: + type: string + inputBinding: + prefix: F2= + separate: false +outputs: + FQ1: + type: File + outputBinding: + glob: $(inputs.fq1) + FQ2: + type: File + outputBinding: + glob: $(inputs.fq2) diff --git a/cwl/SamToFastq.yml b/cwl/SamToFastq.yml index 0967ef4..69a88e3 100644 --- a/cwl/SamToFastq.yml +++ b/cwl/SamToFastq.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/ScarHRD/ScarHRD.cwl b/cwl/ScarHRD/ScarHRD.cwl new file mode 100644 index 0000000..8cb345e --- /dev/null +++ b/cwl/ScarHRD/ScarHRD.cwl @@ -0,0 +1,55 @@ +cwlVersion: v1.0 +class: Workflow +inputs: + normal: + type: File + secondaryFiles: .bai + tumor: + type: File + secondaryFiles: .bai + ref: + type: File + secondaryFiles: .fai + gc: + type: File + out: + type: string + window: + type: int + default: 50 + build: + type: string + default: grch37 +outputs: + segs: + type: File + outputSource: seqz_binning/seqzs + score: + type: File + outputSource: hrd/HRD +steps: + bam2seqz: + run: bam2seqz.cwl + in: + normal: normal + tumor: tumor + ref: ref + gc: gc + out: out + out: + - seqz + seqz_binning: + run: seqz_binning.cwl + in: + seqz: bam2seqz/seqz + window: window + out: out + out: + - seqzs + hrd: + run: hrd.cwl + in: + seg: seqz_binning/seqzs + reference: build + out: + - HRD diff --git a/cwl/ScarHRD/ScarHRD.yml b/cwl/ScarHRD/ScarHRD.yml new file mode 100644 index 0000000..08a5c13 --- /dev/null +++ b/cwl/ScarHRD/ScarHRD.yml @@ -0,0 +1,2 @@ +window: 50 +build: grch37 diff --git a/cwl/ScarHRD/bam2seqz.cwl b/cwl/ScarHRD/bam2seqz.cwl new file mode 100644 index 0000000..63dcb3a --- /dev/null +++ b/cwl/ScarHRD/bam2seqz.cwl @@ -0,0 +1,42 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- sequenza-utils +- bam2seqz +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/sequenza-utils:3.0.0--py39h67e14b5_5 +inputs: + normal: + type: File + secondaryFiles: .bai + inputBinding: + prefix: -n + separate: true + tumor: + type: File + secondaryFiles: .bai + inputBinding: + prefix: -t + separate: true + ref: + type: File + secondaryFiles: .fai + inputBinding: + prefix: --fasta + separate: true + gc: + type: File + inputBinding: + prefix: -gc + separate: true + out: + type: string + inputBinding: + prefix: -o + separate: true +outputs: + seqz: + type: File + outputBinding: + glob: $(inputs.out) diff --git a/cwl/ScarHRD/hrd.R b/cwl/ScarHRD/hrd.R new file mode 100644 index 0000000..a782204 --- /dev/null +++ b/cwl/ScarHRD/hrd.R @@ -0,0 +1,9 @@ +suppressPackageStartupMessages(library(R.utils)) +args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) +hrd <- +function(seg, reference, seqz = TRUE, chr.in.names = FALSE){ + Sys.setenv(VROOM_CONNECTION_SIZE = 131072 * 10000) + ss <- scarHRD::scar_score(seg, reference = reference, seqz = seqz, chr.in.names = chr.in.names) + write.table(ss, "scarHRD.txt", row.names=FALSE, quote=FALSE, sep="\t") +} +do.call(hrd, args) diff --git a/cwl/ScarHRD/hrd.cwl b/cwl/ScarHRD/hrd.cwl new file mode 100644 index 0000000..d3452f7 --- /dev/null +++ b/cwl/ScarHRD/hrd.cwl @@ -0,0 +1,36 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: Rscript +requirements: +- class: InitialWorkDirRequirement + listing: + - entryname: hrd.R + entry: |- + suppressPackageStartupMessages(library(R.utils)) + args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) + hrd <- + function(seg, reference, seqz = TRUE, chr.in.names = FALSE){ + Sys.setenv(VROOM_CONNECTION_SIZE = 131072 * 10000) + ss <- scarHRD::scar_score(seg, reference = reference, seqz = seqz, chr.in.names = chr.in.names) + write.table(ss, "scarHRD.txt", row.names=FALSE, quote=FALSE, sep="\t") + } + do.call(hrd, args) + writable: false +arguments: +- hrd.R +inputs: + seg: + type: File + inputBinding: + position: 1 + separate: true + reference: + type: string + inputBinding: + position: 2 + separate: true +outputs: + HRD: + type: File + outputBinding: + glob: scarHRD.txt diff --git a/cwl/ScarHRD/seqz_binning.cwl b/cwl/ScarHRD/seqz_binning.cwl new file mode 100644 index 0000000..ef2f673 --- /dev/null +++ b/cwl/ScarHRD/seqz_binning.cwl @@ -0,0 +1,29 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- sequenza-utils +- seqz_binning +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/sequenza-utils:3.0.0--py39h67e14b5_5 +inputs: + seqz: + type: File + inputBinding: + prefix: --seqz + separate: true + window: + type: int + inputBinding: + prefix: -w + separate: true + out: + type: string + inputBinding: + prefix: -o + separate: true +outputs: + seqzs: + type: File + outputBinding: + glob: $(inputs.out) diff --git a/cwl/SomaticCallers/ColSeqArtifact.cwl b/cwl/SomaticCaller4/CalculateContamination.cwl similarity index 64% rename from cwl/SomaticCallers/ColSeqArtifact.cwl rename to cwl/SomaticCaller4/CalculateContamination.cwl index 5784cea..8df26f0 100644 --- a/cwl/SomaticCallers/ColSeqArtifact.cwl +++ b/cwl/SomaticCaller4/CalculateContamination.cwl @@ -1,35 +1,38 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- gatk -- CollectSequencingArtifactMetrics -requirements: -- class: DockerRequirement - dockerPull: broadinstitute/gatk:latest -inputs: - bam: - type: File - inputBinding: - prefix: -I - separate: true - ref: - type: File - inputBinding: - prefix: -R - separate: true - ext: - type: string - inputBinding: - prefix: --FILE_EXTENSION - separate: true - default: .txt - art: - type: string - inputBinding: - prefix: -O - separate: true -outputs: - aout: - type: File - outputBinding: - glob: $(inputs.art).pre_adapter_detail_metrics.txt +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- gatk +- CalculateContamination +requirements: +- class: DockerRequirement + dockerPull: broadinstitute/gatk:latest +inputs: + ttable: + type: File + inputBinding: + prefix: -I + separate: true + ntable: + type: File + inputBinding: + prefix: -matched + separate: true + cont: + type: string + inputBinding: + prefix: -O + separate: true + seg: + type: string + inputBinding: + prefix: -segments + separate: true +outputs: + Cout: + type: File + outputBinding: + glob: $(inputs.cont) + Seg: + type: File + outputBinding: + glob: $(inputs.seg) diff --git a/cwl/SomaticCaller4/FilterMutectCalls.cwl b/cwl/SomaticCaller4/FilterMutectCalls.cwl new file mode 100644 index 0000000..f30ae4b --- /dev/null +++ b/cwl/SomaticCaller4/FilterMutectCalls.cwl @@ -0,0 +1,50 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- gatk +- FilterMutectCalls +requirements: +- class: DockerRequirement + dockerPull: broadinstitute/gatk:latest +inputs: + vcf: + type: File + secondaryFiles: + - .idx + - .stats + inputBinding: + prefix: -V + separate: true + cont: + type: File + inputBinding: + prefix: --contamination-table + separate: true + seg: + type: File + inputBinding: + prefix: --tumor-segmentation + separate: true + lro: + type: File + inputBinding: + prefix: --ob-priors + separate: true + fvcf: + type: string + inputBinding: + prefix: -O + separate: true + ref: + type: File + secondaryFiles: + - .fai + - ^.dict + inputBinding: + prefix: -R + separate: true +outputs: + fout: + type: File + outputBinding: + glob: $(inputs.fvcf) diff --git a/cwl/SomaticCaller4/GetPileupSummariesN.cwl b/cwl/SomaticCaller4/GetPileupSummariesN.cwl new file mode 100644 index 0000000..ceb59cd --- /dev/null +++ b/cwl/SomaticCaller4/GetPileupSummariesN.cwl @@ -0,0 +1,38 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- gatk +- GetPileupSummaries +requirements: +- class: DockerRequirement + dockerPull: broadinstitute/gatk:latest +- class: InlineJavascriptRequirement +inputs: + bam: + type: File + secondaryFiles: .bai + inputBinding: + prefix: -I + separate: true + vcf: + type: File + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + inputBinding: + prefix: -V + separate: true + interval: + type: File + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + inputBinding: + prefix: -L + separate: true + pileup: + type: string + inputBinding: + prefix: -O + separate: true +outputs: + pout: + type: File + outputBinding: + glob: $(inputs.pileup) diff --git a/cwl/SomaticCaller4/GetPileupSummariesT.cwl b/cwl/SomaticCaller4/GetPileupSummariesT.cwl new file mode 100644 index 0000000..ceb59cd --- /dev/null +++ b/cwl/SomaticCaller4/GetPileupSummariesT.cwl @@ -0,0 +1,38 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- gatk +- GetPileupSummaries +requirements: +- class: DockerRequirement + dockerPull: broadinstitute/gatk:latest +- class: InlineJavascriptRequirement +inputs: + bam: + type: File + secondaryFiles: .bai + inputBinding: + prefix: -I + separate: true + vcf: + type: File + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + inputBinding: + prefix: -V + separate: true + interval: + type: File + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + inputBinding: + prefix: -L + separate: true + pileup: + type: string + inputBinding: + prefix: -O + separate: true +outputs: + pout: + type: File + outputBinding: + glob: $(inputs.pileup) diff --git a/cwl/SomaticCaller4/LearnReadOrientationModel.cwl b/cwl/SomaticCaller4/LearnReadOrientationModel.cwl new file mode 100644 index 0000000..8989b81 --- /dev/null +++ b/cwl/SomaticCaller4/LearnReadOrientationModel.cwl @@ -0,0 +1,25 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- gatk +- LearnReadOrientationModel +requirements: +- class: DockerRequirement + dockerPull: broadinstitute/gatk:latest +inputs: + f1r2: + type: File + inputBinding: + prefix: -I + separate: true + romodel: + type: string + inputBinding: + prefix: -O + separate: true + default: read-orientation-model.tar.gz +outputs: + rofile: + type: File + outputBinding: + glob: $(inputs.romodel) diff --git a/cwl/SomaticCaller4/MuSE.cwl b/cwl/SomaticCaller4/MuSE.cwl new file mode 100644 index 0000000..6d6e0ad --- /dev/null +++ b/cwl/SomaticCaller4/MuSE.cwl @@ -0,0 +1,83 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- MuSE +- call +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/muse:1.0.rc--h2e03b76_5 +- class: ShellCommandRequirement +- class: InlineJavascriptRequirement +arguments: +- -O +- output +- valueFrom: ' && ' + position: 5 + shellQuote: false +- valueFrom: MuSE + position: 6 +- valueFrom: sump + position: 7 +- valueFrom: -I + position: 8 +- valueFrom: output.MuSE.txt + position: 9 +inputs: + tbam: + type: File + secondaryFiles: .bai + inputBinding: + position: 1 + separate: true + nbam: + type: File + secondaryFiles: .bai + inputBinding: + position: 2 + separate: true + ref: + type: File + secondaryFiles: .fai + inputBinding: + position: 3 + prefix: -f + separate: true + region: + type: File? + inputBinding: + position: 4 + prefix: -l + separate: true + dbsnp: + type: File + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + inputBinding: + position: 10 + prefix: -D + separate: true + vcf: + type: string + inputBinding: + position: 11 + prefix: -O + separate: true + exome: + type: boolean + inputBinding: + position: 12 + prefix: -E + separate: true + default: true + genome: + type: boolean + inputBinding: + position: 12 + prefix: -G + separate: true + default: false +outputs: + outVcf: + type: File + secondaryFiles: .tbi? + outputBinding: + glob: $(inputs.vcf) diff --git a/cwl/SomaticCaller4/Mutect2.cwl b/cwl/SomaticCaller4/Mutect2.cwl new file mode 100644 index 0000000..2e82964 --- /dev/null +++ b/cwl/SomaticCaller4/Mutect2.cwl @@ -0,0 +1,80 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- gatk +- Mutect2 +requirements: +- class: DockerRequirement + dockerPull: broadinstitute/gatk:latest +- class: InlineJavascriptRequirement +inputs: + tbam: + type: File + secondaryFiles: .bai + inputBinding: + prefix: -I + separate: true + nbam: + type: File? + secondaryFiles: .bai + inputBinding: + prefix: -I + separate: true + Ref: + type: File + secondaryFiles: + - .fai + - ^.dict + inputBinding: + prefix: -R + separate: true + normal: + type: string? + inputBinding: + prefix: -normal + separate: true + germline: + type: File? + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + inputBinding: + prefix: --germline-resource + separate: true + pon: + type: File? + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + inputBinding: + prefix: --panel-of-normals + separate: true + interval: + type: File? + inputBinding: + prefix: -L + separate: true + out: + type: string + inputBinding: + prefix: -O + separate: true + f1r2: + type: string? + inputBinding: + prefix: --f1r2-tar-gz + separate: true + default: f1r2.tar.gz + threads: + type: int? + inputBinding: + prefix: --native-pair-hmm-threads + separate: true +outputs: + vout: + type: File + secondaryFiles: + - .idx + - .stats + outputBinding: + glob: $(inputs.out) + F1r2: + type: File + outputBinding: + glob: $(inputs.f1r2) diff --git a/cwl/SomaticCaller4/Mutect2PL.cwl b/cwl/SomaticCaller4/Mutect2PL.cwl new file mode 100644 index 0000000..3cd9005 --- /dev/null +++ b/cwl/SomaticCaller4/Mutect2PL.cwl @@ -0,0 +1,137 @@ +cwlVersion: v1.0 +class: Workflow +requirements: +- class: InlineJavascriptRequirement +- class: StepInputExpressionRequirement +- class: MultipleInputFeatureRequirement +inputs: + tbam: + type: File + secondaryFiles: .bai + nbam: + type: File + secondaryFiles: .bai + Ref: + type: File + secondaryFiles: + - .fai + - ^.dict + normal: + type: string + tumor: + type: string + gresource: + type: File + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + pon: + type: File + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + interval: + type: File + comvcf: + type: File + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + filter: + type: string + default: PASS + threads: + type: int? +outputs: + filterVCF: + type: File + outputSource: FilterMutectCalls/fout + passVCF: + type: File + outputSource: bcfview/Fout + conTable: + type: File + outputSource: CalculateContamination/Cout + segment: + type: File + outputSource: CalculateContamination/Seg +steps: + Mutect2: + run: Mutect2.cwl + in: + tbam: tbam + nbam: nbam + Ref: Ref + normal: normal + germline: gresource + pon: pon + interval: interval + threads: threads + out: + source: + - normal + - tumor + valueFrom: $(self[0]).$(self[1]) + out: + - vout + - F1r2 + GetPileupSummariesT: + run: GetPileupSummariesT.cwl + in: + bam: tbam + vcf: comvcf + interval: comvcf + pileup: + valueFrom: $(inputs.bam.nameroot).ptable + out: + - pout + GetPileupSummariesN: + run: GetPileupSummariesN.cwl + in: + bam: nbam + vcf: comvcf + interval: comvcf + pileup: + valueFrom: $(inputs.bam.nameroot).ptable + out: + - pout + CalculateContamination: + run: CalculateContamination.cwl + in: + ttable: GetPileupSummariesT/pout + ntable: GetPileupSummariesN/pout + cont: + source: + - tumor + valueFrom: $(self).contamination.table + seg: + source: + - tumor + valueFrom: $(self).segments + out: + - Cout + - Seg + LearnReadOrientationModel: + run: LearnReadOrientationModel.cwl + in: + f1r2: Mutect2/F1r2 + out: + - rofile + FilterMutectCalls: + run: FilterMutectCalls.cwl + in: + vcf: Mutect2/vout + cont: CalculateContamination/Cout + seg: CalculateContamination/Seg + lro: LearnReadOrientationModel/rofile + ref: Ref + fvcf: + source: + - normal + - tumor + valueFrom: $(self[0]).$(self[1]).filtered.vcf + out: + - fout + bcfview: + run: bcfview.cwl + in: + vcf: FilterMutectCalls/fout + filter: filter + fout: + valueFrom: $(inputs.vcf.nameroot).PASS.vcf + out: + - Fout diff --git a/cwl/SomaticCaller4/SomaticCaller4.cwl b/cwl/SomaticCaller4/SomaticCaller4.cwl new file mode 100644 index 0000000..427f53e --- /dev/null +++ b/cwl/SomaticCaller4/SomaticCaller4.cwl @@ -0,0 +1,159 @@ +cwlVersion: v1.0 +class: Workflow +requirements: +- class: InlineJavascriptRequirement +- class: StepInputExpressionRequirement +- class: SubworkflowFeatureRequirement +- class: MultipleInputFeatureRequirement +inputs: + tbam: + type: File + secondaryFiles: .bai + nbam: + type: File + secondaryFiles: .bai + Ref: + type: File + secondaryFiles: + - .fai + - ^.dict + normal: + type: string + tumor: + type: string + dbsnp: + type: File + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + gresource: + type: File + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + pon: + type: File + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + interval: + type: File + comvcf: + type: File + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + filter: + type: string + default: PASS + threads: + type: int + default: 8 +outputs: + mutect2filterVCF: + type: File + outputSource: Mutect2PL/filterVCF + mutect2passVCF: + type: File + outputSource: Mutect2PL/passVCF + mutect2conTable: + type: File + outputSource: Mutect2PL/conTable + mutect2segment: + type: File + outputSource: Mutect2PL/segment + MuSEout: + type: File + outputSource: MuSE/outVcf + strelka2snv: + type: File + outputSource: mantaStrelka/snvs + strelka2indel: + type: File + outputSource: mantaStrelka/indels + VarDictout: + type: File + outputSource: VarDict/outVcf + combineVcf: + type: File + outputSource: combine/cvcf +steps: + Mutect2PL: + run: Mutect2PL.cwl + in: + tbam: tbam + nbam: nbam + Ref: Ref + normal: normal + tumor: tumor + gresource: gresource + pon: pon + interval: interval + comvcf: comvcf + out: + - filterVCF + - passVCF + - conTable + - segment + MuSE: + run: MuSE.cwl + in: + tbam: tbam + nbam: nbam + ref: Ref + region: interval + dbsnp: dbsnp + vcf: + source: + - tumor + - normal + valueFrom: $(self[0])_$(self[1])_MuSE.vcf + out: + - outVcf + bgzip: + run: bgzip.cwl + in: + ifile: interval + out: + - zfile + tabixIndex: + run: tabixIndex.cwl + in: + tfile: bgzip/zfile + type: + valueFrom: bed + out: + - idx + mantaStrelka: + run: mantaStrelka.cwl + in: + tbam: tbam + nbam: nbam + ref: Ref + region: tabixIndex/idx + out: + - snvs + - indels + - somaticSV + - diploidSV + VarDict: + run: VarDict.cwl + in: + tbam: tbam + nbam: nbam + ref: Ref + region: interval + threads: threads + vcf: + source: + - tumor + - normal + valueFrom: $(self[0])_$(self[1])_VarDict.vcf + af: + valueFrom: '0.05' + out: + - outVcf + combine: + run: combine.cwl + in: + m2: Mutect2PL/filterVCF + vd: VarDict/outVcf + mu: MuSE/outVcf + ss: mantaStrelka/snvs + si: mantaStrelka/indels + tid: tumor + nid: normal + out: + - cvcf diff --git a/cwl/SomaticCaller4/SomaticCaller4.yml b/cwl/SomaticCaller4/SomaticCaller4.yml new file mode 100644 index 0000000..b53509e --- /dev/null +++ b/cwl/SomaticCaller4/SomaticCaller4.yml @@ -0,0 +1,2 @@ +filter: PASS +threads: 8 diff --git a/cwl/SomaticCaller4/VarDict.cwl b/cwl/SomaticCaller4/VarDict.cwl new file mode 100644 index 0000000..de3a57d --- /dev/null +++ b/cwl/SomaticCaller4/VarDict.cwl @@ -0,0 +1,79 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: vardict-java +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/vardict-java:1.8.2--hdfd78af_1 +- class: ShellCommandRequirement +arguments: +- valueFrom: -b + position: 5 +- valueFrom: $(inputs.tbam.path)|$(inputs.nbam.path) + position: 6 +- valueFrom: -f + position: 7 +- valueFrom: $(inputs.af) + position: 8 +- -c +- '1' +- -S +- '2' +- -E +- '3' +- -g +- '4' +- valueFrom: ' | ' + position: 9 + shellQuote: false +- valueFrom: testsomatic.R + position: 10 +- valueFrom: ' | ' + position: 11 + shellQuote: false +- valueFrom: var2vcf_paired.pl + position: 12 +- valueFrom: -N + position: 13 +- valueFrom: TUMOR|NORMAL + position: 14 +- valueFrom: -f + position: 15 +- valueFrom: $(inputs.af) + position: 16 +inputs: + tbam: + type: File + secondaryFiles: .bai + nbam: + type: File + secondaryFiles: .bai + ref: + type: File + secondaryFiles: .fai + inputBinding: + position: 2 + prefix: -G + separate: true + region: + type: File + inputBinding: + position: 1 + separate: true + af: + type: string + default: '0.01' + vcf: + type: string + threads: + type: int + inputBinding: + position: 4 + prefix: -th + separate: true + default: 1 +outputs: + outVcf: + type: File + outputBinding: + glob: $(inputs.vcf) +stdout: $(inputs.vcf) diff --git a/cwl/SomaticCaller4/bcfview.cwl b/cwl/SomaticCaller4/bcfview.cwl new file mode 100644 index 0000000..4297877 --- /dev/null +++ b/cwl/SomaticCaller4/bcfview.cwl @@ -0,0 +1,60 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- bcftools +- view +requirements: +- class: DockerRequirement + dockerPull: biocontainers/bcftools:v1.5_cv3 +inputs: + vcf: + type: File + inputBinding: + separate: true + filter: + type: string? + inputBinding: + prefix: -f + separate: true + default: PASS + fout: + type: string + inputBinding: + prefix: -o + separate: true + otype: + type: string? + inputBinding: + prefix: -O + separate: true + default: v + sample: + type: string? + inputBinding: + prefix: -s + separate: true + samplefile: + type: File? + inputBinding: + prefix: -S + separate: true + genotype: + type: string? + inputBinding: + prefix: -g + separate: true + include: + type: string? + inputBinding: + prefix: -i + separate: true + exclude: + type: string? + inputBinding: + prefix: -e + separate: true +outputs: + Fout: + type: File + outputBinding: + glob: $(inputs.fout) diff --git a/cwl/SomaticCaller4/bgzip.cwl b/cwl/SomaticCaller4/bgzip.cwl new file mode 100644 index 0000000..a3f9938 --- /dev/null +++ b/cwl/SomaticCaller4/bgzip.cwl @@ -0,0 +1,19 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- bgzip +- -c +requirements: +- class: DockerRequirement + dockerPull: biocontainers/tabix:v1.3.2-2-deb_cv1 +inputs: + ifile: + type: File + inputBinding: + separate: true +outputs: + zfile: + type: File + outputBinding: + glob: $(inputs.ifile.basename).gz +stdout: $(inputs.ifile.basename).gz diff --git a/cwl/SomaticCaller4/combine.R b/cwl/SomaticCaller4/combine.R new file mode 100644 index 0000000..128d25f --- /dev/null +++ b/cwl/SomaticCaller4/combine.R @@ -0,0 +1,40 @@ +suppressPackageStartupMessages(library(R.utils)) +args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) +combine <- +function(ss, si, m2, mu, vd, id_t, id_n){ + ## combine + library(VariantCombiner) + + v1a <- readVcf(ss) + v1a <- v1a[fixed(v1a)$FILTER == "PASS"] + v1b <- readVcf(si) + v1b <- v1b[fixed(v1b)$FILTER == "PASS"] + s1a <- strelka_snv(v1a) + s1b <- strelka_indel(v1b) + ## strelka2 + v_s <- SomaticCombiner(s1a, s1b, sources = c("strelka2", "strelka2"), + GENO = c(GT = 1, DP = 1, AD = 1), + id_t = id_t, id_n = id_n) + ## mutect2 + m2v <- readVcf(m2) + m2v <- m2v[fixed(m2v)$FILTER %in% c("PASS", "multiallelic")] + v_m <- SomaticCombiner(m2v, v_s, source = c("mutect2", "strelka2"), + GENO = c(GT = 1, DP = 1, AD = 1), + id_t = id_t, id_n = id_n) + + ## muse + mu1 <- readVcf(mu) + mu1 <- mu1[fixed(mu1)$FILTER == "PASS"] + v_m <- SomaticCombiner(v_m, mu1, source = c("", "muse"), + GENO = c(GT = 1, DP = 1, AD = 1), + id_t = id_t, id_n = id_n) + ## vardict + vd1 <- readVcf(vd) + vd1 <- vd1[info(vd1)$STATUS == "StrongSomatic" & fixed(vd1)$FILTER == "PASS"] + vd1 <- vd1[!info(vd1)$TYPE %in% c("DEL", "DUP", "INV")] + v_m <- SomaticCombiner(v_m, vd1, source = c("", "vardict"), + GENO = c(GT = 1, DP = 1, AD = 1), + id_t = id_t, id_n = id_n) + writeVcf(v_m, paste0(id_t, "_", id_n, "_strelka2_mutect2_muse_vardict.vcf")) +} +do.call(combine, args) diff --git a/cwl/SomaticCaller4/combine.cwl b/cwl/SomaticCaller4/combine.cwl new file mode 100644 index 0000000..ef23d7e --- /dev/null +++ b/cwl/SomaticCaller4/combine.cwl @@ -0,0 +1,71 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: Rscript +requirements: +- class: InitialWorkDirRequirement + listing: + - entryname: combine.R + entry: "suppressPackageStartupMessages(library(R.utils))\nargs <- commandArgs(trailingOnly + = TRUE, asValues = TRUE)\ncombine <-\nfunction(ss, si, m2, mu, vd, id_t, id_n){\n + \ ## combine\n library(VariantCombiner)\n\n v1a <- readVcf(ss)\n v1a + <- v1a[fixed(v1a)$FILTER == \"PASS\"]\n v1b <- readVcf(si)\n v1b <- v1b[fixed(v1b)$FILTER + == \"PASS\"]\n s1a <- strelka_snv(v1a)\n s1b <- strelka_indel(v1b)\n ## + strelka2\n v_s <- SomaticCombiner(s1a, s1b, sources = c(\"strelka2\", \"strelka2\"),\n + \ GENO = c(GT = 1, DP = 1, AD = 1),\n id_t + = id_t, id_n = id_n)\n ## mutect2\n m2v <- readVcf(m2)\n m2v <- m2v[fixed(m2v)$FILTER + %in% c(\"PASS\", \"multiallelic\")]\n v_m <- SomaticCombiner(m2v, v_s, source + = c(\"mutect2\", \"strelka2\"),\n GENO = c(GT = 1, DP + = 1, AD = 1),\n id_t = id_t, id_n = id_n)\n \n ## + muse\n mu1 <- readVcf(mu)\n mu1 <- mu1[fixed(mu1)$FILTER == \"PASS\"]\n + \ v_m <- SomaticCombiner(v_m, mu1, source = c(\"\", \"muse\"),\n GENO + = c(GT = 1, DP = 1, AD = 1),\n id_t = id_t, id_n = id_n)\n + \ ## vardict\n vd1 <- readVcf(vd)\n vd1 <- vd1[info(vd1)$STATUS == \"StrongSomatic\" + & fixed(vd1)$FILTER == \"PASS\"]\n vd1 <- vd1[!info(vd1)$TYPE %in% c(\"DEL\", + \"DUP\", \"INV\")]\n v_m <- SomaticCombiner(v_m, vd1, source = c(\"\", \"vardict\"),\n + \ GENO = c(GT = 1, DP = 1, AD = 1),\n id_t + = id_t, id_n = id_n)\n writeVcf(v_m, paste0(id_t, \"_\", id_n, \"_strelka2_mutect2_muse_vardict.vcf\"))\n}\ndo.call(combine, + args)" + writable: false +arguments: +- combine.R +inputs: + ss: + type: File + inputBinding: + prefix: ss= + separate: false + si: + type: File + inputBinding: + prefix: si= + separate: false + m2: + type: File + inputBinding: + prefix: m2= + separate: false + mu: + type: File + inputBinding: + prefix: mu= + separate: false + vd: + type: File + inputBinding: + prefix: vd= + separate: false + tid: + type: string + inputBinding: + prefix: id_t= + separate: false + nid: + type: string + inputBinding: + prefix: id_n= + separate: false +outputs: + cvcf: + type: File + outputBinding: + glob: '*_strelka2_mutect2_muse_vardict.vcf' diff --git a/cwl/SomaticCaller4/manta.cwl b/cwl/SomaticCaller4/manta.cwl new file mode 100644 index 0000000..bfdd688 --- /dev/null +++ b/cwl/SomaticCaller4/manta.cwl @@ -0,0 +1,75 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: configManta.py +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/manta:1.6.0--h9ee0642_1 +- class: ShellCommandRequirement +arguments: +- --runDir +- mantaRunDir +- valueFrom: ' && ' + position: 5 + shellQuote: false +- valueFrom: mantaRunDir/runWorkflow.py + position: 6 +- valueFrom: -m + position: 7 +- valueFrom: local + position: 8 +inputs: + tbam: + type: File + secondaryFiles: .bai + inputBinding: + position: 1 + prefix: --tumorBam + separate: true + nbam: + type: File + secondaryFiles: .bai + inputBinding: + position: 2 + prefix: --normalBam + separate: true + ref: + type: File + secondaryFiles: .fai + inputBinding: + position: 3 + prefix: --referenceFasta + separate: true + callRegions: + type: File? + secondaryFiles: .tbi + inputBinding: + position: 4 + prefix: --callRegions + separate: true + exome: + type: boolean + inputBinding: + prefix: --exome + separate: true + default: true +outputs: + somaticSV: + type: File + secondaryFiles: .tbi + outputBinding: + glob: mantaRunDir/results/variants/somaticSV.vcf.gz + diploidSV: + type: File + secondaryFiles: .tbi + outputBinding: + glob: mantaRunDir/results/variants/diploidSV.vcf.gz + candidateSV: + type: File + secondaryFiles: .tbi + outputBinding: + glob: mantaRunDir/results/variants/candidateSV.vcf.gz + candidateSmallIndels: + type: File + secondaryFiles: .tbi + outputBinding: + glob: mantaRunDir/results/variants/candidateSmallIndels.vcf.gz diff --git a/cwl/SomaticCaller4/mantaStrelka.cwl b/cwl/SomaticCaller4/mantaStrelka.cwl new file mode 100644 index 0000000..369dcef --- /dev/null +++ b/cwl/SomaticCaller4/mantaStrelka.cwl @@ -0,0 +1,57 @@ +cwlVersion: v1.0 +class: Workflow +inputs: + tbam: + type: File + secondaryFiles: .bai + nbam: + type: File + secondaryFiles: .bai + ref: + type: File + secondaryFiles: .fai + region: + type: File? + secondaryFiles: .tbi + exome: + type: boolean + default: true +outputs: + snvs: + type: File + outputSource: strelka/snvs + indels: + type: File + outputSource: strelka/indels + somaticSV: + type: File + outputSource: manta/somaticSV + diploidSV: + type: File + outputSource: manta/diploidSV +steps: + manta: + run: manta.cwl + in: + tbam: tbam + nbam: nbam + ref: ref + callRegions: region + exome: exome + out: + - somaticSV + - diploidSV + - candidateSV + - candidateSmallIndels + strelka: + run: strelka.cwl + in: + tbam: tbam + nbam: nbam + ref: ref + callRegions: region + indelCandidates: manta/candidateSmallIndels + exome: exome + out: + - snvs + - indels diff --git a/cwl/SomaticCaller4/strelka.cwl b/cwl/SomaticCaller4/strelka.cwl new file mode 100644 index 0000000..eed3af6 --- /dev/null +++ b/cwl/SomaticCaller4/strelka.cwl @@ -0,0 +1,71 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: configureStrelkaSomaticWorkflow.py +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/strelka:2.9.10--h9ee0642_1 +- class: ShellCommandRequirement +arguments: +- --runDir +- strelkaRunDir +- valueFrom: ' && ' + position: 6 + shellQuote: false +- valueFrom: strelkaRunDir/runWorkflow.py + position: 7 +- valueFrom: -m + position: 8 +- valueFrom: local + position: 9 +inputs: + tbam: + type: File + secondaryFiles: .bai + inputBinding: + position: 1 + prefix: --tumorBam + separate: true + nbam: + type: File + secondaryFiles: .bai + inputBinding: + position: 2 + prefix: --normalBam + separate: true + ref: + type: File + secondaryFiles: .fai + inputBinding: + position: 3 + prefix: --referenceFasta + separate: true + callRegions: + type: File? + secondaryFiles: .tbi + inputBinding: + position: 4 + prefix: --callRegions + separate: true + indelCandidates: + type: File? + inputBinding: + position: 5 + prefix: --indelCandidates + separate: true + exome: + type: boolean + inputBinding: + prefix: --exome + separate: true + default: true +outputs: + snvs: + type: File + secondaryFiles: .tbi + outputBinding: + glob: strelkaRunDir/results/variants/somatic.snvs.vcf.gz + indels: + type: File + secondaryFiles: .tbi + outputBinding: + glob: strelkaRunDir/results/variants/somatic.indels.vcf.gz diff --git a/cwl/SomaticCaller4/tabixIndex.cwl b/cwl/SomaticCaller4/tabixIndex.cwl new file mode 100644 index 0000000..591a0ea --- /dev/null +++ b/cwl/SomaticCaller4/tabixIndex.cwl @@ -0,0 +1,28 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: tabix +requirements: +- class: DockerRequirement + dockerPull: biocontainers/tabix:v1.3.2-2-deb_cv1 +- class: InitialWorkDirRequirement + listing: + - $(inputs.tfile) +inputs: + tfile: + type: File + inputBinding: + position: 1 + separate: true + type: + type: string + inputBinding: + prefix: -p + separate: true + default: vcf +outputs: + idx: + type: File + secondaryFiles: + - .tbi + outputBinding: + glob: $(inputs.tfile.basename) diff --git a/cwl/SomaticCaller_mouse/MuSE.cwl b/cwl/SomaticCaller_mouse/MuSE.cwl new file mode 100644 index 0000000..6d6e0ad --- /dev/null +++ b/cwl/SomaticCaller_mouse/MuSE.cwl @@ -0,0 +1,83 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- MuSE +- call +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/muse:1.0.rc--h2e03b76_5 +- class: ShellCommandRequirement +- class: InlineJavascriptRequirement +arguments: +- -O +- output +- valueFrom: ' && ' + position: 5 + shellQuote: false +- valueFrom: MuSE + position: 6 +- valueFrom: sump + position: 7 +- valueFrom: -I + position: 8 +- valueFrom: output.MuSE.txt + position: 9 +inputs: + tbam: + type: File + secondaryFiles: .bai + inputBinding: + position: 1 + separate: true + nbam: + type: File + secondaryFiles: .bai + inputBinding: + position: 2 + separate: true + ref: + type: File + secondaryFiles: .fai + inputBinding: + position: 3 + prefix: -f + separate: true + region: + type: File? + inputBinding: + position: 4 + prefix: -l + separate: true + dbsnp: + type: File + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + inputBinding: + position: 10 + prefix: -D + separate: true + vcf: + type: string + inputBinding: + position: 11 + prefix: -O + separate: true + exome: + type: boolean + inputBinding: + position: 12 + prefix: -E + separate: true + default: true + genome: + type: boolean + inputBinding: + position: 12 + prefix: -G + separate: true + default: false +outputs: + outVcf: + type: File + secondaryFiles: .tbi? + outputBinding: + glob: $(inputs.vcf) diff --git a/cwl/SomaticCaller_mouse/Mutect2.cwl b/cwl/SomaticCaller_mouse/Mutect2.cwl new file mode 100644 index 0000000..2e82964 --- /dev/null +++ b/cwl/SomaticCaller_mouse/Mutect2.cwl @@ -0,0 +1,80 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- gatk +- Mutect2 +requirements: +- class: DockerRequirement + dockerPull: broadinstitute/gatk:latest +- class: InlineJavascriptRequirement +inputs: + tbam: + type: File + secondaryFiles: .bai + inputBinding: + prefix: -I + separate: true + nbam: + type: File? + secondaryFiles: .bai + inputBinding: + prefix: -I + separate: true + Ref: + type: File + secondaryFiles: + - .fai + - ^.dict + inputBinding: + prefix: -R + separate: true + normal: + type: string? + inputBinding: + prefix: -normal + separate: true + germline: + type: File? + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + inputBinding: + prefix: --germline-resource + separate: true + pon: + type: File? + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + inputBinding: + prefix: --panel-of-normals + separate: true + interval: + type: File? + inputBinding: + prefix: -L + separate: true + out: + type: string + inputBinding: + prefix: -O + separate: true + f1r2: + type: string? + inputBinding: + prefix: --f1r2-tar-gz + separate: true + default: f1r2.tar.gz + threads: + type: int? + inputBinding: + prefix: --native-pair-hmm-threads + separate: true +outputs: + vout: + type: File + secondaryFiles: + - .idx + - .stats + outputBinding: + glob: $(inputs.out) + F1r2: + type: File + outputBinding: + glob: $(inputs.f1r2) diff --git a/cwl/SomaticCaller_mouse/SomaticCaller_mouse.cwl b/cwl/SomaticCaller_mouse/SomaticCaller_mouse.cwl new file mode 100644 index 0000000..fc81953 --- /dev/null +++ b/cwl/SomaticCaller_mouse/SomaticCaller_mouse.cwl @@ -0,0 +1,138 @@ +cwlVersion: v1.0 +class: Workflow +requirements: +- class: InlineJavascriptRequirement +- class: StepInputExpressionRequirement +- class: SubworkflowFeatureRequirement +- class: MultipleInputFeatureRequirement +inputs: + tbam: + type: File + secondaryFiles: .bai + nbam: + type: File + secondaryFiles: .bai + Ref: + type: File + secondaryFiles: + - .fai + - ^.dict + normal: + type: string + tumor: + type: string + dbsnp: + type: File + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + interval: + type: File + threads: + type: int + default: 8.0 +outputs: + mutect2out: + type: File + outputSource: Mutect2/vout + MuSEout: + type: File + outputSource: MuSE/outVcf + strelka2snv: + type: File + outputSource: mantaStrelka/snvs + strelka2indel: + type: File + outputSource: mantaStrelka/indels + VarDictout: + type: File + outputSource: VarDict/outVcf + combineVcf: + type: File + outputSource: combine/cvcf +steps: + Mutect2: + run: Mutect2.cwl + in: + tbam: tbam + nbam: nbam + Ref: Ref + normal: normal + out: + source: + - tumor + - normal + valueFrom: $(self[0])_$(self[1])_mutect2.vcf + threads: threads + interval: interval + out: + - vout + - F1r2 + MuSE: + run: MuSE.cwl + in: + tbam: tbam + nbam: nbam + ref: Ref + region: interval + dbsnp: dbsnp + vcf: + source: + - tumor + - normal + valueFrom: $(self[0])_$(self[1])_MuSE.vcf + out: + - outVcf + bgzip: + run: bgzip.cwl + in: + ifile: interval + out: + - zfile + tabixIndex: + run: tabixIndex.cwl + in: + tfile: bgzip/zfile + type: + valueFrom: bed + out: + - idx + mantaStrelka: + run: mantaStrelka.cwl + in: + tbam: tbam + nbam: nbam + ref: Ref + region: tabixIndex/idx + out: + - snvs + - indels + - somaticSV + - diploidSV + VarDict: + run: VarDict.cwl + in: + tbam: tbam + nbam: nbam + ref: Ref + region: interval + threads: threads + vcf: + source: + - tumor + - normal + valueFrom: $(self[0])_$(self[1])_VarDict.vcf + af: + valueFrom: '0.05' + out: + - outVcf + combine: + run: combine.cwl + in: + m2: Mutect2/vout + vd: VarDict/outVcf + mu: MuSE/outVcf + ss: mantaStrelka/snvs + si: mantaStrelka/indels + tid: tumor + nid: normal + out: + - cvcf diff --git a/cwl/SomaticCaller_mouse/SomaticCaller_mouse.yml b/cwl/SomaticCaller_mouse/SomaticCaller_mouse.yml new file mode 100644 index 0000000..ae42664 --- /dev/null +++ b/cwl/SomaticCaller_mouse/SomaticCaller_mouse.yml @@ -0,0 +1 @@ +threads: 8.0 diff --git a/cwl/SomaticCaller_mouse/VarDict.cwl b/cwl/SomaticCaller_mouse/VarDict.cwl new file mode 100644 index 0000000..de3a57d --- /dev/null +++ b/cwl/SomaticCaller_mouse/VarDict.cwl @@ -0,0 +1,79 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: vardict-java +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/vardict-java:1.8.2--hdfd78af_1 +- class: ShellCommandRequirement +arguments: +- valueFrom: -b + position: 5 +- valueFrom: $(inputs.tbam.path)|$(inputs.nbam.path) + position: 6 +- valueFrom: -f + position: 7 +- valueFrom: $(inputs.af) + position: 8 +- -c +- '1' +- -S +- '2' +- -E +- '3' +- -g +- '4' +- valueFrom: ' | ' + position: 9 + shellQuote: false +- valueFrom: testsomatic.R + position: 10 +- valueFrom: ' | ' + position: 11 + shellQuote: false +- valueFrom: var2vcf_paired.pl + position: 12 +- valueFrom: -N + position: 13 +- valueFrom: TUMOR|NORMAL + position: 14 +- valueFrom: -f + position: 15 +- valueFrom: $(inputs.af) + position: 16 +inputs: + tbam: + type: File + secondaryFiles: .bai + nbam: + type: File + secondaryFiles: .bai + ref: + type: File + secondaryFiles: .fai + inputBinding: + position: 2 + prefix: -G + separate: true + region: + type: File + inputBinding: + position: 1 + separate: true + af: + type: string + default: '0.01' + vcf: + type: string + threads: + type: int + inputBinding: + position: 4 + prefix: -th + separate: true + default: 1 +outputs: + outVcf: + type: File + outputBinding: + glob: $(inputs.vcf) +stdout: $(inputs.vcf) diff --git a/cwl/SomaticCaller_mouse/bgzip.cwl b/cwl/SomaticCaller_mouse/bgzip.cwl new file mode 100644 index 0000000..a3f9938 --- /dev/null +++ b/cwl/SomaticCaller_mouse/bgzip.cwl @@ -0,0 +1,19 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- bgzip +- -c +requirements: +- class: DockerRequirement + dockerPull: biocontainers/tabix:v1.3.2-2-deb_cv1 +inputs: + ifile: + type: File + inputBinding: + separate: true +outputs: + zfile: + type: File + outputBinding: + glob: $(inputs.ifile.basename).gz +stdout: $(inputs.ifile.basename).gz diff --git a/cwl/SomaticCaller_mouse/combine.R b/cwl/SomaticCaller_mouse/combine.R new file mode 100644 index 0000000..2f73caf --- /dev/null +++ b/cwl/SomaticCaller_mouse/combine.R @@ -0,0 +1,40 @@ +suppressPackageStartupMessages(library(R.utils)) +args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) +combine <- +function(ss, si, m2, mu, vd, id_t, id_n){ + ## combine + library(VariantCombiner) + + v1a <- readVcf(ss) + v1a <- v1a[fixed(v1a)$FILTER == "PASS"] + v1b <- readVcf(si) + v1b <- v1b[fixed(v1b)$FILTER == "PASS"] + s1a <- strelka_snv(v1a) + s1b <- strelka_indel(v1b) + ## strelka2 + v_s <- SomaticCombiner(s1a, s1b, sources = c("strelka2", "strelka2"), + GENO = c(GT = 1, DP = 1, AD = 1), + id_t = id_t, id_n = id_n) + ## mutect2 + m2v <- readVcf(m2) + ## m2v <- m2v[fixed(m2v)$FILTER == "PASS"] + v_m <- SomaticCombiner(m2v, v_s, source = c("mutect2", "strelka2"), + GENO = c(GT = 1, DP = 1, AD = 1), + id_t = id_t, id_n = id_n) + + ## muse + mu1 <- readVcf(mu) + mu1 <- mu1[fixed(mu1)$FILTER == "PASS"] + v_m <- SomaticCombiner(v_m, mu1, source = c("", "muse"), + GENO = c(GT = 1, DP = 1, AD = 1), + id_t = id_t, id_n = id_n) + ## vardict + vd1 <- readVcf(vd) + vd1 <- vd1[info(vd1)$STATUS == "StrongSomatic" & fixed(vd1)$FILTER == "PASS"] + vd1 <- vd1[!info(vd1)$TYPE %in% c("DEL", "DUP", "INV")] + v_m <- SomaticCombiner(v_m, vd1, source = c("", "vardict"), + GENO = c(GT = 1, DP = 1, AD = 1), + id_t = id_t, id_n = id_n) + writeVcf(v_m, paste0(id_t, "_", id_n, "_strelka2_mutect2_muse_vardict.vcf")) +} +do.call(combine, args) diff --git a/cwl/SomaticCaller_mouse/combine.cwl b/cwl/SomaticCaller_mouse/combine.cwl new file mode 100644 index 0000000..30b6701 --- /dev/null +++ b/cwl/SomaticCaller_mouse/combine.cwl @@ -0,0 +1,71 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: Rscript +requirements: +- class: InitialWorkDirRequirement + listing: + - entryname: combine.R + entry: "suppressPackageStartupMessages(library(R.utils))\nargs <- commandArgs(trailingOnly + = TRUE, asValues = TRUE)\ncombine <-\nfunction(ss, si, m2, mu, vd, id_t, id_n){\n + \ ## combine\n library(VariantCombiner)\n\n v1a <- readVcf(ss)\n v1a + <- v1a[fixed(v1a)$FILTER == \"PASS\"]\n v1b <- readVcf(si)\n v1b <- v1b[fixed(v1b)$FILTER + == \"PASS\"]\n s1a <- strelka_snv(v1a)\n s1b <- strelka_indel(v1b)\n ## + strelka2\n v_s <- SomaticCombiner(s1a, s1b, sources = c(\"strelka2\", \"strelka2\"),\n + \ GENO = c(GT = 1, DP = 1, AD = 1),\n id_t + = id_t, id_n = id_n)\n ## mutect2\n m2v <- readVcf(m2)\n ## m2v <- + m2v[fixed(m2v)$FILTER == \"PASS\"]\n v_m <- SomaticCombiner(m2v, v_s, source + = c(\"mutect2\", \"strelka2\"),\n GENO = c(GT = 1, DP + = 1, AD = 1),\n id_t = id_t, id_n = id_n)\n \n ## + muse\n mu1 <- readVcf(mu)\n mu1 <- mu1[fixed(mu1)$FILTER == \"PASS\"]\n + \ v_m <- SomaticCombiner(v_m, mu1, source = c(\"\", \"muse\"),\n GENO + = c(GT = 1, DP = 1, AD = 1),\n id_t = id_t, id_n = id_n)\n + \ ## vardict\n vd1 <- readVcf(vd)\n vd1 <- vd1[info(vd1)$STATUS == \"StrongSomatic\" + & fixed(vd1)$FILTER == \"PASS\"]\n vd1 <- vd1[!info(vd1)$TYPE %in% c(\"DEL\", + \"DUP\", \"INV\")]\n v_m <- SomaticCombiner(v_m, vd1, source = c(\"\", \"vardict\"),\n + \ GENO = c(GT = 1, DP = 1, AD = 1),\n id_t + = id_t, id_n = id_n)\n writeVcf(v_m, paste0(id_t, \"_\", id_n, \"_strelka2_mutect2_muse_vardict.vcf\"))\n}\ndo.call(combine, + args)" + writable: false +arguments: +- combine.R +inputs: + ss: + type: File + inputBinding: + prefix: ss= + separate: false + si: + type: File + inputBinding: + prefix: si= + separate: false + m2: + type: File + inputBinding: + prefix: m2= + separate: false + mu: + type: File + inputBinding: + prefix: mu= + separate: false + vd: + type: File + inputBinding: + prefix: vd= + separate: false + tid: + type: string + inputBinding: + prefix: id_t= + separate: false + nid: + type: string + inputBinding: + prefix: id_n= + separate: false +outputs: + cvcf: + type: File + outputBinding: + glob: '*_strelka2_mutect2_muse_vardict.vcf' diff --git a/cwl/SomaticCaller_mouse/manta.cwl b/cwl/SomaticCaller_mouse/manta.cwl new file mode 100644 index 0000000..bfdd688 --- /dev/null +++ b/cwl/SomaticCaller_mouse/manta.cwl @@ -0,0 +1,75 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: configManta.py +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/manta:1.6.0--h9ee0642_1 +- class: ShellCommandRequirement +arguments: +- --runDir +- mantaRunDir +- valueFrom: ' && ' + position: 5 + shellQuote: false +- valueFrom: mantaRunDir/runWorkflow.py + position: 6 +- valueFrom: -m + position: 7 +- valueFrom: local + position: 8 +inputs: + tbam: + type: File + secondaryFiles: .bai + inputBinding: + position: 1 + prefix: --tumorBam + separate: true + nbam: + type: File + secondaryFiles: .bai + inputBinding: + position: 2 + prefix: --normalBam + separate: true + ref: + type: File + secondaryFiles: .fai + inputBinding: + position: 3 + prefix: --referenceFasta + separate: true + callRegions: + type: File? + secondaryFiles: .tbi + inputBinding: + position: 4 + prefix: --callRegions + separate: true + exome: + type: boolean + inputBinding: + prefix: --exome + separate: true + default: true +outputs: + somaticSV: + type: File + secondaryFiles: .tbi + outputBinding: + glob: mantaRunDir/results/variants/somaticSV.vcf.gz + diploidSV: + type: File + secondaryFiles: .tbi + outputBinding: + glob: mantaRunDir/results/variants/diploidSV.vcf.gz + candidateSV: + type: File + secondaryFiles: .tbi + outputBinding: + glob: mantaRunDir/results/variants/candidateSV.vcf.gz + candidateSmallIndels: + type: File + secondaryFiles: .tbi + outputBinding: + glob: mantaRunDir/results/variants/candidateSmallIndels.vcf.gz diff --git a/cwl/SomaticCaller_mouse/mantaStrelka.cwl b/cwl/SomaticCaller_mouse/mantaStrelka.cwl new file mode 100644 index 0000000..369dcef --- /dev/null +++ b/cwl/SomaticCaller_mouse/mantaStrelka.cwl @@ -0,0 +1,57 @@ +cwlVersion: v1.0 +class: Workflow +inputs: + tbam: + type: File + secondaryFiles: .bai + nbam: + type: File + secondaryFiles: .bai + ref: + type: File + secondaryFiles: .fai + region: + type: File? + secondaryFiles: .tbi + exome: + type: boolean + default: true +outputs: + snvs: + type: File + outputSource: strelka/snvs + indels: + type: File + outputSource: strelka/indels + somaticSV: + type: File + outputSource: manta/somaticSV + diploidSV: + type: File + outputSource: manta/diploidSV +steps: + manta: + run: manta.cwl + in: + tbam: tbam + nbam: nbam + ref: ref + callRegions: region + exome: exome + out: + - somaticSV + - diploidSV + - candidateSV + - candidateSmallIndels + strelka: + run: strelka.cwl + in: + tbam: tbam + nbam: nbam + ref: ref + callRegions: region + indelCandidates: manta/candidateSmallIndels + exome: exome + out: + - snvs + - indels diff --git a/cwl/SomaticCaller_mouse/strelka.cwl b/cwl/SomaticCaller_mouse/strelka.cwl new file mode 100644 index 0000000..eed3af6 --- /dev/null +++ b/cwl/SomaticCaller_mouse/strelka.cwl @@ -0,0 +1,71 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: configureStrelkaSomaticWorkflow.py +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/strelka:2.9.10--h9ee0642_1 +- class: ShellCommandRequirement +arguments: +- --runDir +- strelkaRunDir +- valueFrom: ' && ' + position: 6 + shellQuote: false +- valueFrom: strelkaRunDir/runWorkflow.py + position: 7 +- valueFrom: -m + position: 8 +- valueFrom: local + position: 9 +inputs: + tbam: + type: File + secondaryFiles: .bai + inputBinding: + position: 1 + prefix: --tumorBam + separate: true + nbam: + type: File + secondaryFiles: .bai + inputBinding: + position: 2 + prefix: --normalBam + separate: true + ref: + type: File + secondaryFiles: .fai + inputBinding: + position: 3 + prefix: --referenceFasta + separate: true + callRegions: + type: File? + secondaryFiles: .tbi + inputBinding: + position: 4 + prefix: --callRegions + separate: true + indelCandidates: + type: File? + inputBinding: + position: 5 + prefix: --indelCandidates + separate: true + exome: + type: boolean + inputBinding: + prefix: --exome + separate: true + default: true +outputs: + snvs: + type: File + secondaryFiles: .tbi + outputBinding: + glob: strelkaRunDir/results/variants/somatic.snvs.vcf.gz + indels: + type: File + secondaryFiles: .tbi + outputBinding: + glob: strelkaRunDir/results/variants/somatic.indels.vcf.gz diff --git a/cwl/SomaticCaller_mouse/tabixIndex.cwl b/cwl/SomaticCaller_mouse/tabixIndex.cwl new file mode 100644 index 0000000..591a0ea --- /dev/null +++ b/cwl/SomaticCaller_mouse/tabixIndex.cwl @@ -0,0 +1,28 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: tabix +requirements: +- class: DockerRequirement + dockerPull: biocontainers/tabix:v1.3.2-2-deb_cv1 +- class: InitialWorkDirRequirement + listing: + - $(inputs.tfile) +inputs: + tfile: + type: File + inputBinding: + position: 1 + separate: true + type: + type: string + inputBinding: + prefix: -p + separate: true + default: vcf +outputs: + idx: + type: File + secondaryFiles: + - .tbi + outputBinding: + glob: $(inputs.tfile.basename) diff --git a/cwl/SomaticCallers/CalculateContamination.cwl b/cwl/SomaticCallers/CalculateContamination.cwl index 90ec005..8df26f0 100644 --- a/cwl/SomaticCallers/CalculateContamination.cwl +++ b/cwl/SomaticCallers/CalculateContamination.cwl @@ -1,29 +1,38 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- gatk -- CalculateContamination -requirements: -- class: DockerRequirement - dockerPull: broadinstitute/gatk:latest -inputs: - ttable: - type: File - inputBinding: - prefix: -I - separate: true - ntable: - type: File - inputBinding: - prefix: -matched - separate: true - cont: - type: string - inputBinding: - prefix: -O - separate: true -outputs: - cout: - type: File - outputBinding: - glob: $(inputs.cont) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- gatk +- CalculateContamination +requirements: +- class: DockerRequirement + dockerPull: broadinstitute/gatk:latest +inputs: + ttable: + type: File + inputBinding: + prefix: -I + separate: true + ntable: + type: File + inputBinding: + prefix: -matched + separate: true + cont: + type: string + inputBinding: + prefix: -O + separate: true + seg: + type: string + inputBinding: + prefix: -segments + separate: true +outputs: + Cout: + type: File + outputBinding: + glob: $(inputs.cont) + Seg: + type: File + outputBinding: + glob: $(inputs.seg) diff --git a/cwl/SomaticCallers/FilterMutectCalls.cwl b/cwl/SomaticCallers/FilterMutectCalls.cwl index a956658..f30ae4b 100644 --- a/cwl/SomaticCallers/FilterMutectCalls.cwl +++ b/cwl/SomaticCallers/FilterMutectCalls.cwl @@ -1,40 +1,50 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- gatk -- FilterMutectCalls -requirements: -- class: DockerRequirement - dockerPull: broadinstitute/gatk:latest -inputs: - vcf: - type: File - secondaryFiles: - - .idx - - .stats - inputBinding: - prefix: -V - separate: true - cont: - type: File - inputBinding: - prefix: --contamination-table - separate: true - fvcf: - type: string - inputBinding: - prefix: -O - separate: true - ref: - type: File - secondaryFiles: - - .fai - - $(self.nameroot).dict - inputBinding: - prefix: -R - separate: true -outputs: - fout: - type: File - outputBinding: - glob: $(inputs.fvcf) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- gatk +- FilterMutectCalls +requirements: +- class: DockerRequirement + dockerPull: broadinstitute/gatk:latest +inputs: + vcf: + type: File + secondaryFiles: + - .idx + - .stats + inputBinding: + prefix: -V + separate: true + cont: + type: File + inputBinding: + prefix: --contamination-table + separate: true + seg: + type: File + inputBinding: + prefix: --tumor-segmentation + separate: true + lro: + type: File + inputBinding: + prefix: --ob-priors + separate: true + fvcf: + type: string + inputBinding: + prefix: -O + separate: true + ref: + type: File + secondaryFiles: + - .fai + - ^.dict + inputBinding: + prefix: -R + separate: true +outputs: + fout: + type: File + outputBinding: + glob: $(inputs.fvcf) diff --git a/cwl/SomaticCallers/GetPileupSummariesN.cwl b/cwl/SomaticCallers/GetPileupSummariesN.cwl index 0bddce1..ceb59cd 100644 --- a/cwl/SomaticCallers/GetPileupSummariesN.cwl +++ b/cwl/SomaticCallers/GetPileupSummariesN.cwl @@ -1,36 +1,38 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- gatk -- GetPileupSummaries -requirements: -- class: DockerRequirement - dockerPull: broadinstitute/gatk:latest -inputs: - bam: - type: File - inputBinding: - prefix: -I - separate: true - vcf: - type: File - secondaryFiles: .idx - inputBinding: - prefix: -V - separate: true - interval: - type: File - secondaryFiles: .idx - inputBinding: - prefix: -L - separate: true - pileup: - type: string - inputBinding: - prefix: -O - separate: true -outputs: - pout: - type: File - outputBinding: - glob: $(inputs.pileup) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- gatk +- GetPileupSummaries +requirements: +- class: DockerRequirement + dockerPull: broadinstitute/gatk:latest +- class: InlineJavascriptRequirement +inputs: + bam: + type: File + secondaryFiles: .bai + inputBinding: + prefix: -I + separate: true + vcf: + type: File + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + inputBinding: + prefix: -V + separate: true + interval: + type: File + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + inputBinding: + prefix: -L + separate: true + pileup: + type: string + inputBinding: + prefix: -O + separate: true +outputs: + pout: + type: File + outputBinding: + glob: $(inputs.pileup) diff --git a/cwl/SomaticCallers/GetPileupSummariesT.cwl b/cwl/SomaticCallers/GetPileupSummariesT.cwl index 0bddce1..ceb59cd 100644 --- a/cwl/SomaticCallers/GetPileupSummariesT.cwl +++ b/cwl/SomaticCallers/GetPileupSummariesT.cwl @@ -1,36 +1,38 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- gatk -- GetPileupSummaries -requirements: -- class: DockerRequirement - dockerPull: broadinstitute/gatk:latest -inputs: - bam: - type: File - inputBinding: - prefix: -I - separate: true - vcf: - type: File - secondaryFiles: .idx - inputBinding: - prefix: -V - separate: true - interval: - type: File - secondaryFiles: .idx - inputBinding: - prefix: -L - separate: true - pileup: - type: string - inputBinding: - prefix: -O - separate: true -outputs: - pout: - type: File - outputBinding: - glob: $(inputs.pileup) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- gatk +- GetPileupSummaries +requirements: +- class: DockerRequirement + dockerPull: broadinstitute/gatk:latest +- class: InlineJavascriptRequirement +inputs: + bam: + type: File + secondaryFiles: .bai + inputBinding: + prefix: -I + separate: true + vcf: + type: File + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + inputBinding: + prefix: -V + separate: true + interval: + type: File + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + inputBinding: + prefix: -L + separate: true + pileup: + type: string + inputBinding: + prefix: -O + separate: true +outputs: + pout: + type: File + outputBinding: + glob: $(inputs.pileup) diff --git a/cwl/SomaticCallers/LearnReadOrientationModel.cwl b/cwl/SomaticCallers/LearnReadOrientationModel.cwl new file mode 100644 index 0000000..8989b81 --- /dev/null +++ b/cwl/SomaticCallers/LearnReadOrientationModel.cwl @@ -0,0 +1,25 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- gatk +- LearnReadOrientationModel +requirements: +- class: DockerRequirement + dockerPull: broadinstitute/gatk:latest +inputs: + f1r2: + type: File + inputBinding: + prefix: -I + separate: true + romodel: + type: string + inputBinding: + prefix: -O + separate: true + default: read-orientation-model.tar.gz +outputs: + rofile: + type: File + outputBinding: + glob: $(inputs.romodel) diff --git a/cwl/SomaticCallers/LoFreq.cwl b/cwl/SomaticCallers/LoFreq.cwl index 233822d..5b407a8 100644 --- a/cwl/SomaticCallers/LoFreq.cwl +++ b/cwl/SomaticCallers/LoFreq.cwl @@ -1,65 +1,69 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- lofreq -- somatic -requirements: -- class: DockerRequirement - dockerPull: andreaswilm/lofreq:v2.1.2 -inputs: - tbam: - type: File - secondaryFiles: .bai - inputBinding: - prefix: -t - separate: true - nbam: - type: File - secondaryFiles: .bai - inputBinding: - prefix: -n - separate: true - ref: - type: File - secondaryFiles: .fai - inputBinding: - prefix: -f - separate: true - region: - type: File - inputBinding: - prefix: -l - separate: true - dbsnp: - type: File - secondaryFiles: .tbi - inputBinding: - prefix: -d - separate: true - out: - type: string - inputBinding: - prefix: -o - separate: true - threads: - type: int - inputBinding: - prefix: --threads - separate: true -outputs: - snp: - type: File - outputBinding: - glob: $(inputs.out)somatic_final.snvs.vcf.gz - snpdb: - type: File - outputBinding: - glob: $(inputs.out)somatic_final_minus-dbsnp.snvs.vcf.gz - indel: - type: File - outputBinding: - glob: $(inputs.out)somatic_final.indels.vcf.gz - indeldb: - type: File - outputBinding: - glob: $(inputs.out)somatic_final_minus-dbsnp.indels.vcf.gz +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- lofreq +- somatic +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/lofreq:2.1.5--py37h916d2e8_4 +inputs: + tbam: + type: File + secondaryFiles: .bai + inputBinding: + prefix: -t + separate: true + nbam: + type: File + secondaryFiles: .bai + inputBinding: + prefix: -n + separate: true + ref: + type: File + secondaryFiles: .fai + inputBinding: + prefix: -f + separate: true + region: + type: File + inputBinding: + prefix: -l + separate: true + dbsnp: + type: File + secondaryFiles: .tbi + inputBinding: + prefix: -d + separate: true + out: + type: string + inputBinding: + prefix: -o + separate: true + threads: + type: int + inputBinding: + prefix: --threads + separate: true +outputs: + snp: + type: File + secondaryFiles: .tbi + outputBinding: + glob: $(inputs.out)somatic_final.snvs.vcf.gz + snpdb: + type: File + secondaryFiles: .tbi + outputBinding: + glob: $(inputs.out)somatic_final_minus-dbsnp.snvs.vcf.gz + indel: + type: File + secondaryFiles: .tbi + outputBinding: + glob: $(inputs.out)somatic_final.indels.vcf.gz + indeldb: + type: File + secondaryFiles: .tbi + outputBinding: + glob: $(inputs.out)somatic_final_minus-dbsnp.indels.vcf.gz diff --git a/cwl/SomaticCallers/MuSE.cwl b/cwl/SomaticCallers/MuSE.cwl index 3ecbaa4..6d6e0ad 100644 --- a/cwl/SomaticCallers/MuSE.cwl +++ b/cwl/SomaticCallers/MuSE.cwl @@ -1,80 +1,83 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- MuSEv1.0rc_submission_c039ffa -- call -requirements: -- class: DockerRequirement - dockerPull: marghoob/muse:1.0rc_c -- class: ShellCommandRequirement -arguments: -- -O -- output -- valueFrom: ' && ' - position: 5 -- valueFrom: MuSEv1.0rc_submission_c039ffa - position: 6 -- valueFrom: sump - position: 7 -- valueFrom: -I - position: 8 -- valueFrom: output.MuSE.txt - position: 9 -inputs: - tbam: - type: File - secondaryFiles: .bai - inputBinding: - position: 1 - separate: true - nbam: - type: File - secondaryFiles: .bai - inputBinding: - position: 2 - separate: true - ref: - type: File - secondaryFiles: .fai - inputBinding: - position: 3 - prefix: -f - separate: true - region: - type: File? - inputBinding: - position: 4 - prefix: -l - separate: true - dbsnp: - type: File - secondaryFiles: .tbi - inputBinding: - position: 10 - prefix: -D - separate: true - vcf: - type: string - inputBinding: - position: 11 - prefix: -O - separate: true - exome: - type: boolean - inputBinding: - position: 12 - prefix: -E - separate: true - default: true - genome: - type: boolean - inputBinding: - position: 12 - prefix: -G - separate: true - default: false -outputs: - outVcf: - type: File - outputBinding: - glob: $(inputs.vcf) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- MuSE +- call +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/muse:1.0.rc--h2e03b76_5 +- class: ShellCommandRequirement +- class: InlineJavascriptRequirement +arguments: +- -O +- output +- valueFrom: ' && ' + position: 5 + shellQuote: false +- valueFrom: MuSE + position: 6 +- valueFrom: sump + position: 7 +- valueFrom: -I + position: 8 +- valueFrom: output.MuSE.txt + position: 9 +inputs: + tbam: + type: File + secondaryFiles: .bai + inputBinding: + position: 1 + separate: true + nbam: + type: File + secondaryFiles: .bai + inputBinding: + position: 2 + separate: true + ref: + type: File + secondaryFiles: .fai + inputBinding: + position: 3 + prefix: -f + separate: true + region: + type: File? + inputBinding: + position: 4 + prefix: -l + separate: true + dbsnp: + type: File + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + inputBinding: + position: 10 + prefix: -D + separate: true + vcf: + type: string + inputBinding: + position: 11 + prefix: -O + separate: true + exome: + type: boolean + inputBinding: + position: 12 + prefix: -E + separate: true + default: true + genome: + type: boolean + inputBinding: + position: 12 + prefix: -G + separate: true + default: false +outputs: + outVcf: + type: File + secondaryFiles: .tbi? + outputBinding: + glob: $(inputs.vcf) diff --git a/cwl/SomaticCallers/Mutect2.cwl b/cwl/SomaticCallers/Mutect2.cwl index 65b1450..2e82964 100644 --- a/cwl/SomaticCallers/Mutect2.cwl +++ b/cwl/SomaticCallers/Mutect2.cwl @@ -1,64 +1,80 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- gatk -- Mutect2 -requirements: -- class: DockerRequirement - dockerPull: broadinstitute/gatk:4.1.3.0 -inputs: - tbam: - type: File - secondaryFiles: .bai - inputBinding: - prefix: -I - separate: true - nbam: - type: File? - secondaryFiles: .bai - inputBinding: - prefix: -I - separate: true - Ref: - type: File - secondaryFiles: - - .fai - - $(self.nameroot).dict - inputBinding: - prefix: -R - separate: true - normal: - type: string? - inputBinding: - prefix: -normal - separate: true - germline: - type: File? - secondaryFiles: .idx - inputBinding: - prefix: --germline-resource - separate: true - pon: - type: File? - secondaryFiles: .idx - inputBinding: - prefix: --panel-of-normals - separate: true - interval: - type: File? - inputBinding: - prefix: -L - separate: true - out: - type: string - inputBinding: - prefix: -O - separate: true -outputs: - vout: - type: File - secondaryFiles: - - .idx - - .stats - outputBinding: - glob: $(inputs.out) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- gatk +- Mutect2 +requirements: +- class: DockerRequirement + dockerPull: broadinstitute/gatk:latest +- class: InlineJavascriptRequirement +inputs: + tbam: + type: File + secondaryFiles: .bai + inputBinding: + prefix: -I + separate: true + nbam: + type: File? + secondaryFiles: .bai + inputBinding: + prefix: -I + separate: true + Ref: + type: File + secondaryFiles: + - .fai + - ^.dict + inputBinding: + prefix: -R + separate: true + normal: + type: string? + inputBinding: + prefix: -normal + separate: true + germline: + type: File? + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + inputBinding: + prefix: --germline-resource + separate: true + pon: + type: File? + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + inputBinding: + prefix: --panel-of-normals + separate: true + interval: + type: File? + inputBinding: + prefix: -L + separate: true + out: + type: string + inputBinding: + prefix: -O + separate: true + f1r2: + type: string? + inputBinding: + prefix: --f1r2-tar-gz + separate: true + default: f1r2.tar.gz + threads: + type: int? + inputBinding: + prefix: --native-pair-hmm-threads + separate: true +outputs: + vout: + type: File + secondaryFiles: + - .idx + - .stats + outputBinding: + glob: $(inputs.out) + F1r2: + type: File + outputBinding: + glob: $(inputs.f1r2) diff --git a/cwl/SomaticCallers/Mutect2PL.cwl b/cwl/SomaticCallers/Mutect2PL.cwl index 0252eed..3cd9005 100644 --- a/cwl/SomaticCallers/Mutect2PL.cwl +++ b/cwl/SomaticCallers/Mutect2PL.cwl @@ -1,151 +1,137 @@ -cwlVersion: v1.0 -class: Workflow -requirements: -- class: InlineJavascriptRequirement -- class: StepInputExpressionRequirement -- class: MultipleInputFeatureRequirement -inputs: - tbam: - type: File - secondaryFiles: .bai - nbam: - type: File - secondaryFiles: .bai - Ref: - type: File - secondaryFiles: - - .fai - - $(self.nameroot).dict - normal: - type: string - tumor: - type: string - gresource: - type: File - secondaryFiles: .idx - pon: - type: File - secondaryFiles: .idx - interval: - type: File - comvcf: - type: File - secondaryFiles: .idx - artMode: - type: - type: array - items: string - inputBinding: - separate: true - default: - - G/T - - C/T - filter: - type: string - default: PASS -outputs: - filterVCF: - type: File - outputSource: FilterOBias/fout - passVCF: - type: File - outputSource: bcfview/Fout - conTable: - type: File - outputSource: CalculateContamination/cout - artTable: - type: File - outputSource: ColSeqArtifact/aout -steps: - Mutect2: - run: Mutect2.cwl - in: - tbam: tbam - nbam: nbam - Ref: Ref - normal: normal - germline: gresource - pon: pon - interval: interval - out: - source: - - normal - - tumor - valueFrom: $(self[0]).$(self[1]) - out: - - vout - GetPileupSummariesT: - run: GetPileupSummariesT.cwl - in: - bam: tbam - vcf: comvcf - interval: comvcf - pileup: - valueFrom: $(inputs.bam.nameroot).ptable - out: - - pout - GetPileupSummariesN: - run: GetPileupSummariesN.cwl - in: - bam: nbam - vcf: comvcf - interval: comvcf - pileup: - valueFrom: $(inputs.bam.nameroot).ptable - out: - - pout - CalculateContamination: - run: CalculateContamination.cwl - in: - ttable: GetPileupSummariesT/pout - ntable: GetPileupSummariesN/pout - cont: - source: - - tumor - valueFrom: $(self[0]).contamination.table - out: - - cout - FilterMutectCalls: - run: FilterMutectCalls.cwl - in: - vcf: Mutect2/vout - cont: CalculateContamination/cout - ref: Ref - fvcf: - source: - - normal - - tumor - valueFrom: $(self[0]).$(self[1]).ctfiltered.vcf - out: - - fout - ColSeqArtifact: - run: ColSeqArtifact.cwl - in: - bam: tbam - ref: Ref - art: - valueFrom: $(inputs.bam.nameroot).art - out: - - aout - FilterOBias: - run: FilterOBias.cwl - in: - vcf: FilterMutectCalls/fout - art: ColSeqArtifact/aout - mode: artMode - avcf: - source: - - normal - - tumor - valueFrom: $(self[0]).$(self[1]).ctfiltered.obfiltered.vcf - out: - - fout - bcfview: - run: bcfview.cwl - in: - vcf: FilterOBias/fout - filter: filter - fout: - valueFrom: $(inputs.vcf.nameroot).PASS.vcf - out: - - Fout +cwlVersion: v1.0 +class: Workflow +requirements: +- class: InlineJavascriptRequirement +- class: StepInputExpressionRequirement +- class: MultipleInputFeatureRequirement +inputs: + tbam: + type: File + secondaryFiles: .bai + nbam: + type: File + secondaryFiles: .bai + Ref: + type: File + secondaryFiles: + - .fai + - ^.dict + normal: + type: string + tumor: + type: string + gresource: + type: File + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + pon: + type: File + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + interval: + type: File + comvcf: + type: File + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + filter: + type: string + default: PASS + threads: + type: int? +outputs: + filterVCF: + type: File + outputSource: FilterMutectCalls/fout + passVCF: + type: File + outputSource: bcfview/Fout + conTable: + type: File + outputSource: CalculateContamination/Cout + segment: + type: File + outputSource: CalculateContamination/Seg +steps: + Mutect2: + run: Mutect2.cwl + in: + tbam: tbam + nbam: nbam + Ref: Ref + normal: normal + germline: gresource + pon: pon + interval: interval + threads: threads + out: + source: + - normal + - tumor + valueFrom: $(self[0]).$(self[1]) + out: + - vout + - F1r2 + GetPileupSummariesT: + run: GetPileupSummariesT.cwl + in: + bam: tbam + vcf: comvcf + interval: comvcf + pileup: + valueFrom: $(inputs.bam.nameroot).ptable + out: + - pout + GetPileupSummariesN: + run: GetPileupSummariesN.cwl + in: + bam: nbam + vcf: comvcf + interval: comvcf + pileup: + valueFrom: $(inputs.bam.nameroot).ptable + out: + - pout + CalculateContamination: + run: CalculateContamination.cwl + in: + ttable: GetPileupSummariesT/pout + ntable: GetPileupSummariesN/pout + cont: + source: + - tumor + valueFrom: $(self).contamination.table + seg: + source: + - tumor + valueFrom: $(self).segments + out: + - Cout + - Seg + LearnReadOrientationModel: + run: LearnReadOrientationModel.cwl + in: + f1r2: Mutect2/F1r2 + out: + - rofile + FilterMutectCalls: + run: FilterMutectCalls.cwl + in: + vcf: Mutect2/vout + cont: CalculateContamination/Cout + seg: CalculateContamination/Seg + lro: LearnReadOrientationModel/rofile + ref: Ref + fvcf: + source: + - normal + - tumor + valueFrom: $(self[0]).$(self[1]).filtered.vcf + out: + - fout + bcfview: + run: bcfview.cwl + in: + vcf: FilterMutectCalls/fout + filter: filter + fout: + valueFrom: $(inputs.vcf.nameroot).PASS.vcf + out: + - Fout diff --git a/cwl/SomaticCallers/SomaticCallers.R b/cwl/SomaticCallers/SomaticCallers.R deleted file mode 100644 index b7bc4d0..0000000 --- a/cwl/SomaticCallers/SomaticCallers.R +++ /dev/null @@ -1,14 +0,0 @@ -.libPaths('/home/hq/R/x86_64-pc-linux-gnu-library/4.0') -suppressPackageStartupMessages(library(R.utils)) -suppressPackageStartupMessages(library(codetools)) -args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) -SomaticCallers <- -function(esnv, eindel){ - snv1 <- read.table(esnv, header = TRUE) - indel1 <- read.table(eindel, header = TRUE) - var1 <- rbind(snv1, indel1) - var1[is.na(var1)] <- 0 - write.table(var1, file = "Ensemble.sVar.tsv", - row.names = FALSE, sep = "\t", quote = FALSE) -} -do.call(SomaticCallers, args) diff --git a/cwl/SomaticCallers/SomaticCallers.cwl b/cwl/SomaticCallers/SomaticCallers.cwl index 1274e1b..4441889 100644 --- a/cwl/SomaticCallers/SomaticCallers.cwl +++ b/cwl/SomaticCallers/SomaticCallers.cwl @@ -1,21 +1,224 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- Rscript -- cwl/SomaticCallers/SomaticCallers.R -inputs: - esnv: - type: File - inputBinding: - prefix: esnv= - separate: false - eindel: - type: File - inputBinding: - prefix: eindel= - separate: false -outputs: - tsv: - type: File - outputBinding: - glob: Ensemble.sVar.tsv +cwlVersion: v1.0 +class: Workflow +requirements: +- class: InlineJavascriptRequirement +- class: StepInputExpressionRequirement +- class: SubworkflowFeatureRequirement +inputs: + tbam: + type: File + secondaryFiles: .bai + nbam: + type: File + secondaryFiles: .bai + Ref: + type: File + secondaryFiles: + - .fai + - ^.dict + dbsnp: + type: File + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + gresource: + type: File + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + pon: + type: File + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + interval: + type: File + comvcf: + type: File + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + filter: + type: string + default: PASS + threads: + type: int + default: 8.0 +outputs: + mutect2filterVCF: + type: File + outputSource: Mutect2PL/filterVCF + mutect2passVCF: + type: File + outputSource: Mutect2PL/passVCF + mutect2conTable: + type: File + outputSource: Mutect2PL/conTable + mutect2segment: + type: File + outputSource: Mutect2PL/segment + MuSEout: + type: File + outputSource: MuSE/outVcf + strelka2snv: + type: File + outputSource: mantaStrelka/snvs + strelka2indel: + type: File + outputSource: mantaStrelka/indels + SomaticSniperout: + type: File + outputSource: SomaticSniper/outVcf + VarDictout: + type: File + outputSource: VarDict/outVcf + VarScanSnp: + type: File + outputSource: VarScanPL/sSnp + VarScanIndel: + type: File + outputSource: VarScanPL/sIndel + VarScansVcf: + type: File + outputSource: VarScanPL/sVcf + mergeTSVout: + type: File + outputSource: mergeTSV/tsv + WrapperSNV: + type: File + outputSource: Wrapper/conSNV + WrapperINDEL: + type: File + outputSource: Wrapper/conINDEL + WrapperESNV: + type: File + outputSource: Wrapper/EnsSNV + WrapperEINDEL: + type: File + outputSource: Wrapper/EnsINDEL + neusomaticVCF: + type: File + outputSource: neusomaticPL/outVcf +steps: + Mutect2PL: + run: Mutect2PL.cwl + in: + tbam: tbam + nbam: nbam + Ref: Ref + normal: + valueFrom: $(inputs.nbam.nameroot.split('_')[0]) + tumor: + valueFrom: $(inputs.tbam.nameroot.split('_')[0]) + gresource: gresource + pon: pon + interval: interval + comvcf: comvcf + out: + - filterVCF + - passVCF + - conTable + - segment + MuSE: + run: MuSE.cwl + in: + tbam: tbam + nbam: nbam + ref: Ref + region: interval + dbsnp: dbsnp + vcf: + valueFrom: $(inputs.tbam.nameroot.split('_')[0])_MuSE.vcf + out: + - outVcf + bgzip: + run: bgzip.cwl + in: + ifile: interval + out: + - zfile + tabixIndex: + run: tabixIndex.cwl + in: + tfile: bgzip/zfile + type: + valueFrom: bed + out: + - idx + mantaStrelka: + run: mantaStrelka.cwl + in: + tbam: tbam + nbam: nbam + ref: Ref + region: tabixIndex/idx + out: + - snvs + - indels + - somaticSV + - diploidSV + SomaticSniper: + run: SomaticSniper.cwl + in: + tbam: tbam + nbam: nbam + ref: Ref + vcf: + valueFrom: $(inputs.tbam.nameroot.split('_')[0])_SomaticSniper.vcf + out: + - outVcf + VarDict: + run: VarDict.cwl + in: + tbam: tbam + nbam: nbam + ref: Ref + region: interval + vcf: + valueFrom: $(inputs.tbam.nameroot.split('_')[0])_VarDict.vcf + out: + - outVcf + VarScanPL: + run: VarScanPL.cwl + in: + tbam: tbam + nbam: nbam + ref: Ref + region: interval + out: + - sSnp + - sIndel + - sVcf + Wrapper: + run: Wrapper.cwl + in: + tbam: tbam + nbam: nbam + ref: Ref + region: interval + dbsnp: dbsnp + mutect2: Mutect2PL/filterVCF + varscanSnv: VarScanPL/sSnp + varscanIndel: VarScanPL/sIndel + sniper: SomaticSniper/outVcf + vardict: VarDict/outVcf + muse: MuSE/outVcf + strelkaSnv: mantaStrelka/snvs + strelkaIndel: mantaStrelka/indels + out: + - conSNV + - conINDEL + - EnsSNV + - EnsINDEL + mergeTSV: + run: mergeTSV.cwl + in: + esnv: Wrapper/EnsSNV + eindel: Wrapper/EnsINDEL + out: + - tsv + neusomaticPL: + run: neusomaticPL.cwl + in: + tbam: tbam + nbam: nbam + ref: Ref + region: interval + ensemble: mergeTSV/tsv + threads: threads + ovcf: + valueFrom: $(inputs.tbam.nameroot.split('_')[0])_neusomatic.vcf + out: + - outVcf diff --git a/cwl/SomaticCallers/SomaticCallers.yml b/cwl/SomaticCallers/SomaticCallers.yml index 0967ef4..4d12d15 100644 --- a/cwl/SomaticCallers/SomaticCallers.yml +++ b/cwl/SomaticCallers/SomaticCallers.yml @@ -1 +1,2 @@ -{} +filter: PASS +threads: 8.0 diff --git a/cwl/SomaticCallers/SomaticSniper.cwl b/cwl/SomaticCallers/SomaticSniper.cwl index 22c3a6f..54bf3e0 100644 --- a/cwl/SomaticCallers/SomaticSniper.cwl +++ b/cwl/SomaticCallers/SomaticSniper.cwl @@ -1,41 +1,41 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: /opt/somatic-sniper/build/bin/bam-somaticsniper -requirements: -- class: DockerRequirement - dockerPull: lethalfang/somaticsniper:1.0.5.0-2 -arguments: -- -q -- '10' -- -F -- vcf -inputs: - ref: - type: File - secondaryFiles: .fai - inputBinding: - position: 1 - prefix: -f - separate: true - tbam: - type: File - secondaryFiles: .bai - inputBinding: - position: 2 - separate: true - nbam: - type: File - secondaryFiles: .bai - inputBinding: - position: 3 - separate: true - vcf: - type: string - inputBinding: - position: 4 - separate: true -outputs: - outVcf: - type: File - outputBinding: - glob: $(inputs.vcf) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: /opt/somatic-sniper/build/bin/bam-somaticsniper +requirements: +- class: DockerRequirement + dockerPull: lethalfang/somaticsniper:1.0.5.0-2 +arguments: +- -q +- '10' +- -F +- vcf +inputs: + ref: + type: File + secondaryFiles: .fai + inputBinding: + position: 1 + prefix: -f + separate: true + tbam: + type: File + secondaryFiles: .bai + inputBinding: + position: 2 + separate: true + nbam: + type: File + secondaryFiles: .bai + inputBinding: + position: 3 + separate: true + vcf: + type: string + inputBinding: + position: 4 + separate: true +outputs: + outVcf: + type: File + outputBinding: + glob: $(inputs.vcf) diff --git a/cwl/SomaticCallers/VarDict.cwl b/cwl/SomaticCallers/VarDict.cwl index 7dbf3aa..de3a57d 100644 --- a/cwl/SomaticCallers/VarDict.cwl +++ b/cwl/SomaticCallers/VarDict.cwl @@ -1,67 +1,79 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: /opt/VarDict-1.5.1/bin/VarDict -requirements: -- class: DockerRequirement - dockerPull: lethalfang/vardictjava:1.5.1 -- class: ShellCommandRequirement -arguments: -- valueFrom: -b - position: 2 -- valueFrom: $(inputs.tbam.path)|$(inputs.nbam.path) - position: 3 -- valueFrom: -f - position: 4 -- valueFrom: $(inputs.af) - position: 5 -- -c -- '1' -- -S -- '2' -- -E -- '3' -- -g -- '4' -- valueFrom: ' | ' - position: 6 -- valueFrom: /opt/VarDict/testsomatic.R - position: 7 -- valueFrom: ' | ' - position: 8 -- valueFrom: /opt/VarDict/var2vcf_paired.pl - position: 9 -- valueFrom: -N - position: 10 -- valueFrom: TUMOR|NORMAL - position: 11 -- valueFrom: -f - position: 12 -- valueFrom: $(inputs.af) - position: 13 -inputs: - tbam: - type: File - secondaryFiles: .bai - nbam: - type: File - secondaryFiles: .bai - ref: - type: File - secondaryFiles: .fai - inputBinding: - position: 1 - prefix: -G - separate: true - region: - type: File - inputBinding: - separate: true - af: - type: float - default: 0.05 - vcf: - type: string -outputs: - outVcf: - type: stdout -stdout: $(inputs.vcf) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: vardict-java +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/vardict-java:1.8.2--hdfd78af_1 +- class: ShellCommandRequirement +arguments: +- valueFrom: -b + position: 5 +- valueFrom: $(inputs.tbam.path)|$(inputs.nbam.path) + position: 6 +- valueFrom: -f + position: 7 +- valueFrom: $(inputs.af) + position: 8 +- -c +- '1' +- -S +- '2' +- -E +- '3' +- -g +- '4' +- valueFrom: ' | ' + position: 9 + shellQuote: false +- valueFrom: testsomatic.R + position: 10 +- valueFrom: ' | ' + position: 11 + shellQuote: false +- valueFrom: var2vcf_paired.pl + position: 12 +- valueFrom: -N + position: 13 +- valueFrom: TUMOR|NORMAL + position: 14 +- valueFrom: -f + position: 15 +- valueFrom: $(inputs.af) + position: 16 +inputs: + tbam: + type: File + secondaryFiles: .bai + nbam: + type: File + secondaryFiles: .bai + ref: + type: File + secondaryFiles: .fai + inputBinding: + position: 2 + prefix: -G + separate: true + region: + type: File + inputBinding: + position: 1 + separate: true + af: + type: string + default: '0.01' + vcf: + type: string + threads: + type: int + inputBinding: + position: 4 + prefix: -th + separate: true + default: 1 +outputs: + outVcf: + type: File + outputBinding: + glob: $(inputs.vcf) +stdout: $(inputs.vcf) diff --git a/cwl/SomaticCallers/VarScanPL.cwl b/cwl/SomaticCallers/VarScanPL.cwl index fab07f9..5fb98d9 100644 --- a/cwl/SomaticCallers/VarScanPL.cwl +++ b/cwl/SomaticCallers/VarScanPL.cwl @@ -1,75 +1,75 @@ -cwlVersion: v1.0 -class: Workflow -requirements: -- class: StepInputExpressionRequirement -- class: MultipleInputFeatureRequirement -inputs: - tbam: - type: File - nbam: - type: File - ref: - type: File - secondaryFiles: .fai - region: - type: File -outputs: - sSnp: - type: File - outputSource: somatic/snp - sIndel: - type: File - outputSource: somatic/indel - sVcf: - type: File - outputSource: somaticFilter/outVcf -steps: - mpileupT: - run: mpileupT.cwl - in: - bam: tbam - ref: ref - region: region - out: - - pileup - mpileupN: - run: mpileupN.cwl - in: - bam: nbam - ref: ref - region: region - out: - - pileup - somatic: - run: somatic.cwl - in: - npileup: mpileupN/pileup - tpileup: mpileupT/pileup - bname: - valueFrom: $(inputs.tpileup.nameroot) - out: - - snp - - indel - processSomatic: - run: processSomatic.cwl - in: - vcf: somatic/snp - out: - - somaticHC - - somatic - - germline - - germlineHC - - LOH - - LOHHC - somaticFilter: - run: somaticFilter.cwl - in: - vcf: processSomatic/somaticHC - indel: somatic/indel - outvcf: - source: - - tbam - - nbam - valueFrom: $(self[0].nameroot).$(self[1].nameroot).somatic.vcf - out: - - outVcf +cwlVersion: v1.0 +class: Workflow +requirements: +- class: StepInputExpressionRequirement +- class: MultipleInputFeatureRequirement +inputs: + tbam: + type: File + nbam: + type: File + ref: + type: File + secondaryFiles: .fai + region: + type: File +outputs: + sSnp: + type: File + outputSource: somatic/snp + sIndel: + type: File + outputSource: somatic/indel + sVcf: + type: File + outputSource: somaticFilter/outVcf +steps: + mpileupT: + run: mpileupT.cwl + in: + bam: tbam + ref: ref + region: region + out: + - pileup + mpileupN: + run: mpileupN.cwl + in: + bam: nbam + ref: ref + region: region + out: + - pileup + somatic: + run: somatic.cwl + in: + npileup: mpileupN/pileup + tpileup: mpileupT/pileup + bname: + valueFrom: $(inputs.tpileup.nameroot) + out: + - snp + - indel + processSomatic: + run: processSomatic.cwl + in: + vcf: somatic/snp + out: + - somaticHC + - somatic + - germline + - germlineHC + - LOH + - LOHHC + somaticFilter: + run: somaticFilter.cwl + in: + vcf: processSomatic/somaticHC + indel: somatic/indel + outvcf: + source: + - tbam + - nbam + valueFrom: $(self[0].nameroot).$(self[1].nameroot).somatic.vcf + out: + - outVcf diff --git a/cwl/SomaticCallers/Wrapper.cwl b/cwl/SomaticCallers/Wrapper.cwl index 04dfe81..62b688e 100644 --- a/cwl/SomaticCallers/Wrapper.cwl +++ b/cwl/SomaticCallers/Wrapper.cwl @@ -1,110 +1,110 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: /opt/somaticseq/SomaticSeq.Wrapper.sh -requirements: -- class: DockerRequirement - dockerPull: lethalfang/somaticseq:2.7.2 -arguments: -- --output-dir -- '.' -- --gatk -- /opt/GATK/GenomeAnalysisTK.jar -inputs: - ref: - type: File - secondaryFiles: - - .fai - - $(self.nameroot).dict - inputBinding: - prefix: --genome-reference - separate: true - tbam: - type: File - secondaryFiles: .bai - inputBinding: - prefix: --tumor-bam - separate: true - nbam: - type: File - secondaryFiles: .bai - inputBinding: - prefix: --normal-bam - separate: true - mutect2: - type: File? - inputBinding: - prefix: --mutect2 - separate: true - varscanSnv: - type: File? - inputBinding: - prefix: --varscan-snv - separate: true - varscanIndel: - type: File? - inputBinding: - prefix: --varscan-indel - separate: true - sniper: - type: File? - inputBinding: - prefix: --sniper - separate: true - vardict: - type: File? - inputBinding: - prefix: --vardict - separate: true - muse: - type: File? - inputBinding: - prefix: --muse - separate: true - strelkaSnv: - type: File? - inputBinding: - prefix: --strelka-snv - separate: true - strelkaIndel: - type: File? - inputBinding: - prefix: --strelka-indel - separate: true - lofreqSnv: - type: File? - inputBinding: - prefix: --lofreq-snv - separate: true - lofreqIndel: - type: File? - inputBinding: - prefix: --lofreq-indel - separate: true - region: - type: File? - inputBinding: - prefix: --inclusion-region - separate: true - dbsnp: - type: File - secondaryFiles: .tbi - inputBinding: - prefix: --dbsnp - separate: true -outputs: - conSNV: - type: File - outputBinding: - glob: Consensus.sSNV.vcf - conINDEL: - type: File - outputBinding: - glob: Consensus.sINDEL.vcf - EnsSNV: - type: File - outputBinding: - glob: Ensemble.sSNV.tsv - EnsINDEL: - type: File - outputBinding: - glob: Ensemble.sINDEL.tsv +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: /opt/somaticseq/SomaticSeq.Wrapper.sh +requirements: +- class: DockerRequirement + dockerPull: lethalfang/somaticseq:2.7.2 +arguments: +- --output-dir +- '.' +- --gatk +- /opt/GATK/GenomeAnalysisTK.jar +inputs: + ref: + type: File + secondaryFiles: + - .fai + - ^.dict + inputBinding: + prefix: --genome-reference + separate: true + tbam: + type: File + secondaryFiles: .bai + inputBinding: + prefix: --tumor-bam + separate: true + nbam: + type: File + secondaryFiles: .bai + inputBinding: + prefix: --normal-bam + separate: true + mutect2: + type: File? + inputBinding: + prefix: --mutect2 + separate: true + varscanSnv: + type: File? + inputBinding: + prefix: --varscan-snv + separate: true + varscanIndel: + type: File? + inputBinding: + prefix: --varscan-indel + separate: true + sniper: + type: File? + inputBinding: + prefix: --sniper + separate: true + vardict: + type: File? + inputBinding: + prefix: --vardict + separate: true + muse: + type: File? + inputBinding: + prefix: --muse + separate: true + strelkaSnv: + type: File? + inputBinding: + prefix: --strelka-snv + separate: true + strelkaIndel: + type: File? + inputBinding: + prefix: --strelka-indel + separate: true + lofreqSnv: + type: File? + inputBinding: + prefix: --lofreq-snv + separate: true + lofreqIndel: + type: File? + inputBinding: + prefix: --lofreq-indel + separate: true + region: + type: File? + inputBinding: + prefix: --inclusion-region + separate: true + dbsnp: + type: File + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + inputBinding: + prefix: --dbsnp + separate: true +outputs: + conSNV: + type: File + outputBinding: + glob: Consensus.sSNV.vcf + conINDEL: + type: File + outputBinding: + glob: Consensus.sINDEL.vcf + EnsSNV: + type: File + outputBinding: + glob: Ensemble.sSNV.tsv + EnsINDEL: + type: File + outputBinding: + glob: Ensemble.sINDEL.tsv diff --git a/cwl/SomaticCallers/bcfview.cwl b/cwl/SomaticCallers/bcfview.cwl index 476bd81..4297877 100644 --- a/cwl/SomaticCallers/bcfview.cwl +++ b/cwl/SomaticCallers/bcfview.cwl @@ -1,60 +1,60 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- bcftools -- view -requirements: -- class: DockerRequirement - dockerPull: biocontainers/bcftools:v1.5_cv3 -inputs: - vcf: - type: File - inputBinding: - separate: true - filter: - type: string? - inputBinding: - prefix: -f - separate: true - default: PASS - fout: - type: string - inputBinding: - prefix: -o - separate: true - otype: - type: string? - inputBinding: - prefix: -O - separate: true - default: v - sample: - type: string? - inputBinding: - prefix: -s - separate: true - samplefile: - type: File? - inputBinding: - prefix: -S - separate: true - genotype: - type: string? - inputBinding: - prefix: -g - separate: true - include: - type: string? - inputBinding: - prefix: -i - separate: true - exclude: - type: string? - inputBinding: - prefix: -e - separate: true -outputs: - Fout: - type: File - outputBinding: - glob: $(inputs.fout) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- bcftools +- view +requirements: +- class: DockerRequirement + dockerPull: biocontainers/bcftools:v1.5_cv3 +inputs: + vcf: + type: File + inputBinding: + separate: true + filter: + type: string? + inputBinding: + prefix: -f + separate: true + default: PASS + fout: + type: string + inputBinding: + prefix: -o + separate: true + otype: + type: string? + inputBinding: + prefix: -O + separate: true + default: v + sample: + type: string? + inputBinding: + prefix: -s + separate: true + samplefile: + type: File? + inputBinding: + prefix: -S + separate: true + genotype: + type: string? + inputBinding: + prefix: -g + separate: true + include: + type: string? + inputBinding: + prefix: -i + separate: true + exclude: + type: string? + inputBinding: + prefix: -e + separate: true +outputs: + Fout: + type: File + outputBinding: + glob: $(inputs.fout) diff --git a/cwl/SomaticCallers/bgzip.cwl b/cwl/SomaticCallers/bgzip.cwl index 8d9129b..a3f9938 100644 --- a/cwl/SomaticCallers/bgzip.cwl +++ b/cwl/SomaticCallers/bgzip.cwl @@ -1,19 +1,19 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- bgzip -- -c -requirements: -- class: DockerRequirement - dockerPull: biocontainers/tabix:v1.3.2-2-deb_cv1 -inputs: - ifile: - type: File - inputBinding: - separate: true -outputs: - zfile: - type: File - outputBinding: - glob: $(inputs.ifile.basename).gz -stdout: $(inputs.ifile.basename).gz +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- bgzip +- -c +requirements: +- class: DockerRequirement + dockerPull: biocontainers/tabix:v1.3.2-2-deb_cv1 +inputs: + ifile: + type: File + inputBinding: + separate: true +outputs: + zfile: + type: File + outputBinding: + glob: $(inputs.ifile.basename).gz +stdout: $(inputs.ifile.basename).gz diff --git a/cwl/SomaticCallers/call.cwl b/cwl/SomaticCallers/call.cwl index 01f3a46..c9f9fbb 100644 --- a/cwl/SomaticCallers/call.cwl +++ b/cwl/SomaticCallers/call.cwl @@ -1,38 +1,38 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- python -- /opt/neusomatic/neusomatic/python/call.py -requirements: -- class: DockerRequirement - dockerPull: msahraeian/neusomatic -arguments: -- --out -- '.' -- --ensemble -- --batch_size -- '100' -inputs: - candidates: - type: File[] - secondaryFiles: .idx - inputBinding: - prefix: --candidates_tsv - separate: true - ref: - type: File - secondaryFiles: .fai - inputBinding: - prefix: --reference - separate: true - checkpoint: - type: string - inputBinding: - prefix: --checkpoint - separate: true - default: /opt/neusomatic/neusomatic/models/NeuSomatic_v0.1.4_ensemble_SEQC-WGS-Spike.pth -outputs: - pred: - type: File - outputBinding: - glob: pred.vcf +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- python +- /opt/neusomatic/neusomatic/python/call.py +requirements: +- class: DockerRequirement + dockerPull: msahraeian/neusomatic +arguments: +- --out +- '.' +- --ensemble +- --batch_size +- '100' +inputs: + candidates: + type: File[] + secondaryFiles: .idx + inputBinding: + prefix: --candidates_tsv + separate: true + ref: + type: File + secondaryFiles: .fai + inputBinding: + prefix: --reference + separate: true + checkpoint: + type: string + inputBinding: + prefix: --checkpoint + separate: true + default: /opt/neusomatic/neusomatic/models/NeuSomatic_v0.1.4_ensemble_SEQC-WGS-Spike.pth +outputs: + pred: + type: File + outputBinding: + glob: pred.vcf diff --git a/cwl/SomaticCallers/manta.cwl b/cwl/SomaticCallers/manta.cwl index b72127a..bfdd688 100644 --- a/cwl/SomaticCallers/manta.cwl +++ b/cwl/SomaticCallers/manta.cwl @@ -1,69 +1,75 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: configManta.py -requirements: -- class: DockerRequirement - dockerPull: cmopipeline/strelka2_manta -- class: ShellCommandRequirement -arguments: -- --runDir -- mantaRunDir -- --exome -- valueFrom: ' && ' - position: 5 -- valueFrom: mantaRunDir/runWorkflow.py - position: 6 -- valueFrom: -m - position: 7 -- valueFrom: local - position: 8 -inputs: - tbam: - type: File - secondaryFiles: .bai - inputBinding: - position: 1 - prefix: --tumorBam - separate: true - nbam: - type: File - secondaryFiles: .bai - inputBinding: - position: 2 - prefix: --normalBam - separate: true - ref: - type: File - secondaryFiles: .fai - inputBinding: - position: 3 - prefix: --referenceFasta - separate: true - callRegions: - type: File? - secondaryFiles: .tbi - inputBinding: - position: 4 - prefix: --callRegions - separate: true -outputs: - somaticSV: - type: File - secondaryFiles: .tbi - outputBinding: - glob: mantaRunDir/results/variants/somaticSV.vcf.gz - diploidSV: - type: File - secondaryFiles: .tbi - outputBinding: - glob: mantaRunDir/results/variants/diploidSV.vcf.gz - candidateSV: - type: File - secondaryFiles: .tbi - outputBinding: - glob: mantaRunDir/results/variants/candidateSV.vcf.gz - candidateSmallIndels: - type: File - secondaryFiles: .tbi - outputBinding: - glob: mantaRunDir/results/variants/candidateSmallIndels.vcf.gz +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: configManta.py +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/manta:1.6.0--h9ee0642_1 +- class: ShellCommandRequirement +arguments: +- --runDir +- mantaRunDir +- valueFrom: ' && ' + position: 5 + shellQuote: false +- valueFrom: mantaRunDir/runWorkflow.py + position: 6 +- valueFrom: -m + position: 7 +- valueFrom: local + position: 8 +inputs: + tbam: + type: File + secondaryFiles: .bai + inputBinding: + position: 1 + prefix: --tumorBam + separate: true + nbam: + type: File + secondaryFiles: .bai + inputBinding: + position: 2 + prefix: --normalBam + separate: true + ref: + type: File + secondaryFiles: .fai + inputBinding: + position: 3 + prefix: --referenceFasta + separate: true + callRegions: + type: File? + secondaryFiles: .tbi + inputBinding: + position: 4 + prefix: --callRegions + separate: true + exome: + type: boolean + inputBinding: + prefix: --exome + separate: true + default: true +outputs: + somaticSV: + type: File + secondaryFiles: .tbi + outputBinding: + glob: mantaRunDir/results/variants/somaticSV.vcf.gz + diploidSV: + type: File + secondaryFiles: .tbi + outputBinding: + glob: mantaRunDir/results/variants/diploidSV.vcf.gz + candidateSV: + type: File + secondaryFiles: .tbi + outputBinding: + glob: mantaRunDir/results/variants/candidateSV.vcf.gz + candidateSmallIndels: + type: File + secondaryFiles: .tbi + outputBinding: + glob: mantaRunDir/results/variants/candidateSmallIndels.vcf.gz diff --git a/cwl/SomaticCallers/mantaStrelka.cwl b/cwl/SomaticCallers/mantaStrelka.cwl index d4a28de..369dcef 100644 --- a/cwl/SomaticCallers/mantaStrelka.cwl +++ b/cwl/SomaticCallers/mantaStrelka.cwl @@ -1,52 +1,57 @@ -cwlVersion: v1.0 -class: Workflow -inputs: - tbam: - type: File - secondaryFiles: .bai - nbam: - type: File - secondaryFiles: .bai - ref: - type: File - secondaryFiles: .fai - region: - type: File? - secondaryFiles: .tbi -outputs: - snvs: - type: File - outputSource: strelka/snvs - indels: - type: File - outputSource: strelka/indels - somaticSV: - type: File - outputSource: manta/somaticSV - diploidSV: - type: File - outputSource: manta/diploidSV -steps: - manta: - run: manta.cwl - in: - tbam: tbam - nbam: nbam - ref: ref - callRegions: region - out: - - somaticSV - - diploidSV - - candidateSV - - candidateSmallIndels - strelka: - run: strelka.cwl - in: - tbam: tbam - nbam: nbam - ref: ref - callRegions: region - indelCandidates: manta/candidateSmallIndels - out: - - snvs - - indels +cwlVersion: v1.0 +class: Workflow +inputs: + tbam: + type: File + secondaryFiles: .bai + nbam: + type: File + secondaryFiles: .bai + ref: + type: File + secondaryFiles: .fai + region: + type: File? + secondaryFiles: .tbi + exome: + type: boolean + default: true +outputs: + snvs: + type: File + outputSource: strelka/snvs + indels: + type: File + outputSource: strelka/indels + somaticSV: + type: File + outputSource: manta/somaticSV + diploidSV: + type: File + outputSource: manta/diploidSV +steps: + manta: + run: manta.cwl + in: + tbam: tbam + nbam: nbam + ref: ref + callRegions: region + exome: exome + out: + - somaticSV + - diploidSV + - candidateSV + - candidateSmallIndels + strelka: + run: strelka.cwl + in: + tbam: tbam + nbam: nbam + ref: ref + callRegions: region + indelCandidates: manta/candidateSmallIndels + exome: exome + out: + - snvs + - indels diff --git a/cwl/SomaticCallers/mergeTSV.R b/cwl/SomaticCallers/mergeTSV.R index 4ae5d0c..ca63310 100644 --- a/cwl/SomaticCallers/mergeTSV.R +++ b/cwl/SomaticCallers/mergeTSV.R @@ -1,13 +1,12 @@ -suppressPackageStartupMessages(library(R.utils)) -suppressPackageStartupMessages(library(codetools)) -args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) -mergeTSV <- -function(esnv, eindel){ - snv1 <- read.table(esnv, header = TRUE) - indel1 <- read.table(eindel, header = TRUE) - var1 <- rbind(snv1, indel1) - var1[is.na(var1)] <- 0 - write.table(var1, file = "Ensemble.sVar.tsv", - row.names = FALSE, sep = "\t", quote = FALSE) -} -do.call(mergeTSV, args) +suppressPackageStartupMessages(library(R.utils)) +args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) +mergeTSV <- +function(esnv, eindel){ + snv1 <- read.table(esnv, header = TRUE) + indel1 <- read.table(eindel, header = TRUE) + var1 <- rbind(snv1, indel1) + var1[is.na(var1)] <- 0 + write.table(var1, file = "Ensemble.sVar.tsv", + row.names = FALSE, sep = "\t", quote = FALSE) +} +do.call(mergeTSV, args) diff --git a/cwl/SomaticCallers/mergeTSV.cwl b/cwl/SomaticCallers/mergeTSV.cwl index 96793c5..dfc4a09 100644 --- a/cwl/SomaticCallers/mergeTSV.cwl +++ b/cwl/SomaticCallers/mergeTSV.cwl @@ -1,21 +1,39 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- Rscript -- cwl/SomaticCallers/mergeTSV.R -inputs: - esnv: - type: File - inputBinding: - prefix: esnv= - separate: false - eindel: - type: File - inputBinding: - prefix: eindel= - separate: false -outputs: - tsv: - type: File - outputBinding: - glob: Ensemble.sVar.tsv +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: Rscript +requirements: +- class: InitialWorkDirRequirement + listing: + - entryname: mergeTSV.R + entry: |- + suppressPackageStartupMessages(library(R.utils)) + args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) + mergeTSV <- + function(esnv, eindel){ + snv1 <- read.table(esnv, header = TRUE) + indel1 <- read.table(eindel, header = TRUE) + var1 <- rbind(snv1, indel1) + var1[is.na(var1)] <- 0 + write.table(var1, file = "Ensemble.sVar.tsv", + row.names = FALSE, sep = "\t", quote = FALSE) + } + do.call(mergeTSV, args) + writable: false +arguments: +- mergeTSV.R +inputs: + esnv: + type: File + inputBinding: + prefix: esnv= + separate: false + eindel: + type: File + inputBinding: + prefix: eindel= + separate: false +outputs: + tsv: + type: File + outputBinding: + glob: Ensemble.sVar.tsv diff --git a/cwl/SomaticCallers/mpileupN.cwl b/cwl/SomaticCallers/mpileupN.cwl index 1d0d9e1..2c4bd18 100644 --- a/cwl/SomaticCallers/mpileupN.cwl +++ b/cwl/SomaticCallers/mpileupN.cwl @@ -1,30 +1,30 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- samtools -- mpileup -requirements: -- class: DockerRequirement - dockerPull: biocontainers/samtools:v1.7.0_cv3 -inputs: - bam: - type: File - inputBinding: - separate: true - ref: - type: File - secondaryFiles: .fai - inputBinding: - prefix: -f - separate: true - region: - type: File? - inputBinding: - prefix: -l - separate: true -outputs: - pileup: - type: File - outputBinding: - glob: $(inputs.bam.nameroot).pileup -stdout: $(inputs.bam.nameroot).pileup +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- mpileup +requirements: +- class: DockerRequirement + dockerPull: biocontainers/samtools:v1.7.0_cv3 +inputs: + bam: + type: File + inputBinding: + separate: true + ref: + type: File + secondaryFiles: .fai + inputBinding: + prefix: -f + separate: true + region: + type: File? + inputBinding: + prefix: -l + separate: true +outputs: + pileup: + type: File + outputBinding: + glob: $(inputs.bam.nameroot).pileup +stdout: $(inputs.bam.nameroot).pileup diff --git a/cwl/SomaticCallers/mpileupT.cwl b/cwl/SomaticCallers/mpileupT.cwl index 1d0d9e1..2c4bd18 100644 --- a/cwl/SomaticCallers/mpileupT.cwl +++ b/cwl/SomaticCallers/mpileupT.cwl @@ -1,30 +1,30 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- samtools -- mpileup -requirements: -- class: DockerRequirement - dockerPull: biocontainers/samtools:v1.7.0_cv3 -inputs: - bam: - type: File - inputBinding: - separate: true - ref: - type: File - secondaryFiles: .fai - inputBinding: - prefix: -f - separate: true - region: - type: File? - inputBinding: - prefix: -l - separate: true -outputs: - pileup: - type: File - outputBinding: - glob: $(inputs.bam.nameroot).pileup -stdout: $(inputs.bam.nameroot).pileup +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- mpileup +requirements: +- class: DockerRequirement + dockerPull: biocontainers/samtools:v1.7.0_cv3 +inputs: + bam: + type: File + inputBinding: + separate: true + ref: + type: File + secondaryFiles: .fai + inputBinding: + prefix: -f + separate: true + region: + type: File? + inputBinding: + prefix: -l + separate: true +outputs: + pileup: + type: File + outputBinding: + glob: $(inputs.bam.nameroot).pileup +stdout: $(inputs.bam.nameroot).pileup diff --git a/cwl/SomaticCallers/neusomaticPL.cwl b/cwl/SomaticCallers/neusomaticPL.cwl index 0e42c66..58916ff 100644 --- a/cwl/SomaticCallers/neusomaticPL.cwl +++ b/cwl/SomaticCallers/neusomaticPL.cwl @@ -1,56 +1,56 @@ -cwlVersion: v1.0 -class: Workflow -inputs: - tbam: - type: File - secondaryFiles: .bai - nbam: - type: File - secondaryFiles: .bai - ref: - type: File - secondaryFiles: .fai - region: - type: File - ensemble: - type: File - threads: - type: int - default: 2 - ovcf: - type: string -outputs: - outVcf: - type: File - outputSource: postprocess/oVcf -steps: - preprocess: - run: preprocess.cwl - in: - tbam: tbam - nbam: nbam - ref: ref - ensemble: ensemble - region: region - threads: threads - out: - - candidates - - fcandidates - call: - run: call.cwl - in: - candidates: preprocess/candidates - ref: ref - out: - - pred - postprocess: - run: postprocess.cwl - in: - ref: ref - tbam: tbam - pred: call/pred - fcandidates: preprocess/fcandidates - ensemble: ensemble - ovcf: ovcf - out: - - oVcf +cwlVersion: v1.0 +class: Workflow +inputs: + tbam: + type: File + secondaryFiles: .bai + nbam: + type: File + secondaryFiles: .bai + ref: + type: File + secondaryFiles: .fai + region: + type: File + ensemble: + type: File + threads: + type: int + default: 2 + ovcf: + type: string +outputs: + outVcf: + type: File + outputSource: postprocess/oVcf +steps: + preprocess: + run: preprocess.cwl + in: + tbam: tbam + nbam: nbam + ref: ref + ensemble: ensemble + region: region + threads: threads + out: + - candidates + - fcandidates + call: + run: call.cwl + in: + candidates: preprocess/candidates + ref: ref + out: + - pred + postprocess: + run: postprocess.cwl + in: + ref: ref + tbam: tbam + pred: call/pred + fcandidates: preprocess/fcandidates + ensemble: ensemble + ovcf: ovcf + out: + - oVcf diff --git a/cwl/SomaticCallers/postprocess.cwl b/cwl/SomaticCallers/postprocess.cwl index 13ed9a6..dd994df 100644 --- a/cwl/SomaticCallers/postprocess.cwl +++ b/cwl/SomaticCallers/postprocess.cwl @@ -1,49 +1,49 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- python -- /opt/neusomatic/neusomatic/python/postprocess.py -requirements: -- class: DockerRequirement - dockerPull: msahraeian/neusomatic -arguments: -- --work -- '.' -inputs: - ref: - type: File - secondaryFiles: .fai - inputBinding: - prefix: --reference - separate: true - tbam: - type: File - secondaryFiles: .bai - inputBinding: - prefix: --tumor_bam - separate: true - pred: - type: File - inputBinding: - prefix: --pred_vcf - separate: true - fcandidates: - type: File - inputBinding: - prefix: --candidates_vcf - separate: true - ensemble: - type: File - inputBinding: - prefix: --ensemble_tsv - separate: true - ovcf: - type: string - inputBinding: - prefix: --output_vcf - separate: true -outputs: - oVcf: - type: File - outputBinding: - glob: $(inputs.ovcf) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- python +- /opt/neusomatic/neusomatic/python/postprocess.py +requirements: +- class: DockerRequirement + dockerPull: msahraeian/neusomatic +arguments: +- --work +- '.' +inputs: + ref: + type: File + secondaryFiles: .fai + inputBinding: + prefix: --reference + separate: true + tbam: + type: File + secondaryFiles: .bai + inputBinding: + prefix: --tumor_bam + separate: true + pred: + type: File + inputBinding: + prefix: --pred_vcf + separate: true + fcandidates: + type: File + inputBinding: + prefix: --candidates_vcf + separate: true + ensemble: + type: File + inputBinding: + prefix: --ensemble_tsv + separate: true + ovcf: + type: string + inputBinding: + prefix: --output_vcf + separate: true +outputs: + oVcf: + type: File + outputBinding: + glob: $(inputs.ovcf) diff --git a/cwl/SomaticCallers/preprocess.cwl b/cwl/SomaticCallers/preprocess.cwl index 5edfebf..8a24ccd 100644 --- a/cwl/SomaticCallers/preprocess.cwl +++ b/cwl/SomaticCallers/preprocess.cwl @@ -1,71 +1,71 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- python -- /opt/neusomatic/neusomatic/python/preprocess.py -requirements: -- class: DockerRequirement - dockerPull: msahraeian/neusomatic -- class: ShellCommandRequirement -arguments: -- --mode -- call -- --work -- '.' -- --scan_alignments_binary -- /opt/neusomatic/neusomatic/bin/scan_alignments -- valueFrom: '&& for i in `ls dataset/*/*tsv*`; do can=`echo $i | sed ''s/\/candidates/_candidates/''`; - cp $i $can;done' - position: 10 - shellQuote: false -inputs: - tbam: - type: File - secondaryFiles: .bai - inputBinding: - prefix: --tumor_bam - separate: true - nbam: - type: File - secondaryFiles: .bai - inputBinding: - prefix: --normal_bam - separate: true - ref: - type: File - secondaryFiles: .fai - inputBinding: - prefix: --reference - separate: true - region: - type: File - inputBinding: - prefix: --region_bed - separate: true - ensemble: - type: File - inputBinding: - prefix: --ensemble_tsv - separate: true - mapq: - type: int - inputBinding: - prefix: --min_mapq - separate: true - default: 10 - threads: - type: int - inputBinding: - prefix: --num_threads - separate: true - default: 2 -outputs: - candidates: - type: File[] - secondaryFiles: .idx - outputBinding: - glob: dataset/work*candidates*.tsv - fcandidates: - type: File - outputBinding: - glob: work_tumor/filtered_candidates.vcf +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- python +- /opt/neusomatic/neusomatic/python/preprocess.py +requirements: +- class: DockerRequirement + dockerPull: msahraeian/neusomatic +- class: ShellCommandRequirement +arguments: +- --mode +- call +- --work +- '.' +- --scan_alignments_binary +- /opt/neusomatic/neusomatic/bin/scan_alignments +- valueFrom: '&& for i in `ls dataset/*/*tsv*`; do can=`echo $i | sed ''s/\/candidates/_candidates/''`; + cp $i $can;done' + position: 10 + shellQuote: false +inputs: + tbam: + type: File + secondaryFiles: .bai + inputBinding: + prefix: --tumor_bam + separate: true + nbam: + type: File + secondaryFiles: .bai + inputBinding: + prefix: --normal_bam + separate: true + ref: + type: File + secondaryFiles: .fai + inputBinding: + prefix: --reference + separate: true + region: + type: File + inputBinding: + prefix: --region_bed + separate: true + ensemble: + type: File + inputBinding: + prefix: --ensemble_tsv + separate: true + mapq: + type: int + inputBinding: + prefix: --min_mapq + separate: true + default: 10 + threads: + type: int + inputBinding: + prefix: --num_threads + separate: true + default: 2 +outputs: + candidates: + type: File[] + secondaryFiles: .idx + outputBinding: + glob: dataset/work*candidates*.tsv + fcandidates: + type: File + outputBinding: + glob: work_tumor/filtered_candidates.vcf diff --git a/cwl/SomaticCallers/processSomatic.cwl b/cwl/SomaticCallers/processSomatic.cwl index 0d7767d..be60998 100644 --- a/cwl/SomaticCallers/processSomatic.cwl +++ b/cwl/SomaticCallers/processSomatic.cwl @@ -1,43 +1,43 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- java -- -jar -- /opt/varscan/VarScan.jar -- processSomatic -requirements: -- class: DockerRequirement - dockerPull: mgibio/varscan-cwl:v2.4.2-samtools1.3.1 -- class: InitialWorkDirRequirement - listing: - - $(inputs.vcf) -inputs: - vcf: - type: File - inputBinding: - separate: true -outputs: - somaticHC: - type: File - outputBinding: - glob: $(inputs.vcf.nameroot).Somatic.hc.vcf - somatic: - type: File - outputBinding: - glob: $(inputs.vcf.nameroot).Somatic.vcf - germline: - type: File - outputBinding: - glob: $(inputs.vcf.nameroot).Germline.vcf - germlineHC: - type: File - outputBinding: - glob: $(inputs.vcf.nameroot).Germline.hc.vcf - LOH: - type: File - outputBinding: - glob: $(inputs.vcf.nameroot).LOH.vcf - LOHHC: - type: File - outputBinding: - glob: $(inputs.vcf.nameroot).LOH.hc.vcf +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- java +- -jar +- /opt/varscan/VarScan.jar +- processSomatic +requirements: +- class: DockerRequirement + dockerPull: mgibio/varscan-cwl:v2.4.2-samtools1.3.1 +- class: InitialWorkDirRequirement + listing: + - $(inputs.vcf) +inputs: + vcf: + type: File + inputBinding: + separate: true +outputs: + somaticHC: + type: File + outputBinding: + glob: $(inputs.vcf.nameroot).Somatic.hc.vcf + somatic: + type: File + outputBinding: + glob: $(inputs.vcf.nameroot).Somatic.vcf + germline: + type: File + outputBinding: + glob: $(inputs.vcf.nameroot).Germline.vcf + germlineHC: + type: File + outputBinding: + glob: $(inputs.vcf.nameroot).Germline.hc.vcf + LOH: + type: File + outputBinding: + glob: $(inputs.vcf.nameroot).LOH.vcf + LOHHC: + type: File + outputBinding: + glob: $(inputs.vcf.nameroot).LOH.hc.vcf diff --git a/cwl/SomaticCallers/somatic.cwl b/cwl/SomaticCallers/somatic.cwl index 7fcd8df..35be054 100644 --- a/cwl/SomaticCallers/somatic.cwl +++ b/cwl/SomaticCallers/somatic.cwl @@ -1,42 +1,42 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- java -- -jar -- /opt/varscan/VarScan.jar -- somatic -requirements: -- class: DockerRequirement - dockerPull: mgibio/varscan-cwl:v2.4.2-samtools1.3.1 -inputs: - npileup: - type: File - inputBinding: - position: 1 - separate: true - tpileup: - type: File - inputBinding: - position: 2 - separate: true - bname: - type: string - inputBinding: - position: 3 - separate: true - vcfout: - type: boolean - inputBinding: - position: 4 - prefix: --output-vcf - separate: true - default: true -outputs: - snp: - type: File - outputBinding: - glob: $(inputs.bname).snp.vcf - indel: - type: File - outputBinding: - glob: $(inputs.bname).indel.vcf +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- java +- -jar +- /opt/varscan/VarScan.jar +- somatic +requirements: +- class: DockerRequirement + dockerPull: mgibio/varscan-cwl:v2.4.2-samtools1.3.1 +inputs: + npileup: + type: File + inputBinding: + position: 1 + separate: true + tpileup: + type: File + inputBinding: + position: 2 + separate: true + bname: + type: string + inputBinding: + position: 3 + separate: true + vcfout: + type: boolean + inputBinding: + position: 4 + prefix: --output-vcf + separate: true + default: true +outputs: + snp: + type: File + outputBinding: + glob: $(inputs.bname).snp.vcf + indel: + type: File + outputBinding: + glob: $(inputs.bname).indel.vcf diff --git a/cwl/SomaticCallers/somaticFilter.cwl b/cwl/SomaticCallers/somaticFilter.cwl index 1e47cce..e936b7c 100644 --- a/cwl/SomaticCallers/somaticFilter.cwl +++ b/cwl/SomaticCallers/somaticFilter.cwl @@ -1,33 +1,33 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- java -- -jar -- /opt/varscan/VarScan.jar -- somaticFilter -requirements: -- class: DockerRequirement - dockerPull: mgibio/varscan-cwl:v2.4.2-samtools1.3.1 -inputs: - vcf: - type: File - inputBinding: - position: 1 - separate: true - indel: - type: File - inputBinding: - position: 2 - prefix: --indel-file - separate: true - outvcf: - type: string - inputBinding: - position: 3 - prefix: --output-file - separate: true -outputs: - outVcf: - type: File - outputBinding: - glob: $(inputs.outvcf) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- java +- -jar +- /opt/varscan/VarScan.jar +- somaticFilter +requirements: +- class: DockerRequirement + dockerPull: mgibio/varscan-cwl:v2.4.2-samtools1.3.1 +inputs: + vcf: + type: File + inputBinding: + position: 1 + separate: true + indel: + type: File + inputBinding: + position: 2 + prefix: --indel-file + separate: true + outvcf: + type: string + inputBinding: + position: 3 + prefix: --output-file + separate: true +outputs: + outVcf: + type: File + outputBinding: + glob: $(inputs.outvcf) diff --git a/cwl/SomaticCallers/strelka.cwl b/cwl/SomaticCallers/strelka.cwl index fc90b0d..eed3af6 100644 --- a/cwl/SomaticCallers/strelka.cwl +++ b/cwl/SomaticCallers/strelka.cwl @@ -1,65 +1,71 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: configureStrelkaSomaticWorkflow.py -requirements: -- class: DockerRequirement - dockerPull: cmopipeline/strelka2_manta -- class: ShellCommandRequirement -arguments: -- --runDir -- strelkaRunDir -- --exome -- valueFrom: ' && ' - position: 6 -- valueFrom: strelkaRunDir/runWorkflow.py - position: 7 -- valueFrom: -m - position: 8 -- valueFrom: local - position: 9 -inputs: - tbam: - type: File - secondaryFiles: .bai - inputBinding: - position: 1 - prefix: --tumorBam - separate: true - nbam: - type: File - secondaryFiles: .bai - inputBinding: - position: 2 - prefix: --normalBam - separate: true - ref: - type: File - secondaryFiles: .fai - inputBinding: - position: 3 - prefix: --referenceFasta - separate: true - callRegions: - type: File? - secondaryFiles: .tbi - inputBinding: - position: 4 - prefix: --callRegions - separate: true - indelCandidates: - type: File? - inputBinding: - position: 5 - prefix: --indelCandidates - separate: true -outputs: - snvs: - type: File - secondaryFiles: .tbi - outputBinding: - glob: strelkaRunDir/results/variants/somatic.snvs.vcf.gz - indels: - type: File - secondaryFiles: .tbi - outputBinding: - glob: strelkaRunDir/results/variants/somatic.indels.vcf.gz +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: configureStrelkaSomaticWorkflow.py +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/strelka:2.9.10--h9ee0642_1 +- class: ShellCommandRequirement +arguments: +- --runDir +- strelkaRunDir +- valueFrom: ' && ' + position: 6 + shellQuote: false +- valueFrom: strelkaRunDir/runWorkflow.py + position: 7 +- valueFrom: -m + position: 8 +- valueFrom: local + position: 9 +inputs: + tbam: + type: File + secondaryFiles: .bai + inputBinding: + position: 1 + prefix: --tumorBam + separate: true + nbam: + type: File + secondaryFiles: .bai + inputBinding: + position: 2 + prefix: --normalBam + separate: true + ref: + type: File + secondaryFiles: .fai + inputBinding: + position: 3 + prefix: --referenceFasta + separate: true + callRegions: + type: File? + secondaryFiles: .tbi + inputBinding: + position: 4 + prefix: --callRegions + separate: true + indelCandidates: + type: File? + inputBinding: + position: 5 + prefix: --indelCandidates + separate: true + exome: + type: boolean + inputBinding: + prefix: --exome + separate: true + default: true +outputs: + snvs: + type: File + secondaryFiles: .tbi + outputBinding: + glob: strelkaRunDir/results/variants/somatic.snvs.vcf.gz + indels: + type: File + secondaryFiles: .tbi + outputBinding: + glob: strelkaRunDir/results/variants/somatic.indels.vcf.gz diff --git a/cwl/SomaticCallers/tabixIndex.cwl b/cwl/SomaticCallers/tabixIndex.cwl index f506ee0..591a0ea 100644 --- a/cwl/SomaticCallers/tabixIndex.cwl +++ b/cwl/SomaticCallers/tabixIndex.cwl @@ -1,28 +1,28 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: tabix -requirements: -- class: DockerRequirement - dockerPull: biocontainers/tabix:v1.3.2-2-deb_cv1 -- class: InitialWorkDirRequirement - listing: - - $(inputs.tfile) -inputs: - tfile: - type: File - inputBinding: - position: 1 - separate: true - type: - type: string - inputBinding: - prefix: -p - separate: true - default: vcf -outputs: - idx: - type: File - secondaryFiles: - - .tbi - outputBinding: - glob: $(inputs.tfile.basename) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: tabix +requirements: +- class: DockerRequirement + dockerPull: biocontainers/tabix:v1.3.2-2-deb_cv1 +- class: InitialWorkDirRequirement + listing: + - $(inputs.tfile) +inputs: + tfile: + type: File + inputBinding: + position: 1 + separate: true + type: + type: string + inputBinding: + prefix: -p + separate: true + default: vcf +outputs: + idx: + type: File + secondaryFiles: + - .tbi + outputBinding: + glob: $(inputs.tfile.basename) diff --git a/cwl/SomaticSeq_Wrapper.cwl b/cwl/SomaticSeq_Wrapper.cwl index 04dfe81..62b688e 100644 --- a/cwl/SomaticSeq_Wrapper.cwl +++ b/cwl/SomaticSeq_Wrapper.cwl @@ -1,110 +1,110 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: /opt/somaticseq/SomaticSeq.Wrapper.sh -requirements: -- class: DockerRequirement - dockerPull: lethalfang/somaticseq:2.7.2 -arguments: -- --output-dir -- '.' -- --gatk -- /opt/GATK/GenomeAnalysisTK.jar -inputs: - ref: - type: File - secondaryFiles: - - .fai - - $(self.nameroot).dict - inputBinding: - prefix: --genome-reference - separate: true - tbam: - type: File - secondaryFiles: .bai - inputBinding: - prefix: --tumor-bam - separate: true - nbam: - type: File - secondaryFiles: .bai - inputBinding: - prefix: --normal-bam - separate: true - mutect2: - type: File? - inputBinding: - prefix: --mutect2 - separate: true - varscanSnv: - type: File? - inputBinding: - prefix: --varscan-snv - separate: true - varscanIndel: - type: File? - inputBinding: - prefix: --varscan-indel - separate: true - sniper: - type: File? - inputBinding: - prefix: --sniper - separate: true - vardict: - type: File? - inputBinding: - prefix: --vardict - separate: true - muse: - type: File? - inputBinding: - prefix: --muse - separate: true - strelkaSnv: - type: File? - inputBinding: - prefix: --strelka-snv - separate: true - strelkaIndel: - type: File? - inputBinding: - prefix: --strelka-indel - separate: true - lofreqSnv: - type: File? - inputBinding: - prefix: --lofreq-snv - separate: true - lofreqIndel: - type: File? - inputBinding: - prefix: --lofreq-indel - separate: true - region: - type: File? - inputBinding: - prefix: --inclusion-region - separate: true - dbsnp: - type: File - secondaryFiles: .tbi - inputBinding: - prefix: --dbsnp - separate: true -outputs: - conSNV: - type: File - outputBinding: - glob: Consensus.sSNV.vcf - conINDEL: - type: File - outputBinding: - glob: Consensus.sINDEL.vcf - EnsSNV: - type: File - outputBinding: - glob: Ensemble.sSNV.tsv - EnsINDEL: - type: File - outputBinding: - glob: Ensemble.sINDEL.tsv +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: /opt/somaticseq/SomaticSeq.Wrapper.sh +requirements: +- class: DockerRequirement + dockerPull: lethalfang/somaticseq:2.7.2 +arguments: +- --output-dir +- '.' +- --gatk +- /opt/GATK/GenomeAnalysisTK.jar +inputs: + ref: + type: File + secondaryFiles: + - .fai + - ^.dict + inputBinding: + prefix: --genome-reference + separate: true + tbam: + type: File + secondaryFiles: .bai + inputBinding: + prefix: --tumor-bam + separate: true + nbam: + type: File + secondaryFiles: .bai + inputBinding: + prefix: --normal-bam + separate: true + mutect2: + type: File? + inputBinding: + prefix: --mutect2 + separate: true + varscanSnv: + type: File? + inputBinding: + prefix: --varscan-snv + separate: true + varscanIndel: + type: File? + inputBinding: + prefix: --varscan-indel + separate: true + sniper: + type: File? + inputBinding: + prefix: --sniper + separate: true + vardict: + type: File? + inputBinding: + prefix: --vardict + separate: true + muse: + type: File? + inputBinding: + prefix: --muse + separate: true + strelkaSnv: + type: File? + inputBinding: + prefix: --strelka-snv + separate: true + strelkaIndel: + type: File? + inputBinding: + prefix: --strelka-indel + separate: true + lofreqSnv: + type: File? + inputBinding: + prefix: --lofreq-snv + separate: true + lofreqIndel: + type: File? + inputBinding: + prefix: --lofreq-indel + separate: true + region: + type: File? + inputBinding: + prefix: --inclusion-region + separate: true + dbsnp: + type: File + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + inputBinding: + prefix: --dbsnp + separate: true +outputs: + conSNV: + type: File + outputBinding: + glob: Consensus.sSNV.vcf + conINDEL: + type: File + outputBinding: + glob: Consensus.sINDEL.vcf + EnsSNV: + type: File + outputBinding: + glob: Ensemble.sSNV.tsv + EnsINDEL: + type: File + outputBinding: + glob: Ensemble.sINDEL.tsv diff --git a/cwl/SomaticSeq_Wrapper.yml b/cwl/SomaticSeq_Wrapper.yml index 0967ef4..69a88e3 100644 --- a/cwl/SomaticSeq_Wrapper.yml +++ b/cwl/SomaticSeq_Wrapper.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/SomaticSniper.cwl b/cwl/SomaticSniper.cwl index 22c3a6f..54bf3e0 100644 --- a/cwl/SomaticSniper.cwl +++ b/cwl/SomaticSniper.cwl @@ -1,41 +1,41 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: /opt/somatic-sniper/build/bin/bam-somaticsniper -requirements: -- class: DockerRequirement - dockerPull: lethalfang/somaticsniper:1.0.5.0-2 -arguments: -- -q -- '10' -- -F -- vcf -inputs: - ref: - type: File - secondaryFiles: .fai - inputBinding: - position: 1 - prefix: -f - separate: true - tbam: - type: File - secondaryFiles: .bai - inputBinding: - position: 2 - separate: true - nbam: - type: File - secondaryFiles: .bai - inputBinding: - position: 3 - separate: true - vcf: - type: string - inputBinding: - position: 4 - separate: true -outputs: - outVcf: - type: File - outputBinding: - glob: $(inputs.vcf) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: /opt/somatic-sniper/build/bin/bam-somaticsniper +requirements: +- class: DockerRequirement + dockerPull: lethalfang/somaticsniper:1.0.5.0-2 +arguments: +- -q +- '10' +- -F +- vcf +inputs: + ref: + type: File + secondaryFiles: .fai + inputBinding: + position: 1 + prefix: -f + separate: true + tbam: + type: File + secondaryFiles: .bai + inputBinding: + position: 2 + separate: true + nbam: + type: File + secondaryFiles: .bai + inputBinding: + position: 3 + separate: true + vcf: + type: string + inputBinding: + position: 4 + separate: true +outputs: + outVcf: + type: File + outputBinding: + glob: $(inputs.vcf) diff --git a/cwl/SomaticSniper.yml b/cwl/SomaticSniper.yml index 0967ef4..69a88e3 100644 --- a/cwl/SomaticSniper.yml +++ b/cwl/SomaticSniper.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/SortVcf.cwl b/cwl/SortVcf.cwl index a0d8323..68b2bb7 100644 --- a/cwl/SortVcf.cwl +++ b/cwl/SortVcf.cwl @@ -1,31 +1,31 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- java -- -jar -- /usr/picard/picard.jar -- SortVcf -requirements: -- class: DockerRequirement - dockerPull: broadinstitute/picard -inputs: - vcf: - type: File - inputBinding: - prefix: I= - separate: false - ovcf: - type: string - inputBinding: - prefix: O= - separate: false - dict: - type: File? - inputBinding: - prefix: SD= - separate: false -outputs: - oVcf: - type: File - outputBinding: - glob: $(inputs.ovcf) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- java +- -jar +- /usr/picard/picard.jar +- SortVcf +requirements: +- class: DockerRequirement + dockerPull: broadinstitute/picard +inputs: + vcf: + type: File + inputBinding: + prefix: I= + separate: false + ovcf: + type: string + inputBinding: + prefix: O= + separate: false + dict: + type: File? + inputBinding: + prefix: SD= + separate: false +outputs: + oVcf: + type: File + outputBinding: + glob: $(inputs.ovcf) diff --git a/cwl/SortVcf.yml b/cwl/SortVcf.yml index 0967ef4..69a88e3 100644 --- a/cwl/SortVcf.yml +++ b/cwl/SortVcf.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/TPMCalculator.cwl b/cwl/TPMCalculator.cwl new file mode 100644 index 0000000..a5f5124 --- /dev/null +++ b/cwl/TPMCalculator.cwl @@ -0,0 +1,42 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: TPMCalculator +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/tpmcalculator:0.0.4--hf393df8_3 +inputs: + bam: + type: File + inputBinding: + prefix: -b + separate: true + gtf: + type: File + inputBinding: + prefix: -g + separate: true + paired: + type: boolean? + inputBinding: + prefix: -p + separate: true + default: true + all: + type: boolean? + inputBinding: + prefix: -a + separate: true + default: true +outputs: + out: + type: File[] + outputBinding: + glob: '*.out' + ent: + type: File[]? + outputBinding: + glob: '*.ent' + uni: + type: File[]? + outputBinding: + glob: '*.uni' diff --git a/cwl/TPMCalculator.yml b/cwl/TPMCalculator.yml new file mode 100644 index 0000000..74b7da2 --- /dev/null +++ b/cwl/TPMCalculator.yml @@ -0,0 +1,2 @@ +paired: true +all: true diff --git a/cwl/VarDict.cwl b/cwl/VarDict.cwl index 7dbf3aa..de3a57d 100644 --- a/cwl/VarDict.cwl +++ b/cwl/VarDict.cwl @@ -1,67 +1,79 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: /opt/VarDict-1.5.1/bin/VarDict -requirements: -- class: DockerRequirement - dockerPull: lethalfang/vardictjava:1.5.1 -- class: ShellCommandRequirement -arguments: -- valueFrom: -b - position: 2 -- valueFrom: $(inputs.tbam.path)|$(inputs.nbam.path) - position: 3 -- valueFrom: -f - position: 4 -- valueFrom: $(inputs.af) - position: 5 -- -c -- '1' -- -S -- '2' -- -E -- '3' -- -g -- '4' -- valueFrom: ' | ' - position: 6 -- valueFrom: /opt/VarDict/testsomatic.R - position: 7 -- valueFrom: ' | ' - position: 8 -- valueFrom: /opt/VarDict/var2vcf_paired.pl - position: 9 -- valueFrom: -N - position: 10 -- valueFrom: TUMOR|NORMAL - position: 11 -- valueFrom: -f - position: 12 -- valueFrom: $(inputs.af) - position: 13 -inputs: - tbam: - type: File - secondaryFiles: .bai - nbam: - type: File - secondaryFiles: .bai - ref: - type: File - secondaryFiles: .fai - inputBinding: - position: 1 - prefix: -G - separate: true - region: - type: File - inputBinding: - separate: true - af: - type: float - default: 0.05 - vcf: - type: string -outputs: - outVcf: - type: stdout -stdout: $(inputs.vcf) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: vardict-java +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/vardict-java:1.8.2--hdfd78af_1 +- class: ShellCommandRequirement +arguments: +- valueFrom: -b + position: 5 +- valueFrom: $(inputs.tbam.path)|$(inputs.nbam.path) + position: 6 +- valueFrom: -f + position: 7 +- valueFrom: $(inputs.af) + position: 8 +- -c +- '1' +- -S +- '2' +- -E +- '3' +- -g +- '4' +- valueFrom: ' | ' + position: 9 + shellQuote: false +- valueFrom: testsomatic.R + position: 10 +- valueFrom: ' | ' + position: 11 + shellQuote: false +- valueFrom: var2vcf_paired.pl + position: 12 +- valueFrom: -N + position: 13 +- valueFrom: TUMOR|NORMAL + position: 14 +- valueFrom: -f + position: 15 +- valueFrom: $(inputs.af) + position: 16 +inputs: + tbam: + type: File + secondaryFiles: .bai + nbam: + type: File + secondaryFiles: .bai + ref: + type: File + secondaryFiles: .fai + inputBinding: + position: 2 + prefix: -G + separate: true + region: + type: File + inputBinding: + position: 1 + separate: true + af: + type: string + default: '0.01' + vcf: + type: string + threads: + type: int + inputBinding: + position: 4 + prefix: -th + separate: true + default: 1 +outputs: + outVcf: + type: File + outputBinding: + glob: $(inputs.vcf) +stdout: $(inputs.vcf) diff --git a/cwl/VarDict.yml b/cwl/VarDict.yml index eddab76..4c70d58 100644 --- a/cwl/VarDict.yml +++ b/cwl/VarDict.yml @@ -1 +1,2 @@ -af: 0.05 +af: '0.01' +threads: 1 diff --git a/cwl/VarScan2.cwl b/cwl/VarScan2.cwl index cd37852..e430492 100644 --- a/cwl/VarScan2.cwl +++ b/cwl/VarScan2.cwl @@ -1,53 +1,53 @@ -cwlVersion: v1.0 -class: CommandLineTool -requirements: -- class: DockerRequirement - dockerPull: serge2016/varscan:v0.1.1 -arguments: -- -o -- '.' -inputs: - nbam: - type: File - secondaryFiles: .bai - inputBinding: - position: 1 - separate: true - tbam: - type: File - secondaryFiles: .bai - inputBinding: - position: 2 - separate: true - ref: - type: File - secondaryFiles: - - .fai - - $(self.nameroot).dict - inputBinding: - prefix: -b - separate: true - allvcf: - type: string - inputBinding: - prefix: -f - separate: true - somvcf: - type: string - inputBinding: - prefix: -y - separate: true - proc: - type: int - inputBinding: - prefix: -p - separate: true -outputs: - allVcf: - type: File - outputBinding: - glob: $(inputs.allvcf) - somVcf: - type: File - outputBinding: - glob: $(inputs.somvcf) +cwlVersion: v1.0 +class: CommandLineTool +requirements: +- class: DockerRequirement + dockerPull: serge2016/varscan:v0.1.1 +arguments: +- -o +- '.' +inputs: + nbam: + type: File + secondaryFiles: .bai + inputBinding: + position: 1 + separate: true + tbam: + type: File + secondaryFiles: .bai + inputBinding: + position: 2 + separate: true + ref: + type: File + secondaryFiles: + - .fai + - $(self.nameroot).dict + inputBinding: + prefix: -b + separate: true + allvcf: + type: string + inputBinding: + prefix: -f + separate: true + somvcf: + type: string + inputBinding: + prefix: -y + separate: true + proc: + type: int + inputBinding: + prefix: -p + separate: true +outputs: + allVcf: + type: File + outputBinding: + glob: $(inputs.allvcf) + somVcf: + type: File + outputBinding: + glob: $(inputs.somvcf) diff --git a/cwl/VarScan2.yml b/cwl/VarScan2.yml index 0967ef4..69a88e3 100644 --- a/cwl/VarScan2.yml +++ b/cwl/VarScan2.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/VarScan2Somatic/VarScan2Somatic.cwl b/cwl/VarScan2Somatic/VarScan2Somatic.cwl index 6a2d063..5fb98d9 100644 --- a/cwl/VarScan2Somatic/VarScan2Somatic.cwl +++ b/cwl/VarScan2Somatic/VarScan2Somatic.cwl @@ -1,75 +1,75 @@ -cwlVersion: v1.0 -class: Workflow -requirements: -- class: StepInputExpressionRequirement -- class: MultipleInputFeatureRequirement -inputs: - tbam: - type: File - nbam: - type: File - ref: - type: File - secondaryFiles: .fai - region: - type: File -outputs: - sSnp: - type: File - outputSource: somatic/snp - sIndel: - type: File - outputSource: somatic/indel - sVcf: - type: File - outputSource: somaticFilter/outVcf -steps: - mpileupT: - run: cwl/VarScan2Somatic/mpileupT.cwl - in: - bam: tbam - ref: ref - region: region - out: - - pileup - mpileupN: - run: cwl/VarScan2Somatic/mpileupN.cwl - in: - bam: nbam - ref: ref - region: region - out: - - pileup - somatic: - run: cwl/VarScan2Somatic/somatic.cwl - in: - npileup: mpileupN/pileup - tpileup: mpileupT/pileup - bname: - valueFrom: $(inputs.tpileup.nameroot) - out: - - snp - - indel - processSomatic: - run: cwl/VarScan2Somatic/processSomatic.cwl - in: - vcf: somatic/snp - out: - - somaticHC - - somatic - - germline - - germlineHC - - LOH - - LOHHC - somaticFilter: - run: cwl/VarScan2Somatic/somaticFilter.cwl - in: - vcf: processSomatic/somaticHC - indel: somatic/indel - outvcf: - source: - - tbam - - nbam - valueFrom: $(self[0].nameroot).$(self[1].nameroot).somatic.vcf - out: - - outVcf +cwlVersion: v1.0 +class: Workflow +requirements: +- class: StepInputExpressionRequirement +- class: MultipleInputFeatureRequirement +inputs: + tbam: + type: File + nbam: + type: File + ref: + type: File + secondaryFiles: .fai + region: + type: File +outputs: + sSnp: + type: File + outputSource: somatic/snp + sIndel: + type: File + outputSource: somatic/indel + sVcf: + type: File + outputSource: somaticFilter/outVcf +steps: + mpileupT: + run: mpileupT.cwl + in: + bam: tbam + ref: ref + region: region + out: + - pileup + mpileupN: + run: mpileupN.cwl + in: + bam: nbam + ref: ref + region: region + out: + - pileup + somatic: + run: somatic.cwl + in: + npileup: mpileupN/pileup + tpileup: mpileupT/pileup + bname: + valueFrom: $(inputs.tpileup.nameroot) + out: + - snp + - indel + processSomatic: + run: processSomatic.cwl + in: + vcf: somatic/snp + out: + - somaticHC + - somatic + - germline + - germlineHC + - LOH + - LOHHC + somaticFilter: + run: somaticFilter.cwl + in: + vcf: processSomatic/somaticHC + indel: somatic/indel + outvcf: + source: + - tbam + - nbam + valueFrom: $(self[0].nameroot).$(self[1].nameroot).somatic.vcf + out: + - outVcf diff --git a/cwl/VarScan2Somatic/VarScan2Somatic.yml b/cwl/VarScan2Somatic/VarScan2Somatic.yml index 0967ef4..69a88e3 100644 --- a/cwl/VarScan2Somatic/VarScan2Somatic.yml +++ b/cwl/VarScan2Somatic/VarScan2Somatic.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/VarScan2Somatic/mpileupN.cwl b/cwl/VarScan2Somatic/mpileupN.cwl index 1d0d9e1..2c4bd18 100644 --- a/cwl/VarScan2Somatic/mpileupN.cwl +++ b/cwl/VarScan2Somatic/mpileupN.cwl @@ -1,30 +1,30 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- samtools -- mpileup -requirements: -- class: DockerRequirement - dockerPull: biocontainers/samtools:v1.7.0_cv3 -inputs: - bam: - type: File - inputBinding: - separate: true - ref: - type: File - secondaryFiles: .fai - inputBinding: - prefix: -f - separate: true - region: - type: File? - inputBinding: - prefix: -l - separate: true -outputs: - pileup: - type: File - outputBinding: - glob: $(inputs.bam.nameroot).pileup -stdout: $(inputs.bam.nameroot).pileup +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- mpileup +requirements: +- class: DockerRequirement + dockerPull: biocontainers/samtools:v1.7.0_cv3 +inputs: + bam: + type: File + inputBinding: + separate: true + ref: + type: File + secondaryFiles: .fai + inputBinding: + prefix: -f + separate: true + region: + type: File? + inputBinding: + prefix: -l + separate: true +outputs: + pileup: + type: File + outputBinding: + glob: $(inputs.bam.nameroot).pileup +stdout: $(inputs.bam.nameroot).pileup diff --git a/cwl/VarScan2Somatic/mpileupT.cwl b/cwl/VarScan2Somatic/mpileupT.cwl index 1d0d9e1..2c4bd18 100644 --- a/cwl/VarScan2Somatic/mpileupT.cwl +++ b/cwl/VarScan2Somatic/mpileupT.cwl @@ -1,30 +1,30 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- samtools -- mpileup -requirements: -- class: DockerRequirement - dockerPull: biocontainers/samtools:v1.7.0_cv3 -inputs: - bam: - type: File - inputBinding: - separate: true - ref: - type: File - secondaryFiles: .fai - inputBinding: - prefix: -f - separate: true - region: - type: File? - inputBinding: - prefix: -l - separate: true -outputs: - pileup: - type: File - outputBinding: - glob: $(inputs.bam.nameroot).pileup -stdout: $(inputs.bam.nameroot).pileup +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- mpileup +requirements: +- class: DockerRequirement + dockerPull: biocontainers/samtools:v1.7.0_cv3 +inputs: + bam: + type: File + inputBinding: + separate: true + ref: + type: File + secondaryFiles: .fai + inputBinding: + prefix: -f + separate: true + region: + type: File? + inputBinding: + prefix: -l + separate: true +outputs: + pileup: + type: File + outputBinding: + glob: $(inputs.bam.nameroot).pileup +stdout: $(inputs.bam.nameroot).pileup diff --git a/cwl/VarScan2Somatic/processSomatic.cwl b/cwl/VarScan2Somatic/processSomatic.cwl index 0d7767d..be60998 100644 --- a/cwl/VarScan2Somatic/processSomatic.cwl +++ b/cwl/VarScan2Somatic/processSomatic.cwl @@ -1,43 +1,43 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- java -- -jar -- /opt/varscan/VarScan.jar -- processSomatic -requirements: -- class: DockerRequirement - dockerPull: mgibio/varscan-cwl:v2.4.2-samtools1.3.1 -- class: InitialWorkDirRequirement - listing: - - $(inputs.vcf) -inputs: - vcf: - type: File - inputBinding: - separate: true -outputs: - somaticHC: - type: File - outputBinding: - glob: $(inputs.vcf.nameroot).Somatic.hc.vcf - somatic: - type: File - outputBinding: - glob: $(inputs.vcf.nameroot).Somatic.vcf - germline: - type: File - outputBinding: - glob: $(inputs.vcf.nameroot).Germline.vcf - germlineHC: - type: File - outputBinding: - glob: $(inputs.vcf.nameroot).Germline.hc.vcf - LOH: - type: File - outputBinding: - glob: $(inputs.vcf.nameroot).LOH.vcf - LOHHC: - type: File - outputBinding: - glob: $(inputs.vcf.nameroot).LOH.hc.vcf +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- java +- -jar +- /opt/varscan/VarScan.jar +- processSomatic +requirements: +- class: DockerRequirement + dockerPull: mgibio/varscan-cwl:v2.4.2-samtools1.3.1 +- class: InitialWorkDirRequirement + listing: + - $(inputs.vcf) +inputs: + vcf: + type: File + inputBinding: + separate: true +outputs: + somaticHC: + type: File + outputBinding: + glob: $(inputs.vcf.nameroot).Somatic.hc.vcf + somatic: + type: File + outputBinding: + glob: $(inputs.vcf.nameroot).Somatic.vcf + germline: + type: File + outputBinding: + glob: $(inputs.vcf.nameroot).Germline.vcf + germlineHC: + type: File + outputBinding: + glob: $(inputs.vcf.nameroot).Germline.hc.vcf + LOH: + type: File + outputBinding: + glob: $(inputs.vcf.nameroot).LOH.vcf + LOHHC: + type: File + outputBinding: + glob: $(inputs.vcf.nameroot).LOH.hc.vcf diff --git a/cwl/VarScan2Somatic/somatic.cwl b/cwl/VarScan2Somatic/somatic.cwl index 7fcd8df..35be054 100644 --- a/cwl/VarScan2Somatic/somatic.cwl +++ b/cwl/VarScan2Somatic/somatic.cwl @@ -1,42 +1,42 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- java -- -jar -- /opt/varscan/VarScan.jar -- somatic -requirements: -- class: DockerRequirement - dockerPull: mgibio/varscan-cwl:v2.4.2-samtools1.3.1 -inputs: - npileup: - type: File - inputBinding: - position: 1 - separate: true - tpileup: - type: File - inputBinding: - position: 2 - separate: true - bname: - type: string - inputBinding: - position: 3 - separate: true - vcfout: - type: boolean - inputBinding: - position: 4 - prefix: --output-vcf - separate: true - default: true -outputs: - snp: - type: File - outputBinding: - glob: $(inputs.bname).snp.vcf - indel: - type: File - outputBinding: - glob: $(inputs.bname).indel.vcf +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- java +- -jar +- /opt/varscan/VarScan.jar +- somatic +requirements: +- class: DockerRequirement + dockerPull: mgibio/varscan-cwl:v2.4.2-samtools1.3.1 +inputs: + npileup: + type: File + inputBinding: + position: 1 + separate: true + tpileup: + type: File + inputBinding: + position: 2 + separate: true + bname: + type: string + inputBinding: + position: 3 + separate: true + vcfout: + type: boolean + inputBinding: + position: 4 + prefix: --output-vcf + separate: true + default: true +outputs: + snp: + type: File + outputBinding: + glob: $(inputs.bname).snp.vcf + indel: + type: File + outputBinding: + glob: $(inputs.bname).indel.vcf diff --git a/cwl/VarScan2Somatic/somaticFilter.cwl b/cwl/VarScan2Somatic/somaticFilter.cwl index 1e47cce..e936b7c 100644 --- a/cwl/VarScan2Somatic/somaticFilter.cwl +++ b/cwl/VarScan2Somatic/somaticFilter.cwl @@ -1,33 +1,33 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- java -- -jar -- /opt/varscan/VarScan.jar -- somaticFilter -requirements: -- class: DockerRequirement - dockerPull: mgibio/varscan-cwl:v2.4.2-samtools1.3.1 -inputs: - vcf: - type: File - inputBinding: - position: 1 - separate: true - indel: - type: File - inputBinding: - position: 2 - prefix: --indel-file - separate: true - outvcf: - type: string - inputBinding: - position: 3 - prefix: --output-file - separate: true -outputs: - outVcf: - type: File - outputBinding: - glob: $(inputs.outvcf) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- java +- -jar +- /opt/varscan/VarScan.jar +- somaticFilter +requirements: +- class: DockerRequirement + dockerPull: mgibio/varscan-cwl:v2.4.2-samtools1.3.1 +inputs: + vcf: + type: File + inputBinding: + position: 1 + separate: true + indel: + type: File + inputBinding: + position: 2 + prefix: --indel-file + separate: true + outvcf: + type: string + inputBinding: + position: 3 + prefix: --output-file + separate: true +outputs: + outVcf: + type: File + outputBinding: + glob: $(inputs.outvcf) diff --git a/cwl/VarScan2_processSomatic.cwl b/cwl/VarScan2_processSomatic.cwl index 0d7767d..be60998 100644 --- a/cwl/VarScan2_processSomatic.cwl +++ b/cwl/VarScan2_processSomatic.cwl @@ -1,43 +1,43 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- java -- -jar -- /opt/varscan/VarScan.jar -- processSomatic -requirements: -- class: DockerRequirement - dockerPull: mgibio/varscan-cwl:v2.4.2-samtools1.3.1 -- class: InitialWorkDirRequirement - listing: - - $(inputs.vcf) -inputs: - vcf: - type: File - inputBinding: - separate: true -outputs: - somaticHC: - type: File - outputBinding: - glob: $(inputs.vcf.nameroot).Somatic.hc.vcf - somatic: - type: File - outputBinding: - glob: $(inputs.vcf.nameroot).Somatic.vcf - germline: - type: File - outputBinding: - glob: $(inputs.vcf.nameroot).Germline.vcf - germlineHC: - type: File - outputBinding: - glob: $(inputs.vcf.nameroot).Germline.hc.vcf - LOH: - type: File - outputBinding: - glob: $(inputs.vcf.nameroot).LOH.vcf - LOHHC: - type: File - outputBinding: - glob: $(inputs.vcf.nameroot).LOH.hc.vcf +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- java +- -jar +- /opt/varscan/VarScan.jar +- processSomatic +requirements: +- class: DockerRequirement + dockerPull: mgibio/varscan-cwl:v2.4.2-samtools1.3.1 +- class: InitialWorkDirRequirement + listing: + - $(inputs.vcf) +inputs: + vcf: + type: File + inputBinding: + separate: true +outputs: + somaticHC: + type: File + outputBinding: + glob: $(inputs.vcf.nameroot).Somatic.hc.vcf + somatic: + type: File + outputBinding: + glob: $(inputs.vcf.nameroot).Somatic.vcf + germline: + type: File + outputBinding: + glob: $(inputs.vcf.nameroot).Germline.vcf + germlineHC: + type: File + outputBinding: + glob: $(inputs.vcf.nameroot).Germline.hc.vcf + LOH: + type: File + outputBinding: + glob: $(inputs.vcf.nameroot).LOH.vcf + LOHHC: + type: File + outputBinding: + glob: $(inputs.vcf.nameroot).LOH.hc.vcf diff --git a/cwl/VarScan2_processSomatic.yml b/cwl/VarScan2_processSomatic.yml index 0967ef4..69a88e3 100644 --- a/cwl/VarScan2_processSomatic.yml +++ b/cwl/VarScan2_processSomatic.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/VarScan2_somatic.cwl b/cwl/VarScan2_somatic.cwl index 7fcd8df..35be054 100644 --- a/cwl/VarScan2_somatic.cwl +++ b/cwl/VarScan2_somatic.cwl @@ -1,42 +1,42 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- java -- -jar -- /opt/varscan/VarScan.jar -- somatic -requirements: -- class: DockerRequirement - dockerPull: mgibio/varscan-cwl:v2.4.2-samtools1.3.1 -inputs: - npileup: - type: File - inputBinding: - position: 1 - separate: true - tpileup: - type: File - inputBinding: - position: 2 - separate: true - bname: - type: string - inputBinding: - position: 3 - separate: true - vcfout: - type: boolean - inputBinding: - position: 4 - prefix: --output-vcf - separate: true - default: true -outputs: - snp: - type: File - outputBinding: - glob: $(inputs.bname).snp.vcf - indel: - type: File - outputBinding: - glob: $(inputs.bname).indel.vcf +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- java +- -jar +- /opt/varscan/VarScan.jar +- somatic +requirements: +- class: DockerRequirement + dockerPull: mgibio/varscan-cwl:v2.4.2-samtools1.3.1 +inputs: + npileup: + type: File + inputBinding: + position: 1 + separate: true + tpileup: + type: File + inputBinding: + position: 2 + separate: true + bname: + type: string + inputBinding: + position: 3 + separate: true + vcfout: + type: boolean + inputBinding: + position: 4 + prefix: --output-vcf + separate: true + default: true +outputs: + snp: + type: File + outputBinding: + glob: $(inputs.bname).snp.vcf + indel: + type: File + outputBinding: + glob: $(inputs.bname).indel.vcf diff --git a/cwl/VarScan2_somatic.yml b/cwl/VarScan2_somatic.yml index 2d5a0f1..ffeed2c 100644 --- a/cwl/VarScan2_somatic.yml +++ b/cwl/VarScan2_somatic.yml @@ -1 +1 @@ -vcfout: true +vcfout: true diff --git a/cwl/VarScan2_somaticFilter.cwl b/cwl/VarScan2_somaticFilter.cwl index 1e47cce..e936b7c 100644 --- a/cwl/VarScan2_somaticFilter.cwl +++ b/cwl/VarScan2_somaticFilter.cwl @@ -1,33 +1,33 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- java -- -jar -- /opt/varscan/VarScan.jar -- somaticFilter -requirements: -- class: DockerRequirement - dockerPull: mgibio/varscan-cwl:v2.4.2-samtools1.3.1 -inputs: - vcf: - type: File - inputBinding: - position: 1 - separate: true - indel: - type: File - inputBinding: - position: 2 - prefix: --indel-file - separate: true - outvcf: - type: string - inputBinding: - position: 3 - prefix: --output-file - separate: true -outputs: - outVcf: - type: File - outputBinding: - glob: $(inputs.outvcf) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- java +- -jar +- /opt/varscan/VarScan.jar +- somaticFilter +requirements: +- class: DockerRequirement + dockerPull: mgibio/varscan-cwl:v2.4.2-samtools1.3.1 +inputs: + vcf: + type: File + inputBinding: + position: 1 + separate: true + indel: + type: File + inputBinding: + position: 2 + prefix: --indel-file + separate: true + outvcf: + type: string + inputBinding: + position: 3 + prefix: --output-file + separate: true +outputs: + outVcf: + type: File + outputBinding: + glob: $(inputs.outvcf) diff --git a/cwl/VarScan2_somaticFilter.yml b/cwl/VarScan2_somaticFilter.yml index 0967ef4..69a88e3 100644 --- a/cwl/VarScan2_somaticFilter.yml +++ b/cwl/VarScan2_somaticFilter.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/alignMerge/alignMerge.cwl b/cwl/alignMerge/alignMerge.cwl index 934b60f..bbd558d 100644 --- a/cwl/alignMerge/alignMerge.cwl +++ b/cwl/alignMerge/alignMerge.cwl @@ -1,64 +1,64 @@ -cwlVersion: v1.0 -class: Workflow -requirements: -- class: SubworkflowFeatureRequirement -- class: ScatterFeatureRequirement -inputs: - idBam: - type: string - RG: - type: string[] - threads: - type: int - Ref: - type: File - secondaryFiles: - - .amb - - .ann - - .bwt - - .pac - - .sa - FQ1s: - type: File[] - FQ2s: - type: File[] -outputs: - oBam: - type: File - outputSource: mergeBamDup/oBam - matrix: - type: File - outputSource: mergeBamDup/matrix - Idx: - type: File - outputSource: mergeBamDup/Idx - stat: - type: File - outputSource: mergeBamDup/stat -steps: - bwaAlign: - run: cwl/alignMerge/bwaAlign.cwl - in: - threads: threads - RG: RG - Ref: Ref - FQ1: FQ1s - FQ2: FQ2s - out: - - Bam - - Idx - scatter: - - RG - - FQ1 - - FQ2 - scatterMethod: dotproduct - mergeBamDup: - run: cwl/alignMerge/mergeBamDup.cwl - in: - ibam: bwaAlign/Bam - obam: idBam - out: - - oBam - - matrix - - Idx - - stat +cwlVersion: v1.0 +class: Workflow +requirements: +- class: SubworkflowFeatureRequirement +- class: ScatterFeatureRequirement +inputs: + idBam: + type: string + RG: + type: string[] + threads: + type: int + Ref: + type: File + secondaryFiles: + - .amb + - .ann + - .bwt + - .pac + - .sa + FQ1s: + type: File[] + FQ2s: + type: File[] +outputs: + oBam: + type: File + outputSource: mergeBamDup/oBam + matrix: + type: File + outputSource: mergeBamDup/matrix + Idx: + type: File + outputSource: mergeBamDup/Idx + stat: + type: File + outputSource: mergeBamDup/stat +steps: + bwaAlign: + run: bwaAlign.cwl + in: + threads: threads + RG: RG + Ref: Ref + FQ1: FQ1s + FQ2: FQ2s + out: + - Bam + - Idx + scatter: + - RG + - FQ1 + - FQ2 + scatterMethod: dotproduct + mergeBamDup: + run: mergeBamDup.cwl + in: + ibam: bwaAlign/Bam + obam: idBam + out: + - oBam + - matrix + - Idx + - stat diff --git a/cwl/alignMerge/alignMerge.yml b/cwl/alignMerge/alignMerge.yml index 0967ef4..69a88e3 100644 --- a/cwl/alignMerge/alignMerge.yml +++ b/cwl/alignMerge/alignMerge.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/alignMerge/bwa.cwl b/cwl/alignMerge/bwa.cwl index 03d69d3..7b63bc4 100644 --- a/cwl/alignMerge/bwa.cwl +++ b/cwl/alignMerge/bwa.cwl @@ -1,48 +1,48 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- bwa -- mem -requirements: -- class: DockerRequirement - dockerPull: biocontainers/bwa:v0.7.17-3-deb_cv1 -inputs: - threads: - type: int - inputBinding: - position: 1 - prefix: -t - separate: true - RG: - type: string - inputBinding: - position: 2 - prefix: -R - separate: true - Ref: - type: File - secondaryFiles: - - .amb - - .ann - - .bwt - - .pac - - .sa - inputBinding: - position: 3 - separate: true - FQ1: - type: File - inputBinding: - position: 4 - separate: true - FQ2: - type: File? - inputBinding: - position: 5 - separate: true -outputs: - sam: - type: File - outputBinding: - glob: '*.sam' -stdout: bwaOutput.sam +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- bwa +- mem +requirements: +- class: DockerRequirement + dockerPull: biocontainers/bwa:v0.7.17-3-deb_cv1 +inputs: + threads: + type: int + inputBinding: + position: 1 + prefix: -t + separate: true + RG: + type: string? + inputBinding: + position: 2 + prefix: -R + separate: true + Ref: + type: File + secondaryFiles: + - .amb + - .ann + - .bwt + - .pac + - .sa + inputBinding: + position: 3 + separate: true + FQ1: + type: File + inputBinding: + position: 4 + separate: true + FQ2: + type: File? + inputBinding: + position: 5 + separate: true +outputs: + sam: + type: File + outputBinding: + glob: '*.sam' +stdout: bwaOutput.sam diff --git a/cwl/alignMerge/bwaAlign.cwl b/cwl/alignMerge/bwaAlign.cwl index 8d95f6e..7faf4df 100644 --- a/cwl/alignMerge/bwaAlign.cwl +++ b/cwl/alignMerge/bwaAlign.cwl @@ -1,55 +1,61 @@ -cwlVersion: v1.0 -class: Workflow -inputs: - threads: - type: int - RG: - type: string - Ref: - type: File - secondaryFiles: - - .amb - - .ann - - .bwt - - .pac - - .sa - FQ1: - type: File - FQ2: - type: File? -outputs: - Bam: - type: File - outputSource: sortBam/sbam - Idx: - type: File - outputSource: idxBam/idx -steps: - bwa: - run: bwa.cwl - in: - threads: threads - RG: RG - Ref: Ref - FQ1: FQ1 - FQ2: FQ2 - out: - - sam - sam2bam: - run: sam2bam.cwl - in: - sam: bwa/sam - out: - - bam - sortBam: - run: sortBam.cwl - in: - bam: sam2bam/bam - out: - - sbam - idxBam: - run: idxBam.cwl - in: - bam: sortBam/sbam - out: - - idx +cwlVersion: v1.0 +class: Workflow +requirements: +- class: StepInputExpressionRequirement +inputs: + threads: + type: int + RG: + type: string + Ref: + type: File + secondaryFiles: + - .amb + - .ann + - .bwt + - .pac + - .sa + FQ1: + type: File + FQ2: + type: File? +outputs: + Bam: + type: File + outputSource: sortBam/sbam + Idx: + type: File + outputSource: idxBam/idx +steps: + bwa: + run: bwa.cwl + in: + threads: threads + RG: RG + Ref: Ref + FQ1: FQ1 + FQ2: FQ2 + out: + - sam + sam2bam: + run: sam2bam.cwl + in: + bam: bwa/sam + obam: + valueFrom: $(inputs.bam.nameroot).bam + out: + - oBam + sortBam: + run: sortBam.cwl + in: + bam: sam2bam/oBam + obam: + valueFrom: $(inputs.bam.nameroot)_sort.bam + out: + - sbam + idxBam: + run: idxBam.cwl + in: + bam: sortBam/sbam + out: + - idx diff --git a/cwl/alignMerge/idxBam.cwl b/cwl/alignMerge/idxBam.cwl index f80966b..e779867 100644 --- a/cwl/alignMerge/idxBam.cwl +++ b/cwl/alignMerge/idxBam.cwl @@ -1,24 +1,24 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- samtools -- index -requirements: -- class: DockerRequirement - dockerPull: biocontainers/samtools:v1.7.0_cv3 -- class: InitialWorkDirRequirement - listing: - - $(inputs.bam) -inputs: - bam: - type: File - inputBinding: - position: 1 - separate: true -outputs: - idx: - type: File - secondaryFiles: - - .bai - outputBinding: - glob: $(inputs.bam.basename) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- index +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.12--h9aed4be_1 +- class: InitialWorkDirRequirement + listing: + - $(inputs.bam) +inputs: + bam: + type: File + inputBinding: + position: 1 + separate: true +outputs: + idx: + type: File + secondaryFiles: + - .bai + outputBinding: + glob: $(inputs.bam.basename) diff --git a/cwl/alignMerge/markdup.cwl b/cwl/alignMerge/markdup.cwl index 8a0301c..8e647ce 100644 --- a/cwl/alignMerge/markdup.cwl +++ b/cwl/alignMerge/markdup.cwl @@ -1,33 +1,33 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- picard -- MarkDuplicates -requirements: -- class: DockerRequirement - dockerPull: quay.io/biocontainers/picard:2.21.1--0 -inputs: - ibam: - type: File - inputBinding: - prefix: I= - separate: false - obam: - type: string - inputBinding: - prefix: O= - separate: false - matrix: - type: string - inputBinding: - prefix: M= - separate: false -outputs: - mBam: - type: File - outputBinding: - glob: $(inputs.obam) - Mat: - type: File - outputBinding: - glob: $(inputs.matrix) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- picard +- MarkDuplicates +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/picard:2.21.1--0 +inputs: + ibam: + type: File + inputBinding: + prefix: I= + separate: false + obam: + type: string + inputBinding: + prefix: O= + separate: false + matrix: + type: string + inputBinding: + prefix: M= + separate: false +outputs: + mBam: + type: File + outputBinding: + glob: $(inputs.obam) + Mat: + type: File + outputBinding: + glob: $(inputs.matrix) diff --git a/cwl/alignMerge/mergeBam.cwl b/cwl/alignMerge/mergeBam.cwl index 874f053..09d81b0 100644 --- a/cwl/alignMerge/mergeBam.cwl +++ b/cwl/alignMerge/mergeBam.cwl @@ -1,28 +1,28 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- picard -- MergeSamFiles -requirements: -- class: DockerRequirement - dockerPull: quay.io/biocontainers/picard:2.21.1--0 -inputs: - ibam: - type: - type: array - items: File - inputBinding: - prefix: I= - separate: false - inputBinding: - separate: true - obam: - type: string - inputBinding: - prefix: O= - separate: false -outputs: - oBam: - type: File - outputBinding: - glob: $(inputs.obam) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- picard +- MergeSamFiles +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/picard:2.21.1--0 +inputs: + ibam: + type: + type: array + items: File + inputBinding: + prefix: I= + separate: false + inputBinding: + separate: true + obam: + type: string + inputBinding: + prefix: O= + separate: false +outputs: + oBam: + type: File + outputBinding: + glob: $(inputs.obam) diff --git a/cwl/alignMerge/mergeBamDup.cwl b/cwl/alignMerge/mergeBamDup.cwl index efc2a16..b5cd688 100644 --- a/cwl/alignMerge/mergeBamDup.cwl +++ b/cwl/alignMerge/mergeBamDup.cwl @@ -1,53 +1,53 @@ -cwlVersion: v1.0 -class: Workflow -requirements: -- class: StepInputExpressionRequirement -- class: InlineJavascriptRequirement -inputs: - ibam: - type: File[] - obam: - type: string -outputs: - oBam: - type: File - outputSource: markdup/mBam - matrix: - type: File - outputSource: markdup/Mat - Idx: - type: File - outputSource: samtools_index/idx - stat: - type: File - outputSource: samtools_flagstat/flagstat -steps: - mergeBam: - run: mergeBam.cwl - in: - ibam: ibam - obam: obam - out: - - oBam - markdup: - run: markdup.cwl - in: - ibam: mergeBam/oBam - obam: obam - matrix: - valueFrom: $(inputs.ibam.nameroot).markdup.txt - out: - - mBam - - Mat - samtools_index: - run: samtools_index.cwl - in: - bam: markdup/mBam - out: - - idx - samtools_flagstat: - run: samtools_flagstat.cwl - in: - bam: markdup/mBam - out: - - flagstat +cwlVersion: v1.0 +class: Workflow +requirements: +- class: StepInputExpressionRequirement +- class: InlineJavascriptRequirement +inputs: + ibam: + type: File[] + obam: + type: string +outputs: + oBam: + type: File + outputSource: markdup/mBam + matrix: + type: File + outputSource: markdup/Mat + Idx: + type: File + outputSource: samtools_index/idx + stat: + type: File + outputSource: samtools_flagstat/flagstat +steps: + mergeBam: + run: mergeBam.cwl + in: + ibam: ibam + obam: obam + out: + - oBam + markdup: + run: markdup.cwl + in: + ibam: mergeBam/oBam + obam: obam + matrix: + valueFrom: $(inputs.ibam.nameroot).markdup.txt + out: + - mBam + - Mat + samtools_index: + run: samtools_index.cwl + in: + bam: markdup/mBam + out: + - idx + samtools_flagstat: + run: samtools_flagstat.cwl + in: + bam: markdup/mBam + out: + - flagstat diff --git a/cwl/alignMerge/sam2bam.cwl b/cwl/alignMerge/sam2bam.cwl index 621e78d..48b492e 100644 --- a/cwl/alignMerge/sam2bam.cwl +++ b/cwl/alignMerge/sam2bam.cwl @@ -1,21 +1,67 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- samtools -- view -requirements: -- class: DockerRequirement - dockerPull: biocontainers/samtools:v1.7.0_cv3 -arguments: -- -b -inputs: - sam: - type: File - inputBinding: - separate: true -outputs: - bam: - type: File - outputBinding: - glob: $(inputs.sam.basename).bam -stdout: $(inputs.sam.basename).bam +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- view +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.16.1--h6899075_1 +inputs: + bam: + type: File + secondaryFiles: .bai + inputBinding: + position: 99 + separate: true + bed: + type: File? + inputBinding: + position: 1 + prefix: -L + separate: true + obam: + type: string + inputBinding: + position: 2 + prefix: -o + separate: true + region: + type: string? + inputBinding: + position: 100 + separate: true + outb: + type: boolean? + inputBinding: + prefix: -b + separate: true + exFlag: + type: int? + inputBinding: + prefix: -F + separate: true + reqFlag: + type: int? + inputBinding: + prefix: -f + separate: true + qname: + type: File? + inputBinding: + prefix: -N + separate: true + threads: + type: int? + inputBinding: + prefix: --threads + separate: true + mapq: + type: int? + inputBinding: + prefix: -q + separate: true +outputs: + oBam: + type: File + outputBinding: + glob: $(inputs.obam) diff --git a/cwl/alignMerge/samtools_flagstat.cwl b/cwl/alignMerge/samtools_flagstat.cwl index 3c68178..000949d 100644 --- a/cwl/alignMerge/samtools_flagstat.cwl +++ b/cwl/alignMerge/samtools_flagstat.cwl @@ -1,19 +1,19 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- samtools -- flagstat -requirements: -- class: DockerRequirement - dockerPull: biocontainers/samtools:v1.7.0_cv3 -inputs: - bam: - type: File - inputBinding: - separate: true -outputs: - flagstat: - type: File - outputBinding: - glob: $(inputs.bam.nameroot).flagstat.txt -stdout: $(inputs.bam.nameroot).flagstat.txt +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- flagstat +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.15--h1170115_1 +inputs: + bam: + type: File + inputBinding: + separate: true +outputs: + flagstat: + type: File + outputBinding: + glob: $(inputs.bam.nameroot).flagstat.txt +stdout: $(inputs.bam.nameroot).flagstat.txt diff --git a/cwl/alignMerge/samtools_index.cwl b/cwl/alignMerge/samtools_index.cwl index f80966b..e779867 100644 --- a/cwl/alignMerge/samtools_index.cwl +++ b/cwl/alignMerge/samtools_index.cwl @@ -1,24 +1,24 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- samtools -- index -requirements: -- class: DockerRequirement - dockerPull: biocontainers/samtools:v1.7.0_cv3 -- class: InitialWorkDirRequirement - listing: - - $(inputs.bam) -inputs: - bam: - type: File - inputBinding: - position: 1 - separate: true -outputs: - idx: - type: File - secondaryFiles: - - .bai - outputBinding: - glob: $(inputs.bam.basename) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- index +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.12--h9aed4be_1 +- class: InitialWorkDirRequirement + listing: + - $(inputs.bam) +inputs: + bam: + type: File + inputBinding: + position: 1 + separate: true +outputs: + idx: + type: File + secondaryFiles: + - .bai + outputBinding: + glob: $(inputs.bam.basename) diff --git a/cwl/alignMerge/sortBam.cwl b/cwl/alignMerge/sortBam.cwl index bc3d45d..be772d7 100644 --- a/cwl/alignMerge/sortBam.cwl +++ b/cwl/alignMerge/sortBam.cwl @@ -1,19 +1,23 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- samtools -- sort -requirements: -- class: DockerRequirement - dockerPull: biocontainers/samtools:v1.7.0_cv3 -inputs: - bam: - type: File - inputBinding: - separate: true -outputs: - sbam: - type: File - outputBinding: - glob: $(inputs.bam.nameroot).sorted.bam -stdout: $(inputs.bam.nameroot).sorted.bam +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- sort +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.12--h9aed4be_1 +inputs: + bam: + type: File + inputBinding: + separate: true + obam: + type: string + inputBinding: + prefix: -o + separate: true +outputs: + sbam: + type: File + outputBinding: + glob: $(inputs.obam) diff --git a/cwl/annovar.cwl b/cwl/annovar.cwl index 9c5940a..49f8cbd 100644 --- a/cwl/annovar.cwl +++ b/cwl/annovar.cwl @@ -1,55 +1,55 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: table_annovar.pl -requirements: -- class: InlineJavascriptRequirement -- class: DockerRequirement - dockerPull: bioinfochrustrasbourg/annovar -arguments: -- -vcfinput -inputs: - vcf: - type: File - inputBinding: - position: 1 - separate: true - db: - type: Directory - inputBinding: - position: 2 - separate: true - build: - type: string - inputBinding: - prefix: -buildver - separate: true - default: hg19 - aout: - type: string - inputBinding: - prefix: -out - separate: true - protocol: - type: string - inputBinding: - prefix: -protocol - separate: true - default: refGene,cosmic70 - operation: - type: string - inputBinding: - prefix: -operation - separate: true - default: g,f - nastring: - type: string - inputBinding: - prefix: -nastring - separate: true - default: '.' -outputs: - Aout: - type: File - secondaryFiles: $(inputs.aout).$(inputs.build)_multianno.txt - outputBinding: - glob: $(inputs.aout).$(inputs.build)_multianno.vcf +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: table_annovar.pl +requirements: +- class: InlineJavascriptRequirement +- class: DockerRequirement + dockerPull: bioinfochrustrasbourg/annovar +arguments: +- -vcfinput +inputs: + vcf: + type: File + inputBinding: + position: 1 + separate: true + db: + type: Directory + inputBinding: + position: 2 + separate: true + build: + type: string + inputBinding: + prefix: -buildver + separate: true + default: hg19 + aout: + type: string + inputBinding: + prefix: -out + separate: true + protocol: + type: string + inputBinding: + prefix: -protocol + separate: true + default: refGene,cosmic70 + operation: + type: string + inputBinding: + prefix: -operation + separate: true + default: g,f + nastring: + type: string + inputBinding: + prefix: -nastring + separate: true + default: '.' +outputs: + Aout: + type: File + secondaryFiles: $(inputs.aout).$(inputs.build)_multianno.txt + outputBinding: + glob: $(inputs.aout).$(inputs.build)_multianno.vcf diff --git a/cwl/annovar.yml b/cwl/annovar.yml index 29bf851..f348d1b 100644 --- a/cwl/annovar.yml +++ b/cwl/annovar.yml @@ -1,4 +1,4 @@ -build: hg19 -protocol: refGene,cosmic70 -operation: g,f -nastring: '.' +build: hg19 +protocol: refGene,cosmic70 +operation: g,f +nastring: '.' diff --git a/cwl/arcasHLA_extract.cwl b/cwl/arcasHLA_extract.cwl new file mode 100644 index 0000000..43aaa76 --- /dev/null +++ b/cwl/arcasHLA_extract.cwl @@ -0,0 +1,30 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- arcasHLA +- extract +requirements: +- class: DockerRequirement + dockerPull: hubentu/arcas-hla +arguments: +- -o +- '.' +- -v +inputs: + bam: + type: File + secondaryFiles: .bai + inputBinding: + position: 1 + separate: true + threads: + type: int + inputBinding: + prefix: -t + separate: true + default: 4 +outputs: + fqs: + type: File[] + outputBinding: + glob: '*.fq.gz' diff --git a/cwl/arcasHLA_extract.yml b/cwl/arcasHLA_extract.yml new file mode 100644 index 0000000..bf19c2b --- /dev/null +++ b/cwl/arcasHLA_extract.yml @@ -0,0 +1 @@ +threads: 4 diff --git a/cwl/arcasHLA_genotype.R~.cwl b/cwl/arcasHLA_genotype.R~.cwl new file mode 100644 index 0000000..fdeebd5 --- /dev/null +++ b/cwl/arcasHLA_genotype.R~.cwl @@ -0,0 +1,42 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- arcasHLA +- genotype +requirements: +- class: DockerRequirement + dockerPull: hubentu/arcas-hla +arguments: +- -o +- '.' +- -v +inputs: + fqs: + type: File[] + inputBinding: + position: 1 + separate: true + gene: + type: string + inputBinding: + prefix: -g + separate: true + default: A,B,C,DPB1,DQB1,DQA1,DRB1 + threads: + type: int + inputBinding: + prefix: -t + separate: true +outputs: + genotype: + type: File + outputBinding: + glob: '*.genotype.json' + align: + type: File + outputBinding: + glob: '*.alignment.p' + gjs: + type: File + outputBinding: + glob: '*.genes.json' diff --git a/cwl/arcasHLA_genotype.R~.yml b/cwl/arcasHLA_genotype.R~.yml new file mode 100644 index 0000000..90bd59d --- /dev/null +++ b/cwl/arcasHLA_genotype.R~.yml @@ -0,0 +1 @@ +gene: A,B,C,DPB1,DQB1,DQA1,DRB1 diff --git a/cwl/arcasHLA_genotype.cwl b/cwl/arcasHLA_genotype.cwl new file mode 100644 index 0000000..fdeebd5 --- /dev/null +++ b/cwl/arcasHLA_genotype.cwl @@ -0,0 +1,42 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- arcasHLA +- genotype +requirements: +- class: DockerRequirement + dockerPull: hubentu/arcas-hla +arguments: +- -o +- '.' +- -v +inputs: + fqs: + type: File[] + inputBinding: + position: 1 + separate: true + gene: + type: string + inputBinding: + prefix: -g + separate: true + default: A,B,C,DPB1,DQB1,DQA1,DRB1 + threads: + type: int + inputBinding: + prefix: -t + separate: true +outputs: + genotype: + type: File + outputBinding: + glob: '*.genotype.json' + align: + type: File + outputBinding: + glob: '*.alignment.p' + gjs: + type: File + outputBinding: + glob: '*.genes.json' diff --git a/cwl/arcasHLA_genotype.yml b/cwl/arcasHLA_genotype.yml new file mode 100644 index 0000000..90bd59d --- /dev/null +++ b/cwl/arcasHLA_genotype.yml @@ -0,0 +1 @@ +gene: A,B,C,DPB1,DQB1,DQA1,DRB1 diff --git a/cwl/arcasHLA_partial.R~.cwl b/cwl/arcasHLA_partial.R~.cwl new file mode 100644 index 0000000..547ea0d --- /dev/null +++ b/cwl/arcasHLA_partial.R~.cwl @@ -0,0 +1,43 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- arcasHLA +- partial +requirements: +- class: DockerRequirement + dockerPull: hubentu/arcas-hla +arguments: +- -o +- '.' +- -v +inputs: + fqs: + type: File[] + inputBinding: + position: 1 + separate: true + gene: + type: string + inputBinding: + prefix: -g + separate: true + default: A,B,C,DPB1,DQB1,DQA1,DRB1 + threads: + type: int + inputBinding: + prefix: -t + separate: true + genotype: + type: File + inputBinding: + prefix: -G + separate: true +outputs: + pg: + type: File + outputBinding: + glob: '*.partial_genotype.json' + align: + type: File + outputBinding: + glob: '*.partial_alignment.p' diff --git a/cwl/arcasHLA_partial.R~.yml b/cwl/arcasHLA_partial.R~.yml new file mode 100644 index 0000000..90bd59d --- /dev/null +++ b/cwl/arcasHLA_partial.R~.yml @@ -0,0 +1 @@ +gene: A,B,C,DPB1,DQB1,DQA1,DRB1 diff --git a/cwl/arcasHLA_partial.cwl b/cwl/arcasHLA_partial.cwl new file mode 100644 index 0000000..547ea0d --- /dev/null +++ b/cwl/arcasHLA_partial.cwl @@ -0,0 +1,43 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- arcasHLA +- partial +requirements: +- class: DockerRequirement + dockerPull: hubentu/arcas-hla +arguments: +- -o +- '.' +- -v +inputs: + fqs: + type: File[] + inputBinding: + position: 1 + separate: true + gene: + type: string + inputBinding: + prefix: -g + separate: true + default: A,B,C,DPB1,DQB1,DQA1,DRB1 + threads: + type: int + inputBinding: + prefix: -t + separate: true + genotype: + type: File + inputBinding: + prefix: -G + separate: true +outputs: + pg: + type: File + outputBinding: + glob: '*.partial_genotype.json' + align: + type: File + outputBinding: + glob: '*.partial_alignment.p' diff --git a/cwl/arcasHLA_partial.yml b/cwl/arcasHLA_partial.yml new file mode 100644 index 0000000..90bd59d --- /dev/null +++ b/cwl/arcasHLA_partial.yml @@ -0,0 +1 @@ +gene: A,B,C,DPB1,DQB1,DQA1,DRB1 diff --git a/cwl/arcasHLA_pl/Extract.cwl b/cwl/arcasHLA_pl/Extract.cwl new file mode 100644 index 0000000..43aaa76 --- /dev/null +++ b/cwl/arcasHLA_pl/Extract.cwl @@ -0,0 +1,30 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- arcasHLA +- extract +requirements: +- class: DockerRequirement + dockerPull: hubentu/arcas-hla +arguments: +- -o +- '.' +- -v +inputs: + bam: + type: File + secondaryFiles: .bai + inputBinding: + position: 1 + separate: true + threads: + type: int + inputBinding: + prefix: -t + separate: true + default: 4 +outputs: + fqs: + type: File[] + outputBinding: + glob: '*.fq.gz' diff --git a/cwl/arcasHLA_pl/Genotype.cwl b/cwl/arcasHLA_pl/Genotype.cwl new file mode 100644 index 0000000..fdeebd5 --- /dev/null +++ b/cwl/arcasHLA_pl/Genotype.cwl @@ -0,0 +1,42 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- arcasHLA +- genotype +requirements: +- class: DockerRequirement + dockerPull: hubentu/arcas-hla +arguments: +- -o +- '.' +- -v +inputs: + fqs: + type: File[] + inputBinding: + position: 1 + separate: true + gene: + type: string + inputBinding: + prefix: -g + separate: true + default: A,B,C,DPB1,DQB1,DQA1,DRB1 + threads: + type: int + inputBinding: + prefix: -t + separate: true +outputs: + genotype: + type: File + outputBinding: + glob: '*.genotype.json' + align: + type: File + outputBinding: + glob: '*.alignment.p' + gjs: + type: File + outputBinding: + glob: '*.genes.json' diff --git a/cwl/arcasHLA_pl/Partial.cwl b/cwl/arcasHLA_pl/Partial.cwl new file mode 100644 index 0000000..547ea0d --- /dev/null +++ b/cwl/arcasHLA_pl/Partial.cwl @@ -0,0 +1,43 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- arcasHLA +- partial +requirements: +- class: DockerRequirement + dockerPull: hubentu/arcas-hla +arguments: +- -o +- '.' +- -v +inputs: + fqs: + type: File[] + inputBinding: + position: 1 + separate: true + gene: + type: string + inputBinding: + prefix: -g + separate: true + default: A,B,C,DPB1,DQB1,DQA1,DRB1 + threads: + type: int + inputBinding: + prefix: -t + separate: true + genotype: + type: File + inputBinding: + prefix: -G + separate: true +outputs: + pg: + type: File + outputBinding: + glob: '*.partial_genotype.json' + align: + type: File + outputBinding: + glob: '*.partial_alignment.p' diff --git a/cwl/arcasHLA_pl/arcasHLA_pl.cwl b/cwl/arcasHLA_pl/arcasHLA_pl.cwl new file mode 100644 index 0000000..ac1ddf1 --- /dev/null +++ b/cwl/arcasHLA_pl/arcasHLA_pl.cwl @@ -0,0 +1,42 @@ +cwlVersion: v1.0 +class: Workflow +inputs: + bam: + type: File + secondaryFiles: .bai + threads: + type: int + default: 4 +outputs: + gout: + type: File + outputSource: Genotype/genotype + pout: + type: File + outputSource: Partial/pg +steps: + Extract: + run: Extract.cwl + in: + bam: bam + threads: threads + out: + - fqs + Genotype: + run: Genotype.cwl + in: + fqs: Extract/fqs + threads: threads + out: + - genotype + - align + - gjs + Partial: + run: Partial.cwl + in: + fqs: Extract/fqs + genotype: Genotype/genotype + threads: threads + out: + - pg + - align diff --git a/cwl/arcasHLA_pl/arcasHLA_pl.yml b/cwl/arcasHLA_pl/arcasHLA_pl.yml new file mode 100644 index 0000000..bf19c2b --- /dev/null +++ b/cwl/arcasHLA_pl/arcasHLA_pl.yml @@ -0,0 +1 @@ +threads: 4 diff --git a/cwl/arriba.cwl b/cwl/arriba.cwl new file mode 100644 index 0000000..5a101c3 --- /dev/null +++ b/cwl/arriba.cwl @@ -0,0 +1,62 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: arriba +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/arriba:2.4.0--h0033a41_2 +inputs: + align: + type: File + inputBinding: + prefix: -x + separate: true + out: + type: string + inputBinding: + prefix: -o + separate: true + dout: + type: string + inputBinding: + prefix: -O + separate: true + genome: + type: File + secondaryFiles: .fai + inputBinding: + prefix: -a + separate: true + gtf: + type: File + inputBinding: + prefix: -g + separate: true + blacklist: + type: File + inputBinding: + prefix: -b + separate: true + known: + type: File + inputBinding: + prefix: -k + separate: true + tag: + type: File + inputBinding: + prefix: -t + separate: true + protein: + type: File + inputBinding: + prefix: -p + separate: true +outputs: + fout: + type: File + outputBinding: + glob: $(inputs.out) + fOut: + type: File + outputBinding: + glob: $(inputs.dout) diff --git a/cwl/arriba.yml b/cwl/arriba.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/arriba.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/arriba_pl/STAR.cwl b/cwl/arriba_pl/STAR.cwl new file mode 100644 index 0000000..d12d3d9 --- /dev/null +++ b/cwl/arriba_pl/STAR.cwl @@ -0,0 +1,60 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: STAR +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/star:2.7.9a--h9ee0642_0 +arguments: +- --outFilterMultimapNmax 50 +- --peOverlapNbasesMin 10 +- --alignSplicedMateMapLminOverLmate 0.5 +- --alignSJstitchMismatchNmax 5 -1 5 5 +- --chimSegmentMin 10 +- --chimOutType WithinBAM HardClip +- --chimJunctionOverhangMin 10 +- --chimScoreDropMax 30 +- --chimScoreJunctionNonGTAG 0 +- --chimScoreSeparation 1 +- --chimSegmentReadGapMax 3 +- --chimMultimapNmax 50 +- --outSAMtype BAM Unsorted +- --outSAMunmapped Within +- '--outBAMcompression 0 ' +inputs: + prefix: + type: string + inputBinding: + prefix: --outFileNamePrefix + separate: true + readFilesIn: + type: File[] + inputBinding: + prefix: --readFilesIn + separate: true + genomeDir: + type: Directory + inputBinding: + prefix: --genomeDir + separate: true + sjdbGTFfile: + type: File + inputBinding: + prefix: --sjdbGTFfile + separate: true + runThreadN: + type: int + inputBinding: + prefix: --runThreadN + separate: true + default: 1 + readFileCommand: + type: string + inputBinding: + prefix: --readFilesCommand + separate: true + default: zcat +outputs: + outBAM: + type: File + outputBinding: + glob: '*.bam' diff --git a/cwl/arriba_pl/arriba.cwl b/cwl/arriba_pl/arriba.cwl new file mode 100644 index 0000000..5a101c3 --- /dev/null +++ b/cwl/arriba_pl/arriba.cwl @@ -0,0 +1,62 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: arriba +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/arriba:2.4.0--h0033a41_2 +inputs: + align: + type: File + inputBinding: + prefix: -x + separate: true + out: + type: string + inputBinding: + prefix: -o + separate: true + dout: + type: string + inputBinding: + prefix: -O + separate: true + genome: + type: File + secondaryFiles: .fai + inputBinding: + prefix: -a + separate: true + gtf: + type: File + inputBinding: + prefix: -g + separate: true + blacklist: + type: File + inputBinding: + prefix: -b + separate: true + known: + type: File + inputBinding: + prefix: -k + separate: true + tag: + type: File + inputBinding: + prefix: -t + separate: true + protein: + type: File + inputBinding: + prefix: -p + separate: true +outputs: + fout: + type: File + outputBinding: + glob: $(inputs.out) + fOut: + type: File + outputBinding: + glob: $(inputs.dout) diff --git a/cwl/arriba_pl/arriba_pl.cwl b/cwl/arriba_pl/arriba_pl.cwl new file mode 100644 index 0000000..99f7571 --- /dev/null +++ b/cwl/arriba_pl/arriba_pl.cwl @@ -0,0 +1,28 @@ +cwlVersion: v1.0 +class: Workflow +inputs: + STAR_sjdbGTFfile: + type: File +outputs: + Fout: + type: File + outputSource: arriba/fout + FOut: + type: File + outputSource: arriba/fOut + bam: + type: File + outputSource: STAR/outBAM +steps: + STAR: + run: STAR.cwl + out: + - outBAM + arriba: + run: arriba.cwl + in: + align: STAR/outBAM + gtf: STAR_sjdbGTFfile + out: + - fout + - fOut diff --git a/cwl/arriba_pl/arriba_pl.yml b/cwl/arriba_pl/arriba_pl.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/arriba_pl/arriba_pl.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/awk_merge.cwl b/cwl/awk_merge.cwl index 57381b3..1692488 100644 --- a/cwl/awk_merge.cwl +++ b/cwl/awk_merge.cwl @@ -1,19 +1,19 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: awk -arguments: -- FNR==1 && NR!=1 { while (/^
/) getline; } 1 {print} -inputs: - files: - type: File[] - inputBinding: - separate: true - outfile: - type: string - default: merged.txt -outputs: - out: - type: File - outputBinding: - glob: $(inputs.outfile) -stdout: $(inputs.outfile) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: awk +arguments: +- FNR==1 && NR!=1 { while (/^
/) getline; } 1 {print} +inputs: + files: + type: File[] + inputBinding: + separate: true + outfile: + type: string + default: merged.txt +outputs: + out: + type: File + outputBinding: + glob: $(inputs.outfile) +stdout: $(inputs.outfile) diff --git a/cwl/awk_merge.yml b/cwl/awk_merge.yml index 4ce82d4..6e5a1c4 100644 --- a/cwl/awk_merge.yml +++ b/cwl/awk_merge.yml @@ -1 +1 @@ -outfile: merged.txt +outfile: merged.txt diff --git a/cwl/bam2seqz.cwl b/cwl/bam2seqz.cwl new file mode 100644 index 0000000..63dcb3a --- /dev/null +++ b/cwl/bam2seqz.cwl @@ -0,0 +1,42 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- sequenza-utils +- bam2seqz +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/sequenza-utils:3.0.0--py39h67e14b5_5 +inputs: + normal: + type: File + secondaryFiles: .bai + inputBinding: + prefix: -n + separate: true + tumor: + type: File + secondaryFiles: .bai + inputBinding: + prefix: -t + separate: true + ref: + type: File + secondaryFiles: .fai + inputBinding: + prefix: --fasta + separate: true + gc: + type: File + inputBinding: + prefix: -gc + separate: true + out: + type: string + inputBinding: + prefix: -o + separate: true +outputs: + seqz: + type: File + outputBinding: + glob: $(inputs.out) diff --git a/cwl/bam2seqz.yml b/cwl/bam2seqz.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/bam2seqz.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/bamCoverage.cwl b/cwl/bamCoverage.cwl index 6d6b287..634f5db 100644 --- a/cwl/bamCoverage.cwl +++ b/cwl/bamCoverage.cwl @@ -1,44 +1,44 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: bamCoverage -requirements: -- class: DockerRequirement - dockerPull: quay.io/biocontainers/deeptools:3.4.3--py_0 -arguments: -- --ignoreDuplicates -- --skipNonCoveredRegions -inputs: - bam: - type: File - secondaryFiles: .bai - inputBinding: - prefix: -b - separate: true - outFile: - type: string - inputBinding: - prefix: -o - separate: true - binsize: - type: int - inputBinding: - prefix: -bs - separate: true - default: 1 - processors: - type: string - inputBinding: - prefix: -p - separate: true - default: max - outFormat: - type: string - inputBinding: - prefix: --outFileFormat - separate: true - default: bigwig -outputs: - bigwig: - type: File - outputBinding: - glob: $(inputs.bw) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: bamCoverage +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/deeptools:3.4.3--py_0 +arguments: +- --ignoreDuplicates +- --skipNonCoveredRegions +inputs: + bam: + type: File + secondaryFiles: .bai + inputBinding: + prefix: -b + separate: true + outFile: + type: string + inputBinding: + prefix: -o + separate: true + binsize: + type: int + inputBinding: + prefix: -bs + separate: true + default: 1 + processors: + type: string + inputBinding: + prefix: -p + separate: true + default: max + outFormat: + type: string + inputBinding: + prefix: --outFileFormat + separate: true + default: bigwig +outputs: + bigwig: + type: File + outputBinding: + glob: $(inputs.bw) diff --git a/cwl/bamCoverage.yml b/cwl/bamCoverage.yml index bb6a21e..5c00157 100644 --- a/cwl/bamCoverage.yml +++ b/cwl/bamCoverage.yml @@ -1,3 +1,3 @@ -binsize: 1 -processors: max -outFormat: bigwig +binsize: 1 +processors: max +outFormat: bigwig diff --git a/cwl/bam_readcount.cwl b/cwl/bam_readcount.cwl index 8c1d310..2bb5533 100644 --- a/cwl/bam_readcount.cwl +++ b/cwl/bam_readcount.cwl @@ -1,46 +1,46 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- /usr/bin/python -- /usr/bin/bam_readcount_helper.py -requirements: -- class: DockerRequirement - dockerPull: mgibio/bam_readcount_helper-cwl:1.1.1 -arguments: -- valueFrom: NOPREFIX - position: 5 -- valueFrom: ./ - position: 6 - shellQuote: false -inputs: - vcf: - type: File - inputBinding: - position: 1 - separate: true - sample: - type: string - inputBinding: - position: 2 - separate: true - ref: - type: File - secondaryFiles: .fai - inputBinding: - position: 3 - separate: true - bam: - type: File - secondaryFiles: .bai - inputBinding: - position: 4 - separate: true -outputs: - snv: - type: File - outputBinding: - glob: $(inputs.sample)_bam_readcount_snv.tsv - indel: - type: File - outputBinding: - glob: $(inputs.sample)_bam_readcount_indel.tsv +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- /usr/bin/python +- /usr/bin/bam_readcount_helper.py +requirements: +- class: DockerRequirement + dockerPull: mgibio/bam_readcount_helper-cwl:1.1.1 +arguments: +- valueFrom: NOPREFIX + position: 5 +- valueFrom: ./ + position: 6 + shellQuote: false +inputs: + vcf: + type: File + inputBinding: + position: 1 + separate: true + sample: + type: string + inputBinding: + position: 2 + separate: true + ref: + type: File + secondaryFiles: .fai + inputBinding: + position: 3 + separate: true + bam: + type: File + secondaryFiles: .bai + inputBinding: + position: 4 + separate: true +outputs: + snv: + type: File + outputBinding: + glob: $(inputs.sample)_bam_readcount_snv.tsv + indel: + type: File + outputBinding: + glob: $(inputs.sample)_bam_readcount_indel.tsv diff --git a/cwl/bam_readcount.yml b/cwl/bam_readcount.yml index 0967ef4..69a88e3 100644 --- a/cwl/bam_readcount.yml +++ b/cwl/bam_readcount.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/bam_stat.py.cwl b/cwl/bam_stat.py.cwl new file mode 100644 index 0000000..a23e907 --- /dev/null +++ b/cwl/bam_stat.py.cwl @@ -0,0 +1,18 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: bam_stat.py +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/rseqc:4.0.0--py38h4a8c8d9_1 +inputs: + bam: + type: File + inputBinding: + prefix: -i + separate: true +outputs: + statOut: + type: File + outputBinding: + glob: $(inputs.bam.nameroot).bamStat.txt +stdout: $(inputs.bam.nameroot).bamStat.txt diff --git a/cwl/bam_stat.py.yml b/cwl/bam_stat.py.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/bam_stat.py.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/bambino.cwl b/cwl/bambino.cwl new file mode 100644 index 0000000..09005a4 --- /dev/null +++ b/cwl/bambino.cwl @@ -0,0 +1,35 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: /opt/run.sh +requirements: +- class: DockerRequirement + dockerPull: hubentu/bambino +inputs: + dbam: + type: File + secondaryFiles: .bai + inputBinding: + position: 1 + separate: true + gbam: + type: File + secondaryFiles: .bai + inputBinding: + position: 2 + separate: true + out: + type: string + inputBinding: + position: 3 + separate: true + ref: + type: File + secondaryFiles: .fai + inputBinding: + position: 4 + separate: true +outputs: + vout: + type: File + outputBinding: + glob: $(inputs.out) diff --git a/cwl/bambino.yml b/cwl/bambino.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/bambino.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/bcftools_concat.cwl b/cwl/bcftools_concat.cwl new file mode 100644 index 0000000..93933c2 --- /dev/null +++ b/cwl/bcftools_concat.cwl @@ -0,0 +1,40 @@ +cwlVersion: v1.2 +class: CommandLineTool +baseCommand: +- bcftools +- concat +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/bcftools:1.13--h3a49de5_0 +inputs: + ovcf: + type: string + inputBinding: + prefix: -o + separate: true + vcfs: + type: File[]? + secondaryFiles: tbi? + inputBinding: + separate: true + type: + type: string? + inputBinding: + prefix: -O + separate: true + overlap: + type: boolean? + inputBinding: + prefix: -a + separate: true + vfile: + type: File? + inputBinding: + prefix: -f + separate: true +outputs: + Fout: + type: File + secondaryFiles: .tbi? + outputBinding: + glob: $(inputs.ovcf) diff --git a/cwl/bcftools_concat.yml b/cwl/bcftools_concat.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/bcftools_concat.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/bcftools_concat_file.cwl b/cwl/bcftools_concat_file.cwl new file mode 100644 index 0000000..94ae86c --- /dev/null +++ b/cwl/bcftools_concat_file.cwl @@ -0,0 +1,40 @@ +cwlVersion: v1.2 +class: CommandLineTool +baseCommand: +- bcftools +- concat +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/bcftools:1.13--h3a49de5_0 +- class: InitialWorkDirRequirement + listing: + - entryname: gvcfs + entry: "${var x='';for(var i=0;i1) + markdup: + run: markdup.cwl + in: + ibam: + source: + - mergeBam/oBam + - bwaAlign/Bam + linkMerge: merge_flattened + pickValue: first_non_null + valueFrom: $(self) + obam: outBam + matrix: + source: + - outBam + valueFrom: $(self).markdup.txt + out: + - mBam + - Mat + samtools_index: + run: samtools_index.cwl + in: + bam: + source: + - markdup/mBam + - mergeBam/oBam + - bwaAlign/Bam + linkMerge: merge_flattened + pickValue: first_non_null + valueFrom: $(self) + out: + - idx + samtools_flagstat: + run: samtools_flagstat.cwl + in: + bam: samtools_index/idx + out: + - flagstat + samtools_stats: + run: samtools_stats.cwl + in: + bam: samtools_index/idx + out: + - stats + md5sum: + run: md5sum.cwl + in: + file: samtools_index/idx + out: + - md5 diff --git a/cwl/bwaDup/bwaDup.yml b/cwl/bwaDup/bwaDup.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/bwaDup/bwaDup.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/bwaDup/idxBam.cwl b/cwl/bwaDup/idxBam.cwl new file mode 100644 index 0000000..e779867 --- /dev/null +++ b/cwl/bwaDup/idxBam.cwl @@ -0,0 +1,24 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- index +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.12--h9aed4be_1 +- class: InitialWorkDirRequirement + listing: + - $(inputs.bam) +inputs: + bam: + type: File + inputBinding: + position: 1 + separate: true +outputs: + idx: + type: File + secondaryFiles: + - .bai + outputBinding: + glob: $(inputs.bam.basename) diff --git a/cwl/bwaDup/markdup.cwl b/cwl/bwaDup/markdup.cwl new file mode 100644 index 0000000..8e647ce --- /dev/null +++ b/cwl/bwaDup/markdup.cwl @@ -0,0 +1,33 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- picard +- MarkDuplicates +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/picard:2.21.1--0 +inputs: + ibam: + type: File + inputBinding: + prefix: I= + separate: false + obam: + type: string + inputBinding: + prefix: O= + separate: false + matrix: + type: string + inputBinding: + prefix: M= + separate: false +outputs: + mBam: + type: File + outputBinding: + glob: $(inputs.obam) + Mat: + type: File + outputBinding: + glob: $(inputs.matrix) diff --git a/cwl/bwaDup/md5sum.cwl b/cwl/bwaDup/md5sum.cwl new file mode 100644 index 0000000..5e1ef6c --- /dev/null +++ b/cwl/bwaDup/md5sum.cwl @@ -0,0 +1,14 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: md5sum +inputs: + file: + type: File + inputBinding: + separate: true +outputs: + md5: + type: File + outputBinding: + glob: $(inputs.file.basename).md5 +stdout: $(inputs.file.basename).md5 diff --git a/cwl/bwaDup/mergeBam.cwl b/cwl/bwaDup/mergeBam.cwl new file mode 100644 index 0000000..09d81b0 --- /dev/null +++ b/cwl/bwaDup/mergeBam.cwl @@ -0,0 +1,28 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- picard +- MergeSamFiles +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/picard:2.21.1--0 +inputs: + ibam: + type: + type: array + items: File + inputBinding: + prefix: I= + separate: false + inputBinding: + separate: true + obam: + type: string + inputBinding: + prefix: O= + separate: false +outputs: + oBam: + type: File + outputBinding: + glob: $(inputs.obam) diff --git a/cwl/bwaDup/sam2bam.cwl b/cwl/bwaDup/sam2bam.cwl new file mode 100644 index 0000000..48b492e --- /dev/null +++ b/cwl/bwaDup/sam2bam.cwl @@ -0,0 +1,67 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- view +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.16.1--h6899075_1 +inputs: + bam: + type: File + secondaryFiles: .bai + inputBinding: + position: 99 + separate: true + bed: + type: File? + inputBinding: + position: 1 + prefix: -L + separate: true + obam: + type: string + inputBinding: + position: 2 + prefix: -o + separate: true + region: + type: string? + inputBinding: + position: 100 + separate: true + outb: + type: boolean? + inputBinding: + prefix: -b + separate: true + exFlag: + type: int? + inputBinding: + prefix: -F + separate: true + reqFlag: + type: int? + inputBinding: + prefix: -f + separate: true + qname: + type: File? + inputBinding: + prefix: -N + separate: true + threads: + type: int? + inputBinding: + prefix: --threads + separate: true + mapq: + type: int? + inputBinding: + prefix: -q + separate: true +outputs: + oBam: + type: File + outputBinding: + glob: $(inputs.obam) diff --git a/cwl/bwaDup/samtools_flagstat.cwl b/cwl/bwaDup/samtools_flagstat.cwl new file mode 100644 index 0000000..000949d --- /dev/null +++ b/cwl/bwaDup/samtools_flagstat.cwl @@ -0,0 +1,19 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- flagstat +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.15--h1170115_1 +inputs: + bam: + type: File + inputBinding: + separate: true +outputs: + flagstat: + type: File + outputBinding: + glob: $(inputs.bam.nameroot).flagstat.txt +stdout: $(inputs.bam.nameroot).flagstat.txt diff --git a/cwl/bwaDup/samtools_index.cwl b/cwl/bwaDup/samtools_index.cwl new file mode 100644 index 0000000..e779867 --- /dev/null +++ b/cwl/bwaDup/samtools_index.cwl @@ -0,0 +1,24 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- index +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.12--h9aed4be_1 +- class: InitialWorkDirRequirement + listing: + - $(inputs.bam) +inputs: + bam: + type: File + inputBinding: + position: 1 + separate: true +outputs: + idx: + type: File + secondaryFiles: + - .bai + outputBinding: + glob: $(inputs.bam.basename) diff --git a/cwl/bwaAlign/sam2bam.cwl b/cwl/bwaDup/samtools_stats.cwl similarity index 68% rename from cwl/bwaAlign/sam2bam.cwl rename to cwl/bwaDup/samtools_stats.cwl index 621e78d..c054631 100644 --- a/cwl/bwaAlign/sam2bam.cwl +++ b/cwl/bwaDup/samtools_stats.cwl @@ -1,21 +1,19 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- samtools -- view -requirements: -- class: DockerRequirement - dockerPull: biocontainers/samtools:v1.7.0_cv3 -arguments: -- -b -inputs: - sam: - type: File - inputBinding: - separate: true -outputs: - bam: - type: File - outputBinding: - glob: $(inputs.sam.basename).bam -stdout: $(inputs.sam.basename).bam +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- stats +requirements: +- class: DockerRequirement + dockerPull: biocontainers/samtools:v1.7.0_cv3 +inputs: + bam: + type: File + inputBinding: + separate: true +outputs: + stats: + type: File + outputBinding: + glob: $(inputs.bam.nameroot).stats.txt +stdout: $(inputs.bam.nameroot).stats.txt diff --git a/cwl/bwaDup/sortBam.cwl b/cwl/bwaDup/sortBam.cwl new file mode 100644 index 0000000..be772d7 --- /dev/null +++ b/cwl/bwaDup/sortBam.cwl @@ -0,0 +1,23 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- sort +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.12--h9aed4be_1 +inputs: + bam: + type: File + inputBinding: + separate: true + obam: + type: string + inputBinding: + prefix: -o + separate: true +outputs: + sbam: + type: File + outputBinding: + glob: $(inputs.obam) diff --git a/cwl/bwaMM/bwa.cwl b/cwl/bwaMM/bwa.cwl new file mode 100644 index 0000000..7b63bc4 --- /dev/null +++ b/cwl/bwaMM/bwa.cwl @@ -0,0 +1,48 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- bwa +- mem +requirements: +- class: DockerRequirement + dockerPull: biocontainers/bwa:v0.7.17-3-deb_cv1 +inputs: + threads: + type: int + inputBinding: + position: 1 + prefix: -t + separate: true + RG: + type: string? + inputBinding: + position: 2 + prefix: -R + separate: true + Ref: + type: File + secondaryFiles: + - .amb + - .ann + - .bwt + - .pac + - .sa + inputBinding: + position: 3 + separate: true + FQ1: + type: File + inputBinding: + position: 4 + separate: true + FQ2: + type: File? + inputBinding: + position: 5 + separate: true +outputs: + sam: + type: File + outputBinding: + glob: '*.sam' +stdout: bwaOutput.sam diff --git a/cwl/bwaMM/bwaAlign.cwl b/cwl/bwaMM/bwaAlign.cwl new file mode 100644 index 0000000..7faf4df --- /dev/null +++ b/cwl/bwaMM/bwaAlign.cwl @@ -0,0 +1,61 @@ +cwlVersion: v1.0 +class: Workflow +requirements: +- class: StepInputExpressionRequirement +inputs: + threads: + type: int + RG: + type: string + Ref: + type: File + secondaryFiles: + - .amb + - .ann + - .bwt + - .pac + - .sa + FQ1: + type: File + FQ2: + type: File? +outputs: + Bam: + type: File + outputSource: sortBam/sbam + Idx: + type: File + outputSource: idxBam/idx +steps: + bwa: + run: bwa.cwl + in: + threads: threads + RG: RG + Ref: Ref + FQ1: FQ1 + FQ2: FQ2 + out: + - sam + sam2bam: + run: sam2bam.cwl + in: + bam: bwa/sam + obam: + valueFrom: $(inputs.bam.nameroot).bam + out: + - oBam + sortBam: + run: sortBam.cwl + in: + bam: sam2bam/oBam + obam: + valueFrom: $(inputs.bam.nameroot)_sort.bam + out: + - sbam + idxBam: + run: idxBam.cwl + in: + bam: sortBam/sbam + out: + - idx diff --git a/cwl/bwaMM/bwaMM.cwl b/cwl/bwaMM/bwaMM.cwl new file mode 100644 index 0000000..62c1e0b --- /dev/null +++ b/cwl/bwaMM/bwaMM.cwl @@ -0,0 +1,64 @@ +cwlVersion: v1.0 +class: Workflow +requirements: +- class: SubworkflowFeatureRequirement +- class: ScatterFeatureRequirement +- class: InlineJavascriptRequirement +inputs: + outBam: + type: string + RG: + type: string[] + threads: + type: int + Ref: + type: File + secondaryFiles: + - .amb + - .ann + - .bwt + - .pac + - .sa + - .fai + - $(self.nameroot).dict + FQ1s: + type: File[] + FQ2s: + type: File[] +outputs: + matrix: + type: File + outputSource: mergeBamDup/matrix + Idx: + type: File + outputSource: mergeBamDup/Idx + flagstat: + type: File + outputSource: mergeBamDup/stat +steps: + bwaAlign: + run: bwaAlign.cwl + in: + threads: threads + RG: RG + Ref: Ref + FQ1: FQ1s + FQ2: FQ2s + out: + - Bam + - Idx + scatter: + - RG + - FQ1 + - FQ2 + scatterMethod: dotproduct + mergeBamDup: + run: mergeBamDup.cwl + in: + ibam: bwaAlign/Bam + obam: outBam + out: + - oBam + - matrix + - Idx + - stat diff --git a/cwl/bwaMM/bwaMM.yml b/cwl/bwaMM/bwaMM.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/bwaMM/bwaMM.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/bwaMM/idxBam.cwl b/cwl/bwaMM/idxBam.cwl new file mode 100644 index 0000000..e779867 --- /dev/null +++ b/cwl/bwaMM/idxBam.cwl @@ -0,0 +1,24 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- index +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.12--h9aed4be_1 +- class: InitialWorkDirRequirement + listing: + - $(inputs.bam) +inputs: + bam: + type: File + inputBinding: + position: 1 + separate: true +outputs: + idx: + type: File + secondaryFiles: + - .bai + outputBinding: + glob: $(inputs.bam.basename) diff --git a/cwl/bwaMM/markdup.cwl b/cwl/bwaMM/markdup.cwl new file mode 100644 index 0000000..8e647ce --- /dev/null +++ b/cwl/bwaMM/markdup.cwl @@ -0,0 +1,33 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- picard +- MarkDuplicates +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/picard:2.21.1--0 +inputs: + ibam: + type: File + inputBinding: + prefix: I= + separate: false + obam: + type: string + inputBinding: + prefix: O= + separate: false + matrix: + type: string + inputBinding: + prefix: M= + separate: false +outputs: + mBam: + type: File + outputBinding: + glob: $(inputs.obam) + Mat: + type: File + outputBinding: + glob: $(inputs.matrix) diff --git a/cwl/bwaMM/mergeBam.cwl b/cwl/bwaMM/mergeBam.cwl new file mode 100644 index 0000000..09d81b0 --- /dev/null +++ b/cwl/bwaMM/mergeBam.cwl @@ -0,0 +1,28 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- picard +- MergeSamFiles +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/picard:2.21.1--0 +inputs: + ibam: + type: + type: array + items: File + inputBinding: + prefix: I= + separate: false + inputBinding: + separate: true + obam: + type: string + inputBinding: + prefix: O= + separate: false +outputs: + oBam: + type: File + outputBinding: + glob: $(inputs.obam) diff --git a/cwl/bwaMM/mergeBamDup.cwl b/cwl/bwaMM/mergeBamDup.cwl new file mode 100644 index 0000000..b5cd688 --- /dev/null +++ b/cwl/bwaMM/mergeBamDup.cwl @@ -0,0 +1,53 @@ +cwlVersion: v1.0 +class: Workflow +requirements: +- class: StepInputExpressionRequirement +- class: InlineJavascriptRequirement +inputs: + ibam: + type: File[] + obam: + type: string +outputs: + oBam: + type: File + outputSource: markdup/mBam + matrix: + type: File + outputSource: markdup/Mat + Idx: + type: File + outputSource: samtools_index/idx + stat: + type: File + outputSource: samtools_flagstat/flagstat +steps: + mergeBam: + run: mergeBam.cwl + in: + ibam: ibam + obam: obam + out: + - oBam + markdup: + run: markdup.cwl + in: + ibam: mergeBam/oBam + obam: obam + matrix: + valueFrom: $(inputs.ibam.nameroot).markdup.txt + out: + - mBam + - Mat + samtools_index: + run: samtools_index.cwl + in: + bam: markdup/mBam + out: + - idx + samtools_flagstat: + run: samtools_flagstat.cwl + in: + bam: markdup/mBam + out: + - flagstat diff --git a/cwl/bwaMM/sam2bam.cwl b/cwl/bwaMM/sam2bam.cwl new file mode 100644 index 0000000..48b492e --- /dev/null +++ b/cwl/bwaMM/sam2bam.cwl @@ -0,0 +1,67 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- view +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.16.1--h6899075_1 +inputs: + bam: + type: File + secondaryFiles: .bai + inputBinding: + position: 99 + separate: true + bed: + type: File? + inputBinding: + position: 1 + prefix: -L + separate: true + obam: + type: string + inputBinding: + position: 2 + prefix: -o + separate: true + region: + type: string? + inputBinding: + position: 100 + separate: true + outb: + type: boolean? + inputBinding: + prefix: -b + separate: true + exFlag: + type: int? + inputBinding: + prefix: -F + separate: true + reqFlag: + type: int? + inputBinding: + prefix: -f + separate: true + qname: + type: File? + inputBinding: + prefix: -N + separate: true + threads: + type: int? + inputBinding: + prefix: --threads + separate: true + mapq: + type: int? + inputBinding: + prefix: -q + separate: true +outputs: + oBam: + type: File + outputBinding: + glob: $(inputs.obam) diff --git a/cwl/bwaMM/samtools_flagstat.cwl b/cwl/bwaMM/samtools_flagstat.cwl new file mode 100644 index 0000000..000949d --- /dev/null +++ b/cwl/bwaMM/samtools_flagstat.cwl @@ -0,0 +1,19 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- flagstat +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.15--h1170115_1 +inputs: + bam: + type: File + inputBinding: + separate: true +outputs: + flagstat: + type: File + outputBinding: + glob: $(inputs.bam.nameroot).flagstat.txt +stdout: $(inputs.bam.nameroot).flagstat.txt diff --git a/cwl/bwaMM/samtools_index.cwl b/cwl/bwaMM/samtools_index.cwl new file mode 100644 index 0000000..e779867 --- /dev/null +++ b/cwl/bwaMM/samtools_index.cwl @@ -0,0 +1,24 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- index +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.12--h9aed4be_1 +- class: InitialWorkDirRequirement + listing: + - $(inputs.bam) +inputs: + bam: + type: File + inputBinding: + position: 1 + separate: true +outputs: + idx: + type: File + secondaryFiles: + - .bai + outputBinding: + glob: $(inputs.bam.basename) diff --git a/cwl/bwaMM/sortBam.cwl b/cwl/bwaMM/sortBam.cwl new file mode 100644 index 0000000..be772d7 --- /dev/null +++ b/cwl/bwaMM/sortBam.cwl @@ -0,0 +1,23 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- sort +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.12--h9aed4be_1 +inputs: + bam: + type: File + inputBinding: + separate: true + obam: + type: string + inputBinding: + prefix: -o + separate: true +outputs: + sbam: + type: File + outputBinding: + glob: $(inputs.obam) diff --git a/cwl/bwaMMRecal/ApplyBQSR.cwl b/cwl/bwaMMRecal/ApplyBQSR.cwl index 018b8fd..567e86b 100644 --- a/cwl/bwaMMRecal/ApplyBQSR.cwl +++ b/cwl/bwaMMRecal/ApplyBQSR.cwl @@ -1,37 +1,37 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- gatk -- ApplyBQSR -requirements: -- class: DockerRequirement - dockerPull: broadinstitute/gatk:latest -inputs: - bam: - type: File - inputBinding: - prefix: -I - separate: true - ref: - type: File - secondaryFiles: - - .fai - - $(self.nameroot).dict - inputBinding: - prefix: -R - separate: true - rtable: - type: File - inputBinding: - prefix: --bqsr-recal-file - separate: true - oBam: - type: string - inputBinding: - prefix: -O - separate: true -outputs: - Bam: - type: File - outputBinding: - glob: $(inputs.oBam) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- gatk +- ApplyBQSR +requirements: +- class: DockerRequirement + dockerPull: broadinstitute/gatk:latest +inputs: + bam: + type: File + inputBinding: + prefix: -I + separate: true + ref: + type: File + secondaryFiles: + - .fai + - $(self.nameroot).dict + inputBinding: + prefix: -R + separate: true + rtable: + type: File + inputBinding: + prefix: --bqsr-recal-file + separate: true + oBam: + type: string + inputBinding: + prefix: -O + separate: true +outputs: + Bam: + type: File + outputBinding: + glob: $(inputs.oBam) diff --git a/cwl/bwaMMRecal/BaseRecal.cwl b/cwl/bwaMMRecal/BaseRecal.cwl index 75635cb..52b427c 100644 --- a/cwl/bwaMMRecal/BaseRecal.cwl +++ b/cwl/bwaMMRecal/BaseRecal.cwl @@ -1,71 +1,70 @@ -cwlVersion: v1.0 -class: Workflow -requirements: -- class: StepInputExpressionRequirement -- class: InlineJavascriptRequirement -inputs: - bam: - type: File - ref: - type: File - secondaryFiles: - - .fai - - $(self.nameroot).dict - knowSites: - type: - type: array - items: File - inputBinding: - separate: true - secondaryFiles: .idx - oBam: - type: string -outputs: - rcBam: - type: File - secondaryFiles: .bai - outputSource: samtools_index/idx - flagstat: - type: File - outputSource: samtools_flagstat/flagstat - stats: - type: File - outputSource: samtools_stats/stats -steps: - BaseRecalibrator: - run: BaseRecalibrator.cwl - in: - bam: bam - ref: ref - knowSites: knowSites - recal: - valueFrom: $(inputs.bam.nameroot).recal.txt - out: - - rtable - ApplyBQSR: - run: ApplyBQSR.cwl - in: - bam: bam - ref: ref - rtable: BaseRecalibrator/rtable - oBam: oBam - out: - - Bam - samtools_index: - run: samtools_index.cwl - in: - bam: ApplyBQSR/Bam - out: - - idx - samtools_flagstat: - run: samtools_flagstat.cwl - in: - bam: ApplyBQSR/Bam - out: - - flagstat - samtools_stats: - run: samtools_stats.cwl - in: - bam: ApplyBQSR/Bam - out: - - stats +cwlVersion: v1.0 +class: Workflow +requirements: +- class: StepInputExpressionRequirement +- class: InlineJavascriptRequirement +- class: InlineJavascriptRequirement +inputs: + bam: + type: File + ref: + type: File + secondaryFiles: + - .fai + - $(self.nameroot).dict + knowSites: + type: + type: array + items: File + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + oBam: + type: string +outputs: + rcBam: + type: File + secondaryFiles: .bai + outputSource: samtools_index/idx + flagstat: + type: File + outputSource: samtools_flagstat/flagstat + stats: + type: File + outputSource: samtools_stats/stats +steps: + BaseRecalibrator: + run: BaseRecalibrator.cwl + in: + bam: bam + ref: ref + knowSites: knowSites + recal: + valueFrom: $(inputs.bam.nameroot).recal.txt + out: + - rtable + ApplyBQSR: + run: ApplyBQSR.cwl + in: + bam: bam + ref: ref + rtable: BaseRecalibrator/rtable + oBam: oBam + out: + - Bam + samtools_index: + run: samtools_index.cwl + in: + bam: ApplyBQSR/Bam + out: + - idx + samtools_flagstat: + run: samtools_flagstat.cwl + in: + bam: ApplyBQSR/Bam + out: + - flagstat + samtools_stats: + run: samtools_stats.cwl + in: + bam: ApplyBQSR/Bam + out: + - stats diff --git a/cwl/bwaMMRecal/BaseRecalibrator.cwl b/cwl/bwaMMRecal/BaseRecalibrator.cwl index 0353c15..f92210e 100644 --- a/cwl/bwaMMRecal/BaseRecalibrator.cwl +++ b/cwl/bwaMMRecal/BaseRecalibrator.cwl @@ -1,42 +1,43 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- gatk -- BaseRecalibrator -requirements: -- class: DockerRequirement - dockerPull: broadinstitute/gatk:latest -inputs: - bam: - type: File - inputBinding: - prefix: -I - separate: true - ref: - type: File - secondaryFiles: - - .fai - - $(self.nameroot).dict - inputBinding: - prefix: -R - separate: true - knowSites: - type: - type: array - items: File - inputBinding: - prefix: --known-sites - separate: true - secondaryFiles: .idx - inputBinding: - separate: true - recal: - type: string - inputBinding: - prefix: -O - separate: true -outputs: - rtable: - type: File - outputBinding: - glob: $(inputs.recal) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- gatk +- BaseRecalibrator +requirements: +- class: DockerRequirement + dockerPull: broadinstitute/gatk:latest +- class: InlineJavascriptRequirement +inputs: + bam: + type: File + inputBinding: + prefix: -I + separate: true + ref: + type: File + secondaryFiles: + - .fai + - $(self.nameroot).dict + inputBinding: + prefix: -R + separate: true + knowSites: + type: + type: array + items: File + inputBinding: + prefix: --known-sites + separate: true + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + inputBinding: + separate: true + recal: + type: string + inputBinding: + prefix: -O + separate: true +outputs: + rtable: + type: File + outputBinding: + glob: $(inputs.recal) diff --git a/cwl/bwaMMRecal/bwa.cwl b/cwl/bwaMMRecal/bwa.cwl index 03d69d3..7b63bc4 100644 --- a/cwl/bwaMMRecal/bwa.cwl +++ b/cwl/bwaMMRecal/bwa.cwl @@ -1,48 +1,48 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- bwa -- mem -requirements: -- class: DockerRequirement - dockerPull: biocontainers/bwa:v0.7.17-3-deb_cv1 -inputs: - threads: - type: int - inputBinding: - position: 1 - prefix: -t - separate: true - RG: - type: string - inputBinding: - position: 2 - prefix: -R - separate: true - Ref: - type: File - secondaryFiles: - - .amb - - .ann - - .bwt - - .pac - - .sa - inputBinding: - position: 3 - separate: true - FQ1: - type: File - inputBinding: - position: 4 - separate: true - FQ2: - type: File? - inputBinding: - position: 5 - separate: true -outputs: - sam: - type: File - outputBinding: - glob: '*.sam' -stdout: bwaOutput.sam +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- bwa +- mem +requirements: +- class: DockerRequirement + dockerPull: biocontainers/bwa:v0.7.17-3-deb_cv1 +inputs: + threads: + type: int + inputBinding: + position: 1 + prefix: -t + separate: true + RG: + type: string? + inputBinding: + position: 2 + prefix: -R + separate: true + Ref: + type: File + secondaryFiles: + - .amb + - .ann + - .bwt + - .pac + - .sa + inputBinding: + position: 3 + separate: true + FQ1: + type: File + inputBinding: + position: 4 + separate: true + FQ2: + type: File? + inputBinding: + position: 5 + separate: true +outputs: + sam: + type: File + outputBinding: + glob: '*.sam' +stdout: bwaOutput.sam diff --git a/cwl/bwaMMRecal/bwaAlign.cwl b/cwl/bwaMMRecal/bwaAlign.cwl index 8d95f6e..7faf4df 100644 --- a/cwl/bwaMMRecal/bwaAlign.cwl +++ b/cwl/bwaMMRecal/bwaAlign.cwl @@ -1,55 +1,61 @@ -cwlVersion: v1.0 -class: Workflow -inputs: - threads: - type: int - RG: - type: string - Ref: - type: File - secondaryFiles: - - .amb - - .ann - - .bwt - - .pac - - .sa - FQ1: - type: File - FQ2: - type: File? -outputs: - Bam: - type: File - outputSource: sortBam/sbam - Idx: - type: File - outputSource: idxBam/idx -steps: - bwa: - run: bwa.cwl - in: - threads: threads - RG: RG - Ref: Ref - FQ1: FQ1 - FQ2: FQ2 - out: - - sam - sam2bam: - run: sam2bam.cwl - in: - sam: bwa/sam - out: - - bam - sortBam: - run: sortBam.cwl - in: - bam: sam2bam/bam - out: - - sbam - idxBam: - run: idxBam.cwl - in: - bam: sortBam/sbam - out: - - idx +cwlVersion: v1.0 +class: Workflow +requirements: +- class: StepInputExpressionRequirement +inputs: + threads: + type: int + RG: + type: string + Ref: + type: File + secondaryFiles: + - .amb + - .ann + - .bwt + - .pac + - .sa + FQ1: + type: File + FQ2: + type: File? +outputs: + Bam: + type: File + outputSource: sortBam/sbam + Idx: + type: File + outputSource: idxBam/idx +steps: + bwa: + run: bwa.cwl + in: + threads: threads + RG: RG + Ref: Ref + FQ1: FQ1 + FQ2: FQ2 + out: + - sam + sam2bam: + run: sam2bam.cwl + in: + bam: bwa/sam + obam: + valueFrom: $(inputs.bam.nameroot).bam + out: + - oBam + sortBam: + run: sortBam.cwl + in: + bam: sam2bam/oBam + obam: + valueFrom: $(inputs.bam.nameroot)_sort.bam + out: + - sbam + idxBam: + run: idxBam.cwl + in: + bam: sortBam/sbam + out: + - idx diff --git a/cwl/bwaMMRecal/bwaMMRecal.cwl b/cwl/bwaMMRecal/bwaMMRecal.cwl index 99a73fe..b6bd1a0 100644 --- a/cwl/bwaMMRecal/bwaMMRecal.cwl +++ b/cwl/bwaMMRecal/bwaMMRecal.cwl @@ -1,84 +1,83 @@ -cwlVersion: v1.0 -class: Workflow -requirements: -- class: SubworkflowFeatureRequirement -- class: ScatterFeatureRequirement -inputs: - outBam: - type: string - RG: - type: string[] - threads: - type: int - Ref: - type: File - secondaryFiles: - - .amb - - .ann - - .bwt - - .pac - - .sa - - .fai - - $(self.nameroot).dict - FQ1s: - type: File[] - FQ2s: - type: File[] - knowSites: - type: - type: array - items: File - inputBinding: - separate: true - secondaryFiles: .idx -outputs: - BAM: - type: File - outputSource: BaseRecal/rcBam - matrix: - type: File - outputSource: mergeBamDup/matrix - flagstat: - type: File - outputSource: BaseRecal/flagstat - stats: - type: File - outputSource: BaseRecal/stats -steps: - bwaAlign: - run: cwl/bwaMMRecal/bwaAlign.cwl - in: - threads: threads - RG: RG - Ref: Ref - FQ1: FQ1s - FQ2: FQ2s - out: - - Bam - - Idx - scatter: - - RG - - FQ1 - - FQ2 - scatterMethod: dotproduct - mergeBamDup: - run: cwl/bwaMMRecal/mergeBamDup.cwl - in: - ibam: bwaAlign/Bam - obam: outBam - out: - - oBam - - matrix - - Idx - - stat - BaseRecal: - run: cwl/bwaMMRecal/BaseRecal.cwl - in: - bam: mergeBamDup/Idx - ref: Ref - knowSites: knowSites - oBam: outBam - out: - - rcBam - - flagstat - - stats +cwlVersion: v1.0 +class: Workflow +requirements: +- class: SubworkflowFeatureRequirement +- class: ScatterFeatureRequirement +- class: InlineJavascriptRequirement +inputs: + outBam: + type: string + RG: + type: string[] + threads: + type: int + Ref: + type: File + secondaryFiles: + - .amb + - .ann + - .bwt + - .pac + - .sa + - .fai + - $(self.nameroot).dict + FQ1s: + type: File[] + FQ2s: + type: File[] + knowSites: + type: + type: array + items: File + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' +outputs: + BAM: + type: File + outputSource: BaseRecal/rcBam + matrix: + type: File + outputSource: mergeBamDup/matrix + flagstat: + type: File + outputSource: BaseRecal/flagstat + stats: + type: File + outputSource: BaseRecal/stats +steps: + bwaAlign: + run: bwaAlign.cwl + in: + threads: threads + RG: RG + Ref: Ref + FQ1: FQ1s + FQ2: FQ2s + out: + - Bam + - Idx + scatter: + - RG + - FQ1 + - FQ2 + scatterMethod: dotproduct + mergeBamDup: + run: mergeBamDup.cwl + in: + ibam: bwaAlign/Bam + obam: outBam + out: + - oBam + - matrix + - Idx + - stat + BaseRecal: + run: BaseRecal.cwl + in: + bam: mergeBamDup/Idx + ref: Ref + knowSites: knowSites + oBam: outBam + out: + - rcBam + - flagstat + - stats diff --git a/cwl/bwaMMRecal/bwaMMRecal.yml b/cwl/bwaMMRecal/bwaMMRecal.yml index 0967ef4..69a88e3 100644 --- a/cwl/bwaMMRecal/bwaMMRecal.yml +++ b/cwl/bwaMMRecal/bwaMMRecal.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/bwaMMRecal/idxBam.cwl b/cwl/bwaMMRecal/idxBam.cwl index f80966b..e779867 100644 --- a/cwl/bwaMMRecal/idxBam.cwl +++ b/cwl/bwaMMRecal/idxBam.cwl @@ -1,24 +1,24 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- samtools -- index -requirements: -- class: DockerRequirement - dockerPull: biocontainers/samtools:v1.7.0_cv3 -- class: InitialWorkDirRequirement - listing: - - $(inputs.bam) -inputs: - bam: - type: File - inputBinding: - position: 1 - separate: true -outputs: - idx: - type: File - secondaryFiles: - - .bai - outputBinding: - glob: $(inputs.bam.basename) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- index +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.12--h9aed4be_1 +- class: InitialWorkDirRequirement + listing: + - $(inputs.bam) +inputs: + bam: + type: File + inputBinding: + position: 1 + separate: true +outputs: + idx: + type: File + secondaryFiles: + - .bai + outputBinding: + glob: $(inputs.bam.basename) diff --git a/cwl/bwaMMRecal/markdup.cwl b/cwl/bwaMMRecal/markdup.cwl index 8a0301c..8e647ce 100644 --- a/cwl/bwaMMRecal/markdup.cwl +++ b/cwl/bwaMMRecal/markdup.cwl @@ -1,33 +1,33 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- picard -- MarkDuplicates -requirements: -- class: DockerRequirement - dockerPull: quay.io/biocontainers/picard:2.21.1--0 -inputs: - ibam: - type: File - inputBinding: - prefix: I= - separate: false - obam: - type: string - inputBinding: - prefix: O= - separate: false - matrix: - type: string - inputBinding: - prefix: M= - separate: false -outputs: - mBam: - type: File - outputBinding: - glob: $(inputs.obam) - Mat: - type: File - outputBinding: - glob: $(inputs.matrix) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- picard +- MarkDuplicates +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/picard:2.21.1--0 +inputs: + ibam: + type: File + inputBinding: + prefix: I= + separate: false + obam: + type: string + inputBinding: + prefix: O= + separate: false + matrix: + type: string + inputBinding: + prefix: M= + separate: false +outputs: + mBam: + type: File + outputBinding: + glob: $(inputs.obam) + Mat: + type: File + outputBinding: + glob: $(inputs.matrix) diff --git a/cwl/bwaMMRecal/mergeBam.cwl b/cwl/bwaMMRecal/mergeBam.cwl index 874f053..09d81b0 100644 --- a/cwl/bwaMMRecal/mergeBam.cwl +++ b/cwl/bwaMMRecal/mergeBam.cwl @@ -1,28 +1,28 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- picard -- MergeSamFiles -requirements: -- class: DockerRequirement - dockerPull: quay.io/biocontainers/picard:2.21.1--0 -inputs: - ibam: - type: - type: array - items: File - inputBinding: - prefix: I= - separate: false - inputBinding: - separate: true - obam: - type: string - inputBinding: - prefix: O= - separate: false -outputs: - oBam: - type: File - outputBinding: - glob: $(inputs.obam) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- picard +- MergeSamFiles +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/picard:2.21.1--0 +inputs: + ibam: + type: + type: array + items: File + inputBinding: + prefix: I= + separate: false + inputBinding: + separate: true + obam: + type: string + inputBinding: + prefix: O= + separate: false +outputs: + oBam: + type: File + outputBinding: + glob: $(inputs.obam) diff --git a/cwl/bwaMMRecal/mergeBamDup.cwl b/cwl/bwaMMRecal/mergeBamDup.cwl index efc2a16..b5cd688 100644 --- a/cwl/bwaMMRecal/mergeBamDup.cwl +++ b/cwl/bwaMMRecal/mergeBamDup.cwl @@ -1,53 +1,53 @@ -cwlVersion: v1.0 -class: Workflow -requirements: -- class: StepInputExpressionRequirement -- class: InlineJavascriptRequirement -inputs: - ibam: - type: File[] - obam: - type: string -outputs: - oBam: - type: File - outputSource: markdup/mBam - matrix: - type: File - outputSource: markdup/Mat - Idx: - type: File - outputSource: samtools_index/idx - stat: - type: File - outputSource: samtools_flagstat/flagstat -steps: - mergeBam: - run: mergeBam.cwl - in: - ibam: ibam - obam: obam - out: - - oBam - markdup: - run: markdup.cwl - in: - ibam: mergeBam/oBam - obam: obam - matrix: - valueFrom: $(inputs.ibam.nameroot).markdup.txt - out: - - mBam - - Mat - samtools_index: - run: samtools_index.cwl - in: - bam: markdup/mBam - out: - - idx - samtools_flagstat: - run: samtools_flagstat.cwl - in: - bam: markdup/mBam - out: - - flagstat +cwlVersion: v1.0 +class: Workflow +requirements: +- class: StepInputExpressionRequirement +- class: InlineJavascriptRequirement +inputs: + ibam: + type: File[] + obam: + type: string +outputs: + oBam: + type: File + outputSource: markdup/mBam + matrix: + type: File + outputSource: markdup/Mat + Idx: + type: File + outputSource: samtools_index/idx + stat: + type: File + outputSource: samtools_flagstat/flagstat +steps: + mergeBam: + run: mergeBam.cwl + in: + ibam: ibam + obam: obam + out: + - oBam + markdup: + run: markdup.cwl + in: + ibam: mergeBam/oBam + obam: obam + matrix: + valueFrom: $(inputs.ibam.nameroot).markdup.txt + out: + - mBam + - Mat + samtools_index: + run: samtools_index.cwl + in: + bam: markdup/mBam + out: + - idx + samtools_flagstat: + run: samtools_flagstat.cwl + in: + bam: markdup/mBam + out: + - flagstat diff --git a/cwl/bwaMMRecal/sam2bam.cwl b/cwl/bwaMMRecal/sam2bam.cwl index 621e78d..48b492e 100644 --- a/cwl/bwaMMRecal/sam2bam.cwl +++ b/cwl/bwaMMRecal/sam2bam.cwl @@ -1,21 +1,67 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- samtools -- view -requirements: -- class: DockerRequirement - dockerPull: biocontainers/samtools:v1.7.0_cv3 -arguments: -- -b -inputs: - sam: - type: File - inputBinding: - separate: true -outputs: - bam: - type: File - outputBinding: - glob: $(inputs.sam.basename).bam -stdout: $(inputs.sam.basename).bam +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- view +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.16.1--h6899075_1 +inputs: + bam: + type: File + secondaryFiles: .bai + inputBinding: + position: 99 + separate: true + bed: + type: File? + inputBinding: + position: 1 + prefix: -L + separate: true + obam: + type: string + inputBinding: + position: 2 + prefix: -o + separate: true + region: + type: string? + inputBinding: + position: 100 + separate: true + outb: + type: boolean? + inputBinding: + prefix: -b + separate: true + exFlag: + type: int? + inputBinding: + prefix: -F + separate: true + reqFlag: + type: int? + inputBinding: + prefix: -f + separate: true + qname: + type: File? + inputBinding: + prefix: -N + separate: true + threads: + type: int? + inputBinding: + prefix: --threads + separate: true + mapq: + type: int? + inputBinding: + prefix: -q + separate: true +outputs: + oBam: + type: File + outputBinding: + glob: $(inputs.obam) diff --git a/cwl/bwaMMRecal/samtools_flagstat.cwl b/cwl/bwaMMRecal/samtools_flagstat.cwl index 3c68178..000949d 100644 --- a/cwl/bwaMMRecal/samtools_flagstat.cwl +++ b/cwl/bwaMMRecal/samtools_flagstat.cwl @@ -1,19 +1,19 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- samtools -- flagstat -requirements: -- class: DockerRequirement - dockerPull: biocontainers/samtools:v1.7.0_cv3 -inputs: - bam: - type: File - inputBinding: - separate: true -outputs: - flagstat: - type: File - outputBinding: - glob: $(inputs.bam.nameroot).flagstat.txt -stdout: $(inputs.bam.nameroot).flagstat.txt +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- flagstat +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.15--h1170115_1 +inputs: + bam: + type: File + inputBinding: + separate: true +outputs: + flagstat: + type: File + outputBinding: + glob: $(inputs.bam.nameroot).flagstat.txt +stdout: $(inputs.bam.nameroot).flagstat.txt diff --git a/cwl/bwaMMRecal/samtools_index.cwl b/cwl/bwaMMRecal/samtools_index.cwl index f80966b..e779867 100644 --- a/cwl/bwaMMRecal/samtools_index.cwl +++ b/cwl/bwaMMRecal/samtools_index.cwl @@ -1,24 +1,24 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- samtools -- index -requirements: -- class: DockerRequirement - dockerPull: biocontainers/samtools:v1.7.0_cv3 -- class: InitialWorkDirRequirement - listing: - - $(inputs.bam) -inputs: - bam: - type: File - inputBinding: - position: 1 - separate: true -outputs: - idx: - type: File - secondaryFiles: - - .bai - outputBinding: - glob: $(inputs.bam.basename) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- index +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.12--h9aed4be_1 +- class: InitialWorkDirRequirement + listing: + - $(inputs.bam) +inputs: + bam: + type: File + inputBinding: + position: 1 + separate: true +outputs: + idx: + type: File + secondaryFiles: + - .bai + outputBinding: + glob: $(inputs.bam.basename) diff --git a/cwl/bwaMMRecal/samtools_stats.cwl b/cwl/bwaMMRecal/samtools_stats.cwl index a5709bd..c054631 100644 --- a/cwl/bwaMMRecal/samtools_stats.cwl +++ b/cwl/bwaMMRecal/samtools_stats.cwl @@ -1,19 +1,19 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- samtools -- stats -requirements: -- class: DockerRequirement - dockerPull: biocontainers/samtools:v1.7.0_cv3 -inputs: - bam: - type: File - inputBinding: - separate: true -outputs: - stats: - type: File - outputBinding: - glob: $(inputs.bam.nameroot).stats.txt -stdout: $(inputs.bam.nameroot).stats.txt +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- stats +requirements: +- class: DockerRequirement + dockerPull: biocontainers/samtools:v1.7.0_cv3 +inputs: + bam: + type: File + inputBinding: + separate: true +outputs: + stats: + type: File + outputBinding: + glob: $(inputs.bam.nameroot).stats.txt +stdout: $(inputs.bam.nameroot).stats.txt diff --git a/cwl/bwaMMRecal/sortBam.cwl b/cwl/bwaMMRecal/sortBam.cwl index bc3d45d..be772d7 100644 --- a/cwl/bwaMMRecal/sortBam.cwl +++ b/cwl/bwaMMRecal/sortBam.cwl @@ -1,19 +1,23 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- samtools -- sort -requirements: -- class: DockerRequirement - dockerPull: biocontainers/samtools:v1.7.0_cv3 -inputs: - bam: - type: File - inputBinding: - separate: true -outputs: - sbam: - type: File - outputBinding: - glob: $(inputs.bam.nameroot).sorted.bam -stdout: $(inputs.bam.nameroot).sorted.bam +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- sort +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.12--h9aed4be_1 +inputs: + bam: + type: File + inputBinding: + separate: true + obam: + type: string + inputBinding: + prefix: -o + separate: true +outputs: + sbam: + type: File + outputBinding: + glob: $(inputs.obam) diff --git a/cwl/bwaMRecal/ApplyBQSR.cwl b/cwl/bwaMRecal/ApplyBQSR.cwl index 018b8fd..567e86b 100644 --- a/cwl/bwaMRecal/ApplyBQSR.cwl +++ b/cwl/bwaMRecal/ApplyBQSR.cwl @@ -1,37 +1,37 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- gatk -- ApplyBQSR -requirements: -- class: DockerRequirement - dockerPull: broadinstitute/gatk:latest -inputs: - bam: - type: File - inputBinding: - prefix: -I - separate: true - ref: - type: File - secondaryFiles: - - .fai - - $(self.nameroot).dict - inputBinding: - prefix: -R - separate: true - rtable: - type: File - inputBinding: - prefix: --bqsr-recal-file - separate: true - oBam: - type: string - inputBinding: - prefix: -O - separate: true -outputs: - Bam: - type: File - outputBinding: - glob: $(inputs.oBam) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- gatk +- ApplyBQSR +requirements: +- class: DockerRequirement + dockerPull: broadinstitute/gatk:latest +inputs: + bam: + type: File + inputBinding: + prefix: -I + separate: true + ref: + type: File + secondaryFiles: + - .fai + - $(self.nameroot).dict + inputBinding: + prefix: -R + separate: true + rtable: + type: File + inputBinding: + prefix: --bqsr-recal-file + separate: true + oBam: + type: string + inputBinding: + prefix: -O + separate: true +outputs: + Bam: + type: File + outputBinding: + glob: $(inputs.oBam) diff --git a/cwl/bwaMRecal/BaseRecal.cwl b/cwl/bwaMRecal/BaseRecal.cwl index 75635cb..52b427c 100644 --- a/cwl/bwaMRecal/BaseRecal.cwl +++ b/cwl/bwaMRecal/BaseRecal.cwl @@ -1,71 +1,70 @@ -cwlVersion: v1.0 -class: Workflow -requirements: -- class: StepInputExpressionRequirement -- class: InlineJavascriptRequirement -inputs: - bam: - type: File - ref: - type: File - secondaryFiles: - - .fai - - $(self.nameroot).dict - knowSites: - type: - type: array - items: File - inputBinding: - separate: true - secondaryFiles: .idx - oBam: - type: string -outputs: - rcBam: - type: File - secondaryFiles: .bai - outputSource: samtools_index/idx - flagstat: - type: File - outputSource: samtools_flagstat/flagstat - stats: - type: File - outputSource: samtools_stats/stats -steps: - BaseRecalibrator: - run: BaseRecalibrator.cwl - in: - bam: bam - ref: ref - knowSites: knowSites - recal: - valueFrom: $(inputs.bam.nameroot).recal.txt - out: - - rtable - ApplyBQSR: - run: ApplyBQSR.cwl - in: - bam: bam - ref: ref - rtable: BaseRecalibrator/rtable - oBam: oBam - out: - - Bam - samtools_index: - run: samtools_index.cwl - in: - bam: ApplyBQSR/Bam - out: - - idx - samtools_flagstat: - run: samtools_flagstat.cwl - in: - bam: ApplyBQSR/Bam - out: - - flagstat - samtools_stats: - run: samtools_stats.cwl - in: - bam: ApplyBQSR/Bam - out: - - stats +cwlVersion: v1.0 +class: Workflow +requirements: +- class: StepInputExpressionRequirement +- class: InlineJavascriptRequirement +- class: InlineJavascriptRequirement +inputs: + bam: + type: File + ref: + type: File + secondaryFiles: + - .fai + - $(self.nameroot).dict + knowSites: + type: + type: array + items: File + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + oBam: + type: string +outputs: + rcBam: + type: File + secondaryFiles: .bai + outputSource: samtools_index/idx + flagstat: + type: File + outputSource: samtools_flagstat/flagstat + stats: + type: File + outputSource: samtools_stats/stats +steps: + BaseRecalibrator: + run: BaseRecalibrator.cwl + in: + bam: bam + ref: ref + knowSites: knowSites + recal: + valueFrom: $(inputs.bam.nameroot).recal.txt + out: + - rtable + ApplyBQSR: + run: ApplyBQSR.cwl + in: + bam: bam + ref: ref + rtable: BaseRecalibrator/rtable + oBam: oBam + out: + - Bam + samtools_index: + run: samtools_index.cwl + in: + bam: ApplyBQSR/Bam + out: + - idx + samtools_flagstat: + run: samtools_flagstat.cwl + in: + bam: ApplyBQSR/Bam + out: + - flagstat + samtools_stats: + run: samtools_stats.cwl + in: + bam: ApplyBQSR/Bam + out: + - stats diff --git a/cwl/bwaMRecal/BaseRecalibrator.cwl b/cwl/bwaMRecal/BaseRecalibrator.cwl index 0353c15..f92210e 100644 --- a/cwl/bwaMRecal/BaseRecalibrator.cwl +++ b/cwl/bwaMRecal/BaseRecalibrator.cwl @@ -1,42 +1,43 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- gatk -- BaseRecalibrator -requirements: -- class: DockerRequirement - dockerPull: broadinstitute/gatk:latest -inputs: - bam: - type: File - inputBinding: - prefix: -I - separate: true - ref: - type: File - secondaryFiles: - - .fai - - $(self.nameroot).dict - inputBinding: - prefix: -R - separate: true - knowSites: - type: - type: array - items: File - inputBinding: - prefix: --known-sites - separate: true - secondaryFiles: .idx - inputBinding: - separate: true - recal: - type: string - inputBinding: - prefix: -O - separate: true -outputs: - rtable: - type: File - outputBinding: - glob: $(inputs.recal) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- gatk +- BaseRecalibrator +requirements: +- class: DockerRequirement + dockerPull: broadinstitute/gatk:latest +- class: InlineJavascriptRequirement +inputs: + bam: + type: File + inputBinding: + prefix: -I + separate: true + ref: + type: File + secondaryFiles: + - .fai + - $(self.nameroot).dict + inputBinding: + prefix: -R + separate: true + knowSites: + type: + type: array + items: File + inputBinding: + prefix: --known-sites + separate: true + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + inputBinding: + separate: true + recal: + type: string + inputBinding: + prefix: -O + separate: true +outputs: + rtable: + type: File + outputBinding: + glob: $(inputs.recal) diff --git a/cwl/bwaMRecal/bwa.cwl b/cwl/bwaMRecal/bwa.cwl index 03d69d3..7b63bc4 100644 --- a/cwl/bwaMRecal/bwa.cwl +++ b/cwl/bwaMRecal/bwa.cwl @@ -1,48 +1,48 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- bwa -- mem -requirements: -- class: DockerRequirement - dockerPull: biocontainers/bwa:v0.7.17-3-deb_cv1 -inputs: - threads: - type: int - inputBinding: - position: 1 - prefix: -t - separate: true - RG: - type: string - inputBinding: - position: 2 - prefix: -R - separate: true - Ref: - type: File - secondaryFiles: - - .amb - - .ann - - .bwt - - .pac - - .sa - inputBinding: - position: 3 - separate: true - FQ1: - type: File - inputBinding: - position: 4 - separate: true - FQ2: - type: File? - inputBinding: - position: 5 - separate: true -outputs: - sam: - type: File - outputBinding: - glob: '*.sam' -stdout: bwaOutput.sam +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- bwa +- mem +requirements: +- class: DockerRequirement + dockerPull: biocontainers/bwa:v0.7.17-3-deb_cv1 +inputs: + threads: + type: int + inputBinding: + position: 1 + prefix: -t + separate: true + RG: + type: string? + inputBinding: + position: 2 + prefix: -R + separate: true + Ref: + type: File + secondaryFiles: + - .amb + - .ann + - .bwt + - .pac + - .sa + inputBinding: + position: 3 + separate: true + FQ1: + type: File + inputBinding: + position: 4 + separate: true + FQ2: + type: File? + inputBinding: + position: 5 + separate: true +outputs: + sam: + type: File + outputBinding: + glob: '*.sam' +stdout: bwaOutput.sam diff --git a/cwl/bwaMRecal/bwaAlign.cwl b/cwl/bwaMRecal/bwaAlign.cwl index 8d95f6e..7faf4df 100644 --- a/cwl/bwaMRecal/bwaAlign.cwl +++ b/cwl/bwaMRecal/bwaAlign.cwl @@ -1,55 +1,61 @@ -cwlVersion: v1.0 -class: Workflow -inputs: - threads: - type: int - RG: - type: string - Ref: - type: File - secondaryFiles: - - .amb - - .ann - - .bwt - - .pac - - .sa - FQ1: - type: File - FQ2: - type: File? -outputs: - Bam: - type: File - outputSource: sortBam/sbam - Idx: - type: File - outputSource: idxBam/idx -steps: - bwa: - run: bwa.cwl - in: - threads: threads - RG: RG - Ref: Ref - FQ1: FQ1 - FQ2: FQ2 - out: - - sam - sam2bam: - run: sam2bam.cwl - in: - sam: bwa/sam - out: - - bam - sortBam: - run: sortBam.cwl - in: - bam: sam2bam/bam - out: - - sbam - idxBam: - run: idxBam.cwl - in: - bam: sortBam/sbam - out: - - idx +cwlVersion: v1.0 +class: Workflow +requirements: +- class: StepInputExpressionRequirement +inputs: + threads: + type: int + RG: + type: string + Ref: + type: File + secondaryFiles: + - .amb + - .ann + - .bwt + - .pac + - .sa + FQ1: + type: File + FQ2: + type: File? +outputs: + Bam: + type: File + outputSource: sortBam/sbam + Idx: + type: File + outputSource: idxBam/idx +steps: + bwa: + run: bwa.cwl + in: + threads: threads + RG: RG + Ref: Ref + FQ1: FQ1 + FQ2: FQ2 + out: + - sam + sam2bam: + run: sam2bam.cwl + in: + bam: bwa/sam + obam: + valueFrom: $(inputs.bam.nameroot).bam + out: + - oBam + sortBam: + run: sortBam.cwl + in: + bam: sam2bam/oBam + obam: + valueFrom: $(inputs.bam.nameroot)_sort.bam + out: + - sbam + idxBam: + run: idxBam.cwl + in: + bam: sortBam/sbam + out: + - idx diff --git a/cwl/bwaMRecal/bwaMRecal.cwl b/cwl/bwaMRecal/bwaMRecal.cwl index 9def7ce..91229eb 100644 --- a/cwl/bwaMRecal/bwaMRecal.cwl +++ b/cwl/bwaMRecal/bwaMRecal.cwl @@ -1,82 +1,81 @@ -cwlVersion: v1.0 -class: Workflow -requirements: -- class: SubworkflowFeatureRequirement -- class: StepInputExpressionRequirement -inputs: - outBam: - type: string - RG: - type: string - threads: - type: int - Ref: - type: File - secondaryFiles: - - .amb - - .ann - - .bwt - - .pac - - .sa - - .fai - - $(self.nameroot).dict - FQ1s: - type: File - FQ2s: - type: File - knowSites: - type: - type: array - items: File - inputBinding: - separate: true - secondaryFiles: .idx -outputs: - BAM: - type: File - outputSource: BaseRecal/rcBam - matrix: - type: File - outputSource: markdup/Mat - flagstat: - type: File - outputSource: BaseRecal/flagstat - stats: - type: File - outputSource: BaseRecal/stats -steps: - bwaAlign: - run: cwl/bwaMRecal/bwaAlign.cwl - in: - threads: threads - RG: RG - Ref: Ref - FQ1: FQ1s - FQ2: FQ2s - out: - - Bam - - Idx - markdup: - run: cwl/bwaMRecal/markdup.cwl - in: - ibam: bwaAlign/Idx - obam: - valueFrom: $(inputs.ibam.nameroot).mdup.bam - matrix: - source: - - outBam - valueFrom: $(self).markdup.txt - out: - - mBam - - Mat - BaseRecal: - run: cwl/bwaMRecal/BaseRecal.cwl - in: - bam: markdup/mBam - ref: Ref - knowSites: knowSites - oBam: outBam - out: - - rcBam - - flagstat - - stats +cwlVersion: v1.0 +class: Workflow +requirements: +- class: SubworkflowFeatureRequirement +- class: StepInputExpressionRequirement +- class: InlineJavascriptRequirement +inputs: + outBam: + type: string + RG: + type: string + threads: + type: int + Ref: + type: File + secondaryFiles: + - .amb + - .ann + - .bwt + - .pac + - .sa + - .fai + - $(self.nameroot).dict + FQ1s: + type: File + FQ2s: + type: File? + knowSites: + type: + type: array + items: File + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' +outputs: + BAM: + type: File + outputSource: BaseRecal/rcBam + matrix: + type: File + outputSource: markdup/Mat + flagstat: + type: File + outputSource: BaseRecal/flagstat + stats: + type: File + outputSource: BaseRecal/stats +steps: + bwaAlign: + run: bwaAlign.cwl + in: + threads: threads + RG: RG + Ref: Ref + FQ1: FQ1s + FQ2: FQ2s + out: + - Bam + - Idx + markdup: + run: markdup.cwl + in: + ibam: bwaAlign/Idx + obam: + valueFrom: $(inputs.ibam.nameroot).mdup.bam + matrix: + source: + - outBam + valueFrom: $(self).markdup.txt + out: + - mBam + - Mat + BaseRecal: + run: BaseRecal.cwl + in: + bam: markdup/mBam + ref: Ref + knowSites: knowSites + oBam: outBam + out: + - rcBam + - flagstat + - stats diff --git a/cwl/bwaMRecal/bwaMRecal.yml b/cwl/bwaMRecal/bwaMRecal.yml index 0967ef4..69a88e3 100644 --- a/cwl/bwaMRecal/bwaMRecal.yml +++ b/cwl/bwaMRecal/bwaMRecal.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/bwaMRecal/idxBam.cwl b/cwl/bwaMRecal/idxBam.cwl index f80966b..e779867 100644 --- a/cwl/bwaMRecal/idxBam.cwl +++ b/cwl/bwaMRecal/idxBam.cwl @@ -1,24 +1,24 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- samtools -- index -requirements: -- class: DockerRequirement - dockerPull: biocontainers/samtools:v1.7.0_cv3 -- class: InitialWorkDirRequirement - listing: - - $(inputs.bam) -inputs: - bam: - type: File - inputBinding: - position: 1 - separate: true -outputs: - idx: - type: File - secondaryFiles: - - .bai - outputBinding: - glob: $(inputs.bam.basename) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- index +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.12--h9aed4be_1 +- class: InitialWorkDirRequirement + listing: + - $(inputs.bam) +inputs: + bam: + type: File + inputBinding: + position: 1 + separate: true +outputs: + idx: + type: File + secondaryFiles: + - .bai + outputBinding: + glob: $(inputs.bam.basename) diff --git a/cwl/bwaMRecal/markdup.cwl b/cwl/bwaMRecal/markdup.cwl index 8a0301c..8e647ce 100644 --- a/cwl/bwaMRecal/markdup.cwl +++ b/cwl/bwaMRecal/markdup.cwl @@ -1,33 +1,33 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- picard -- MarkDuplicates -requirements: -- class: DockerRequirement - dockerPull: quay.io/biocontainers/picard:2.21.1--0 -inputs: - ibam: - type: File - inputBinding: - prefix: I= - separate: false - obam: - type: string - inputBinding: - prefix: O= - separate: false - matrix: - type: string - inputBinding: - prefix: M= - separate: false -outputs: - mBam: - type: File - outputBinding: - glob: $(inputs.obam) - Mat: - type: File - outputBinding: - glob: $(inputs.matrix) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- picard +- MarkDuplicates +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/picard:2.21.1--0 +inputs: + ibam: + type: File + inputBinding: + prefix: I= + separate: false + obam: + type: string + inputBinding: + prefix: O= + separate: false + matrix: + type: string + inputBinding: + prefix: M= + separate: false +outputs: + mBam: + type: File + outputBinding: + glob: $(inputs.obam) + Mat: + type: File + outputBinding: + glob: $(inputs.matrix) diff --git a/cwl/bwaMRecal/sam2bam.cwl b/cwl/bwaMRecal/sam2bam.cwl index 621e78d..48b492e 100644 --- a/cwl/bwaMRecal/sam2bam.cwl +++ b/cwl/bwaMRecal/sam2bam.cwl @@ -1,21 +1,67 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- samtools -- view -requirements: -- class: DockerRequirement - dockerPull: biocontainers/samtools:v1.7.0_cv3 -arguments: -- -b -inputs: - sam: - type: File - inputBinding: - separate: true -outputs: - bam: - type: File - outputBinding: - glob: $(inputs.sam.basename).bam -stdout: $(inputs.sam.basename).bam +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- view +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.16.1--h6899075_1 +inputs: + bam: + type: File + secondaryFiles: .bai + inputBinding: + position: 99 + separate: true + bed: + type: File? + inputBinding: + position: 1 + prefix: -L + separate: true + obam: + type: string + inputBinding: + position: 2 + prefix: -o + separate: true + region: + type: string? + inputBinding: + position: 100 + separate: true + outb: + type: boolean? + inputBinding: + prefix: -b + separate: true + exFlag: + type: int? + inputBinding: + prefix: -F + separate: true + reqFlag: + type: int? + inputBinding: + prefix: -f + separate: true + qname: + type: File? + inputBinding: + prefix: -N + separate: true + threads: + type: int? + inputBinding: + prefix: --threads + separate: true + mapq: + type: int? + inputBinding: + prefix: -q + separate: true +outputs: + oBam: + type: File + outputBinding: + glob: $(inputs.obam) diff --git a/cwl/bwaMRecal/samtools_flagstat.cwl b/cwl/bwaMRecal/samtools_flagstat.cwl index 3c68178..000949d 100644 --- a/cwl/bwaMRecal/samtools_flagstat.cwl +++ b/cwl/bwaMRecal/samtools_flagstat.cwl @@ -1,19 +1,19 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- samtools -- flagstat -requirements: -- class: DockerRequirement - dockerPull: biocontainers/samtools:v1.7.0_cv3 -inputs: - bam: - type: File - inputBinding: - separate: true -outputs: - flagstat: - type: File - outputBinding: - glob: $(inputs.bam.nameroot).flagstat.txt -stdout: $(inputs.bam.nameroot).flagstat.txt +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- flagstat +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.15--h1170115_1 +inputs: + bam: + type: File + inputBinding: + separate: true +outputs: + flagstat: + type: File + outputBinding: + glob: $(inputs.bam.nameroot).flagstat.txt +stdout: $(inputs.bam.nameroot).flagstat.txt diff --git a/cwl/bwaMRecal/samtools_index.cwl b/cwl/bwaMRecal/samtools_index.cwl index f80966b..e779867 100644 --- a/cwl/bwaMRecal/samtools_index.cwl +++ b/cwl/bwaMRecal/samtools_index.cwl @@ -1,24 +1,24 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- samtools -- index -requirements: -- class: DockerRequirement - dockerPull: biocontainers/samtools:v1.7.0_cv3 -- class: InitialWorkDirRequirement - listing: - - $(inputs.bam) -inputs: - bam: - type: File - inputBinding: - position: 1 - separate: true -outputs: - idx: - type: File - secondaryFiles: - - .bai - outputBinding: - glob: $(inputs.bam.basename) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- index +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.12--h9aed4be_1 +- class: InitialWorkDirRequirement + listing: + - $(inputs.bam) +inputs: + bam: + type: File + inputBinding: + position: 1 + separate: true +outputs: + idx: + type: File + secondaryFiles: + - .bai + outputBinding: + glob: $(inputs.bam.basename) diff --git a/cwl/bwaMRecal/samtools_stats.cwl b/cwl/bwaMRecal/samtools_stats.cwl index a5709bd..c054631 100644 --- a/cwl/bwaMRecal/samtools_stats.cwl +++ b/cwl/bwaMRecal/samtools_stats.cwl @@ -1,19 +1,19 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- samtools -- stats -requirements: -- class: DockerRequirement - dockerPull: biocontainers/samtools:v1.7.0_cv3 -inputs: - bam: - type: File - inputBinding: - separate: true -outputs: - stats: - type: File - outputBinding: - glob: $(inputs.bam.nameroot).stats.txt -stdout: $(inputs.bam.nameroot).stats.txt +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- stats +requirements: +- class: DockerRequirement + dockerPull: biocontainers/samtools:v1.7.0_cv3 +inputs: + bam: + type: File + inputBinding: + separate: true +outputs: + stats: + type: File + outputBinding: + glob: $(inputs.bam.nameroot).stats.txt +stdout: $(inputs.bam.nameroot).stats.txt diff --git a/cwl/bwaMRecal/sortBam.cwl b/cwl/bwaMRecal/sortBam.cwl index bc3d45d..be772d7 100644 --- a/cwl/bwaMRecal/sortBam.cwl +++ b/cwl/bwaMRecal/sortBam.cwl @@ -1,19 +1,23 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- samtools -- sort -requirements: -- class: DockerRequirement - dockerPull: biocontainers/samtools:v1.7.0_cv3 -inputs: - bam: - type: File - inputBinding: - separate: true -outputs: - sbam: - type: File - outputBinding: - glob: $(inputs.bam.nameroot).sorted.bam -stdout: $(inputs.bam.nameroot).sorted.bam +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- sort +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.12--h9aed4be_1 +inputs: + bam: + type: File + inputBinding: + separate: true + obam: + type: string + inputBinding: + prefix: -o + separate: true +outputs: + sbam: + type: File + outputBinding: + glob: $(inputs.obam) diff --git a/cwl/bwa_align/bwa.cwl b/cwl/bwa_align/bwa.cwl new file mode 100644 index 0000000..7b63bc4 --- /dev/null +++ b/cwl/bwa_align/bwa.cwl @@ -0,0 +1,48 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- bwa +- mem +requirements: +- class: DockerRequirement + dockerPull: biocontainers/bwa:v0.7.17-3-deb_cv1 +inputs: + threads: + type: int + inputBinding: + position: 1 + prefix: -t + separate: true + RG: + type: string? + inputBinding: + position: 2 + prefix: -R + separate: true + Ref: + type: File + secondaryFiles: + - .amb + - .ann + - .bwt + - .pac + - .sa + inputBinding: + position: 3 + separate: true + FQ1: + type: File + inputBinding: + position: 4 + separate: true + FQ2: + type: File? + inputBinding: + position: 5 + separate: true +outputs: + sam: + type: File + outputBinding: + glob: '*.sam' +stdout: bwaOutput.sam diff --git a/cwl/bwa_align/bwa_align.cwl b/cwl/bwa_align/bwa_align.cwl new file mode 100644 index 0000000..67c51ba --- /dev/null +++ b/cwl/bwa_align/bwa_align.cwl @@ -0,0 +1,62 @@ +cwlVersion: v1.0 +class: Workflow +requirements: +- class: StepInputExpressionRequirement +inputs: + threads: + type: int + RG: + type: string + Ref: + type: File + secondaryFiles: + - .amb + - .ann + - .bwt + - .pac + - .sa + FQ1: + type: File + FQ2: + type: File? + outBam: + type: string +outputs: + Bam: + type: File + outputSource: sortBam/sbam + Idx: + type: File + outputSource: idxBam/idx +steps: + bwa: + run: bwa.cwl + in: + threads: threads + RG: RG + Ref: Ref + FQ1: FQ1 + FQ2: FQ2 + out: + - sam + sam2bam: + run: sam2bam.cwl + in: + bam: bwa/sam + obam: + valueFrom: $(inputs.bam.nameroot).bam + out: + - oBam + sortBam: + run: sortBam.cwl + in: + bam: sam2bam/oBam + obam: outBam + out: + - sbam + idxBam: + run: idxBam.cwl + in: + bam: sortBam/sbam + out: + - idx diff --git a/cwl/bwa_align/bwa_align.yml b/cwl/bwa_align/bwa_align.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/bwa_align/bwa_align.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/bwa_align/idxBam.cwl b/cwl/bwa_align/idxBam.cwl new file mode 100644 index 0000000..e779867 --- /dev/null +++ b/cwl/bwa_align/idxBam.cwl @@ -0,0 +1,24 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- index +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.12--h9aed4be_1 +- class: InitialWorkDirRequirement + listing: + - $(inputs.bam) +inputs: + bam: + type: File + inputBinding: + position: 1 + separate: true +outputs: + idx: + type: File + secondaryFiles: + - .bai + outputBinding: + glob: $(inputs.bam.basename) diff --git a/cwl/bwa_align/sam2bam.cwl b/cwl/bwa_align/sam2bam.cwl new file mode 100644 index 0000000..48b492e --- /dev/null +++ b/cwl/bwa_align/sam2bam.cwl @@ -0,0 +1,67 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- view +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.16.1--h6899075_1 +inputs: + bam: + type: File + secondaryFiles: .bai + inputBinding: + position: 99 + separate: true + bed: + type: File? + inputBinding: + position: 1 + prefix: -L + separate: true + obam: + type: string + inputBinding: + position: 2 + prefix: -o + separate: true + region: + type: string? + inputBinding: + position: 100 + separate: true + outb: + type: boolean? + inputBinding: + prefix: -b + separate: true + exFlag: + type: int? + inputBinding: + prefix: -F + separate: true + reqFlag: + type: int? + inputBinding: + prefix: -f + separate: true + qname: + type: File? + inputBinding: + prefix: -N + separate: true + threads: + type: int? + inputBinding: + prefix: --threads + separate: true + mapq: + type: int? + inputBinding: + prefix: -q + separate: true +outputs: + oBam: + type: File + outputBinding: + glob: $(inputs.obam) diff --git a/cwl/bwa_align/sortBam.cwl b/cwl/bwa_align/sortBam.cwl new file mode 100644 index 0000000..be772d7 --- /dev/null +++ b/cwl/bwa_align/sortBam.cwl @@ -0,0 +1,23 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- sort +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.12--h9aed4be_1 +inputs: + bam: + type: File + inputBinding: + separate: true + obam: + type: string + inputBinding: + prefix: -o + separate: true +outputs: + sbam: + type: File + outputBinding: + glob: $(inputs.obam) diff --git a/cwl/bwa_index.cwl b/cwl/bwa_index.cwl index cda066f..29cef17 100644 --- a/cwl/bwa_index.cwl +++ b/cwl/bwa_index.cwl @@ -1,32 +1,32 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- bwa -- index -requirements: -- class: DockerRequirement - dockerPull: biocontainers/bwa:v0.7.17-3-deb_cv1 -- class: InitialWorkDirRequirement - listing: - - $(inputs.Ref) -- class: InlineJavascriptRequirement -arguments: -- -a -- bwtsw -inputs: - Ref: - type: File - inputBinding: - separate: true - valueFrom: $(self.basename) -outputs: - idx: - type: File - secondaryFiles: - - $(inputs.Ref.basename + '.amb') - - $(inputs.Ref.basename + '.ann') - - $(inputs.Ref.basename + '.bwt') - - $(inputs.Ref.basename + '.pac') - - $(inputs.Ref.basename + '.sa') - outputBinding: - glob: $(inputs.Ref.basename) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- bwa +- index +requirements: +- class: DockerRequirement + dockerPull: biocontainers/bwa:v0.7.17-3-deb_cv1 +- class: InitialWorkDirRequirement + listing: + - $(inputs.Ref) +- class: InlineJavascriptRequirement +arguments: +- -a +- bwtsw +inputs: + Ref: + type: File + inputBinding: + separate: true + valueFrom: $(self.basename) +outputs: + idx: + type: File + secondaryFiles: + - $(inputs.Ref.basename + '.amb') + - $(inputs.Ref.basename + '.ann') + - $(inputs.Ref.basename + '.bwt') + - $(inputs.Ref.basename + '.pac') + - $(inputs.Ref.basename + '.sa') + outputBinding: + glob: $(inputs.Ref.basename) diff --git a/cwl/bwa_index.yml b/cwl/bwa_index.yml index 0967ef4..69a88e3 100644 --- a/cwl/bwa_index.yml +++ b/cwl/bwa_index.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/cnv_facets.cwl b/cwl/cnv_facets.cwl index 8516693..b34823c 100644 --- a/cwl/cnv_facets.cwl +++ b/cwl/cnv_facets.cwl @@ -1,50 +1,64 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: cnv_facets.R -requirements: -- class: DockerRequirement - dockerPull: hubuntu/cnv_facets -inputs: - tbam: - type: File? - secondaryFiles: .bai - inputBinding: - prefix: -t - separate: true - nbam: - type: File? - secondaryFiles: .bai - inputBinding: - prefix: -n - separate: true - vcf: - type: File? - secondaryFiles: .tbi - inputBinding: - prefix: -vcf - separate: true - pileup: - type: File? - inputBinding: - prefix: -p - separate: true - out: - type: string - inputBinding: - prefix: -o - separate: true - build: - type: string - inputBinding: - prefix: -g - separate: true - targets: - type: File - inputBinding: - prefix: -T - separate: true -outputs: - Out: - type: File[] - outputBinding: - glob: $(inputs.out)* +cwlVersion: v1.2 +class: CommandLineTool +baseCommand: cnv_facets.R +requirements: +- class: DockerRequirement + dockerPull: hubentu/facets:0.6.2 +inputs: + tbam: + type: File? + secondaryFiles: + - .bai? + - ^.bai? + inputBinding: + prefix: -t + separate: true + nbam: + type: File? + secondaryFiles: + - .bai? + - ^.bai? + inputBinding: + prefix: -n + separate: true + vcf: + type: File? + secondaryFiles: .tbi + inputBinding: + prefix: -vcf + separate: true + pileup: + type: File? + inputBinding: + prefix: -p + separate: true + out: + type: string + inputBinding: + prefix: -o + separate: true + build: + type: string? + inputBinding: + prefix: -g + separate: true + targets: + type: File? + inputBinding: + prefix: -T + separate: true + cval: + type: int[]? + inputBinding: + prefix: -cv + separate: true + nprocs: + type: int? + inputBinding: + prefix: -N + separate: true +outputs: + Out: + type: File[] + outputBinding: + glob: $(inputs.out)* diff --git a/cwl/cnv_facets.yml b/cwl/cnv_facets.yml index 0967ef4..69a88e3 100644 --- a/cwl/cnv_facets.yml +++ b/cwl/cnv_facets.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/cnvkit_batch.cwl b/cwl/cnvkit_batch.cwl index 25b1b2b..5d9b6c2 100644 --- a/cwl/cnvkit_batch.cwl +++ b/cwl/cnvkit_batch.cwl @@ -1,88 +1,93 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- cnvkit.py -- batch -requirements: -- class: DockerRequirement - dockerPull: etal/cnvkit -inputs: - tbams: - type: File[]? - secondaryFiles: .bai - inputBinding: - separate: true - ref: - type: File? - secondaryFiles: .fai - inputBinding: - prefix: --fasta - separate: true - outdir: - type: string - inputBinding: - prefix: --output-dir - separate: true - normal: - type: File[]? - secondaryFiles: .bai - inputBinding: - prefix: --normal - separate: true - outref: - type: string? - inputBinding: - prefix: --output-reference - separate: true - reference: - type: File? - inputBinding: - prefix: -r - separate: true - target: - type: File? - inputBinding: - prefix: --targets - separate: true - anti: - type: File? - inputBinding: - prefix: --antitargets - separate: true - access: - type: File? - inputBinding: - prefix: --access - separate: true - annotate: - type: File? - inputBinding: - prefix: --annotate - separate: true - parallel: - type: int - inputBinding: - prefix: -p - separate: true - default: 1.0 - diagram: - type: boolean - inputBinding: - prefix: --diagram - separate: true - default: true - scatter: - type: boolean - inputBinding: - prefix: --scatter - separate: true - default: true -outputs: - Outdir: - type: Directory - outputBinding: - glob: $(inputs.outdir) - outRef: - type: File? - outputBinding: - glob: $(inputs.outref) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- cnvkit.py +- batch +requirements: +- class: DockerRequirement + dockerPull: etal/cnvkit +inputs: + tbams: + type: File[]? + secondaryFiles: .bai + inputBinding: + separate: true + ref: + type: File? + secondaryFiles: .fai + inputBinding: + prefix: --fasta + separate: true + outdir: + type: string + inputBinding: + prefix: --output-dir + separate: true + normal: + type: File[]? + secondaryFiles: .bai + inputBinding: + prefix: --normal + separate: true + outref: + type: string? + inputBinding: + prefix: --output-reference + separate: true + reference: + type: File? + inputBinding: + prefix: -r + separate: true + target: + type: File? + inputBinding: + prefix: --targets + separate: true + anti: + type: File? + inputBinding: + prefix: --antitargets + separate: true + access: + type: File? + inputBinding: + prefix: --access + separate: true + annotate: + type: File? + inputBinding: + prefix: --annotate + separate: true + parallel: + type: int + inputBinding: + prefix: -p + separate: true + default: 1.0 + diagram: + type: boolean + inputBinding: + prefix: --diagram + separate: true + default: true + scatter: + type: boolean + inputBinding: + prefix: --scatter + separate: true + default: true + method: + type: string? + inputBinding: + prefix: -m + separate: true +outputs: + Outdir: + type: Directory + outputBinding: + glob: $(inputs.outdir) + outRef: + type: File? + outputBinding: + glob: $(inputs.outref) diff --git a/cwl/cnvkit_batch.yml b/cwl/cnvkit_batch.yml index 7749144..853e80c 100644 --- a/cwl/cnvkit_batch.yml +++ b/cwl/cnvkit_batch.yml @@ -1,3 +1,3 @@ -parallel: 1.0 -diagram: true -scatter: true +parallel: 1.0 +diagram: true +scatter: true diff --git a/cwl/collapse_annotation.cwl b/cwl/collapse_annotation.cwl new file mode 100644 index 0000000..c0dcaa1 --- /dev/null +++ b/cwl/collapse_annotation.cwl @@ -0,0 +1,29 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- python +- /opt/collapse_annotation.py +requirements: +- class: DockerRequirement + dockerPull: hubentu/collapse_annotation +inputs: + gtf: + type: File + inputBinding: + position: 1 + separate: true + out: + type: string + inputBinding: + position: 2 + separate: true + blacklist: + type: File? + inputBinding: + prefix: --transcript_blacklist + separate: true +outputs: + gtfout: + type: File + outputBinding: + glob: $(inputs.out) diff --git a/cwl/collapse_annotation.yml b/cwl/collapse_annotation.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/collapse_annotation.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/convert2bed.cwl b/cwl/convert2bed.cwl new file mode 100644 index 0000000..a26b57f --- /dev/null +++ b/cwl/convert2bed.cwl @@ -0,0 +1,23 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: convert2bed +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/bedops:2.4.39--h7d875b9_1 +inputs: + infmt: + type: string + inputBinding: + prefix: --input= + separate: false + infile: + type: File + outbed: + type: string +outputs: + outBed: + type: File + outputBinding: + glob: $(inputs.outbed) +stdin: $(inputs.infile.path) +stdout: $(inputs.outbed) diff --git a/cwl/convert2bed.yml b/cwl/convert2bed.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/convert2bed.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/counts2sce.R b/cwl/counts2sce.R new file mode 100644 index 0000000..630759c --- /dev/null +++ b/cwl/counts2sce.R @@ -0,0 +1,11 @@ +.libPaths(c('/projects/rpci/songliu/qhu/miniconda3/envs/r-base/lib/R/library')) +suppressPackageStartupMessages(library(R.utils)) +args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) +counts2sce <- +function(dir.name, ...) { + library(DropletUtils) + dir.name <- file.path(dir.name, "Gene/filtered") + sce <- read10xCounts(dir.name, ...) + saveRDS(sce, file = "counts_sce.rds") +} +do.call(counts2sce, args) diff --git a/cwl/counts2sce.cwl b/cwl/counts2sce.cwl new file mode 100644 index 0000000..300b0fa --- /dev/null +++ b/cwl/counts2sce.cwl @@ -0,0 +1,26 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: Rscript +requirements: +- class: InitialWorkDirRequirement + listing: + - entryname: counts2sce.R + entry: ".libPaths(c('/projects/rpci/songliu/qhu/miniconda3/envs/r-base/lib/R/library'))\nsuppressPackageStartupMessages(library(R.utils))\nargs + <- commandArgs(trailingOnly = TRUE, asValues = TRUE)\ncounts2sce <-\nfunction(dir.name, + ...) { \n library(DropletUtils)\n dir.name <- file.path(dir.name, \"Gene/filtered\")\n + \ sce <- read10xCounts(dir.name, ...)\n saveRDS(sce, file = \"counts_sce.rds\")\n}\ndo.call(counts2sce, + args)" + writable: false +arguments: +- counts2sce.R +inputs: + dirname: + type: Directory + inputBinding: + prefix: dir.name= + separate: false +outputs: + outsce: + type: File + outputBinding: + glob: '*.rds' diff --git a/cwl/counts2sce.yml b/cwl/counts2sce.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/counts2sce.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/cp.cwl b/cwl/cp.cwl new file mode 100644 index 0000000..3fcedd3 --- /dev/null +++ b/cwl/cp.cwl @@ -0,0 +1,29 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: cp +inputs: + file1: + type: + - File + - Directory + inputBinding: + position: 2 + separate: true + file2: + type: string + inputBinding: + position: 3 + separate: true + folder: + type: boolean? + inputBinding: + position: 1 + prefix: -r + separate: true +outputs: + cpfile: + type: + - File + - Directory + outputBinding: + glob: $(inputs.file2) diff --git a/cwl/cp.yml b/cwl/cp.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/cp.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/cutadapt.cwl b/cwl/cutadapt.cwl index d46c17f..43a327e 100644 --- a/cwl/cutadapt.cwl +++ b/cwl/cutadapt.cwl @@ -1,51 +1,81 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: cutadapt -requirements: -- class: DockerRequirement - dockerPull: kfdrc/cutadapt -inputs: - threadN: - type: int - inputBinding: - position: 1 - prefix: -j - separate: true - default: 1.0 - adapter: - type: string - inputBinding: - position: 2 - prefix: -b - separate: true - out1prefix: - type: string - inputBinding: - position: 3 - prefix: -o - separate: true - out2prefix: - type: string - inputBinding: - position: 4 - prefix: -p - separate: true - in1: - type: File - inputBinding: - position: 5 - separate: true - in2: - type: File - inputBinding: - position: 6 - separate: true -outputs: - out1: - type: File - outputBinding: - glob: $(inputs.out1prefix) - out2: - type: File - outputBinding: - glob: $(inputs.out2prefix) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: cutadapt +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/cutadapt:4.2--py310h1425a21_0 +inputs: + threadN: + type: int? + inputBinding: + position: 1 + prefix: -j + separate: true + default: 1 + adapter1a: + type: string? + inputBinding: + position: 2 + prefix: -a + separate: true + adapter2a: + type: string? + inputBinding: + position: 3 + prefix: -A + separate: true + adapter1g: + type: string? + inputBinding: + position: 4 + prefix: -g + separate: true + adapter2g: + type: string? + inputBinding: + position: 5 + prefix: -G + separate: true + adapter1b: + type: string? + inputBinding: + position: 6 + prefix: -b + separate: true + adapter2b: + type: string? + inputBinding: + position: 7 + prefix: -B + separate: true + out1prefix: + type: string + inputBinding: + position: 8 + prefix: -o + separate: true + out2prefix: + type: string? + inputBinding: + position: 9 + prefix: -p + separate: true + in1: + type: File + inputBinding: + position: 99 + separate: true + in2: + type: File? + inputBinding: + position: 100 + separate: true +outputs: + out1: + type: File + outputBinding: + glob: $(inputs.out1prefix) + out2: + type: File? + outputBinding: + glob: $(inputs.out2prefix) diff --git a/cwl/cutadapt.yml b/cwl/cutadapt.yml index 901994d..957f620 100644 --- a/cwl/cutadapt.yml +++ b/cwl/cutadapt.yml @@ -1 +1 @@ -threadN: 1.0 +threadN: 1 diff --git a/cwl/deduplicate_bismark.cwl b/cwl/deduplicate_bismark.cwl new file mode 100644 index 0000000..b1e38f6 --- /dev/null +++ b/cwl/deduplicate_bismark.cwl @@ -0,0 +1,32 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: deduplicate_bismark +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/bismark:0.23.1--hdfd78af_0 +inputs: + bam: + type: File + inputBinding: + position: 99 + separate: true + format: + type: boolean? + inputBinding: + prefix: --bam + separate: true + paired: + type: boolean? + inputBinding: + prefix: --paired + separate: true + outdir: + type: string? + inputBinding: + prefix: --output_dir + separate: true +outputs: + dbam: + type: File + outputBinding: + glob: '*.deduplicated.bam' diff --git a/cwl/deduplicate_bismark.yml b/cwl/deduplicate_bismark.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/deduplicate_bismark.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/deepvariant.cwl b/cwl/deepvariant.cwl new file mode 100644 index 0000000..ac37d41 --- /dev/null +++ b/cwl/deepvariant.cwl @@ -0,0 +1,70 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: /opt/deepvariant/bin/run_deepvariant +requirements: +- class: DockerRequirement + dockerPull: google/deepvariant +inputs: + bam: + type: File + secondaryFiles: .bai + inputBinding: + prefix: --reads= + separate: false + model: + type: string + inputBinding: + prefix: --model_type= + separate: false + ref: + type: File + secondaryFiles: .fai + inputBinding: + prefix: --ref= + separate: false + regions: + type: + - File? + - string? + inputBinding: + prefix: --regions + separate: true + outVcf: + type: string + inputBinding: + prefix: --output_vcf= + separate: false + outGVcf: + type: string? + inputBinding: + prefix: --output_gvcf= + separate: false + intermediate: + type: string? + inputBinding: + prefix: --intermediate_results_dir + separate: true + cores: + type: int? + inputBinding: + prefix: --num_shards= + separate: false +outputs: + vcf: + type: File + secondaryFiles: .tbi + outputBinding: + glob: $(inputs.outVcf) + gvcf: + type: File? + secondaryFiles: .tbi + outputBinding: + glob: $(inputs.outGVcf) + report: + type: File + outputBinding: + glob: '*.html' + intdir: + type: Directory? + outputBinding: + glob: $(inputs.intermediate) diff --git a/cwl/deepvariant.yml b/cwl/deepvariant.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/deepvariant.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/delly_call.cwl b/cwl/delly_call.cwl new file mode 100644 index 0000000..976d76f --- /dev/null +++ b/cwl/delly_call.cwl @@ -0,0 +1,49 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- delly +- call +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/delly:0.8.7--he03298f_1 +inputs: + exclude: + type: File? + inputBinding: + prefix: -x + separate: true + genome: + type: File + secondaryFiles: .fai + inputBinding: + prefix: -g + separate: true + outfile: + type: string + inputBinding: + prefix: -o + separate: true + bcf: + type: File? + secondaryFiles: .csi + inputBinding: + prefix: -v + separate: true + tbam: + type: File + secondaryFiles: .bai + inputBinding: + position: 5 + separate: true + nbam: + type: File? + secondaryFiles: .bai + inputBinding: + position: 6 + separate: true +outputs: + outbcf: + type: File + secondaryFiles: .csi + outputBinding: + glob: $(inputs.outfile) diff --git a/cwl/delly_call.yml b/cwl/delly_call.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/delly_call.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/delly_filter.cwl b/cwl/delly_filter.cwl new file mode 100644 index 0000000..dc8b8a1 --- /dev/null +++ b/cwl/delly_filter.cwl @@ -0,0 +1,36 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- delly +- filter +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/delly:0.8.7--he03298f_1 +inputs: + filter: + type: string + inputBinding: + prefix: -f + separate: true + default: somatic + outfile: + type: string + inputBinding: + prefix: -o + separate: true + samples: + type: File + inputBinding: + prefix: -s + separate: true + tbcf: + type: File + secondaryFiles: .csi + inputBinding: + separate: true +outputs: + fbcf: + type: File + secondaryFiles: .csi + outputBinding: + glob: $(inputs.outfile) diff --git a/cwl/delly_filter.yml b/cwl/delly_filter.yml new file mode 100644 index 0000000..6976716 --- /dev/null +++ b/cwl/delly_filter.yml @@ -0,0 +1 @@ +filter: somatic diff --git a/cwl/delly_somatic/dellyCall.cwl b/cwl/delly_somatic/dellyCall.cwl new file mode 100644 index 0000000..976d76f --- /dev/null +++ b/cwl/delly_somatic/dellyCall.cwl @@ -0,0 +1,49 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- delly +- call +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/delly:0.8.7--he03298f_1 +inputs: + exclude: + type: File? + inputBinding: + prefix: -x + separate: true + genome: + type: File + secondaryFiles: .fai + inputBinding: + prefix: -g + separate: true + outfile: + type: string + inputBinding: + prefix: -o + separate: true + bcf: + type: File? + secondaryFiles: .csi + inputBinding: + prefix: -v + separate: true + tbam: + type: File + secondaryFiles: .bai + inputBinding: + position: 5 + separate: true + nbam: + type: File? + secondaryFiles: .bai + inputBinding: + position: 6 + separate: true +outputs: + outbcf: + type: File + secondaryFiles: .csi + outputBinding: + glob: $(inputs.outfile) diff --git a/cwl/delly_somatic/dellyFilter.cwl b/cwl/delly_somatic/dellyFilter.cwl new file mode 100644 index 0000000..dc8b8a1 --- /dev/null +++ b/cwl/delly_somatic/dellyFilter.cwl @@ -0,0 +1,36 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- delly +- filter +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/delly:0.8.7--he03298f_1 +inputs: + filter: + type: string + inputBinding: + prefix: -f + separate: true + default: somatic + outfile: + type: string + inputBinding: + prefix: -o + separate: true + samples: + type: File + inputBinding: + prefix: -s + separate: true + tbcf: + type: File + secondaryFiles: .csi + inputBinding: + separate: true +outputs: + fbcf: + type: File + secondaryFiles: .csi + outputBinding: + glob: $(inputs.outfile) diff --git a/cwl/delly_somatic/delly_somatic.cwl b/cwl/delly_somatic/delly_somatic.cwl new file mode 100644 index 0000000..fa09622 --- /dev/null +++ b/cwl/delly_somatic/delly_somatic.cwl @@ -0,0 +1,72 @@ +cwlVersion: v1.0 +class: Workflow +requirements: +- class: StepInputExpressionRequirement +- class: MultipleInputFeatureRequirement +- class: InlineJavascriptRequirement +inputs: + tbam: + type: File + secondaryFiles: .bai + nbam: + type: File + secondaryFiles: .bai + outbcf: + type: string + exclude: + type: File? + genome: + type: File + secondaryFiles: .fai +outputs: + bcf: + type: File + outputSource: dellyFilter/fbcf +steps: + dellyCall: + run: dellyCall.cwl + in: + exclude: exclude + genome: genome + outfile: outbcf + tbam: tbam + nbam: nbam + out: + - outbcf + listSample: + run: listSample.cwl + in: + vcf: dellyCall/outbcf + out: + valueFrom: sample.txt + listSample: + valueFrom: $(true) + out: + - qout + echo: + run: echo.cwl + in: + sth: + valueFrom: |- + tumor + control + out: + - out + fpaste: + run: fpaste.cwl + in: + files: + source: + - listSample/qout + - echo/out + linkMerge: merge_flattened + out: + - out + dellyFilter: + run: dellyFilter.cwl + in: + outfile: outbcf + tbcf: dellyCall/outbcf + samples: fpaste/out + out: + - fbcf diff --git a/cwl/delly_somatic/delly_somatic.yml b/cwl/delly_somatic/delly_somatic.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/delly_somatic/delly_somatic.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/delly_somatic/echo.cwl b/cwl/delly_somatic/echo.cwl new file mode 100644 index 0000000..3e373ca --- /dev/null +++ b/cwl/delly_somatic/echo.cwl @@ -0,0 +1,22 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: echo +inputs: + sth: + type: string + inputBinding: + separate: true + escape: + type: boolean? + inputBinding: + prefix: -e + separate: true + outfile: + type: string + default: echo.txt +outputs: + out: + type: File + outputBinding: + glob: $(inputs.outfile) +stdout: $(inputs.outfile) diff --git a/cwl/delly_somatic/fpaste.cwl b/cwl/delly_somatic/fpaste.cwl new file mode 100644 index 0000000..5a3e30b --- /dev/null +++ b/cwl/delly_somatic/fpaste.cwl @@ -0,0 +1,22 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: paste +inputs: + files: + type: File[] + inputBinding: + separate: true + sep: + type: string? + inputBinding: + prefix: -d + separate: true + outfile: + type: string + default: paste.txt +outputs: + out: + type: File + outputBinding: + glob: $(inputs.outfile) +stdout: $(inputs.outfile) diff --git a/cwl/delly_somatic/listSample.cwl b/cwl/delly_somatic/listSample.cwl new file mode 100644 index 0000000..564d99d --- /dev/null +++ b/cwl/delly_somatic/listSample.cwl @@ -0,0 +1,87 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- bcftools +- query +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/bcftools:1.13--h3a49de5_0 +inputs: + exclude: + type: string? + inputBinding: + prefix: -e + separate: true + format: + type: string? + inputBinding: + prefix: -f + separate: true + header: + type: boolean? + inputBinding: + prefix: -H + separate: true + include: + type: string? + inputBinding: + prefix: -i + separate: true + listSample: + type: boolean? + inputBinding: + prefix: -l + separate: true + region: + type: string? + inputBinding: + prefix: -r + separate: true + regionFile: + type: File? + inputBinding: + prefix: -R + separate: true + sample: + type: string? + inputBinding: + prefix: -s + separate: true + sampleFile: + type: File? + inputBinding: + prefix: -S + separate: true + target: + type: string? + inputBinding: + prefix: -t + separate: true + targetFile: + type: File? + inputBinding: + prefix: -T + separate: true + uTags: + type: boolean? + inputBinding: + prefix: -u + separate: true + vcfList: + type: File? + inputBinding: + prefix: -v + separate: true + vcf: + type: File? + inputBinding: + position: 20 + separate: true + out: + type: string +outputs: + qout: + type: File + outputBinding: + glob: $(inputs.out) +stdout: $(inputs.out) diff --git a/cwl/echo.cwl b/cwl/echo.cwl new file mode 100644 index 0000000..3e373ca --- /dev/null +++ b/cwl/echo.cwl @@ -0,0 +1,22 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: echo +inputs: + sth: + type: string + inputBinding: + separate: true + escape: + type: boolean? + inputBinding: + prefix: -e + separate: true + outfile: + type: string + default: echo.txt +outputs: + out: + type: File + outputBinding: + glob: $(inputs.outfile) +stdout: $(inputs.outfile) diff --git a/cwl/echo.yml b/cwl/echo.yml new file mode 100644 index 0000000..3952eec --- /dev/null +++ b/cwl/echo.yml @@ -0,0 +1 @@ +outfile: echo.txt diff --git a/cwl/fastdump.cwl b/cwl/fastdump.cwl new file mode 100644 index 0000000..7df7631 --- /dev/null +++ b/cwl/fastdump.cwl @@ -0,0 +1,30 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: fastq-dump +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/sra-tools:2.11.0--pl5321h314213e_2 +- class: InitialWorkDirRequirement + listing: + - entryname: .ncbi/user-settings.mkfg + entry: /LIBS/GUID = '666666' + writable: false +inputs: + acc: + type: + - string + - File + inputBinding: + position: 99 + separate: true + split: + type: boolean + inputBinding: + prefix: --split-3 + separate: true + default: true +outputs: + fqs: + type: File[] + outputBinding: + glob: '*.fastq' diff --git a/cwl/fastdump.yml b/cwl/fastdump.yml new file mode 100644 index 0000000..75a06ef --- /dev/null +++ b/cwl/fastdump.yml @@ -0,0 +1 @@ +split: true diff --git a/cwl/fastqc.cwl b/cwl/fastqc.cwl index f068b16..c0ce9bc 100644 --- a/cwl/fastqc.cwl +++ b/cwl/fastqc.cwl @@ -1,19 +1,19 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: fastqc -requirements: -- class: DockerRequirement - dockerPull: hubentu/rcwl-rnaseq -arguments: -- --outdir -- ./ -inputs: - seqfile: - type: File - inputBinding: - separate: true -outputs: - QCfile: - type: File - outputBinding: - glob: '*.zip' +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: fastqc +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/fastqc:0.12.1--hdfd78af_0 +arguments: +- --outdir +- ./ +inputs: + seqfile: + type: File + inputBinding: + separate: true +outputs: + QCfile: + type: File + outputBinding: + glob: '*.zip' diff --git a/cwl/fastqc.yml b/cwl/fastqc.yml index 0967ef4..69a88e3 100644 --- a/cwl/fastqc.yml +++ b/cwl/fastqc.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/fastqdump.cwl b/cwl/fastqdump.cwl new file mode 100644 index 0000000..bbbd034 --- /dev/null +++ b/cwl/fastqdump.cwl @@ -0,0 +1,37 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: fastq-dump +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/sra-tools:3.1.0--h9f5acd7_0 +- class: InitialWorkDirRequirement + listing: + - entryname: .ncbi/user-settings.mkfg + entry: /LIBS/GUID = '666666' + writable: false +inputs: + acc: + type: + - string + - File + inputBinding: + position: 99 + separate: true + split: + type: boolean + inputBinding: + prefix: --split-3 + separate: true + default: true + guid: + type: string? + gzip: + type: boolean? + inputBinding: + prefix: --gzip + separate: true +outputs: + fqs: + type: File[] + outputBinding: + glob: '*' diff --git a/cwl/fastqdump.yml b/cwl/fastqdump.yml new file mode 100644 index 0000000..75a06ef --- /dev/null +++ b/cwl/fastqdump.yml @@ -0,0 +1 @@ +split: true diff --git a/cwl/featureCounts.cwl b/cwl/featureCounts.cwl index 5a8f0ec..f17e8f0 100644 --- a/cwl/featureCounts.cwl +++ b/cwl/featureCounts.cwl @@ -1,27 +1,30 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: featureCounts -requirements: -- class: DockerRequirement - dockerPull: hubentu/rcwl-rnaseq -inputs: - gtf: - type: File - inputBinding: - prefix: -a - separate: true - count: - type: string - inputBinding: - prefix: -o - separate: true - bam: - type: File - inputBinding: - separate: true -outputs: - Count: - type: File - secondaryFiles: .summary - outputBinding: - glob: $(inputs.count) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: featureCounts +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/subread:2.0.1--h7132678_2 +arguments: +- -p +- --countReadPairs +inputs: + gtf: + type: File + inputBinding: + prefix: -a + separate: true + count: + type: string + inputBinding: + prefix: -o + separate: true + bam: + type: File + inputBinding: + separate: true +outputs: + Count: + type: File + secondaryFiles: .summary + outputBinding: + glob: $(inputs.count) diff --git a/cwl/featureCounts.yml b/cwl/featureCounts.yml index 0967ef4..69a88e3 100644 --- a/cwl/featureCounts.yml +++ b/cwl/featureCounts.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/fpaste.cwl b/cwl/fpaste.cwl new file mode 100644 index 0000000..5a3e30b --- /dev/null +++ b/cwl/fpaste.cwl @@ -0,0 +1,22 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: paste +inputs: + files: + type: File[] + inputBinding: + separate: true + sep: + type: string? + inputBinding: + prefix: -d + separate: true + outfile: + type: string + default: paste.txt +outputs: + out: + type: File + outputBinding: + glob: $(inputs.outfile) +stdout: $(inputs.outfile) diff --git a/cwl/fpaste.yml b/cwl/fpaste.yml new file mode 100644 index 0000000..4be6d1b --- /dev/null +++ b/cwl/fpaste.yml @@ -0,0 +1 @@ +outfile: paste.txt diff --git a/cwl/fragCounter.cwl b/cwl/fragCounter.cwl new file mode 100644 index 0000000..4b3c307 --- /dev/null +++ b/cwl/fragCounter.cwl @@ -0,0 +1,39 @@ +cwlVersion: v1.2 +class: CommandLineTool +baseCommand: frag +requirements: +- class: DockerRequirement + dockerPull: hubentu/jabba +inputs: + bam: + type: File + secondaryFiles: + - .bai? + - ^.bai? + inputBinding: + prefix: -b + separate: true + gcmap: + type: Directory + inputBinding: + prefix: -d + separate: true + window: + type: int + inputBinding: + prefix: -w + separate: true + mapq: + type: int? + inputBinding: + prefix: -q + separate: true +outputs: + bw: + type: File + outputBinding: + glob: cov.corrected.bw + rds: + type: File + outputBinding: + glob: cov.rds diff --git a/cwl/fragCounter.yml b/cwl/fragCounter.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/fragCounter.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/gc_wiggle.cwl b/cwl/gc_wiggle.cwl new file mode 100644 index 0000000..5c16033 --- /dev/null +++ b/cwl/gc_wiggle.cwl @@ -0,0 +1,29 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- sequenza-utils +- gc_wiggle +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/sequenza-utils:3.0.0--py39h67e14b5_5 +inputs: + window: + type: int + inputBinding: + prefix: -w + separate: true + ref: + type: File + inputBinding: + prefix: -f + separate: true + out: + type: string + inputBinding: + prefix: -o + separate: true +outputs: + wig: + type: File + outputBinding: + glob: $(inputs.out) diff --git a/cwl/gc_wiggle.yml b/cwl/gc_wiggle.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/gc_wiggle.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/geneBody_coverage.cwl b/cwl/geneBody_coverage.cwl index 62142c2..b494888 100644 --- a/cwl/geneBody_coverage.cwl +++ b/cwl/geneBody_coverage.cwl @@ -1,32 +1,32 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: geneBody_coverage.py -requirements: -- class: DockerRequirement - dockerPull: hubentu/rcwl-rnaseq -inputs: - bam: - type: File - secondaryFiles: .bai - inputBinding: - prefix: -i - separate: true - bed: - type: File - inputBinding: - prefix: -r - separate: true - prefix: - type: string - inputBinding: - prefix: -o - separate: true -outputs: - gCovPDF: - type: File - outputBinding: - glob: '*.geneBodyCoverage.curves.pdf' - gCovTXT: - type: File - outputBinding: - glob: '*.geneBodyCoverage.txt' +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: geneBody_coverage.py +requirements: +- class: DockerRequirement + dockerPull: hubentu/rcwl-rnaseq +inputs: + bam: + type: File + secondaryFiles: .bai + inputBinding: + prefix: -i + separate: true + bed: + type: File + inputBinding: + prefix: -r + separate: true + prefix: + type: string + inputBinding: + prefix: -o + separate: true +outputs: + gCovPDF: + type: File + outputBinding: + glob: '*.geneBodyCoverage.curves.pdf' + gCovTXT: + type: File + outputBinding: + glob: '*.geneBodyCoverage.txt' diff --git a/cwl/geneBody_coverage.yml b/cwl/geneBody_coverage.yml index 0967ef4..69a88e3 100644 --- a/cwl/geneBody_coverage.yml +++ b/cwl/geneBody_coverage.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/genePredToBed.cwl b/cwl/genePredToBed.cwl index da07d22..33ff2a7 100644 --- a/cwl/genePredToBed.cwl +++ b/cwl/genePredToBed.cwl @@ -1,22 +1,22 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: genePredToBed -requirements: -- class: DockerRequirement - dockerPull: hubentu/rcwl-rnaseq -inputs: - genePred: - type: File - inputBinding: - position: 1 - separate: true - Bed: - type: string - inputBinding: - position: 2 - separate: true -outputs: - bed: - type: File - outputBinding: - glob: $(inputs.Bed) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: genePredToBed +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/ucsc-genepredtobed:377--h0b8a92a_4 +inputs: + genePred: + type: File + inputBinding: + position: 1 + separate: true + Bed: + type: string + inputBinding: + position: 2 + separate: true +outputs: + bed: + type: File + outputBinding: + glob: $(inputs.Bed) diff --git a/cwl/genePredToBed.yml b/cwl/genePredToBed.yml index 0967ef4..69a88e3 100644 --- a/cwl/genePredToBed.yml +++ b/cwl/genePredToBed.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/ggsashimi.cwl b/cwl/ggsashimi.cwl new file mode 100644 index 0000000..5fd0183 --- /dev/null +++ b/cwl/ggsashimi.cwl @@ -0,0 +1,54 @@ +cwlVersion: v1.0 +class: CommandLineTool +requirements: +- class: DockerRequirement + dockerPull: guigolab/ggsashimi:1.0.0 +- class: InitialWorkDirRequirement + listing: + - $(inputs.bamDir) +inputs: + tsv: + type: File + inputBinding: + prefix: -b + separate: true + bamDir: + doc: The bam files in the input tsv should be relative to this directory + type: Directory + coord: + type: string + inputBinding: + prefix: -c + separate: true + gtf: + type: File + inputBinding: + prefix: -g + separate: true + Cfactor: + type: int? + inputBinding: + prefix: -C + separate: true + overlay: + type: int? + inputBinding: + prefix: -O + separate: true + oprefix: + type: string + inputBinding: + prefix: -o + separate: true + default: sashimi + alpha: + type: float + inputBinding: + prefix: --alpha + separate: true + default: 0.25 +outputs: + plot: + type: File + outputBinding: + glob: $(inputs.oprefix).pdf diff --git a/cwl/ggsashimi.yml b/cwl/ggsashimi.yml new file mode 100644 index 0000000..7c1087a --- /dev/null +++ b/cwl/ggsashimi.yml @@ -0,0 +1,2 @@ +oprefix: sashimi +alpha: 0.25 diff --git a/cwl/gistic2.cwl b/cwl/gistic2.cwl new file mode 100644 index 0000000..549cf95 --- /dev/null +++ b/cwl/gistic2.cwl @@ -0,0 +1,70 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: gistic2 +requirements: +- class: DockerRequirement + dockerPull: hubentu/gistic2 +arguments: +- -b +- ./ +inputs: + seg: + type: File + inputBinding: + prefix: -seg + separate: true + refgene: + type: File + inputBinding: + prefix: -refgene + separate: true + markers: + type: File? + inputBinding: + prefix: -mk + separate: true + rx: + type: int? + inputBinding: + prefix: -rx + separate: true + genegistic: + type: int? + inputBinding: + prefix: -genegistic + separate: true + savegene: + type: int? + inputBinding: + prefix: -savegene + separate: true + tamp: + type: float? + inputBinding: + prefix: -ta + separate: true + tdel: + type: float? + inputBinding: + prefix: -td + separate: true + gcm: + type: string? + inputBinding: + prefix: -gcm + separate: true + brlen: + type: float? + inputBinding: + prefix: -brlen + separate: true + conf: + type: float? + inputBinding: + prefix: -conf + separate: true +outputs: + outs: + type: File[] + outputBinding: + glob: '*' diff --git a/cwl/gistic2.yml b/cwl/gistic2.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/gistic2.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/glnexus_cli.cwl b/cwl/glnexus_cli.cwl new file mode 100644 index 0000000..94c51d5 --- /dev/null +++ b/cwl/glnexus_cli.cwl @@ -0,0 +1,34 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: glnexus_cli +requirements: +- class: DockerRequirement + dockerPull: ghcr.io/dnanexus-rnd/glnexus:v1.4.1 +inputs: + config: + type: string + inputBinding: + prefix: --config + separate: true + bed: + type: File? + inputBinding: + prefix: --bed + separate: true + gvcfs: + type: File[] + inputBinding: + separate: true + ovcf: + type: string + threads: + type: int + inputBinding: + prefix: -t + separate: true +outputs: + bcf: + type: File + outputBinding: + glob: $(inputs.ovcf) +stdout: $(inputs.ovcf) diff --git a/cwl/glnexus_cli.yml b/cwl/glnexus_cli.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/glnexus_cli.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/glnexus_cli_list.cwl b/cwl/glnexus_cli_list.cwl new file mode 100644 index 0000000..ba85e9b --- /dev/null +++ b/cwl/glnexus_cli_list.cwl @@ -0,0 +1,41 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: glnexus_cli +requirements: +- class: DockerRequirement + dockerPull: ghcr.io/dnanexus-rnd/glnexus:v1.4.1 +- class: InitialWorkDirRequirement + listing: + - entryname: gvcfs + entry: ${var x='';for(var i=0;i $name.bed + writable: false +inputs: + gtf: + type: File + inputBinding: + separate: true +outputs: + bed: + type: File + outputBinding: + glob: '*.bed' diff --git a/cwl/gtf2bed.yml b/cwl/gtf2bed.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/gtf2bed.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/gtfToGenePred.cwl b/cwl/gtfToGenePred.cwl index 59fd07a..d14f104 100644 --- a/cwl/gtfToGenePred.cwl +++ b/cwl/gtfToGenePred.cwl @@ -1,22 +1,24 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: gtfToGenePred -requirements: -- class: DockerRequirement - dockerPull: hubentu/rcwl-rnaseq -inputs: - gtf: - type: File - inputBinding: - position: 1 - separate: true - gPred: - type: string - inputBinding: - position: 2 - separate: true -outputs: - genePred: - type: File - outputBinding: - glob: $(inputs.gPred) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: gtfToGenePred +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/ucsc-gtftogenepred:377--h0b8a92a_4 +arguments: +- -genePredExt +inputs: + gtf: + type: File + inputBinding: + position: 1 + separate: true + gPred: + type: string + inputBinding: + position: 2 + separate: true +outputs: + genePred: + type: File + outputBinding: + glob: $(inputs.gPred) diff --git a/cwl/gtfToGenePred.yml b/cwl/gtfToGenePred.yml index 0967ef4..69a88e3 100644 --- a/cwl/gtfToGenePred.yml +++ b/cwl/gtfToGenePred.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/hapCall/HC.cwl b/cwl/hapCall/HC.cwl index c947ce1..171aed0 100644 --- a/cwl/hapCall/HC.cwl +++ b/cwl/hapCall/HC.cwl @@ -1,33 +1,33 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: java -inputs: - cromwell: - type: File - inputBinding: - position: 1 - prefix: -jar - separate: true - run: - type: string - inputBinding: - position: 2 - separate: true - default: run - wdl: - type: File - inputBinding: - position: 3 - separate: true - json: - type: File - inputBinding: - position: 4 - prefix: -i - separate: true -outputs: - log: - type: File - outputBinding: - glob: $(inputs.wdl.basename).log -stdout: $(inputs.wdl.basename).log +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: java +inputs: + cromwell: + type: File + inputBinding: + position: 1 + prefix: -jar + separate: true + run: + type: string + inputBinding: + position: 2 + separate: true + default: run + wdl: + type: File + inputBinding: + position: 3 + separate: true + json: + type: File + inputBinding: + position: 4 + prefix: -i + separate: true +outputs: + log: + type: File + outputBinding: + glob: $(inputs.wdl.basename).log +stdout: $(inputs.wdl.basename).log diff --git a/cwl/hapCall/hapCall.cwl b/cwl/hapCall/hapCall.cwl index 9eab535..4054b31 100644 --- a/cwl/hapCall/hapCall.cwl +++ b/cwl/hapCall/hapCall.cwl @@ -1,43 +1,43 @@ -cwlVersion: v1.0 -class: Workflow -inputs: - bam: - type: string - intervals: - type: string - cromwell: - type: File - wdl: - type: File - tmpl: - type: File -outputs: - hclog: - type: File - outputSource: HC/log - outdir: - type: Directory - outputSource: mvOut/OutDir -steps: - hapJson: - run: cwl/hapCall/hapJson.cwl - in: - bam: bam - intervals: intervals - tmpl: tmpl - out: - - json - HC: - run: cwl/hapCall/HC.cwl - in: - cromwell: cromwell - wdl: wdl - json: hapJson/json - out: - - log - mvOut: - run: cwl/hapCall/mvOut.cwl - in: - logFile: HC/log - out: - - OutDir +cwlVersion: v1.0 +class: Workflow +inputs: + bam: + type: string + intervals: + type: string + cromwell: + type: File + wdl: + type: File + tmpl: + type: File +outputs: + hclog: + type: File + outputSource: HC/log + outdir: + type: Directory + outputSource: mvOut/OutDir +steps: + hapJson: + run: hapJson.cwl + in: + bam: bam + intervals: intervals + tmpl: tmpl + out: + - json + HC: + run: HC.cwl + in: + cromwell: cromwell + wdl: wdl + json: hapJson/json + out: + - log + mvOut: + run: mvOut.cwl + in: + logFile: HC/log + out: + - OutDir diff --git a/cwl/hapCall/hapCall.yml b/cwl/hapCall/hapCall.yml index 0967ef4..69a88e3 100644 --- a/cwl/hapCall/hapCall.yml +++ b/cwl/hapCall/hapCall.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/hapCall/hapJson.cwl b/cwl/hapCall/hapJson.cwl index 36d03ca..9413bb0 100644 --- a/cwl/hapCall/hapJson.cwl +++ b/cwl/hapCall/hapJson.cwl @@ -1,28 +1,28 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- Rscript -- -e -- args <- commandArgs(TRUE);bam <- args[1];intervals <- args[2];tmpl3 <- args[3];json1 - <- jsonlite::fromJSON(tmpl3);json1$HaplotypeCallerGvcf_GATK4.input_bam <- bam;json1$HaplotypeCallerGvcf_GATK4.input_bam_index - <- sub('.bam', '.bai', bam);json1$HaplotypeCallerGvcf_GATK4.scattered_calling_intervals_list - <- intervals;cat(jsonlite::toJSON(json1, pretty = TRUE, auto_unbox = T)) -inputs: - bam: - type: string - inputBinding: - separate: true - intervals: - type: string - inputBinding: - separate: true - tmpl: - type: File - inputBinding: - separate: true -outputs: - json: - type: File - outputBinding: - glob: tmpl3.json -stdout: tmpl3.json +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- Rscript +- -e +- args <- commandArgs(TRUE);bam <- args[1];intervals <- args[2];tmpl3 <- args[3];json1 + <- jsonlite::fromJSON(tmpl3);json1$HaplotypeCallerGvcf_GATK4.input_bam <- bam;json1$HaplotypeCallerGvcf_GATK4.input_bam_index + <- sub('.bam', '.bai', bam);json1$HaplotypeCallerGvcf_GATK4.scattered_calling_intervals_list + <- intervals;cat(jsonlite::toJSON(json1, pretty = TRUE, auto_unbox = T)) +inputs: + bam: + type: string + inputBinding: + separate: true + intervals: + type: string + inputBinding: + separate: true + tmpl: + type: File + inputBinding: + separate: true +outputs: + json: + type: File + outputBinding: + glob: tmpl3.json +stdout: tmpl3.json diff --git a/cwl/hapCall/mvOut.R b/cwl/hapCall/mvOut.R index 5599d99..9c21925 100644 --- a/cwl/hapCall/mvOut.R +++ b/cwl/hapCall/mvOut.R @@ -1,16 +1,14 @@ -.libPaths('/home/hq/R/x86_64-pc-linux-gnu-library/4.0') -suppressPackageStartupMessages(library(R.utils)) -suppressPackageStartupMessages(library(codetools)) -args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) -mvOut <- -function(logFile){ - log1 <- readLines(logFile) - startn <- grep('Final Outputs:', log1)+1 - endn <- grep('}$', log1) - endn <- endn[endn > startn][1] - logOut <- jsonlite::fromJSON(log1[startn:endn]) - logOut <- logOut[lengths(logOut)>0] - dir.create('output', showWarnings = FALSE) - lapply(logOut, function(x)file.rename(x, file.path('output', basename(x)))) -} -do.call(mvOut, args) +suppressPackageStartupMessages(library(R.utils)) +args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) +mvOut <- +function(logFile){ + log1 <- readLines(logFile) + startn <- grep('Final Outputs:', log1)+1 + endn <- grep('}$', log1) + endn <- endn[endn > startn][1] + logOut <- jsonlite::fromJSON(log1[startn:endn]) + logOut <- logOut[lengths(logOut)>0] + dir.create('output', showWarnings = FALSE) + lapply(logOut, function(x)file.rename(x, file.path('output', basename(x)))) +} +do.call(mvOut, args) diff --git a/cwl/hapCall/mvOut.cwl b/cwl/hapCall/mvOut.cwl index 8e0e978..f0ce137 100644 --- a/cwl/hapCall/mvOut.cwl +++ b/cwl/hapCall/mvOut.cwl @@ -1,17 +1,37 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- Rscript -- cwl/hapCall/mvOut.R -id: mvOut -inputs: - logFile: - type: File - inputBinding: - prefix: logFile= - separate: false -outputs: - OutDir: - type: Directory - outputBinding: - glob: output +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: Rscript +requirements: +- class: InitialWorkDirRequirement + listing: + - entryname: mvOut.R + entry: |- + suppressPackageStartupMessages(library(R.utils)) + args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) + mvOut <- + function(logFile){ + log1 <- readLines(logFile) + startn <- grep('Final Outputs:', log1)+1 + endn <- grep('}$', log1) + endn <- endn[endn > startn][1] + logOut <- jsonlite::fromJSON(log1[startn:endn]) + logOut <- logOut[lengths(logOut)>0] + dir.create('output', showWarnings = FALSE) + lapply(logOut, function(x)file.rename(x, file.path('output', basename(x)))) + } + do.call(mvOut, args) + writable: false +arguments: +- mvOut.R +id: mvOut +inputs: + logFile: + type: File + inputBinding: + prefix: logFile= + separate: false +outputs: + OutDir: + type: Directory + outputBinding: + glob: output diff --git a/cwl/hisat2_align.cwl b/cwl/hisat2_align.cwl index 033f759..e776256 100644 --- a/cwl/hisat2_align.cwl +++ b/cwl/hisat2_align.cwl @@ -1,44 +1,44 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: hisat2 -requirements: -- class: DockerRequirement - dockerPull: biocontainers/hisat2:v2.0.5-1-deb_cv1 -- class: InlineJavascriptRequirement -inputs: - threadN: - type: int - inputBinding: - prefix: -p - separate: true - IndexPrefix: - type: File - secondaryFiles: - - $(self.basename + '.1.ht2') - - $(self.basename + '.2.ht2') - - $(self.basename + '.3.ht2') - - $(self.basename + '.4.ht2') - - $(self.basename + '.5.ht2') - - $(self.basename + '.6.ht2') - - $(self.basename + '.7.ht2') - - $(self.basename + '.8.ht2') - inputBinding: - prefix: -x - separate: true - valueFrom: $(self.dirname + '/' + self.basename) - fq1: - type: File - inputBinding: - prefix: '-1' - separate: true - fq2: - type: File - inputBinding: - prefix: '-2' - separate: true -outputs: - sam: - type: File - outputBinding: - glob: '*.sam' -stdout: output.sam +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: hisat2 +requirements: +- class: DockerRequirement + dockerPull: biocontainers/hisat2:v2.0.5-1-deb_cv1 +- class: InlineJavascriptRequirement +inputs: + threadN: + type: int + inputBinding: + prefix: -p + separate: true + IndexPrefix: + type: File + secondaryFiles: + - $(self.basename + '.1.ht2') + - $(self.basename + '.2.ht2') + - $(self.basename + '.3.ht2') + - $(self.basename + '.4.ht2') + - $(self.basename + '.5.ht2') + - $(self.basename + '.6.ht2') + - $(self.basename + '.7.ht2') + - $(self.basename + '.8.ht2') + inputBinding: + prefix: -x + separate: true + valueFrom: $(self.dirname + '/' + self.basename) + fq1: + type: File + inputBinding: + prefix: '-1' + separate: true + fq2: + type: File + inputBinding: + prefix: '-2' + separate: true +outputs: + sam: + type: File + outputBinding: + glob: '*.sam' +stdout: output.sam diff --git a/cwl/hisat2_align.yml b/cwl/hisat2_align.yml index 0967ef4..69a88e3 100644 --- a/cwl/hisat2_align.yml +++ b/cwl/hisat2_align.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/hisat2_build.cwl b/cwl/hisat2_build.cwl index 1a8e736..51074dd 100644 --- a/cwl/hisat2_build.cwl +++ b/cwl/hisat2_build.cwl @@ -1,22 +1,22 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: hisat2-build -requirements: -- class: DockerRequirement - dockerPull: biocontainers/hisat2:v2.0.5-1-deb_cv1 -inputs: - ref: - type: File - inputBinding: - position: 1 - separate: true - outPrefix: - type: string - inputBinding: - position: 2 - separate: true -outputs: - idx: - type: File[] - outputBinding: - glob: $(inputs.outPrefix).* +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: hisat2-build +requirements: +- class: DockerRequirement + dockerPull: biocontainers/hisat2:v2.0.5-1-deb_cv1 +inputs: + ref: + type: File + inputBinding: + position: 1 + separate: true + outPrefix: + type: string + inputBinding: + position: 2 + separate: true +outputs: + idx: + type: File[] + outputBinding: + glob: $(inputs.outPrefix).* diff --git a/cwl/hisat2_build.yml b/cwl/hisat2_build.yml index 0967ef4..69a88e3 100644 --- a/cwl/hisat2_build.yml +++ b/cwl/hisat2_build.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/htseq.cwl b/cwl/htseq.cwl index 3308df2..218fc0b 100644 --- a/cwl/htseq.cwl +++ b/cwl/htseq.cwl @@ -1,36 +1,36 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: htseq-count -requirements: -- class: DockerRequirement - dockerPull: genomicpariscentre/htseq -arguments: -- --format -- bam -- --mode -- intersection-strict -inputs: - minaqual: - type: int - inputBinding: - prefix: -a - separate: true - stranded: - type: string - inputBinding: - prefix: -s - separate: true - bam: - type: File - inputBinding: - separate: true - gtf: - type: File - inputBinding: - separate: true -outputs: - out: - type: File - outputBinding: - glob: $(inputs.bam.nameroot).htseq.txt -stdout: $(inputs.bam.nameroot).htseq.txt +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: htseq-count +requirements: +- class: DockerRequirement + dockerPull: genomicpariscentre/htseq +arguments: +- --format +- bam +- --mode +- intersection-strict +inputs: + minaqual: + type: int + inputBinding: + prefix: -a + separate: true + stranded: + type: string + inputBinding: + prefix: -s + separate: true + bam: + type: File + inputBinding: + separate: true + gtf: + type: File + inputBinding: + separate: true +outputs: + out: + type: File + outputBinding: + glob: $(inputs.bam.nameroot).htseq.txt +stdout: $(inputs.bam.nameroot).htseq.txt diff --git a/cwl/htseq.yml b/cwl/htseq.yml index 0967ef4..69a88e3 100644 --- a/cwl/htseq.yml +++ b/cwl/htseq.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/infer_experiment.cwl b/cwl/infer_experiment.cwl new file mode 100644 index 0000000..bc31b91 --- /dev/null +++ b/cwl/infer_experiment.cwl @@ -0,0 +1,29 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: infer_experiment.py +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/rseqc:4.0.0--py38h4a8c8d9_1 +inputs: + bed: + type: File + inputBinding: + prefix: -r + separate: true + bam: + type: File + secondaryFiles: .bai + inputBinding: + prefix: -i + separate: true + size: + type: int? + inputBinding: + prefix: -s + separate: true +outputs: + sout: + type: File + outputBinding: + glob: $(inputs.bam.nameroot).strand.txt +stdout: $(inputs.bam.nameroot).strand.txt diff --git a/cwl/infer_experiment.yml b/cwl/infer_experiment.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/infer_experiment.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/jabba.cwl b/cwl/jabba.cwl new file mode 100644 index 0000000..7fa14d6 --- /dev/null +++ b/cwl/jabba.cwl @@ -0,0 +1,53 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: jba +requirements: +- class: DockerRequirement + dockerPull: hubentu/jabba +- class: EnvVarRequirement + envDef: + GRB_LICENSE_FILE: $(inputs.license.path) +- class: InlineJavascriptRequirement +inputs: + junction: + type: File + inputBinding: + position: 1 + separate: true + coverage: + type: File + inputBinding: + position: 2 + separate: true + gurobi: + type: string? + inputBinding: + position: 3 + prefix: --gurobi + separate: true + default: 'TRUE' + slack: + type: int? + inputBinding: + position: 4 + prefix: --slack + separate: true + license: + type: File +outputs: + gg: + type: File + outputBinding: + glob: jabba.simple.gg.rds + plot: + type: File + outputBinding: + glob: karyograph.rds.ppfit.png + seg: + type: File + outputBinding: + glob: jabba.seg + report: + type: File + outputBinding: + glob: opt.report.rds diff --git a/cwl/jabba.yml b/cwl/jabba.yml new file mode 100644 index 0000000..bd4c15f --- /dev/null +++ b/cwl/jabba.yml @@ -0,0 +1 @@ +gurobi: 'TRUE' diff --git a/cwl/jdCall/JD.cwl b/cwl/jdCall/JD.cwl index c947ce1..171aed0 100644 --- a/cwl/jdCall/JD.cwl +++ b/cwl/jdCall/JD.cwl @@ -1,33 +1,33 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: java -inputs: - cromwell: - type: File - inputBinding: - position: 1 - prefix: -jar - separate: true - run: - type: string - inputBinding: - position: 2 - separate: true - default: run - wdl: - type: File - inputBinding: - position: 3 - separate: true - json: - type: File - inputBinding: - position: 4 - prefix: -i - separate: true -outputs: - log: - type: File - outputBinding: - glob: $(inputs.wdl.basename).log -stdout: $(inputs.wdl.basename).log +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: java +inputs: + cromwell: + type: File + inputBinding: + position: 1 + prefix: -jar + separate: true + run: + type: string + inputBinding: + position: 2 + separate: true + default: run + wdl: + type: File + inputBinding: + position: 3 + separate: true + json: + type: File + inputBinding: + position: 4 + prefix: -i + separate: true +outputs: + log: + type: File + outputBinding: + glob: $(inputs.wdl.basename).log +stdout: $(inputs.wdl.basename).log diff --git a/cwl/jdCall/jdCall.cwl b/cwl/jdCall/jdCall.cwl index b614425..6ba5d71 100644 --- a/cwl/jdCall/jdCall.cwl +++ b/cwl/jdCall/jdCall.cwl @@ -1,52 +1,52 @@ -cwlVersion: v1.0 -class: Workflow -inputs: - sampleName: - type: string - gvcf: - type: string - callsetName: - type: string - intervals: - type: string - unpadded_intervals: - type: string - tmpl: - type: File - cromwell: - type: File - wdl: - type: File -outputs: - hclog: - type: File - outputSource: JD/log - outdir: - type: Directory - outputSource: mvOut/OutDir -steps: - jdJson: - run: cwl/jdCall/jdJson.cwl - in: - sampleName: sampleName - gvcf: gvcf - callsetName: callsetName - intervals: intervals - unpadded_intervals: unpadded_intervals - tmpl: tmpl - out: - - json - JD: - run: cwl/jdCall/JD.cwl - in: - cromwell: cromwell - wdl: wdl - json: jdJson/json - out: - - log - mvOut: - run: cwl/jdCall/mvOut.cwl - in: - logFile: JD/log - out: - - OutDir +cwlVersion: v1.0 +class: Workflow +inputs: + sampleName: + type: string + gvcf: + type: string + callsetName: + type: string + intervals: + type: string + unpadded_intervals: + type: string + tmpl: + type: File + cromwell: + type: File + wdl: + type: File +outputs: + hclog: + type: File + outputSource: JD/log + outdir: + type: Directory + outputSource: mvOut/OutDir +steps: + jdJson: + run: jdJson.cwl + in: + sampleName: sampleName + gvcf: gvcf + callsetName: callsetName + intervals: intervals + unpadded_intervals: unpadded_intervals + tmpl: tmpl + out: + - json + JD: + run: JD.cwl + in: + cromwell: cromwell + wdl: wdl + json: jdJson/json + out: + - log + mvOut: + run: mvOut.cwl + in: + logFile: JD/log + out: + - OutDir diff --git a/cwl/jdCall/jdCall.yml b/cwl/jdCall/jdCall.yml index 0967ef4..69a88e3 100644 --- a/cwl/jdCall/jdCall.yml +++ b/cwl/jdCall/jdCall.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/jdCall/jdJson.cwl b/cwl/jdCall/jdJson.cwl index 097865e..fd3fb68 100644 --- a/cwl/jdCall/jdJson.cwl +++ b/cwl/jdCall/jdJson.cwl @@ -1,50 +1,50 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- Rscript -- -e -- args <- commandArgs(TRUE);splitList <- function(s)as.list(unlist(strsplit(s, split - = ',')));sampleName <- args[1];gvcf <- args[2];callsetName <- args[3];intervals - <- args[4];unpadded_intervals <- args[5];tmpl4 <- args[6];json1 <- jsonlite::fromJSON(tmpl4, - simplifyVector=FALSE);json1$JointGenotyping.sample_names <- splitList(sampleName);json1$JointGenotyping.input_gvcfs - <- splitList(gvcf);json1$JointGenotyping.input_gvcfs_indices <- splitList(gsub('gz', - 'gz.tbi', gvcf));json1$JointGenotyping.callset_name <- callsetName;json1$JointGenotyping.eval_interval_list - <- intervals;json1$JointGenotyping.unpadded_intervals_file <- unpadded_intervals;cat(jsonlite::toJSON(json1, - pretty = TRUE, auto_unbox = T)) -inputs: - sampleName: - type: string - inputBinding: - position: 1 - separate: true - gvcf: - type: string - inputBinding: - position: 2 - separate: true - callsetName: - type: string - inputBinding: - position: 3 - separate: true - intervals: - type: string - inputBinding: - position: 4 - separate: true - unpadded_intervals: - type: string - inputBinding: - position: 5 - separate: true - tmpl: - type: File - inputBinding: - position: 6 - separate: true -outputs: - json: - type: File - outputBinding: - glob: tmpl4.json -stdout: tmpl4.json +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- Rscript +- -e +- args <- commandArgs(TRUE);splitList <- function(s)as.list(unlist(strsplit(s, split + = ',')));sampleName <- args[1];gvcf <- args[2];callsetName <- args[3];intervals + <- args[4];unpadded_intervals <- args[5];tmpl4 <- args[6];json1 <- jsonlite::fromJSON(tmpl4, + simplifyVector=FALSE);json1$JointGenotyping.sample_names <- splitList(sampleName);json1$JointGenotyping.input_gvcfs + <- splitList(gvcf);json1$JointGenotyping.input_gvcfs_indices <- splitList(gsub('gz', + 'gz.tbi', gvcf));json1$JointGenotyping.callset_name <- callsetName;json1$JointGenotyping.eval_interval_list + <- intervals;json1$JointGenotyping.unpadded_intervals_file <- unpadded_intervals;cat(jsonlite::toJSON(json1, + pretty = TRUE, auto_unbox = T)) +inputs: + sampleName: + type: string + inputBinding: + position: 1 + separate: true + gvcf: + type: string + inputBinding: + position: 2 + separate: true + callsetName: + type: string + inputBinding: + position: 3 + separate: true + intervals: + type: string + inputBinding: + position: 4 + separate: true + unpadded_intervals: + type: string + inputBinding: + position: 5 + separate: true + tmpl: + type: File + inputBinding: + position: 6 + separate: true +outputs: + json: + type: File + outputBinding: + glob: tmpl4.json +stdout: tmpl4.json diff --git a/cwl/jdCall/mvOut.R b/cwl/jdCall/mvOut.R index 5599d99..9c21925 100644 --- a/cwl/jdCall/mvOut.R +++ b/cwl/jdCall/mvOut.R @@ -1,16 +1,14 @@ -.libPaths('/home/hq/R/x86_64-pc-linux-gnu-library/4.0') -suppressPackageStartupMessages(library(R.utils)) -suppressPackageStartupMessages(library(codetools)) -args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) -mvOut <- -function(logFile){ - log1 <- readLines(logFile) - startn <- grep('Final Outputs:', log1)+1 - endn <- grep('}$', log1) - endn <- endn[endn > startn][1] - logOut <- jsonlite::fromJSON(log1[startn:endn]) - logOut <- logOut[lengths(logOut)>0] - dir.create('output', showWarnings = FALSE) - lapply(logOut, function(x)file.rename(x, file.path('output', basename(x)))) -} -do.call(mvOut, args) +suppressPackageStartupMessages(library(R.utils)) +args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) +mvOut <- +function(logFile){ + log1 <- readLines(logFile) + startn <- grep('Final Outputs:', log1)+1 + endn <- grep('}$', log1) + endn <- endn[endn > startn][1] + logOut <- jsonlite::fromJSON(log1[startn:endn]) + logOut <- logOut[lengths(logOut)>0] + dir.create('output', showWarnings = FALSE) + lapply(logOut, function(x)file.rename(x, file.path('output', basename(x)))) +} +do.call(mvOut, args) diff --git a/cwl/jdCall/mvOut.cwl b/cwl/jdCall/mvOut.cwl index 873df86..f0ce137 100644 --- a/cwl/jdCall/mvOut.cwl +++ b/cwl/jdCall/mvOut.cwl @@ -1,17 +1,37 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- Rscript -- cwl/jdCall/mvOut.R -id: mvOut -inputs: - logFile: - type: File - inputBinding: - prefix: logFile= - separate: false -outputs: - OutDir: - type: Directory - outputBinding: - glob: output +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: Rscript +requirements: +- class: InitialWorkDirRequirement + listing: + - entryname: mvOut.R + entry: |- + suppressPackageStartupMessages(library(R.utils)) + args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) + mvOut <- + function(logFile){ + log1 <- readLines(logFile) + startn <- grep('Final Outputs:', log1)+1 + endn <- grep('}$', log1) + endn <- endn[endn > startn][1] + logOut <- jsonlite::fromJSON(log1[startn:endn]) + logOut <- logOut[lengths(logOut)>0] + dir.create('output', showWarnings = FALSE) + lapply(logOut, function(x)file.rename(x, file.path('output', basename(x)))) + } + do.call(mvOut, args) + writable: false +arguments: +- mvOut.R +id: mvOut +inputs: + logFile: + type: File + inputBinding: + prefix: logFile= + separate: false +outputs: + OutDir: + type: Directory + outputBinding: + glob: output diff --git a/cwl/kallisto_index.cwl b/cwl/kallisto_index.cwl index 595cfe6..f64b2fc 100644 --- a/cwl/kallisto_index.cwl +++ b/cwl/kallisto_index.cwl @@ -1,23 +1,23 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- kallisto -- index -requirements: -- class: DockerRequirement - dockerPull: zlskidmore/kallisto -inputs: - index: - type: string - inputBinding: - prefix: -i - separate: true - fasta: - type: File - inputBinding: - separate: true -outputs: - fidx: - type: File - outputBinding: - glob: $(inputs.index) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- kallisto +- index +requirements: +- class: DockerRequirement + dockerPull: zlskidmore/kallisto +inputs: + index: + type: string + inputBinding: + prefix: -i + separate: true + fasta: + type: File + inputBinding: + separate: true +outputs: + fidx: + type: File + outputBinding: + glob: $(inputs.index) diff --git a/cwl/kallisto_index.yml b/cwl/kallisto_index.yml index 0967ef4..69a88e3 100644 --- a/cwl/kallisto_index.yml +++ b/cwl/kallisto_index.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/kallisto_quant.cwl b/cwl/kallisto_quant.cwl index b57262f..e9bad11 100644 --- a/cwl/kallisto_quant.cwl +++ b/cwl/kallisto_quant.cwl @@ -1,39 +1,39 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- kallisto -- quant -requirements: -- class: DockerRequirement - dockerPull: zlskidmore/kallisto -arguments: -- -o -- ./ -inputs: - index: - type: File - inputBinding: - prefix: -i - separate: true - fastq: - type: File[] - inputBinding: - separate: true - threads: - type: int - inputBinding: - prefix: -t - separate: true -outputs: - h5: - type: File - outputBinding: - glob: abundance.h5 - tsv: - type: File - outputBinding: - glob: abundance.tsv - info: - type: File - outputBinding: - glob: run_info.json +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- kallisto +- quant +requirements: +- class: DockerRequirement + dockerPull: zlskidmore/kallisto +arguments: +- -o +- ./ +inputs: + index: + type: File + inputBinding: + prefix: -i + separate: true + fastq: + type: File[] + inputBinding: + separate: true + threads: + type: int + inputBinding: + prefix: -t + separate: true +outputs: + h5: + type: File + outputBinding: + glob: abundance.h5 + tsv: + type: File + outputBinding: + glob: abundance.tsv + info: + type: File + outputBinding: + glob: run_info.json diff --git a/cwl/kallisto_quant.yml b/cwl/kallisto_quant.yml index 0967ef4..69a88e3 100644 --- a/cwl/kallisto_quant.yml +++ b/cwl/kallisto_quant.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/lancet.cwl b/cwl/lancet.cwl index 16177a6..5c1fc6b 100644 --- a/cwl/lancet.cwl +++ b/cwl/lancet.cwl @@ -1,39 +1,50 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: /lancet-1.0.7/lancet -requirements: -- class: DockerRequirement - dockerPull: kfdrc/lancet:1.0.7 -inputs: - tbam: - type: File - secondaryFiles: .bai - inputBinding: - prefix: --tumor - separate: true - nbam: - type: File - secondaryFiles: .bai - inputBinding: - prefix: --normal - separate: true - ref: - type: File - secondaryFiles: .fai - inputBinding: - prefix: --ref - separate: true - region: - type: File - inputBinding: - prefix: --bed - separate: true - threads: - type: int - inputBinding: - prefix: --num-threads - separate: true -outputs: - vcf: - type: stdout -stdout: $(inputs.tbam.nameroot)_$(inputs.nbam.nameroot).vcf +cwlVersion: v1.2 +class: CommandLineTool +baseCommand: lancet +requirements: +- class: DockerRequirement + dockerPull: hubentu/lancet +inputs: + tbam: + type: File + secondaryFiles: + - ^.bai? + - .bai? + inputBinding: + prefix: --tumor + separate: true + nbam: + type: File + secondaryFiles: + - ^.bai? + - .bai? + inputBinding: + prefix: --normal + separate: true + ref: + type: File + secondaryFiles: .fai + inputBinding: + prefix: --ref + separate: true + bed: + type: File? + inputBinding: + prefix: --bed + separate: true + reg: + type: string? + inputBinding: + prefix: --reg + separate: true + threads: + type: int + inputBinding: + prefix: --num-threads + separate: true +outputs: + vcf: + type: File + outputBinding: + glob: $(inputs.tbam.namerooot)_lancet.vcf +stdout: $(inputs.tbam.namerooot)_lancet.vcf diff --git a/cwl/lancet.yml b/cwl/lancet.yml index 0967ef4..69a88e3 100644 --- a/cwl/lancet.yml +++ b/cwl/lancet.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/lancet_scatter/lancet_bed.cwl b/cwl/lancet_scatter/lancet_bed.cwl new file mode 100644 index 0000000..5c1fc6b --- /dev/null +++ b/cwl/lancet_scatter/lancet_bed.cwl @@ -0,0 +1,50 @@ +cwlVersion: v1.2 +class: CommandLineTool +baseCommand: lancet +requirements: +- class: DockerRequirement + dockerPull: hubentu/lancet +inputs: + tbam: + type: File + secondaryFiles: + - ^.bai? + - .bai? + inputBinding: + prefix: --tumor + separate: true + nbam: + type: File + secondaryFiles: + - ^.bai? + - .bai? + inputBinding: + prefix: --normal + separate: true + ref: + type: File + secondaryFiles: .fai + inputBinding: + prefix: --ref + separate: true + bed: + type: File? + inputBinding: + prefix: --bed + separate: true + reg: + type: string? + inputBinding: + prefix: --reg + separate: true + threads: + type: int + inputBinding: + prefix: --num-threads + separate: true +outputs: + vcf: + type: File + outputBinding: + glob: $(inputs.tbam.namerooot)_lancet.vcf +stdout: $(inputs.tbam.namerooot)_lancet.vcf diff --git a/cwl/lancet_scatter/lancet_scatter.cwl b/cwl/lancet_scatter/lancet_scatter.cwl new file mode 100644 index 0000000..9f704c4 --- /dev/null +++ b/cwl/lancet_scatter/lancet_scatter.cwl @@ -0,0 +1,51 @@ +cwlVersion: v1.2 +class: Workflow +requirements: +- class: ScatterFeatureRequirement +- class: StepInputExpressionRequirement +- class: InlineJavascriptRequirement +inputs: + tbam: + type: File + secondaryFiles: + - ^.bai? + - .bai? + nbam: + type: File + secondaryFiles: + - ^.bai? + - .bai? + ref: + type: File + secondaryFiles: .fai + bed: + type: File[] + threads: + type: int +outputs: + ovcf: + type: File + outputSource: mergeVcf/Fout +steps: + lancet_bed: + run: lancet_bed.cwl + in: + tbam: tbam + nbam: nbam + ref: ref + bed: bed + threads: threads + out: + - vcf + scatter: bed + scatterMethod: dotproduct + mergeVcf: + run: mergeVcf.cwl + in: + ovcf: + source: + - tbam + valueFrom: $(self.nameroot)_lancet.vcf + vcfs: lancet_bed/vcf + out: + - Fout diff --git a/cwl/lancet_scatter/lancet_scatter.yml b/cwl/lancet_scatter/lancet_scatter.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/lancet_scatter/lancet_scatter.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/lancet_scatter/mergeVcf.cwl b/cwl/lancet_scatter/mergeVcf.cwl new file mode 100644 index 0000000..93933c2 --- /dev/null +++ b/cwl/lancet_scatter/mergeVcf.cwl @@ -0,0 +1,40 @@ +cwlVersion: v1.2 +class: CommandLineTool +baseCommand: +- bcftools +- concat +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/bcftools:1.13--h3a49de5_0 +inputs: + ovcf: + type: string + inputBinding: + prefix: -o + separate: true + vcfs: + type: File[]? + secondaryFiles: tbi? + inputBinding: + separate: true + type: + type: string? + inputBinding: + prefix: -O + separate: true + overlap: + type: boolean? + inputBinding: + prefix: -a + separate: true + vfile: + type: File? + inputBinding: + prefix: -f + separate: true +outputs: + Fout: + type: File + secondaryFiles: .tbi? + outputBinding: + glob: $(inputs.ovcf) diff --git a/cwl/liftOver.cwl b/cwl/liftOver.cwl new file mode 100644 index 0000000..f187b29 --- /dev/null +++ b/cwl/liftOver.cwl @@ -0,0 +1,36 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: liftOver +requirements: +- class: DockerRequirement + dockerPull: biowardrobe2/ucscuserapps:v358_2 +inputs: + oldFile: + type: File + inputBinding: + position: 1 + separate: true + chain: + type: File + inputBinding: + position: 2 + separate: true + newFile: + type: string + inputBinding: + position: 3 + separate: true + unmap: + type: string + inputBinding: + position: 4 + separate: true +outputs: + outFile: + type: File + outputBinding: + glob: $(inputs.newFile) + unMap: + type: File + outputBinding: + glob: $(inputs.unmap) diff --git a/cwl/liftOver.yml b/cwl/liftOver.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/liftOver.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/lofreq_indel/bamIdx.cwl b/cwl/lofreq_indel/bamIdx.cwl new file mode 100644 index 0000000..e779867 --- /dev/null +++ b/cwl/lofreq_indel/bamIdx.cwl @@ -0,0 +1,24 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- index +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.12--h9aed4be_1 +- class: InitialWorkDirRequirement + listing: + - $(inputs.bam) +inputs: + bam: + type: File + inputBinding: + position: 1 + separate: true +outputs: + idx: + type: File + secondaryFiles: + - .bai + outputBinding: + glob: $(inputs.bam.basename) diff --git a/cwl/lofreq_indel/indelq.cwl b/cwl/lofreq_indel/indelq.cwl new file mode 100644 index 0000000..c743277 --- /dev/null +++ b/cwl/lofreq_indel/indelq.cwl @@ -0,0 +1,32 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- lofreq +- indelqual +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/lofreq:2.1.5--py37h916d2e8_4 +arguments: +- --dindel +- --verbose +inputs: + ref: + type: File + secondaryFiles: .fai + inputBinding: + position: 1 + prefix: -f + separate: true + bam: + type: File + inputBinding: + position: 2 + separate: true + ibam: + type: string +outputs: + obam: + type: File + outputBinding: + glob: $(inputs.ibam) +stdout: $(inputs.ibam) diff --git a/cwl/lofreq_indel/lofreq_indel.cwl b/cwl/lofreq_indel/lofreq_indel.cwl new file mode 100644 index 0000000..1e982a3 --- /dev/null +++ b/cwl/lofreq_indel/lofreq_indel.cwl @@ -0,0 +1,32 @@ +cwlVersion: v1.0 +class: Workflow +requirements: +- class: StepInputExpressionRequirement +inputs: + ref: + type: File + secondaryFiles: .fai + bam: + type: File + secondaryFiles: .bai +outputs: + ibam: + type: File + secondaryFiles: .bai + outputSource: bamIdx/idx +steps: + indelq: + run: indelq.cwl + in: + ref: ref + bam: bam + ibam: + valueFrom: $(inputs.bam.nameroot)_i.bam + out: + - obam + bamIdx: + run: bamIdx.cwl + in: + bam: indelq/obam + out: + - idx diff --git a/cwl/lofreq_indel/lofreq_indel.yml b/cwl/lofreq_indel/lofreq_indel.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/lofreq_indel/lofreq_indel.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/lofreq_indelqual.cwl b/cwl/lofreq_indelqual.cwl new file mode 100644 index 0000000..c743277 --- /dev/null +++ b/cwl/lofreq_indelqual.cwl @@ -0,0 +1,32 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- lofreq +- indelqual +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/lofreq:2.1.5--py37h916d2e8_4 +arguments: +- --dindel +- --verbose +inputs: + ref: + type: File + secondaryFiles: .fai + inputBinding: + position: 1 + prefix: -f + separate: true + bam: + type: File + inputBinding: + position: 2 + separate: true + ibam: + type: string +outputs: + obam: + type: File + outputBinding: + glob: $(inputs.ibam) +stdout: $(inputs.ibam) diff --git a/cwl/lofreq_indelqual.yml b/cwl/lofreq_indelqual.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/lofreq_indelqual.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/lofreq_realign/bamIdx.cwl b/cwl/lofreq_realign/bamIdx.cwl new file mode 100644 index 0000000..e779867 --- /dev/null +++ b/cwl/lofreq_realign/bamIdx.cwl @@ -0,0 +1,24 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- index +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.12--h9aed4be_1 +- class: InitialWorkDirRequirement + listing: + - $(inputs.bam) +inputs: + bam: + type: File + inputBinding: + position: 1 + separate: true +outputs: + idx: + type: File + secondaryFiles: + - .bai + outputBinding: + glob: $(inputs.bam.basename) diff --git a/cwl/lofreq_realign/indelq.cwl b/cwl/lofreq_realign/indelq.cwl new file mode 100644 index 0000000..c743277 --- /dev/null +++ b/cwl/lofreq_realign/indelq.cwl @@ -0,0 +1,32 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- lofreq +- indelqual +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/lofreq:2.1.5--py37h916d2e8_4 +arguments: +- --dindel +- --verbose +inputs: + ref: + type: File + secondaryFiles: .fai + inputBinding: + position: 1 + prefix: -f + separate: true + bam: + type: File + inputBinding: + position: 2 + separate: true + ibam: + type: string +outputs: + obam: + type: File + outputBinding: + glob: $(inputs.ibam) +stdout: $(inputs.ibam) diff --git a/cwl/lofreq_realign/lofreq_realign.cwl b/cwl/lofreq_realign/lofreq_realign.cwl new file mode 100644 index 0000000..de7c8b1 --- /dev/null +++ b/cwl/lofreq_realign/lofreq_realign.cwl @@ -0,0 +1,49 @@ +cwlVersion: v1.0 +class: Workflow +requirements: +- class: StepInputExpressionRequirement +inputs: + ref: + type: File + secondaryFiles: .fai + bam: + type: File + secondaryFiles: .bai +outputs: + ibam: + type: File + secondaryFiles: .bai + outputSource: bamIdx/idx +steps: + realign: + run: realign.cwl + in: + ref: ref + bam: bam + vbam: + valueFrom: $(inputs.bam.nameroot)_v.bam + out: + - obam + sortBam: + run: sortBam.cwl + in: + bam: realign/obam + obam: + valueFrom: $(inputs.bam.nameroot)_sort.bam + out: + - sbam + indelq: + run: indelq.cwl + in: + ref: ref + bam: sortBam/sbam + ibam: + valueFrom: $(inputs.bam.nameroot)_i.bam + out: + - obam + bamIdx: + run: bamIdx.cwl + in: + bam: indelq/obam + out: + - idx diff --git a/cwl/lofreq_realign/lofreq_realign.yml b/cwl/lofreq_realign/lofreq_realign.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/lofreq_realign/lofreq_realign.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/lofreq_realign/realign.cwl b/cwl/lofreq_realign/realign.cwl new file mode 100644 index 0000000..c4c6c2b --- /dev/null +++ b/cwl/lofreq_realign/realign.cwl @@ -0,0 +1,32 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- lofreq +- viterbi +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/lofreq:2.1.5--py37h916d2e8_4 +arguments: +- --verbose +inputs: + ref: + type: File + secondaryFiles: .fai + inputBinding: + position: 1 + prefix: -f + separate: true + bam: + type: File + secondaryFiles: .bai + inputBinding: + position: 2 + separate: true + vbam: + type: string +outputs: + obam: + type: File + outputBinding: + glob: $(inputs.vbam) +stdout: $(inputs.vbam) diff --git a/cwl/lofreq_realign/sortBam.cwl b/cwl/lofreq_realign/sortBam.cwl new file mode 100644 index 0000000..be772d7 --- /dev/null +++ b/cwl/lofreq_realign/sortBam.cwl @@ -0,0 +1,23 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- sort +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.12--h9aed4be_1 +inputs: + bam: + type: File + inputBinding: + separate: true + obam: + type: string + inputBinding: + prefix: -o + separate: true +outputs: + sbam: + type: File + outputBinding: + glob: $(inputs.obam) diff --git a/cwl/lofreq_viterbi.cwl b/cwl/lofreq_viterbi.cwl new file mode 100644 index 0000000..c4c6c2b --- /dev/null +++ b/cwl/lofreq_viterbi.cwl @@ -0,0 +1,32 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- lofreq +- viterbi +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/lofreq:2.1.5--py37h916d2e8_4 +arguments: +- --verbose +inputs: + ref: + type: File + secondaryFiles: .fai + inputBinding: + position: 1 + prefix: -f + separate: true + bam: + type: File + secondaryFiles: .bai + inputBinding: + position: 2 + separate: true + vbam: + type: string +outputs: + obam: + type: File + outputBinding: + glob: $(inputs.vbam) +stdout: $(inputs.vbam) diff --git a/cwl/lofreq_viterbi.yml b/cwl/lofreq_viterbi.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/lofreq_viterbi.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/lumpy.cwl b/cwl/lumpy.cwl new file mode 100644 index 0000000..d9106da --- /dev/null +++ b/cwl/lumpy.cwl @@ -0,0 +1,38 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: lumpyexpress +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/lumpy-sv:0.3.1--hdfd78af_3 +inputs: + bam: + type: File[] + secondaryFiles: .bai + inputBinding: + prefix: -B + separate: true + itemSeparator: ',' + split: + type: File[] + secondaryFiles: .bai + inputBinding: + prefix: -S + separate: true + itemSeparator: ',' + discord: + type: File[] + secondaryFiles: .bai + inputBinding: + prefix: -D + separate: true + itemSeparator: ',' + vout: + type: string + inputBinding: + prefix: -o + separate: true +outputs: + vcf: + type: File + outputBinding: + glob: $(inputs.vout) diff --git a/cwl/lumpy.yml b/cwl/lumpy.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/lumpy.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/lumpy/discord.cwl b/cwl/lumpy/discord.cwl new file mode 100644 index 0000000..5968f3c --- /dev/null +++ b/cwl/lumpy/discord.cwl @@ -0,0 +1,69 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- view +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.16.1--h6899075_1 +arguments: +- -h +inputs: + bam: + type: File + secondaryFiles: .bai + inputBinding: + position: 99 + separate: true + bed: + type: File? + inputBinding: + position: 1 + prefix: -L + separate: true + obam: + type: string + inputBinding: + position: 2 + prefix: -o + separate: true + region: + type: string? + inputBinding: + position: 100 + separate: true + outb: + type: boolean? + inputBinding: + prefix: -b + separate: true + exFlag: + type: int? + inputBinding: + prefix: -F + separate: true + reqFlag: + type: int? + inputBinding: + prefix: -f + separate: true + qname: + type: File? + inputBinding: + prefix: -N + separate: true + threads: + type: int? + inputBinding: + prefix: --threads + separate: true + mapq: + type: int? + inputBinding: + prefix: -q + separate: true +outputs: + oBam: + type: File + outputBinding: + glob: $(inputs.obam) diff --git a/cwl/lumpy/discord_idx.cwl b/cwl/lumpy/discord_idx.cwl new file mode 100644 index 0000000..e779867 --- /dev/null +++ b/cwl/lumpy/discord_idx.cwl @@ -0,0 +1,24 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- index +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.12--h9aed4be_1 +- class: InitialWorkDirRequirement + listing: + - $(inputs.bam) +inputs: + bam: + type: File + inputBinding: + position: 1 + separate: true +outputs: + idx: + type: File + secondaryFiles: + - .bai + outputBinding: + glob: $(inputs.bam.basename) diff --git a/cwl/lumpy/lumpy.cwl b/cwl/lumpy/lumpy.cwl new file mode 100644 index 0000000..be28cc1 --- /dev/null +++ b/cwl/lumpy/lumpy.cwl @@ -0,0 +1,79 @@ +cwlVersion: v1.0 +class: Workflow +requirements: +- class: InlineJavascriptRequirement +- class: StepInputExpressionRequirement +- class: ScatterFeatureRequirement +inputs: + bam: + type: File[] + secondaryFiles: .bai +outputs: + vcf: + type: File + outputSource: lumpy/vcf +steps: + discord: + run: discord.cwl + in: + bam: bam + outb: + valueFrom: $(true) + exFlag: + valueFrom: '1294' + obam: + valueFrom: $(inputs.bam.nameroot).discord.bam + out: + - oBam + scatter: bam + sam: + run: sam.cwl + in: + bam: bam + obam: + valueFrom: $(inputs.bam.nameroot).sam + out: + - oBam + scatter: bam + split: + run: split.cwl + in: + sam: sam/oBam + out: + - splitReads + scatter: sam + sam2bam: + run: sam2bam.cwl + in: + bam: split/splitReads + outb: + valueFrom: $(true) + obam: + valueFrom: $(inputs.bam.nameroot).bam + out: + - oBam + scatter: bam + discord_idx: + run: discord_idx.cwl + in: + bam: discord/oBam + out: + - idx + scatter: bam + split_idx: + run: split_idx.cwl + in: + bam: sam2bam/oBam + out: + - idx + scatter: bam + lumpy: + run: lumpy.cwl + in: + bam: bam + split: split_idx/idx + discord: discord_idx/idx + vout: + valueFrom: $(inputs.bam[0].nameroot).vcf + out: + - vcf diff --git a/cwl/lumpy/lumpy.yml b/cwl/lumpy/lumpy.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/lumpy/lumpy.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/lumpy/sam.cwl b/cwl/lumpy/sam.cwl new file mode 100644 index 0000000..5968f3c --- /dev/null +++ b/cwl/lumpy/sam.cwl @@ -0,0 +1,69 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- view +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.16.1--h6899075_1 +arguments: +- -h +inputs: + bam: + type: File + secondaryFiles: .bai + inputBinding: + position: 99 + separate: true + bed: + type: File? + inputBinding: + position: 1 + prefix: -L + separate: true + obam: + type: string + inputBinding: + position: 2 + prefix: -o + separate: true + region: + type: string? + inputBinding: + position: 100 + separate: true + outb: + type: boolean? + inputBinding: + prefix: -b + separate: true + exFlag: + type: int? + inputBinding: + prefix: -F + separate: true + reqFlag: + type: int? + inputBinding: + prefix: -f + separate: true + qname: + type: File? + inputBinding: + prefix: -N + separate: true + threads: + type: int? + inputBinding: + prefix: --threads + separate: true + mapq: + type: int? + inputBinding: + prefix: -q + separate: true +outputs: + oBam: + type: File + outputBinding: + glob: $(inputs.obam) diff --git a/cwl/lumpy/sam2bam.cwl b/cwl/lumpy/sam2bam.cwl new file mode 100644 index 0000000..5968f3c --- /dev/null +++ b/cwl/lumpy/sam2bam.cwl @@ -0,0 +1,69 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- view +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.16.1--h6899075_1 +arguments: +- -h +inputs: + bam: + type: File + secondaryFiles: .bai + inputBinding: + position: 99 + separate: true + bed: + type: File? + inputBinding: + position: 1 + prefix: -L + separate: true + obam: + type: string + inputBinding: + position: 2 + prefix: -o + separate: true + region: + type: string? + inputBinding: + position: 100 + separate: true + outb: + type: boolean? + inputBinding: + prefix: -b + separate: true + exFlag: + type: int? + inputBinding: + prefix: -F + separate: true + reqFlag: + type: int? + inputBinding: + prefix: -f + separate: true + qname: + type: File? + inputBinding: + prefix: -N + separate: true + threads: + type: int? + inputBinding: + prefix: --threads + separate: true + mapq: + type: int? + inputBinding: + prefix: -q + separate: true +outputs: + oBam: + type: File + outputBinding: + glob: $(inputs.obam) diff --git a/cwl/lumpy/split.cwl b/cwl/lumpy/split.cwl new file mode 100644 index 0000000..9da52d2 --- /dev/null +++ b/cwl/lumpy/split.cwl @@ -0,0 +1,18 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: extractSplitReads_BwaMem +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/lumpy-sv:0.3.1--hdfd78af_3 +inputs: + sam: + type: File + inputBinding: + prefix: -i + separate: true +outputs: + splitReads: + type: File + outputBinding: + glob: $(inputs.sam.nameroot).splitReads.sam +stdout: $(inputs.sam.nameroot).splitReads.sam diff --git a/cwl/lumpy/split_idx.cwl b/cwl/lumpy/split_idx.cwl new file mode 100644 index 0000000..e779867 --- /dev/null +++ b/cwl/lumpy/split_idx.cwl @@ -0,0 +1,24 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- index +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.12--h9aed4be_1 +- class: InitialWorkDirRequirement + listing: + - $(inputs.bam) +inputs: + bam: + type: File + inputBinding: + position: 1 + separate: true +outputs: + idx: + type: File + secondaryFiles: + - .bai + outputBinding: + glob: $(inputs.bam.basename) diff --git a/cwl/lumpy_extractSplitReads_BwaMem.cwl b/cwl/lumpy_extractSplitReads_BwaMem.cwl new file mode 100644 index 0000000..9da52d2 --- /dev/null +++ b/cwl/lumpy_extractSplitReads_BwaMem.cwl @@ -0,0 +1,18 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: extractSplitReads_BwaMem +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/lumpy-sv:0.3.1--hdfd78af_3 +inputs: + sam: + type: File + inputBinding: + prefix: -i + separate: true +outputs: + splitReads: + type: File + outputBinding: + glob: $(inputs.sam.nameroot).splitReads.sam +stdout: $(inputs.sam.nameroot).splitReads.sam diff --git a/cwl/lumpy_extractSplitReads_BwaMem.yml b/cwl/lumpy_extractSplitReads_BwaMem.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/lumpy_extractSplitReads_BwaMem.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/mageck_count.cwl b/cwl/mageck_count.cwl new file mode 100644 index 0000000..abff452 --- /dev/null +++ b/cwl/mageck_count.cwl @@ -0,0 +1,40 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- mageck +- count +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/mageck:0.5.9.4--py38hed8969a_0 +inputs: + library: + type: File + inputBinding: + prefix: -l + separate: true + fastq: + type: File[] + inputBinding: + prefix: --fastq + separate: true + samples: + type: string[]? + inputBinding: + prefix: --sample-label + separate: true + itemSeparator: ',' + prefix: + type: string + inputBinding: + prefix: -n + separate: true + conSGRNA: + type: File? + inputBinding: + prefix: --control-sgrna + separate: true +outputs: + counts: + type: File[] + outputBinding: + glob: $(inputs.prefix)* diff --git a/cwl/mageck_count.yml b/cwl/mageck_count.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/mageck_count.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/mageck_mle.cwl b/cwl/mageck_mle.cwl new file mode 100644 index 0000000..1551b82 --- /dev/null +++ b/cwl/mageck_mle.cwl @@ -0,0 +1,39 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- mageck +- mle +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/mageck:0.5.9.4--py38hed8969a_0 +inputs: + countTable: + type: File + inputBinding: + prefix: -k + separate: true + desgin: + type: File? + inputBinding: + prefix: -d + separate: true + day0: + type: string? + inputBinding: + prefix: --day0-label + separate: true + prefix: + type: string + inputBinding: + prefix: -n + separate: true + conSGRNA: + type: File? + inputBinding: + prefix: --control-sgrna + separate: true +outputs: + mout: + type: File[] + outputBinding: + glob: $(inputs.prefix)* diff --git a/cwl/mageck_mle.yml b/cwl/mageck_mle.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/mageck_mle.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/mageck_pathway.cwl b/cwl/mageck_pathway.cwl new file mode 100644 index 0000000..9a05ead --- /dev/null +++ b/cwl/mageck_pathway.cwl @@ -0,0 +1,29 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- mageck +- pathway +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/mageck:0.5.9.4--py38hed8969a_0 +inputs: + geneRank: + type: File + inputBinding: + prefix: --gene-ranking + separate: true + gmt: + type: File + inputBinding: + prefix: --gmt-file + separate: true + prefix: + type: string + inputBinding: + prefix: -n + separate: true +outputs: + pouts: + type: File[] + outputBinding: + glob: $(inputs.prefix)* diff --git a/cwl/mageck_pathway.yml b/cwl/mageck_pathway.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/mageck_pathway.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/mageck_test.cwl b/cwl/mageck_test.cwl new file mode 100644 index 0000000..fa1fd8e --- /dev/null +++ b/cwl/mageck_test.cwl @@ -0,0 +1,46 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- mageck +- test +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/mageck:0.5.9.4--py38hed8969a_0 +inputs: + countTable: + type: File + inputBinding: + prefix: -k + separate: true + treat: + type: string[]? + inputBinding: + prefix: -t + separate: true + itemSeparator: ',' + control: + type: string[]? + inputBinding: + prefix: -c + separate: true + itemSeparator: ',' + prefix: + type: string + inputBinding: + prefix: -n + separate: true + conSGRNA: + type: File? + inputBinding: + prefix: --control-sgrna + separate: true + day0: + type: string? + inputBinding: + prefix: --day0-label + separate: true +outputs: + touts: + type: File[] + outputBinding: + glob: $(inputs.prefix)* diff --git a/cwl/mageck_test.yml b/cwl/mageck_test.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/mageck_test.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/makeblastdb.cwl b/cwl/makeblastdb.cwl index 907d436..313543f 100644 --- a/cwl/makeblastdb.cwl +++ b/cwl/makeblastdb.cwl @@ -1,29 +1,29 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: makeblastdb -requirements: -- class: DockerRequirement - dockerPull: biocontainers/blast:v2.2.31_cv2 -- class: InitialWorkDirRequirement - listing: - - $(inputs.Ref) -- class: InlineJavascriptRequirement -arguments: -- -dbtype -- nucl -inputs: - Ref: - type: File - inputBinding: - prefix: -in - separate: true - valueFrom: $(self.basename) -outputs: - idx: - type: File - secondaryFiles: - - $(inputs.Ref.basename + '.nhr') - - $(inputs.Ref.basename + '.nin') - - $(inputs.Ref.basename + '.nsq') - outputBinding: - glob: $(inputs.Ref.basename) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: makeblastdb +requirements: +- class: DockerRequirement + dockerPull: biocontainers/blast:v2.2.31_cv2 +- class: InitialWorkDirRequirement + listing: + - $(inputs.Ref) +- class: InlineJavascriptRequirement +arguments: +- -dbtype +- nucl +inputs: + Ref: + type: File + inputBinding: + prefix: -in + separate: true + valueFrom: $(self.basename) +outputs: + idx: + type: File + secondaryFiles: + - $(inputs.Ref.basename + '.nhr') + - $(inputs.Ref.basename + '.nin') + - $(inputs.Ref.basename + '.nsq') + outputBinding: + glob: $(inputs.Ref.basename) diff --git a/cwl/makeblastdb.yml b/cwl/makeblastdb.yml index 0967ef4..69a88e3 100644 --- a/cwl/makeblastdb.yml +++ b/cwl/makeblastdb.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/manta.cwl b/cwl/manta.cwl index b72127a..bfdd688 100644 --- a/cwl/manta.cwl +++ b/cwl/manta.cwl @@ -1,69 +1,75 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: configManta.py -requirements: -- class: DockerRequirement - dockerPull: cmopipeline/strelka2_manta -- class: ShellCommandRequirement -arguments: -- --runDir -- mantaRunDir -- --exome -- valueFrom: ' && ' - position: 5 -- valueFrom: mantaRunDir/runWorkflow.py - position: 6 -- valueFrom: -m - position: 7 -- valueFrom: local - position: 8 -inputs: - tbam: - type: File - secondaryFiles: .bai - inputBinding: - position: 1 - prefix: --tumorBam - separate: true - nbam: - type: File - secondaryFiles: .bai - inputBinding: - position: 2 - prefix: --normalBam - separate: true - ref: - type: File - secondaryFiles: .fai - inputBinding: - position: 3 - prefix: --referenceFasta - separate: true - callRegions: - type: File? - secondaryFiles: .tbi - inputBinding: - position: 4 - prefix: --callRegions - separate: true -outputs: - somaticSV: - type: File - secondaryFiles: .tbi - outputBinding: - glob: mantaRunDir/results/variants/somaticSV.vcf.gz - diploidSV: - type: File - secondaryFiles: .tbi - outputBinding: - glob: mantaRunDir/results/variants/diploidSV.vcf.gz - candidateSV: - type: File - secondaryFiles: .tbi - outputBinding: - glob: mantaRunDir/results/variants/candidateSV.vcf.gz - candidateSmallIndels: - type: File - secondaryFiles: .tbi - outputBinding: - glob: mantaRunDir/results/variants/candidateSmallIndels.vcf.gz +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: configManta.py +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/manta:1.6.0--h9ee0642_1 +- class: ShellCommandRequirement +arguments: +- --runDir +- mantaRunDir +- valueFrom: ' && ' + position: 5 + shellQuote: false +- valueFrom: mantaRunDir/runWorkflow.py + position: 6 +- valueFrom: -m + position: 7 +- valueFrom: local + position: 8 +inputs: + tbam: + type: File + secondaryFiles: .bai + inputBinding: + position: 1 + prefix: --tumorBam + separate: true + nbam: + type: File + secondaryFiles: .bai + inputBinding: + position: 2 + prefix: --normalBam + separate: true + ref: + type: File + secondaryFiles: .fai + inputBinding: + position: 3 + prefix: --referenceFasta + separate: true + callRegions: + type: File? + secondaryFiles: .tbi + inputBinding: + position: 4 + prefix: --callRegions + separate: true + exome: + type: boolean + inputBinding: + prefix: --exome + separate: true + default: true +outputs: + somaticSV: + type: File + secondaryFiles: .tbi + outputBinding: + glob: mantaRunDir/results/variants/somaticSV.vcf.gz + diploidSV: + type: File + secondaryFiles: .tbi + outputBinding: + glob: mantaRunDir/results/variants/diploidSV.vcf.gz + candidateSV: + type: File + secondaryFiles: .tbi + outputBinding: + glob: mantaRunDir/results/variants/candidateSV.vcf.gz + candidateSmallIndels: + type: File + secondaryFiles: .tbi + outputBinding: + glob: mantaRunDir/results/variants/candidateSmallIndels.vcf.gz diff --git a/cwl/manta.yml b/cwl/manta.yml index 0967ef4..de00f73 100644 --- a/cwl/manta.yml +++ b/cwl/manta.yml @@ -1 +1 @@ -{} +exome: true diff --git a/cwl/mantaStrelka/manta.cwl b/cwl/mantaStrelka/manta.cwl index b72127a..bfdd688 100644 --- a/cwl/mantaStrelka/manta.cwl +++ b/cwl/mantaStrelka/manta.cwl @@ -1,69 +1,75 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: configManta.py -requirements: -- class: DockerRequirement - dockerPull: cmopipeline/strelka2_manta -- class: ShellCommandRequirement -arguments: -- --runDir -- mantaRunDir -- --exome -- valueFrom: ' && ' - position: 5 -- valueFrom: mantaRunDir/runWorkflow.py - position: 6 -- valueFrom: -m - position: 7 -- valueFrom: local - position: 8 -inputs: - tbam: - type: File - secondaryFiles: .bai - inputBinding: - position: 1 - prefix: --tumorBam - separate: true - nbam: - type: File - secondaryFiles: .bai - inputBinding: - position: 2 - prefix: --normalBam - separate: true - ref: - type: File - secondaryFiles: .fai - inputBinding: - position: 3 - prefix: --referenceFasta - separate: true - callRegions: - type: File? - secondaryFiles: .tbi - inputBinding: - position: 4 - prefix: --callRegions - separate: true -outputs: - somaticSV: - type: File - secondaryFiles: .tbi - outputBinding: - glob: mantaRunDir/results/variants/somaticSV.vcf.gz - diploidSV: - type: File - secondaryFiles: .tbi - outputBinding: - glob: mantaRunDir/results/variants/diploidSV.vcf.gz - candidateSV: - type: File - secondaryFiles: .tbi - outputBinding: - glob: mantaRunDir/results/variants/candidateSV.vcf.gz - candidateSmallIndels: - type: File - secondaryFiles: .tbi - outputBinding: - glob: mantaRunDir/results/variants/candidateSmallIndels.vcf.gz +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: configManta.py +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/manta:1.6.0--h9ee0642_1 +- class: ShellCommandRequirement +arguments: +- --runDir +- mantaRunDir +- valueFrom: ' && ' + position: 5 + shellQuote: false +- valueFrom: mantaRunDir/runWorkflow.py + position: 6 +- valueFrom: -m + position: 7 +- valueFrom: local + position: 8 +inputs: + tbam: + type: File + secondaryFiles: .bai + inputBinding: + position: 1 + prefix: --tumorBam + separate: true + nbam: + type: File + secondaryFiles: .bai + inputBinding: + position: 2 + prefix: --normalBam + separate: true + ref: + type: File + secondaryFiles: .fai + inputBinding: + position: 3 + prefix: --referenceFasta + separate: true + callRegions: + type: File? + secondaryFiles: .tbi + inputBinding: + position: 4 + prefix: --callRegions + separate: true + exome: + type: boolean + inputBinding: + prefix: --exome + separate: true + default: true +outputs: + somaticSV: + type: File + secondaryFiles: .tbi + outputBinding: + glob: mantaRunDir/results/variants/somaticSV.vcf.gz + diploidSV: + type: File + secondaryFiles: .tbi + outputBinding: + glob: mantaRunDir/results/variants/diploidSV.vcf.gz + candidateSV: + type: File + secondaryFiles: .tbi + outputBinding: + glob: mantaRunDir/results/variants/candidateSV.vcf.gz + candidateSmallIndels: + type: File + secondaryFiles: .tbi + outputBinding: + glob: mantaRunDir/results/variants/candidateSmallIndels.vcf.gz diff --git a/cwl/mantaStrelka/mantaStrelka.cwl b/cwl/mantaStrelka/mantaStrelka.cwl index d7b785e..369dcef 100644 --- a/cwl/mantaStrelka/mantaStrelka.cwl +++ b/cwl/mantaStrelka/mantaStrelka.cwl @@ -1,52 +1,57 @@ -cwlVersion: v1.0 -class: Workflow -inputs: - tbam: - type: File - secondaryFiles: .bai - nbam: - type: File - secondaryFiles: .bai - ref: - type: File - secondaryFiles: .fai - region: - type: File? - secondaryFiles: .tbi -outputs: - snvs: - type: File - outputSource: strelka/snvs - indels: - type: File - outputSource: strelka/indels - somaticSV: - type: File - outputSource: manta/somaticSV - diploidSV: - type: File - outputSource: manta/diploidSV -steps: - manta: - run: cwl/mantaStrelka/manta.cwl - in: - tbam: tbam - nbam: nbam - ref: ref - callRegions: region - out: - - somaticSV - - diploidSV - - candidateSV - - candidateSmallIndels - strelka: - run: cwl/mantaStrelka/strelka.cwl - in: - tbam: tbam - nbam: nbam - ref: ref - callRegions: region - indelCandidates: manta/candidateSmallIndels - out: - - snvs - - indels +cwlVersion: v1.0 +class: Workflow +inputs: + tbam: + type: File + secondaryFiles: .bai + nbam: + type: File + secondaryFiles: .bai + ref: + type: File + secondaryFiles: .fai + region: + type: File? + secondaryFiles: .tbi + exome: + type: boolean + default: true +outputs: + snvs: + type: File + outputSource: strelka/snvs + indels: + type: File + outputSource: strelka/indels + somaticSV: + type: File + outputSource: manta/somaticSV + diploidSV: + type: File + outputSource: manta/diploidSV +steps: + manta: + run: manta.cwl + in: + tbam: tbam + nbam: nbam + ref: ref + callRegions: region + exome: exome + out: + - somaticSV + - diploidSV + - candidateSV + - candidateSmallIndels + strelka: + run: strelka.cwl + in: + tbam: tbam + nbam: nbam + ref: ref + callRegions: region + indelCandidates: manta/candidateSmallIndels + exome: exome + out: + - snvs + - indels diff --git a/cwl/mantaStrelka/mantaStrelka.yml b/cwl/mantaStrelka/mantaStrelka.yml index 0967ef4..de00f73 100644 --- a/cwl/mantaStrelka/mantaStrelka.yml +++ b/cwl/mantaStrelka/mantaStrelka.yml @@ -1 +1 @@ -{} +exome: true diff --git a/cwl/mantaStrelka/strelka.cwl b/cwl/mantaStrelka/strelka.cwl index fc90b0d..eed3af6 100644 --- a/cwl/mantaStrelka/strelka.cwl +++ b/cwl/mantaStrelka/strelka.cwl @@ -1,65 +1,71 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: configureStrelkaSomaticWorkflow.py -requirements: -- class: DockerRequirement - dockerPull: cmopipeline/strelka2_manta -- class: ShellCommandRequirement -arguments: -- --runDir -- strelkaRunDir -- --exome -- valueFrom: ' && ' - position: 6 -- valueFrom: strelkaRunDir/runWorkflow.py - position: 7 -- valueFrom: -m - position: 8 -- valueFrom: local - position: 9 -inputs: - tbam: - type: File - secondaryFiles: .bai - inputBinding: - position: 1 - prefix: --tumorBam - separate: true - nbam: - type: File - secondaryFiles: .bai - inputBinding: - position: 2 - prefix: --normalBam - separate: true - ref: - type: File - secondaryFiles: .fai - inputBinding: - position: 3 - prefix: --referenceFasta - separate: true - callRegions: - type: File? - secondaryFiles: .tbi - inputBinding: - position: 4 - prefix: --callRegions - separate: true - indelCandidates: - type: File? - inputBinding: - position: 5 - prefix: --indelCandidates - separate: true -outputs: - snvs: - type: File - secondaryFiles: .tbi - outputBinding: - glob: strelkaRunDir/results/variants/somatic.snvs.vcf.gz - indels: - type: File - secondaryFiles: .tbi - outputBinding: - glob: strelkaRunDir/results/variants/somatic.indels.vcf.gz +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: configureStrelkaSomaticWorkflow.py +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/strelka:2.9.10--h9ee0642_1 +- class: ShellCommandRequirement +arguments: +- --runDir +- strelkaRunDir +- valueFrom: ' && ' + position: 6 + shellQuote: false +- valueFrom: strelkaRunDir/runWorkflow.py + position: 7 +- valueFrom: -m + position: 8 +- valueFrom: local + position: 9 +inputs: + tbam: + type: File + secondaryFiles: .bai + inputBinding: + position: 1 + prefix: --tumorBam + separate: true + nbam: + type: File + secondaryFiles: .bai + inputBinding: + position: 2 + prefix: --normalBam + separate: true + ref: + type: File + secondaryFiles: .fai + inputBinding: + position: 3 + prefix: --referenceFasta + separate: true + callRegions: + type: File? + secondaryFiles: .tbi + inputBinding: + position: 4 + prefix: --callRegions + separate: true + indelCandidates: + type: File? + inputBinding: + position: 5 + prefix: --indelCandidates + separate: true + exome: + type: boolean + inputBinding: + prefix: --exome + separate: true + default: true +outputs: + snvs: + type: File + secondaryFiles: .tbi + outputBinding: + glob: strelkaRunDir/results/variants/somatic.snvs.vcf.gz + indels: + type: File + secondaryFiles: .tbi + outputBinding: + glob: strelkaRunDir/results/variants/somatic.indels.vcf.gz diff --git a/cwl/markdup.cwl b/cwl/markdup.cwl index 8a0301c..8e647ce 100644 --- a/cwl/markdup.cwl +++ b/cwl/markdup.cwl @@ -1,33 +1,33 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- picard -- MarkDuplicates -requirements: -- class: DockerRequirement - dockerPull: quay.io/biocontainers/picard:2.21.1--0 -inputs: - ibam: - type: File - inputBinding: - prefix: I= - separate: false - obam: - type: string - inputBinding: - prefix: O= - separate: false - matrix: - type: string - inputBinding: - prefix: M= - separate: false -outputs: - mBam: - type: File - outputBinding: - glob: $(inputs.obam) - Mat: - type: File - outputBinding: - glob: $(inputs.matrix) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- picard +- MarkDuplicates +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/picard:2.21.1--0 +inputs: + ibam: + type: File + inputBinding: + prefix: I= + separate: false + obam: + type: string + inputBinding: + prefix: O= + separate: false + matrix: + type: string + inputBinding: + prefix: M= + separate: false +outputs: + mBam: + type: File + outputBinding: + glob: $(inputs.obam) + Mat: + type: File + outputBinding: + glob: $(inputs.matrix) diff --git a/cwl/markdup.yml b/cwl/markdup.yml index 0967ef4..69a88e3 100644 --- a/cwl/markdup.yml +++ b/cwl/markdup.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/md5sum.cwl b/cwl/md5sum.cwl new file mode 100644 index 0000000..5e1ef6c --- /dev/null +++ b/cwl/md5sum.cwl @@ -0,0 +1,14 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: md5sum +inputs: + file: + type: File + inputBinding: + separate: true +outputs: + md5: + type: File + outputBinding: + glob: $(inputs.file.basename).md5 +stdout: $(inputs.file.basename).md5 diff --git a/cwl/md5sum.yml b/cwl/md5sum.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/md5sum.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/mergeBam.cwl b/cwl/mergeBam.cwl index 874f053..09d81b0 100644 --- a/cwl/mergeBam.cwl +++ b/cwl/mergeBam.cwl @@ -1,28 +1,28 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- picard -- MergeSamFiles -requirements: -- class: DockerRequirement - dockerPull: quay.io/biocontainers/picard:2.21.1--0 -inputs: - ibam: - type: - type: array - items: File - inputBinding: - prefix: I= - separate: false - inputBinding: - separate: true - obam: - type: string - inputBinding: - prefix: O= - separate: false -outputs: - oBam: - type: File - outputBinding: - glob: $(inputs.obam) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- picard +- MergeSamFiles +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/picard:2.21.1--0 +inputs: + ibam: + type: + type: array + items: File + inputBinding: + prefix: I= + separate: false + inputBinding: + separate: true + obam: + type: string + inputBinding: + prefix: O= + separate: false +outputs: + oBam: + type: File + outputBinding: + glob: $(inputs.obam) diff --git a/cwl/mergeBam.yml b/cwl/mergeBam.yml index 0967ef4..69a88e3 100644 --- a/cwl/mergeBam.yml +++ b/cwl/mergeBam.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/mergeBamDup/markdup.cwl b/cwl/mergeBamDup/markdup.cwl index 8a0301c..8e647ce 100644 --- a/cwl/mergeBamDup/markdup.cwl +++ b/cwl/mergeBamDup/markdup.cwl @@ -1,33 +1,33 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- picard -- MarkDuplicates -requirements: -- class: DockerRequirement - dockerPull: quay.io/biocontainers/picard:2.21.1--0 -inputs: - ibam: - type: File - inputBinding: - prefix: I= - separate: false - obam: - type: string - inputBinding: - prefix: O= - separate: false - matrix: - type: string - inputBinding: - prefix: M= - separate: false -outputs: - mBam: - type: File - outputBinding: - glob: $(inputs.obam) - Mat: - type: File - outputBinding: - glob: $(inputs.matrix) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- picard +- MarkDuplicates +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/picard:2.21.1--0 +inputs: + ibam: + type: File + inputBinding: + prefix: I= + separate: false + obam: + type: string + inputBinding: + prefix: O= + separate: false + matrix: + type: string + inputBinding: + prefix: M= + separate: false +outputs: + mBam: + type: File + outputBinding: + glob: $(inputs.obam) + Mat: + type: File + outputBinding: + glob: $(inputs.matrix) diff --git a/cwl/mergeBamDup/mergeBam.cwl b/cwl/mergeBamDup/mergeBam.cwl index 874f053..09d81b0 100644 --- a/cwl/mergeBamDup/mergeBam.cwl +++ b/cwl/mergeBamDup/mergeBam.cwl @@ -1,28 +1,28 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- picard -- MergeSamFiles -requirements: -- class: DockerRequirement - dockerPull: quay.io/biocontainers/picard:2.21.1--0 -inputs: - ibam: - type: - type: array - items: File - inputBinding: - prefix: I= - separate: false - inputBinding: - separate: true - obam: - type: string - inputBinding: - prefix: O= - separate: false -outputs: - oBam: - type: File - outputBinding: - glob: $(inputs.obam) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- picard +- MergeSamFiles +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/picard:2.21.1--0 +inputs: + ibam: + type: + type: array + items: File + inputBinding: + prefix: I= + separate: false + inputBinding: + separate: true + obam: + type: string + inputBinding: + prefix: O= + separate: false +outputs: + oBam: + type: File + outputBinding: + glob: $(inputs.obam) diff --git a/cwl/mergeBamDup/mergeBamDup.cwl b/cwl/mergeBamDup/mergeBamDup.cwl index e853d27..b5cd688 100644 --- a/cwl/mergeBamDup/mergeBamDup.cwl +++ b/cwl/mergeBamDup/mergeBamDup.cwl @@ -1,53 +1,53 @@ -cwlVersion: v1.0 -class: Workflow -requirements: -- class: StepInputExpressionRequirement -- class: InlineJavascriptRequirement -inputs: - ibam: - type: File[] - obam: - type: string -outputs: - oBam: - type: File - outputSource: markdup/mBam - matrix: - type: File - outputSource: markdup/Mat - Idx: - type: File - outputSource: samtools_index/idx - stat: - type: File - outputSource: samtools_flagstat/flagstat -steps: - mergeBam: - run: cwl/mergeBamDup/mergeBam.cwl - in: - ibam: ibam - obam: obam - out: - - oBam - markdup: - run: cwl/mergeBamDup/markdup.cwl - in: - ibam: mergeBam/oBam - obam: obam - matrix: - valueFrom: $(inputs.ibam.nameroot).markdup.txt - out: - - mBam - - Mat - samtools_index: - run: cwl/mergeBamDup/samtools_index.cwl - in: - bam: markdup/mBam - out: - - idx - samtools_flagstat: - run: cwl/mergeBamDup/samtools_flagstat.cwl - in: - bam: markdup/mBam - out: - - flagstat +cwlVersion: v1.0 +class: Workflow +requirements: +- class: StepInputExpressionRequirement +- class: InlineJavascriptRequirement +inputs: + ibam: + type: File[] + obam: + type: string +outputs: + oBam: + type: File + outputSource: markdup/mBam + matrix: + type: File + outputSource: markdup/Mat + Idx: + type: File + outputSource: samtools_index/idx + stat: + type: File + outputSource: samtools_flagstat/flagstat +steps: + mergeBam: + run: mergeBam.cwl + in: + ibam: ibam + obam: obam + out: + - oBam + markdup: + run: markdup.cwl + in: + ibam: mergeBam/oBam + obam: obam + matrix: + valueFrom: $(inputs.ibam.nameroot).markdup.txt + out: + - mBam + - Mat + samtools_index: + run: samtools_index.cwl + in: + bam: markdup/mBam + out: + - idx + samtools_flagstat: + run: samtools_flagstat.cwl + in: + bam: markdup/mBam + out: + - flagstat diff --git a/cwl/mergeBamDup/mergeBamDup.yml b/cwl/mergeBamDup/mergeBamDup.yml index 0967ef4..69a88e3 100644 --- a/cwl/mergeBamDup/mergeBamDup.yml +++ b/cwl/mergeBamDup/mergeBamDup.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/mergeBamDup/samtools_flagstat.cwl b/cwl/mergeBamDup/samtools_flagstat.cwl index 3c68178..000949d 100644 --- a/cwl/mergeBamDup/samtools_flagstat.cwl +++ b/cwl/mergeBamDup/samtools_flagstat.cwl @@ -1,19 +1,19 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- samtools -- flagstat -requirements: -- class: DockerRequirement - dockerPull: biocontainers/samtools:v1.7.0_cv3 -inputs: - bam: - type: File - inputBinding: - separate: true -outputs: - flagstat: - type: File - outputBinding: - glob: $(inputs.bam.nameroot).flagstat.txt -stdout: $(inputs.bam.nameroot).flagstat.txt +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- flagstat +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.15--h1170115_1 +inputs: + bam: + type: File + inputBinding: + separate: true +outputs: + flagstat: + type: File + outputBinding: + glob: $(inputs.bam.nameroot).flagstat.txt +stdout: $(inputs.bam.nameroot).flagstat.txt diff --git a/cwl/mergeBamDup/samtools_index.cwl b/cwl/mergeBamDup/samtools_index.cwl index f80966b..e779867 100644 --- a/cwl/mergeBamDup/samtools_index.cwl +++ b/cwl/mergeBamDup/samtools_index.cwl @@ -1,24 +1,24 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- samtools -- index -requirements: -- class: DockerRequirement - dockerPull: biocontainers/samtools:v1.7.0_cv3 -- class: InitialWorkDirRequirement - listing: - - $(inputs.bam) -inputs: - bam: - type: File - inputBinding: - position: 1 - separate: true -outputs: - idx: - type: File - secondaryFiles: - - .bai - outputBinding: - glob: $(inputs.bam.basename) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- index +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.12--h9aed4be_1 +- class: InitialWorkDirRequirement + listing: + - $(inputs.bam) +inputs: + bam: + type: File + inputBinding: + position: 1 + separate: true +outputs: + idx: + type: File + secondaryFiles: + - .bai + outputBinding: + glob: $(inputs.bam.basename) diff --git a/cwl/miRDeep2.cwl b/cwl/miRDeep2.cwl index 96fe14d..9964c9f 100644 --- a/cwl/miRDeep2.cwl +++ b/cwl/miRDeep2.cwl @@ -1,77 +1,77 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: miRDeep2.pl -requirements: -- class: DockerRequirement - dockerPull: hubentu/mirdeep2 -inputs: - reads: - type: File - inputBinding: - position: 1 - separate: true - genome: - type: File - inputBinding: - position: 2 - separate: true - mappings: - type: File - inputBinding: - position: 3 - separate: true - miRef: - type: - - File - - string - inputBinding: - position: 4 - separate: true - default: none - miOther: - type: - - File - - string - inputBinding: - position: 5 - separate: true - default: none - precursors: - type: - - File - - string - inputBinding: - position: 6 - separate: true - default: none - species: - type: string - inputBinding: - position: 7 - prefix: -t - separate: true -outputs: - csvfiles: - type: File[] - outputBinding: - glob: '*.csv' - htmls: - type: File[] - outputBinding: - glob: '*.html' - bed: - type: File - outputBinding: - glob: '*.bed' - expression: - type: Directory - outputBinding: - glob: expression_analyses - mirna_results: - type: Directory - outputBinding: - glob: mirna_results* - pdfs: - type: Directory - outputBinding: - glob: pdf* +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: miRDeep2.pl +requirements: +- class: DockerRequirement + dockerPull: hubentu/mirdeep2 +inputs: + reads: + type: File + inputBinding: + position: 1 + separate: true + genome: + type: File + inputBinding: + position: 2 + separate: true + mappings: + type: File + inputBinding: + position: 3 + separate: true + miRef: + type: + - File + - string + inputBinding: + position: 4 + separate: true + default: none + miOther: + type: + - File + - string + inputBinding: + position: 5 + separate: true + default: none + precursors: + type: + - File + - string + inputBinding: + position: 6 + separate: true + default: none + species: + type: string + inputBinding: + position: 7 + prefix: -t + separate: true +outputs: + csvfiles: + type: File[] + outputBinding: + glob: '*.csv' + htmls: + type: File[] + outputBinding: + glob: '*.html' + bed: + type: File + outputBinding: + glob: '*.bed' + expression: + type: Directory + outputBinding: + glob: expression_analyses + mirna_results: + type: Directory + outputBinding: + glob: mirna_results* + pdfs: + type: Directory + outputBinding: + glob: pdf* diff --git a/cwl/miRDeep2.yml b/cwl/miRDeep2.yml index b944d20..b2ba99c 100644 --- a/cwl/miRDeep2.yml +++ b/cwl/miRDeep2.yml @@ -1,3 +1,3 @@ -miRef: none -miOther: none -precursors: none +miRef: none +miOther: none +precursors: none diff --git a/cwl/miRDeep2PL/Mapper.cwl b/cwl/miRDeep2PL/Mapper.cwl index 3dc8645..1f26047 100644 --- a/cwl/miRDeep2PL/Mapper.cwl +++ b/cwl/miRDeep2PL/Mapper.cwl @@ -1,72 +1,72 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: mapper.pl -requirements: -- class: DockerRequirement - dockerPull: hubentu/mirdeep2 -- class: InlineJavascriptRequirement -arguments: -- valueFrom: -j - position: 8 -- valueFrom: -m - position: 9 -inputs: - reads: - type: File - inputBinding: - position: 1 - separate: true - format: - type: string - inputBinding: - position: 2 - separate: true - default: -c - adapter: - type: string - inputBinding: - position: 3 - prefix: -k - separate: true - len: - type: int - inputBinding: - position: 4 - prefix: -l - separate: true - default: 18 - genome: - type: File - secondaryFiles: - - $(self.nameroot + '.1.ebwt') - - $(self.nameroot + '.2.ebwt') - - $(self.nameroot + '.3.ebwt') - - $(self.nameroot + '.4.ebwt') - - $(self.nameroot + '.rev.1.ebwt') - - $(self.nameroot + '.rev.2.ebwt') - inputBinding: - position: 5 - prefix: -p - separate: true - valueFrom: $(self.dirname + '/' + self.nameroot) - preads: - type: string - inputBinding: - position: 6 - prefix: -s - separate: true - arf: - type: string - inputBinding: - position: 7 - prefix: -t - separate: true -outputs: - pReads: - type: File - outputBinding: - glob: $(inputs.preads) - Arf: - type: File - outputBinding: - glob: $(inputs.arf) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: mapper.pl +requirements: +- class: DockerRequirement + dockerPull: hubentu/mirdeep2 +- class: InlineJavascriptRequirement +arguments: +- valueFrom: -j + position: 8 +- valueFrom: -m + position: 9 +inputs: + reads: + type: File + inputBinding: + position: 1 + separate: true + format: + type: string + inputBinding: + position: 2 + separate: true + default: -c + adapter: + type: string + inputBinding: + position: 3 + prefix: -k + separate: true + len: + type: int + inputBinding: + position: 4 + prefix: -l + separate: true + default: 18 + genome: + type: File + secondaryFiles: + - $(self.nameroot + '.1.ebwt') + - $(self.nameroot + '.2.ebwt') + - $(self.nameroot + '.3.ebwt') + - $(self.nameroot + '.4.ebwt') + - $(self.nameroot + '.rev.1.ebwt') + - $(self.nameroot + '.rev.2.ebwt') + inputBinding: + position: 5 + prefix: -p + separate: true + valueFrom: $(self.dirname + '/' + self.nameroot) + preads: + type: string + inputBinding: + position: 6 + prefix: -s + separate: true + arf: + type: string + inputBinding: + position: 7 + prefix: -t + separate: true +outputs: + pReads: + type: File + outputBinding: + glob: $(inputs.preads) + Arf: + type: File + outputBinding: + glob: $(inputs.arf) diff --git a/cwl/miRDeep2PL/miRDeep2.cwl b/cwl/miRDeep2PL/miRDeep2.cwl index 96fe14d..9964c9f 100644 --- a/cwl/miRDeep2PL/miRDeep2.cwl +++ b/cwl/miRDeep2PL/miRDeep2.cwl @@ -1,77 +1,77 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: miRDeep2.pl -requirements: -- class: DockerRequirement - dockerPull: hubentu/mirdeep2 -inputs: - reads: - type: File - inputBinding: - position: 1 - separate: true - genome: - type: File - inputBinding: - position: 2 - separate: true - mappings: - type: File - inputBinding: - position: 3 - separate: true - miRef: - type: - - File - - string - inputBinding: - position: 4 - separate: true - default: none - miOther: - type: - - File - - string - inputBinding: - position: 5 - separate: true - default: none - precursors: - type: - - File - - string - inputBinding: - position: 6 - separate: true - default: none - species: - type: string - inputBinding: - position: 7 - prefix: -t - separate: true -outputs: - csvfiles: - type: File[] - outputBinding: - glob: '*.csv' - htmls: - type: File[] - outputBinding: - glob: '*.html' - bed: - type: File - outputBinding: - glob: '*.bed' - expression: - type: Directory - outputBinding: - glob: expression_analyses - mirna_results: - type: Directory - outputBinding: - glob: mirna_results* - pdfs: - type: Directory - outputBinding: - glob: pdf* +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: miRDeep2.pl +requirements: +- class: DockerRequirement + dockerPull: hubentu/mirdeep2 +inputs: + reads: + type: File + inputBinding: + position: 1 + separate: true + genome: + type: File + inputBinding: + position: 2 + separate: true + mappings: + type: File + inputBinding: + position: 3 + separate: true + miRef: + type: + - File + - string + inputBinding: + position: 4 + separate: true + default: none + miOther: + type: + - File + - string + inputBinding: + position: 5 + separate: true + default: none + precursors: + type: + - File + - string + inputBinding: + position: 6 + separate: true + default: none + species: + type: string + inputBinding: + position: 7 + prefix: -t + separate: true +outputs: + csvfiles: + type: File[] + outputBinding: + glob: '*.csv' + htmls: + type: File[] + outputBinding: + glob: '*.html' + bed: + type: File + outputBinding: + glob: '*.bed' + expression: + type: Directory + outputBinding: + glob: expression_analyses + mirna_results: + type: Directory + outputBinding: + glob: mirna_results* + pdfs: + type: Directory + outputBinding: + glob: pdf* diff --git a/cwl/miRDeep2PL/miRDeep2PL.cwl b/cwl/miRDeep2PL/miRDeep2PL.cwl index bb5506e..595699b 100644 --- a/cwl/miRDeep2PL/miRDeep2PL.cwl +++ b/cwl/miRDeep2PL/miRDeep2PL.cwl @@ -1,96 +1,97 @@ -cwlVersion: v1.0 -class: Workflow -requirements: -- class: StepInputExpressionRequirement -- class: InlineJavascriptRequirement -inputs: - reads: - type: File - format: - type: string - default: -c - adapter: - type: string - len: - type: int - default: 18 - genome: - type: File - secondaryFiles: - - $(self.nameroot + '.1.ebwt') - - $(self.nameroot + '.2.ebwt') - - $(self.nameroot + '.3.ebwt') - - $(self.nameroot + '.4.ebwt') - - $(self.nameroot + '.rev.1.ebwt') - - $(self.nameroot + '.rev.2.ebwt') - miRef: - type: - - File - - string - miOther: - type: - - File - - string - precursors: - type: - - File - - string - species: - type: string -outputs: - csvfiles: - type: File[] - outputSource: miRDeep2/csvfiles - htmls: - type: File[] - outputSource: miRDeep2/htmls - bed: - type: File - outputSource: miRDeep2/bed - expression: - type: Directory - outputSource: miRDeep2/expression - mirna_results: - type: Directory - outputSource: miRDeep2/mirna_results - pdfs: - type: Directory - outputSource: miRDeep2/pdfs - preads: - type: File - outputSource: Mapper/pReads - arf: - type: File - outputSource: Mapper/Arf -steps: - Mapper: - run: cwl/miRDeep2PL/Mapper.cwl - in: - reads: reads - format: format - adapter: adapter - genome: genome - preads: - valueFrom: $(inputs.reads.nameroot)_collapsed.fa - arf: - valueFrom: $(inputs.reads.nameroot)_collapsed.arf - out: - - pReads - - Arf - miRDeep2: - run: cwl/miRDeep2PL/miRDeep2.cwl - in: - reads: Mapper/pReads - genome: genome - mappings: Mapper/Arf - miRef: miRef - miOther: miOther - precursors: precursors - species: species - out: - - csvfiles - - htmls - - bed - - expression - - mirna_results - - pdfs +cwlVersion: v1.0 +class: Workflow +requirements: +- class: StepInputExpressionRequirement +- class: InlineJavascriptRequirement +inputs: + reads: + type: File + format: + type: string + default: -c + adapter: + type: string + len: + type: int + default: 18 + genome: + type: File + secondaryFiles: + - $(self.nameroot + '.1.ebwt') + - $(self.nameroot + '.2.ebwt') + - $(self.nameroot + '.3.ebwt') + - $(self.nameroot + '.4.ebwt') + - $(self.nameroot + '.rev.1.ebwt') + - $(self.nameroot + '.rev.2.ebwt') + miRef: + type: + - File + - string + miOther: + type: + - File + - string + precursors: + type: + - File + - string + species: + type: string +outputs: + csvfiles: + type: File[] + outputSource: miRDeep2/csvfiles + htmls: + type: File[] + outputSource: miRDeep2/htmls + bed: + type: File + outputSource: miRDeep2/bed + expression: + type: Directory + outputSource: miRDeep2/expression + mirna_results: + type: Directory + outputSource: miRDeep2/mirna_results + pdfs: + type: Directory + outputSource: miRDeep2/pdfs + preads: + type: File + outputSource: Mapper/pReads + arf: + type: File + outputSource: Mapper/Arf +steps: + Mapper: + run: Mapper.cwl + in: + reads: reads + format: format + adapter: adapter + genome: genome + len: len + preads: + valueFrom: $(inputs.reads.nameroot)_collapsed.fa + arf: + valueFrom: $(inputs.reads.nameroot)_collapsed.arf + out: + - pReads + - Arf + miRDeep2: + run: miRDeep2.cwl + in: + reads: Mapper/pReads + genome: genome + mappings: Mapper/Arf + miRef: miRef + miOther: miOther + precursors: precursors + species: species + out: + - csvfiles + - htmls + - bed + - expression + - mirna_results + - pdfs diff --git a/cwl/miRDeep2PL/miRDeep2PL.yml b/cwl/miRDeep2PL/miRDeep2PL.yml index 1aecc54..376e7f5 100644 --- a/cwl/miRDeep2PL/miRDeep2PL.yml +++ b/cwl/miRDeep2PL/miRDeep2PL.yml @@ -1,2 +1,2 @@ -format: -c -len: 18 +format: -c +len: 18 diff --git a/cwl/miRMapper.cwl b/cwl/miRMapper.cwl index 3dc8645..1f26047 100644 --- a/cwl/miRMapper.cwl +++ b/cwl/miRMapper.cwl @@ -1,72 +1,72 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: mapper.pl -requirements: -- class: DockerRequirement - dockerPull: hubentu/mirdeep2 -- class: InlineJavascriptRequirement -arguments: -- valueFrom: -j - position: 8 -- valueFrom: -m - position: 9 -inputs: - reads: - type: File - inputBinding: - position: 1 - separate: true - format: - type: string - inputBinding: - position: 2 - separate: true - default: -c - adapter: - type: string - inputBinding: - position: 3 - prefix: -k - separate: true - len: - type: int - inputBinding: - position: 4 - prefix: -l - separate: true - default: 18 - genome: - type: File - secondaryFiles: - - $(self.nameroot + '.1.ebwt') - - $(self.nameroot + '.2.ebwt') - - $(self.nameroot + '.3.ebwt') - - $(self.nameroot + '.4.ebwt') - - $(self.nameroot + '.rev.1.ebwt') - - $(self.nameroot + '.rev.2.ebwt') - inputBinding: - position: 5 - prefix: -p - separate: true - valueFrom: $(self.dirname + '/' + self.nameroot) - preads: - type: string - inputBinding: - position: 6 - prefix: -s - separate: true - arf: - type: string - inputBinding: - position: 7 - prefix: -t - separate: true -outputs: - pReads: - type: File - outputBinding: - glob: $(inputs.preads) - Arf: - type: File - outputBinding: - glob: $(inputs.arf) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: mapper.pl +requirements: +- class: DockerRequirement + dockerPull: hubentu/mirdeep2 +- class: InlineJavascriptRequirement +arguments: +- valueFrom: -j + position: 8 +- valueFrom: -m + position: 9 +inputs: + reads: + type: File + inputBinding: + position: 1 + separate: true + format: + type: string + inputBinding: + position: 2 + separate: true + default: -c + adapter: + type: string + inputBinding: + position: 3 + prefix: -k + separate: true + len: + type: int + inputBinding: + position: 4 + prefix: -l + separate: true + default: 18 + genome: + type: File + secondaryFiles: + - $(self.nameroot + '.1.ebwt') + - $(self.nameroot + '.2.ebwt') + - $(self.nameroot + '.3.ebwt') + - $(self.nameroot + '.4.ebwt') + - $(self.nameroot + '.rev.1.ebwt') + - $(self.nameroot + '.rev.2.ebwt') + inputBinding: + position: 5 + prefix: -p + separate: true + valueFrom: $(self.dirname + '/' + self.nameroot) + preads: + type: string + inputBinding: + position: 6 + prefix: -s + separate: true + arf: + type: string + inputBinding: + position: 7 + prefix: -t + separate: true +outputs: + pReads: + type: File + outputBinding: + glob: $(inputs.preads) + Arf: + type: File + outputBinding: + glob: $(inputs.arf) diff --git a/cwl/miRMapper.yml b/cwl/miRMapper.yml index 1aecc54..376e7f5 100644 --- a/cwl/miRMapper.yml +++ b/cwl/miRMapper.yml @@ -1,2 +1,2 @@ -format: -c -len: 18 +format: -c +len: 18 diff --git a/cwl/mosdepth.cwl b/cwl/mosdepth.cwl new file mode 100644 index 0000000..0f270ec --- /dev/null +++ b/cwl/mosdepth.cwl @@ -0,0 +1,35 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: mosdepth +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/mosdepth:0.3.3--h37c5b7d_2 +arguments: +- -x +inputs: + bedfile: + type: File + inputBinding: + prefix: --by + separate: true + ct: + type: string + inputBinding: + prefix: --thresholds + separate: true + fileID: + type: string + inputBinding: + position: 1 + separate: true + bamfile: + type: File + secondaryFiles: .bai + inputBinding: + position: 2 + separate: true +outputs: + out: + type: File[] + outputBinding: + glob: $(inputs.fileID)* diff --git a/cwl/mosdepth.yml b/cwl/mosdepth.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/mosdepth.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/SomaticCallers/FilterOBias.cwl b/cwl/msisensor_pro_msi.cwl similarity index 52% rename from cwl/SomaticCallers/FilterOBias.cwl rename to cwl/msisensor_pro_msi.cwl index c1f45d4..52671e2 100644 --- a/cwl/SomaticCallers/FilterOBias.cwl +++ b/cwl/msisensor_pro_msi.cwl @@ -1,38 +1,36 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- gatk -- FilterByOrientationBias -requirements: -- class: DockerRequirement - dockerPull: broadinstitute/gatk:latest -inputs: - vcf: - type: File - inputBinding: - prefix: -V - separate: true - art: - type: File - inputBinding: - prefix: -P - separate: true - mode: - type: - type: array - items: string - inputBinding: - prefix: --artifact-modes - separate: true - inputBinding: - separate: true - avcf: - type: string - inputBinding: - prefix: -O - separate: true -outputs: - fout: - type: File - outputBinding: - glob: $(inputs.avcf) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- msisensor-pro +- msi +requirements: +- class: DockerRequirement + dockerPull: pengjia1110/msisensor-pro +inputs: + site: + type: File + inputBinding: + prefix: -d + separate: true + nbam: + type: File + secondaryFiles: .bai + inputBinding: + prefix: -n + separate: true + tbam: + type: File + secondaryFiles: .bai + inputBinding: + prefix: -t + separate: true + outprefix: + type: string + inputBinding: + prefix: -o + separate: true +outputs: + outs: + type: File[] + outputBinding: + glob: $(inputs.outprefix)* diff --git a/cwl/msisensor_pro_msi.yml b/cwl/msisensor_pro_msi.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/msisensor_pro_msi.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/msisensor_pro_scan.cwl b/cwl/msisensor_pro_scan.cwl new file mode 100644 index 0000000..ed05d3d --- /dev/null +++ b/cwl/msisensor_pro_scan.cwl @@ -0,0 +1,25 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- msisensor-pro +- scan +requirements: +- class: DockerRequirement + dockerPull: pengjia1110/msisensor-pro +inputs: + ref: + type: File + secondaryFiles: .fai + inputBinding: + prefix: -d + separate: true + site: + type: string + inputBinding: + prefix: -o + separate: true +outputs: + outsite: + type: File + outputBinding: + glob: $(inputs.site) diff --git a/cwl/msisensor_pro_scan.yml b/cwl/msisensor_pro_scan.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/msisensor_pro_scan.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/multiqc.cwl b/cwl/multiqc.cwl index e2763ae..e889c5b 100644 --- a/cwl/multiqc.cwl +++ b/cwl/multiqc.cwl @@ -1,20 +1,20 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: multiqc -requirements: -- class: DockerRequirement - dockerPull: hubentu/rcwl-rnaseq -inputs: - dir: - type: Directory - inputBinding: - separate: true -outputs: - qc: - type: File - outputBinding: - glob: '*.html' - qcDat: - type: Directory - outputBinding: - glob: multiqc_data +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: multiqc +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/multiqc:1.11--pyhdfd78af_0 +inputs: + dir: + type: Directory + inputBinding: + separate: true +outputs: + qc: + type: File + outputBinding: + glob: '*.html' + qcDat: + type: Directory + outputBinding: + glob: multiqc_data diff --git a/cwl/multiqc.yml b/cwl/multiqc.yml index 0967ef4..69a88e3 100644 --- a/cwl/multiqc.yml +++ b/cwl/multiqc.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/mv.cwl b/cwl/mv.cwl new file mode 100644 index 0000000..1e3e487 --- /dev/null +++ b/cwl/mv.cwl @@ -0,0 +1,19 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: mv +inputs: + file1: + type: File + inputBinding: + position: 1 + separate: true + file2: + type: string + inputBinding: + position: 2 + separate: true +outputs: + mvfile: + type: File + outputBinding: + glob: $(inputs.file2) diff --git a/cwl/mv.yml b/cwl/mv.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/mv.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/mvOut.R b/cwl/mvOut.R index 5599d99..2642943 100644 --- a/cwl/mvOut.R +++ b/cwl/mvOut.R @@ -1,16 +1,15 @@ -.libPaths('/home/hq/R/x86_64-pc-linux-gnu-library/4.0') -suppressPackageStartupMessages(library(R.utils)) -suppressPackageStartupMessages(library(codetools)) -args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) -mvOut <- -function(logFile){ - log1 <- readLines(logFile) - startn <- grep('Final Outputs:', log1)+1 - endn <- grep('}$', log1) - endn <- endn[endn > startn][1] - logOut <- jsonlite::fromJSON(log1[startn:endn]) - logOut <- logOut[lengths(logOut)>0] - dir.create('output', showWarnings = FALSE) - lapply(logOut, function(x)file.rename(x, file.path('output', basename(x)))) -} -do.call(mvOut, args) +.libPaths(c('/projects/rpci/songliu/qhu/miniconda3/envs/r-base/lib/R/library')) +suppressPackageStartupMessages(library(R.utils)) +args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) +mvOut <- +function(logFile){ + log1 <- readLines(logFile) + startn <- grep('Final Outputs:', log1)+1 + endn <- grep('}$', log1) + endn <- endn[endn > startn][1] + logOut <- jsonlite::fromJSON(log1[startn:endn]) + logOut <- logOut[lengths(logOut)>0] + dir.create('output', showWarnings = FALSE) + lapply(logOut, function(x)file.rename(x, file.path('output', basename(x)))) +} +do.call(mvOut, args) diff --git a/cwl/mvOut.cwl b/cwl/mvOut.cwl index da5294d..7bd4d73 100644 --- a/cwl/mvOut.cwl +++ b/cwl/mvOut.cwl @@ -1,17 +1,38 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- Rscript -- cwl/mvOut.R -id: mvOut -inputs: - logFile: - type: File - inputBinding: - prefix: logFile= - separate: false -outputs: - OutDir: - type: Directory - outputBinding: - glob: output +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: Rscript +requirements: +- class: InitialWorkDirRequirement + listing: + - entryname: mvOut.R + entry: |- + .libPaths(c('/projects/rpci/songliu/qhu/miniconda3/envs/r-base/lib/R/library')) + suppressPackageStartupMessages(library(R.utils)) + args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) + mvOut <- + function(logFile){ + log1 <- readLines(logFile) + startn <- grep('Final Outputs:', log1)+1 + endn <- grep('}$', log1) + endn <- endn[endn > startn][1] + logOut <- jsonlite::fromJSON(log1[startn:endn]) + logOut <- logOut[lengths(logOut)>0] + dir.create('output', showWarnings = FALSE) + lapply(logOut, function(x)file.rename(x, file.path('output', basename(x)))) + } + do.call(mvOut, args) + writable: false +arguments: +- mvOut.R +id: mvOut +inputs: + logFile: + type: File + inputBinding: + prefix: logFile= + separate: false +outputs: + OutDir: + type: Directory + outputBinding: + glob: output diff --git a/cwl/mvOut.yml b/cwl/mvOut.yml index 0967ef4..69a88e3 100644 --- a/cwl/mvOut.yml +++ b/cwl/mvOut.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/neusomatic/call.cwl b/cwl/neusomatic/call.cwl index 01f3a46..c9f9fbb 100644 --- a/cwl/neusomatic/call.cwl +++ b/cwl/neusomatic/call.cwl @@ -1,38 +1,38 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- python -- /opt/neusomatic/neusomatic/python/call.py -requirements: -- class: DockerRequirement - dockerPull: msahraeian/neusomatic -arguments: -- --out -- '.' -- --ensemble -- --batch_size -- '100' -inputs: - candidates: - type: File[] - secondaryFiles: .idx - inputBinding: - prefix: --candidates_tsv - separate: true - ref: - type: File - secondaryFiles: .fai - inputBinding: - prefix: --reference - separate: true - checkpoint: - type: string - inputBinding: - prefix: --checkpoint - separate: true - default: /opt/neusomatic/neusomatic/models/NeuSomatic_v0.1.4_ensemble_SEQC-WGS-Spike.pth -outputs: - pred: - type: File - outputBinding: - glob: pred.vcf +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- python +- /opt/neusomatic/neusomatic/python/call.py +requirements: +- class: DockerRequirement + dockerPull: msahraeian/neusomatic +arguments: +- --out +- '.' +- --ensemble +- --batch_size +- '100' +inputs: + candidates: + type: File[] + secondaryFiles: .idx + inputBinding: + prefix: --candidates_tsv + separate: true + ref: + type: File + secondaryFiles: .fai + inputBinding: + prefix: --reference + separate: true + checkpoint: + type: string + inputBinding: + prefix: --checkpoint + separate: true + default: /opt/neusomatic/neusomatic/models/NeuSomatic_v0.1.4_ensemble_SEQC-WGS-Spike.pth +outputs: + pred: + type: File + outputBinding: + glob: pred.vcf diff --git a/cwl/neusomatic/neusomatic.cwl b/cwl/neusomatic/neusomatic.cwl index 23abc15..58916ff 100644 --- a/cwl/neusomatic/neusomatic.cwl +++ b/cwl/neusomatic/neusomatic.cwl @@ -1,56 +1,56 @@ -cwlVersion: v1.0 -class: Workflow -inputs: - tbam: - type: File - secondaryFiles: .bai - nbam: - type: File - secondaryFiles: .bai - ref: - type: File - secondaryFiles: .fai - region: - type: File - ensemble: - type: File - threads: - type: int - default: 2 - ovcf: - type: string -outputs: - outVcf: - type: File - outputSource: postprocess/oVcf -steps: - preprocess: - run: cwl/neusomatic/preprocess.cwl - in: - tbam: tbam - nbam: nbam - ref: ref - ensemble: ensemble - region: region - threads: threads - out: - - candidates - - fcandidates - call: - run: cwl/neusomatic/call.cwl - in: - candidates: preprocess/candidates - ref: ref - out: - - pred - postprocess: - run: cwl/neusomatic/postprocess.cwl - in: - ref: ref - tbam: tbam - pred: call/pred - fcandidates: preprocess/fcandidates - ensemble: ensemble - ovcf: ovcf - out: - - oVcf +cwlVersion: v1.0 +class: Workflow +inputs: + tbam: + type: File + secondaryFiles: .bai + nbam: + type: File + secondaryFiles: .bai + ref: + type: File + secondaryFiles: .fai + region: + type: File + ensemble: + type: File + threads: + type: int + default: 2 + ovcf: + type: string +outputs: + outVcf: + type: File + outputSource: postprocess/oVcf +steps: + preprocess: + run: preprocess.cwl + in: + tbam: tbam + nbam: nbam + ref: ref + ensemble: ensemble + region: region + threads: threads + out: + - candidates + - fcandidates + call: + run: call.cwl + in: + candidates: preprocess/candidates + ref: ref + out: + - pred + postprocess: + run: postprocess.cwl + in: + ref: ref + tbam: tbam + pred: call/pred + fcandidates: preprocess/fcandidates + ensemble: ensemble + ovcf: ovcf + out: + - oVcf diff --git a/cwl/neusomatic/neusomatic.yml b/cwl/neusomatic/neusomatic.yml index eb2be04..ce58b41 100644 --- a/cwl/neusomatic/neusomatic.yml +++ b/cwl/neusomatic/neusomatic.yml @@ -1 +1 @@ -threads: 2 +threads: 2 diff --git a/cwl/neusomatic/postprocess.cwl b/cwl/neusomatic/postprocess.cwl index 13ed9a6..dd994df 100644 --- a/cwl/neusomatic/postprocess.cwl +++ b/cwl/neusomatic/postprocess.cwl @@ -1,49 +1,49 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- python -- /opt/neusomatic/neusomatic/python/postprocess.py -requirements: -- class: DockerRequirement - dockerPull: msahraeian/neusomatic -arguments: -- --work -- '.' -inputs: - ref: - type: File - secondaryFiles: .fai - inputBinding: - prefix: --reference - separate: true - tbam: - type: File - secondaryFiles: .bai - inputBinding: - prefix: --tumor_bam - separate: true - pred: - type: File - inputBinding: - prefix: --pred_vcf - separate: true - fcandidates: - type: File - inputBinding: - prefix: --candidates_vcf - separate: true - ensemble: - type: File - inputBinding: - prefix: --ensemble_tsv - separate: true - ovcf: - type: string - inputBinding: - prefix: --output_vcf - separate: true -outputs: - oVcf: - type: File - outputBinding: - glob: $(inputs.ovcf) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- python +- /opt/neusomatic/neusomatic/python/postprocess.py +requirements: +- class: DockerRequirement + dockerPull: msahraeian/neusomatic +arguments: +- --work +- '.' +inputs: + ref: + type: File + secondaryFiles: .fai + inputBinding: + prefix: --reference + separate: true + tbam: + type: File + secondaryFiles: .bai + inputBinding: + prefix: --tumor_bam + separate: true + pred: + type: File + inputBinding: + prefix: --pred_vcf + separate: true + fcandidates: + type: File + inputBinding: + prefix: --candidates_vcf + separate: true + ensemble: + type: File + inputBinding: + prefix: --ensemble_tsv + separate: true + ovcf: + type: string + inputBinding: + prefix: --output_vcf + separate: true +outputs: + oVcf: + type: File + outputBinding: + glob: $(inputs.ovcf) diff --git a/cwl/neusomatic/preprocess.cwl b/cwl/neusomatic/preprocess.cwl index 5edfebf..8a24ccd 100644 --- a/cwl/neusomatic/preprocess.cwl +++ b/cwl/neusomatic/preprocess.cwl @@ -1,71 +1,71 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- python -- /opt/neusomatic/neusomatic/python/preprocess.py -requirements: -- class: DockerRequirement - dockerPull: msahraeian/neusomatic -- class: ShellCommandRequirement -arguments: -- --mode -- call -- --work -- '.' -- --scan_alignments_binary -- /opt/neusomatic/neusomatic/bin/scan_alignments -- valueFrom: '&& for i in `ls dataset/*/*tsv*`; do can=`echo $i | sed ''s/\/candidates/_candidates/''`; - cp $i $can;done' - position: 10 - shellQuote: false -inputs: - tbam: - type: File - secondaryFiles: .bai - inputBinding: - prefix: --tumor_bam - separate: true - nbam: - type: File - secondaryFiles: .bai - inputBinding: - prefix: --normal_bam - separate: true - ref: - type: File - secondaryFiles: .fai - inputBinding: - prefix: --reference - separate: true - region: - type: File - inputBinding: - prefix: --region_bed - separate: true - ensemble: - type: File - inputBinding: - prefix: --ensemble_tsv - separate: true - mapq: - type: int - inputBinding: - prefix: --min_mapq - separate: true - default: 10 - threads: - type: int - inputBinding: - prefix: --num_threads - separate: true - default: 2 -outputs: - candidates: - type: File[] - secondaryFiles: .idx - outputBinding: - glob: dataset/work*candidates*.tsv - fcandidates: - type: File - outputBinding: - glob: work_tumor/filtered_candidates.vcf +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- python +- /opt/neusomatic/neusomatic/python/preprocess.py +requirements: +- class: DockerRequirement + dockerPull: msahraeian/neusomatic +- class: ShellCommandRequirement +arguments: +- --mode +- call +- --work +- '.' +- --scan_alignments_binary +- /opt/neusomatic/neusomatic/bin/scan_alignments +- valueFrom: '&& for i in `ls dataset/*/*tsv*`; do can=`echo $i | sed ''s/\/candidates/_candidates/''`; + cp $i $can;done' + position: 10 + shellQuote: false +inputs: + tbam: + type: File + secondaryFiles: .bai + inputBinding: + prefix: --tumor_bam + separate: true + nbam: + type: File + secondaryFiles: .bai + inputBinding: + prefix: --normal_bam + separate: true + ref: + type: File + secondaryFiles: .fai + inputBinding: + prefix: --reference + separate: true + region: + type: File + inputBinding: + prefix: --region_bed + separate: true + ensemble: + type: File + inputBinding: + prefix: --ensemble_tsv + separate: true + mapq: + type: int + inputBinding: + prefix: --min_mapq + separate: true + default: 10 + threads: + type: int + inputBinding: + prefix: --num_threads + separate: true + default: 2 +outputs: + candidates: + type: File[] + secondaryFiles: .idx + outputBinding: + glob: dataset/work*candidates*.tsv + fcandidates: + type: File + outputBinding: + glob: work_tumor/filtered_candidates.vcf diff --git a/cwl/neusomatic_call.cwl b/cwl/neusomatic_call.cwl index 01f3a46..c9f9fbb 100644 --- a/cwl/neusomatic_call.cwl +++ b/cwl/neusomatic_call.cwl @@ -1,38 +1,38 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- python -- /opt/neusomatic/neusomatic/python/call.py -requirements: -- class: DockerRequirement - dockerPull: msahraeian/neusomatic -arguments: -- --out -- '.' -- --ensemble -- --batch_size -- '100' -inputs: - candidates: - type: File[] - secondaryFiles: .idx - inputBinding: - prefix: --candidates_tsv - separate: true - ref: - type: File - secondaryFiles: .fai - inputBinding: - prefix: --reference - separate: true - checkpoint: - type: string - inputBinding: - prefix: --checkpoint - separate: true - default: /opt/neusomatic/neusomatic/models/NeuSomatic_v0.1.4_ensemble_SEQC-WGS-Spike.pth -outputs: - pred: - type: File - outputBinding: - glob: pred.vcf +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- python +- /opt/neusomatic/neusomatic/python/call.py +requirements: +- class: DockerRequirement + dockerPull: msahraeian/neusomatic +arguments: +- --out +- '.' +- --ensemble +- --batch_size +- '100' +inputs: + candidates: + type: File[] + secondaryFiles: .idx + inputBinding: + prefix: --candidates_tsv + separate: true + ref: + type: File + secondaryFiles: .fai + inputBinding: + prefix: --reference + separate: true + checkpoint: + type: string + inputBinding: + prefix: --checkpoint + separate: true + default: /opt/neusomatic/neusomatic/models/NeuSomatic_v0.1.4_ensemble_SEQC-WGS-Spike.pth +outputs: + pred: + type: File + outputBinding: + glob: pred.vcf diff --git a/cwl/neusomatic_call.yml b/cwl/neusomatic_call.yml index cf91506..718669c 100644 --- a/cwl/neusomatic_call.yml +++ b/cwl/neusomatic_call.yml @@ -1 +1 @@ -checkpoint: /opt/neusomatic/neusomatic/models/NeuSomatic_v0.1.4_ensemble_SEQC-WGS-Spike.pth +checkpoint: /opt/neusomatic/neusomatic/models/NeuSomatic_v0.1.4_ensemble_SEQC-WGS-Spike.pth diff --git a/cwl/neusomatic_postprocess.cwl b/cwl/neusomatic_postprocess.cwl index 13ed9a6..dd994df 100644 --- a/cwl/neusomatic_postprocess.cwl +++ b/cwl/neusomatic_postprocess.cwl @@ -1,49 +1,49 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- python -- /opt/neusomatic/neusomatic/python/postprocess.py -requirements: -- class: DockerRequirement - dockerPull: msahraeian/neusomatic -arguments: -- --work -- '.' -inputs: - ref: - type: File - secondaryFiles: .fai - inputBinding: - prefix: --reference - separate: true - tbam: - type: File - secondaryFiles: .bai - inputBinding: - prefix: --tumor_bam - separate: true - pred: - type: File - inputBinding: - prefix: --pred_vcf - separate: true - fcandidates: - type: File - inputBinding: - prefix: --candidates_vcf - separate: true - ensemble: - type: File - inputBinding: - prefix: --ensemble_tsv - separate: true - ovcf: - type: string - inputBinding: - prefix: --output_vcf - separate: true -outputs: - oVcf: - type: File - outputBinding: - glob: $(inputs.ovcf) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- python +- /opt/neusomatic/neusomatic/python/postprocess.py +requirements: +- class: DockerRequirement + dockerPull: msahraeian/neusomatic +arguments: +- --work +- '.' +inputs: + ref: + type: File + secondaryFiles: .fai + inputBinding: + prefix: --reference + separate: true + tbam: + type: File + secondaryFiles: .bai + inputBinding: + prefix: --tumor_bam + separate: true + pred: + type: File + inputBinding: + prefix: --pred_vcf + separate: true + fcandidates: + type: File + inputBinding: + prefix: --candidates_vcf + separate: true + ensemble: + type: File + inputBinding: + prefix: --ensemble_tsv + separate: true + ovcf: + type: string + inputBinding: + prefix: --output_vcf + separate: true +outputs: + oVcf: + type: File + outputBinding: + glob: $(inputs.ovcf) diff --git a/cwl/neusomatic_postprocess.yml b/cwl/neusomatic_postprocess.yml index 0967ef4..69a88e3 100644 --- a/cwl/neusomatic_postprocess.yml +++ b/cwl/neusomatic_postprocess.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/neusomatic_preprocess.cwl b/cwl/neusomatic_preprocess.cwl index 5edfebf..8a24ccd 100644 --- a/cwl/neusomatic_preprocess.cwl +++ b/cwl/neusomatic_preprocess.cwl @@ -1,71 +1,71 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- python -- /opt/neusomatic/neusomatic/python/preprocess.py -requirements: -- class: DockerRequirement - dockerPull: msahraeian/neusomatic -- class: ShellCommandRequirement -arguments: -- --mode -- call -- --work -- '.' -- --scan_alignments_binary -- /opt/neusomatic/neusomatic/bin/scan_alignments -- valueFrom: '&& for i in `ls dataset/*/*tsv*`; do can=`echo $i | sed ''s/\/candidates/_candidates/''`; - cp $i $can;done' - position: 10 - shellQuote: false -inputs: - tbam: - type: File - secondaryFiles: .bai - inputBinding: - prefix: --tumor_bam - separate: true - nbam: - type: File - secondaryFiles: .bai - inputBinding: - prefix: --normal_bam - separate: true - ref: - type: File - secondaryFiles: .fai - inputBinding: - prefix: --reference - separate: true - region: - type: File - inputBinding: - prefix: --region_bed - separate: true - ensemble: - type: File - inputBinding: - prefix: --ensemble_tsv - separate: true - mapq: - type: int - inputBinding: - prefix: --min_mapq - separate: true - default: 10 - threads: - type: int - inputBinding: - prefix: --num_threads - separate: true - default: 2 -outputs: - candidates: - type: File[] - secondaryFiles: .idx - outputBinding: - glob: dataset/work*candidates*.tsv - fcandidates: - type: File - outputBinding: - glob: work_tumor/filtered_candidates.vcf +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- python +- /opt/neusomatic/neusomatic/python/preprocess.py +requirements: +- class: DockerRequirement + dockerPull: msahraeian/neusomatic +- class: ShellCommandRequirement +arguments: +- --mode +- call +- --work +- '.' +- --scan_alignments_binary +- /opt/neusomatic/neusomatic/bin/scan_alignments +- valueFrom: '&& for i in `ls dataset/*/*tsv*`; do can=`echo $i | sed ''s/\/candidates/_candidates/''`; + cp $i $can;done' + position: 10 + shellQuote: false +inputs: + tbam: + type: File + secondaryFiles: .bai + inputBinding: + prefix: --tumor_bam + separate: true + nbam: + type: File + secondaryFiles: .bai + inputBinding: + prefix: --normal_bam + separate: true + ref: + type: File + secondaryFiles: .fai + inputBinding: + prefix: --reference + separate: true + region: + type: File + inputBinding: + prefix: --region_bed + separate: true + ensemble: + type: File + inputBinding: + prefix: --ensemble_tsv + separate: true + mapq: + type: int + inputBinding: + prefix: --min_mapq + separate: true + default: 10 + threads: + type: int + inputBinding: + prefix: --num_threads + separate: true + default: 2 +outputs: + candidates: + type: File[] + secondaryFiles: .idx + outputBinding: + glob: dataset/work*candidates*.tsv + fcandidates: + type: File + outputBinding: + glob: work_tumor/filtered_candidates.vcf diff --git a/cwl/neusomatic_preprocess.yml b/cwl/neusomatic_preprocess.yml index 43e9f3f..6e72f47 100644 --- a/cwl/neusomatic_preprocess.yml +++ b/cwl/neusomatic_preprocess.yml @@ -1,2 +1,2 @@ -mapq: 10 -threads: 2 +mapq: 10 +threads: 2 diff --git a/cwl/nudup.cwl b/cwl/nudup.cwl new file mode 100644 index 0000000..bf8a505 --- /dev/null +++ b/cwl/nudup.cwl @@ -0,0 +1,40 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: nudup.py +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/nudup:2.3.3--py_2 +inputs: + index: + type: File + inputBinding: + prefix: -f + separate: true + paired: + type: boolean? + inputBinding: + prefix: '-2' + separate: true + out: + type: string + inputBinding: + prefix: -o + separate: true + sam: + type: File + inputBinding: + position: 10 + separate: true +outputs: + mbam: + type: File + outputBinding: + glob: $(inputs.out).sorted.markdup.bam + dbam: + type: File + outputBinding: + glob: $(inputs.out).sorted.dedup.bam + report: + type: File + outputBinding: + glob: '*log.txt' diff --git a/cwl/nudup.yml b/cwl/nudup.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/nudup.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/octopus_somatic.cwl b/cwl/octopus_somatic.cwl new file mode 100644 index 0000000..7ca323f --- /dev/null +++ b/cwl/octopus_somatic.cwl @@ -0,0 +1,71 @@ +cwlVersion: v1.2 +class: CommandLineTool +baseCommand: octopus +requirements: +- class: DockerRequirement + dockerPull: dancooke/octopus +arguments: +- --forest +- /opt/octopus/resources/forests/germline.v0.7.4.forest +- --somatic-forest +- /opt/octopus/resources/forests/somatic.v0.7.4.forest +inputs: + bams: + type: File[] + secondaryFiles: + - .bai? + - ^.bai? + inputBinding: + prefix: -I + separate: true + ref: + type: File + secondaryFiles: .fai + inputBinding: + prefix: -R + separate: true + normal: + type: string + inputBinding: + prefix: -N + separate: true + ovcf: + type: string + inputBinding: + prefix: -o + separate: true + region: + type: File? + inputBinding: + prefix: -t + separate: true + error: + type: string? + inputBinding: + prefix: --sequence-error-model + separate: true + threads: + type: int? + inputBinding: + prefix: --threads + separate: true + expFreq: + type: float? + inputBinding: + prefix: --min-expected-somatic-frequency + separate: true + creFreq: + type: float? + inputBinding: + prefix: --min-credible-somatic-frequency + separate: true + annotation: + type: string[]? + inputBinding: + prefix: --annotations + separate: true +outputs: + oVcf: + type: File + outputBinding: + glob: $(inputs.ovcf) diff --git a/cwl/octopus_somatic.yml b/cwl/octopus_somatic.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/octopus_somatic.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/Mutect2PL/ColSeqArtifact.cwl b/cwl/oncokb_CnaAnnotator.cwl similarity index 54% rename from cwl/Mutect2PL/ColSeqArtifact.cwl rename to cwl/oncokb_CnaAnnotator.cwl index 5784cea..a987d8d 100644 --- a/cwl/Mutect2PL/ColSeqArtifact.cwl +++ b/cwl/oncokb_CnaAnnotator.cwl @@ -1,35 +1,34 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- gatk -- CollectSequencingArtifactMetrics -requirements: -- class: DockerRequirement - dockerPull: broadinstitute/gatk:latest -inputs: - bam: - type: File - inputBinding: - prefix: -I - separate: true - ref: - type: File - inputBinding: - prefix: -R - separate: true - ext: - type: string - inputBinding: - prefix: --FILE_EXTENSION - separate: true - default: .txt - art: - type: string - inputBinding: - prefix: -O - separate: true -outputs: - aout: - type: File - outputBinding: - glob: $(inputs.art).pre_adapter_detail_metrics.txt +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- python +- /opt/CnaAnnotator.py +requirements: +- class: DockerRequirement + dockerPull: hubentu/oncokb-annotator +inputs: + input: + type: File + inputBinding: + prefix: -i + separate: true + output: + type: string + inputBinding: + prefix: -o + separate: true + clinic: + type: File? + inputBinding: + prefix: -c + separate: true + token: + type: string + inputBinding: + prefix: -b + separate: true +outputs: + ofile: + type: File + outputBinding: + glob: $(inputs.output) diff --git a/cwl/oncokb_CnaAnnotator.yml b/cwl/oncokb_CnaAnnotator.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/oncokb_CnaAnnotator.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/oncokb_FusionAnnotator.cwl b/cwl/oncokb_FusionAnnotator.cwl new file mode 100644 index 0000000..bb54be7 --- /dev/null +++ b/cwl/oncokb_FusionAnnotator.cwl @@ -0,0 +1,34 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- python +- /opt/FusionAnnotator.py +requirements: +- class: DockerRequirement + dockerPull: hubentu/oncokb-annotator +inputs: + input: + type: File + inputBinding: + prefix: -i + separate: true + output: + type: string + inputBinding: + prefix: -o + separate: true + clinic: + type: File? + inputBinding: + prefix: -c + separate: true + token: + type: string + inputBinding: + prefix: -b + separate: true +outputs: + ofile: + type: File + outputBinding: + glob: $(inputs.output) diff --git a/cwl/oncokb_FusionAnnotator.yml b/cwl/oncokb_FusionAnnotator.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/oncokb_FusionAnnotator.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/oncokb_MafAnnotator.cwl b/cwl/oncokb_MafAnnotator.cwl new file mode 100644 index 0000000..6c53227 --- /dev/null +++ b/cwl/oncokb_MafAnnotator.cwl @@ -0,0 +1,34 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- python +- /opt/MafAnnotator.py +requirements: +- class: DockerRequirement + dockerPull: hubentu/oncokb-annotator +inputs: + input: + type: File + inputBinding: + prefix: -i + separate: true + output: + type: string + inputBinding: + prefix: -o + separate: true + clinic: + type: File? + inputBinding: + prefix: -c + separate: true + token: + type: string + inputBinding: + prefix: -b + separate: true +outputs: + ofile: + type: File + outputBinding: + glob: $(inputs.output) diff --git a/cwl/oncokb_MafAnnotator.yml b/cwl/oncokb_MafAnnotator.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/oncokb_MafAnnotator.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/oncokb_StructuralVariantAnnotator.cwl b/cwl/oncokb_StructuralVariantAnnotator.cwl new file mode 100644 index 0000000..53e8c7f --- /dev/null +++ b/cwl/oncokb_StructuralVariantAnnotator.cwl @@ -0,0 +1,34 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- python +- /opt/StructuralVariantAnnotator.py +requirements: +- class: DockerRequirement + dockerPull: hubentu/oncokb-annotator +inputs: + input: + type: File + inputBinding: + prefix: -i + separate: true + output: + type: string + inputBinding: + prefix: -o + separate: true + clinic: + type: File? + inputBinding: + prefix: -c + separate: true + token: + type: string + inputBinding: + prefix: -b + separate: true +outputs: + ofile: + type: File + outputBinding: + glob: $(inputs.output) diff --git a/cwl/oncokb_StructuralVariantAnnotator.yml b/cwl/oncokb_StructuralVariantAnnotator.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/oncokb_StructuralVariantAnnotator.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/phaseVcf/ReadBackedPhasing.cwl b/cwl/phaseVcf/ReadBackedPhasing.cwl index 05ab13c..a79c2e6 100644 --- a/cwl/phaseVcf/ReadBackedPhasing.cwl +++ b/cwl/phaseVcf/ReadBackedPhasing.cwl @@ -1,46 +1,46 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- java -- -jar -- /usr/GenomeAnalysisTK.jar -- -T -- ReadBackedPhasing -requirements: -- class: DockerRequirement - dockerPull: broadinstitute/gatk3:3.8-1 -inputs: - vcf: - type: File - inputBinding: - prefix: --variant - separate: true - bam: - type: File - secondaryFiles: .bai - inputBinding: - prefix: -I - separate: true - ref: - type: File - secondaryFiles: - - .fai - - $(self.nameroot).dict - inputBinding: - prefix: -R - separate: true - ovcf: - type: string - inputBinding: - prefix: -o - separate: true - region: - type: File - inputBinding: - prefix: -L - separate: true -outputs: - oVcf: - type: File - outputBinding: - glob: $(inputs.ovcf) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- java +- -jar +- /usr/GenomeAnalysisTK.jar +- -T +- ReadBackedPhasing +requirements: +- class: DockerRequirement + dockerPull: broadinstitute/gatk3:3.8-1 +inputs: + vcf: + type: File + inputBinding: + prefix: --variant + separate: true + bam: + type: File + secondaryFiles: .bai + inputBinding: + prefix: -I + separate: true + ref: + type: File + secondaryFiles: + - .fai + - $(self.nameroot).dict + inputBinding: + prefix: -R + separate: true + ovcf: + type: string + inputBinding: + prefix: -o + separate: true + region: + type: File + inputBinding: + prefix: -L + separate: true +outputs: + oVcf: + type: File + outputBinding: + glob: $(inputs.ovcf) diff --git a/cwl/phaseVcf/bgzip.cwl b/cwl/phaseVcf/bgzip.cwl index 8d9129b..a3f9938 100644 --- a/cwl/phaseVcf/bgzip.cwl +++ b/cwl/phaseVcf/bgzip.cwl @@ -1,19 +1,19 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- bgzip -- -c -requirements: -- class: DockerRequirement - dockerPull: biocontainers/tabix:v1.3.2-2-deb_cv1 -inputs: - ifile: - type: File - inputBinding: - separate: true -outputs: - zfile: - type: File - outputBinding: - glob: $(inputs.ifile.basename).gz -stdout: $(inputs.ifile.basename).gz +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- bgzip +- -c +requirements: +- class: DockerRequirement + dockerPull: biocontainers/tabix:v1.3.2-2-deb_cv1 +inputs: + ifile: + type: File + inputBinding: + separate: true +outputs: + zfile: + type: File + outputBinding: + glob: $(inputs.ifile.basename).gz +stdout: $(inputs.ifile.basename).gz diff --git a/cwl/phaseVcf/combineVariants.cwl b/cwl/phaseVcf/combineVariants.cwl index d4dad3b..ce4f5a1 100644 --- a/cwl/phaseVcf/combineVariants.cwl +++ b/cwl/phaseVcf/combineVariants.cwl @@ -1,41 +1,41 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- java -- -jar -- /usr/GenomeAnalysisTK.jar -- -T -- CombineVariants -requirements: -- class: DockerRequirement - dockerPull: broadinstitute/gatk3:3.8-1 -arguments: -- --assumeIdenticalSamples -inputs: - variants: - type: - type: array - items: File - inputBinding: - prefix: --variant - separate: true - inputBinding: - separate: true - ref: - type: File - secondaryFiles: - - .fai - - $(self.nameroot).dict - inputBinding: - prefix: -R - separate: true - ovcf: - type: string - inputBinding: - prefix: -o - separate: true -outputs: - oVcf: - type: File - outputBinding: - glob: $(inputs.ovcf) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- java +- -jar +- /usr/GenomeAnalysisTK.jar +- -T +- CombineVariants +requirements: +- class: DockerRequirement + dockerPull: broadinstitute/gatk3:3.8-1 +arguments: +- --assumeIdenticalSamples +inputs: + variants: + type: + type: array + items: File + inputBinding: + prefix: --variant + separate: true + inputBinding: + separate: true + ref: + type: File + secondaryFiles: + - .fai + - $(self.nameroot).dict + inputBinding: + prefix: -R + separate: true + ovcf: + type: string + inputBinding: + prefix: -o + separate: true +outputs: + oVcf: + type: File + outputBinding: + glob: $(inputs.ovcf) diff --git a/cwl/phaseVcf/phaseVcf.cwl b/cwl/phaseVcf/phaseVcf.cwl index fdcb469..d190623 100644 --- a/cwl/phaseVcf/phaseVcf.cwl +++ b/cwl/phaseVcf/phaseVcf.cwl @@ -1,106 +1,106 @@ -cwlVersion: v1.0 -class: Workflow -requirements: -- class: InlineJavascriptRequirement -- class: StepInputExpressionRequirement -- class: MultipleInputFeatureRequirement -inputs: - gvariant: - type: File - secondaryFiles: .tbi - svariant: - type: File - secondaryFiles: .tbi - ref: - type: File - secondaryFiles: - - .fai - - $(self.nameroot).dict - bam: - type: File - secondaryFiles: .bai - outvcf: - type: string - nsample: - type: string - tsample: - type: string -outputs: - pvcf: - type: File - outputSource: tabixIndex/idx -steps: - splitSample: - run: cwl/phaseVcf/splitSample.cwl - in: - vcf: gvariant - sample: nsample - fout: - valueFrom: $(inputs.sample)_germline.vcf - genotype: - valueFrom: ^miss - exclude: - valueFrom: GT='0/0' - out: - - Fout - renameGVcf: - run: cwl/phaseVcf/renameGVcf.cwl - in: - vcf: splitSample/Fout - ovcf: - valueFrom: $(inputs.vcf.nameroot)_g.vcf - NewName: tsample - out: - - oVcf - renameSVcf: - run: cwl/phaseVcf/renameSVcf.cwl - in: - vcf: svariant - ovcf: - valueFrom: $(inputs.vcf.nameroot)_s.vcf - NewName: tsample - out: - - oVcf - combineVariants: - run: cwl/phaseVcf/combineVariants.cwl - in: - variants: - - renameGVcf/oVcf - - renameSVcf/oVcf - ref: ref - ovcf: - valueFrom: combined_somatic_germline.vcf - out: - - oVcf - sortVcf: - run: cwl/phaseVcf/sortVcf.cwl - in: - vcf: combineVariants/oVcf - ovcf: - valueFrom: $(inputs.vcf.nameroot)_sorted.vcf - out: - - oVcf - ReadBackedPhasing: - run: cwl/phaseVcf/ReadBackedPhasing.cwl - in: - vcf: sortVcf/oVcf - bam: bam - ref: ref - region: sortVcf/oVcf - ovcf: outvcf - out: - - oVcf - bgzip: - run: cwl/phaseVcf/bgzip.cwl - in: - ifile: ReadBackedPhasing/oVcf - out: - - zfile - tabixIndex: - run: cwl/phaseVcf/tabixIndex.cwl - in: - tfile: bgzip/zfile - type: - valueFrom: vcf - out: - - idx +cwlVersion: v1.0 +class: Workflow +requirements: +- class: InlineJavascriptRequirement +- class: StepInputExpressionRequirement +- class: MultipleInputFeatureRequirement +inputs: + gvariant: + type: File + secondaryFiles: .tbi + svariant: + type: File + secondaryFiles: .tbi + ref: + type: File + secondaryFiles: + - .fai + - $(self.nameroot).dict + bam: + type: File + secondaryFiles: .bai + outvcf: + type: string + nsample: + type: string + tsample: + type: string +outputs: + pvcf: + type: File + outputSource: tabixIndex/idx +steps: + splitSample: + run: splitSample.cwl + in: + vcf: gvariant + sample: nsample + fout: + valueFrom: $(inputs.sample)_germline.vcf + genotype: + valueFrom: ^miss + exclude: + valueFrom: GT='0/0' + out: + - Fout + renameGVcf: + run: renameGVcf.cwl + in: + vcf: splitSample/Fout + ovcf: + valueFrom: $(inputs.vcf.nameroot)_g.vcf + NewName: tsample + out: + - oVcf + renameSVcf: + run: renameSVcf.cwl + in: + vcf: svariant + ovcf: + valueFrom: $(inputs.vcf.nameroot)_s.vcf + NewName: tsample + out: + - oVcf + combineVariants: + run: combineVariants.cwl + in: + variants: + - renameGVcf/oVcf + - renameSVcf/oVcf + ref: ref + ovcf: + valueFrom: combined_somatic_germline.vcf + out: + - oVcf + sortVcf: + run: sortVcf.cwl + in: + vcf: combineVariants/oVcf + ovcf: + valueFrom: $(inputs.vcf.nameroot)_sorted.vcf + out: + - oVcf + ReadBackedPhasing: + run: ReadBackedPhasing.cwl + in: + vcf: sortVcf/oVcf + bam: bam + ref: ref + region: sortVcf/oVcf + ovcf: outvcf + out: + - oVcf + bgzip: + run: bgzip.cwl + in: + ifile: ReadBackedPhasing/oVcf + out: + - zfile + tabixIndex: + run: tabixIndex.cwl + in: + tfile: bgzip/zfile + type: + valueFrom: vcf + out: + - idx diff --git a/cwl/phaseVcf/phaseVcf.yml b/cwl/phaseVcf/phaseVcf.yml index 0967ef4..69a88e3 100644 --- a/cwl/phaseVcf/phaseVcf.yml +++ b/cwl/phaseVcf/phaseVcf.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/phaseVcf/renameGVcf.cwl b/cwl/phaseVcf/renameGVcf.cwl index bf41fe8..49c5999 100644 --- a/cwl/phaseVcf/renameGVcf.cwl +++ b/cwl/phaseVcf/renameGVcf.cwl @@ -1,29 +1,29 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- picard -- RenameSampleInVcf -requirements: -- class: DockerRequirement - dockerPull: quay.io/biocontainers/picard:2.21.1--0 -inputs: - vcf: - type: File - inputBinding: - prefix: I= - separate: false - ovcf: - type: string - inputBinding: - prefix: O= - separate: false - NewName: - type: string - inputBinding: - prefix: NEW_SAMPLE_NAME= - separate: false -outputs: - oVcf: - type: File - outputBinding: - glob: $(inputs.ovcf) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- picard +- RenameSampleInVcf +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/picard:2.21.1--0 +inputs: + vcf: + type: File + inputBinding: + prefix: I= + separate: false + ovcf: + type: string + inputBinding: + prefix: O= + separate: false + NewName: + type: string + inputBinding: + prefix: NEW_SAMPLE_NAME= + separate: false +outputs: + oVcf: + type: File + outputBinding: + glob: $(inputs.ovcf) diff --git a/cwl/phaseVcf/renameSVcf.cwl b/cwl/phaseVcf/renameSVcf.cwl index bf41fe8..49c5999 100644 --- a/cwl/phaseVcf/renameSVcf.cwl +++ b/cwl/phaseVcf/renameSVcf.cwl @@ -1,29 +1,29 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- picard -- RenameSampleInVcf -requirements: -- class: DockerRequirement - dockerPull: quay.io/biocontainers/picard:2.21.1--0 -inputs: - vcf: - type: File - inputBinding: - prefix: I= - separate: false - ovcf: - type: string - inputBinding: - prefix: O= - separate: false - NewName: - type: string - inputBinding: - prefix: NEW_SAMPLE_NAME= - separate: false -outputs: - oVcf: - type: File - outputBinding: - glob: $(inputs.ovcf) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- picard +- RenameSampleInVcf +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/picard:2.21.1--0 +inputs: + vcf: + type: File + inputBinding: + prefix: I= + separate: false + ovcf: + type: string + inputBinding: + prefix: O= + separate: false + NewName: + type: string + inputBinding: + prefix: NEW_SAMPLE_NAME= + separate: false +outputs: + oVcf: + type: File + outputBinding: + glob: $(inputs.ovcf) diff --git a/cwl/phaseVcf/sortVcf.cwl b/cwl/phaseVcf/sortVcf.cwl index a0d8323..68b2bb7 100644 --- a/cwl/phaseVcf/sortVcf.cwl +++ b/cwl/phaseVcf/sortVcf.cwl @@ -1,31 +1,31 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- java -- -jar -- /usr/picard/picard.jar -- SortVcf -requirements: -- class: DockerRequirement - dockerPull: broadinstitute/picard -inputs: - vcf: - type: File - inputBinding: - prefix: I= - separate: false - ovcf: - type: string - inputBinding: - prefix: O= - separate: false - dict: - type: File? - inputBinding: - prefix: SD= - separate: false -outputs: - oVcf: - type: File - outputBinding: - glob: $(inputs.ovcf) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- java +- -jar +- /usr/picard/picard.jar +- SortVcf +requirements: +- class: DockerRequirement + dockerPull: broadinstitute/picard +inputs: + vcf: + type: File + inputBinding: + prefix: I= + separate: false + ovcf: + type: string + inputBinding: + prefix: O= + separate: false + dict: + type: File? + inputBinding: + prefix: SD= + separate: false +outputs: + oVcf: + type: File + outputBinding: + glob: $(inputs.ovcf) diff --git a/cwl/phaseVcf/splitSample.cwl b/cwl/phaseVcf/splitSample.cwl index 476bd81..4297877 100644 --- a/cwl/phaseVcf/splitSample.cwl +++ b/cwl/phaseVcf/splitSample.cwl @@ -1,60 +1,60 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- bcftools -- view -requirements: -- class: DockerRequirement - dockerPull: biocontainers/bcftools:v1.5_cv3 -inputs: - vcf: - type: File - inputBinding: - separate: true - filter: - type: string? - inputBinding: - prefix: -f - separate: true - default: PASS - fout: - type: string - inputBinding: - prefix: -o - separate: true - otype: - type: string? - inputBinding: - prefix: -O - separate: true - default: v - sample: - type: string? - inputBinding: - prefix: -s - separate: true - samplefile: - type: File? - inputBinding: - prefix: -S - separate: true - genotype: - type: string? - inputBinding: - prefix: -g - separate: true - include: - type: string? - inputBinding: - prefix: -i - separate: true - exclude: - type: string? - inputBinding: - prefix: -e - separate: true -outputs: - Fout: - type: File - outputBinding: - glob: $(inputs.fout) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- bcftools +- view +requirements: +- class: DockerRequirement + dockerPull: biocontainers/bcftools:v1.5_cv3 +inputs: + vcf: + type: File + inputBinding: + separate: true + filter: + type: string? + inputBinding: + prefix: -f + separate: true + default: PASS + fout: + type: string + inputBinding: + prefix: -o + separate: true + otype: + type: string? + inputBinding: + prefix: -O + separate: true + default: v + sample: + type: string? + inputBinding: + prefix: -s + separate: true + samplefile: + type: File? + inputBinding: + prefix: -S + separate: true + genotype: + type: string? + inputBinding: + prefix: -g + separate: true + include: + type: string? + inputBinding: + prefix: -i + separate: true + exclude: + type: string? + inputBinding: + prefix: -e + separate: true +outputs: + Fout: + type: File + outputBinding: + glob: $(inputs.fout) diff --git a/cwl/phaseVcf/tabixIndex.cwl b/cwl/phaseVcf/tabixIndex.cwl index f506ee0..591a0ea 100644 --- a/cwl/phaseVcf/tabixIndex.cwl +++ b/cwl/phaseVcf/tabixIndex.cwl @@ -1,28 +1,28 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: tabix -requirements: -- class: DockerRequirement - dockerPull: biocontainers/tabix:v1.3.2-2-deb_cv1 -- class: InitialWorkDirRequirement - listing: - - $(inputs.tfile) -inputs: - tfile: - type: File - inputBinding: - position: 1 - separate: true - type: - type: string - inputBinding: - prefix: -p - separate: true - default: vcf -outputs: - idx: - type: File - secondaryFiles: - - .tbi - outputBinding: - glob: $(inputs.tfile.basename) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: tabix +requirements: +- class: DockerRequirement + dockerPull: biocontainers/tabix:v1.3.2-2-deb_cv1 +- class: InitialWorkDirRequirement + listing: + - $(inputs.tfile) +inputs: + tfile: + type: File + inputBinding: + position: 1 + separate: true + type: + type: string + inputBinding: + prefix: -p + separate: true + default: vcf +outputs: + idx: + type: File + secondaryFiles: + - .tbi + outputBinding: + glob: $(inputs.tfile.basename) diff --git a/cwl/pl_vcfExpression.R b/cwl/pl_vcfExpression.R deleted file mode 100644 index 49c0d49..0000000 --- a/cwl/pl_vcfExpression.R +++ /dev/null @@ -1,12 +0,0 @@ -.libPaths('/home/hq/R/x86_64-pc-linux-gnu-library/4.0') -suppressPackageStartupMessages(library(R.utils)) -suppressPackageStartupMessages(library(codetools)) -args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) -pl_vcfExpression <- -function(afile) { - exp1 <- read.table(afile, header = TRUE, stringsAsFactors = FALSE) - exp1[,1] <- sub("\\|ENSG.*", "", exp1[,1]) - write.table(exp1, file = "abundance_clean.tsv", - row.names = FALSE, quote = FALSE, sep = "\t") -} -do.call(pl_vcfExpression, args) diff --git a/cwl/pl_vcfExpression.cwl b/cwl/pl_vcfExpression.cwl deleted file mode 100644 index 9c2d2a1..0000000 --- a/cwl/pl_vcfExpression.cwl +++ /dev/null @@ -1,16 +0,0 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- Rscript -- cwl/pl_vcfExpression.R -inputs: - afile: - type: File - inputBinding: - prefix: afile= - separate: false -outputs: - aout: - type: File - outputBinding: - glob: abundance_clean.tsv diff --git a/cwl/polysolver.cwl b/cwl/polysolver.cwl index 9b8143d..63862ef 100644 --- a/cwl/polysolver.cwl +++ b/cwl/polysolver.cwl @@ -1,53 +1,53 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- bash -- /home/polysolver/scripts/shell_call_hla_type -requirements: -- class: DockerRequirement - dockerPull: sachet/polysolver:v4 -arguments: -- valueFrom: $(runtime.outdir) - position: 7 -inputs: - bam: - type: File - secondaryFiles: .bai - inputBinding: - position: 1 - separate: true - race: - type: string - inputBinding: - position: 2 - separate: true - default: Unknown - includeFreq: - type: int - inputBinding: - position: 3 - separate: true - default: 1 - build: - type: string - inputBinding: - position: 4 - separate: true - default: hg19 - format: - type: string - inputBinding: - position: 5 - separate: true - default: STDFQ - insertCalc: - type: int - inputBinding: - position: 6 - separate: true - default: 0 -outputs: - hla: - type: File - outputBinding: - glob: '*.hla.txt' +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- bash +- /home/polysolver/scripts/shell_call_hla_type +requirements: +- class: DockerRequirement + dockerPull: sachet/polysolver:v4 +arguments: +- valueFrom: $(runtime.outdir) + position: 7 +inputs: + bam: + type: File + secondaryFiles: .bai + inputBinding: + position: 1 + separate: true + race: + type: string + inputBinding: + position: 2 + separate: true + default: Unknown + includeFreq: + type: int + inputBinding: + position: 3 + separate: true + default: 1 + build: + type: string + inputBinding: + position: 4 + separate: true + default: hg19 + format: + type: string + inputBinding: + position: 5 + separate: true + default: STDFQ + insertCalc: + type: int + inputBinding: + position: 6 + separate: true + default: 0 +outputs: + hla: + type: File + outputBinding: + glob: '*.hla.txt' diff --git a/cwl/polysolver.yml b/cwl/polysolver.yml index 46840c7..3dc6467 100644 --- a/cwl/polysolver.yml +++ b/cwl/polysolver.yml @@ -1,5 +1,5 @@ -race: Unknown -includeFreq: 1 -build: hg19 -format: STDFQ -insertCalc: 0 +race: Unknown +includeFreq: 1 +build: hg19 +format: STDFQ +insertCalc: 0 diff --git a/cwl/pvacseq.cwl b/cwl/pvacseq.cwl index 1d91cad..241f997 100644 --- a/cwl/pvacseq.cwl +++ b/cwl/pvacseq.cwl @@ -1,56 +1,56 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- pvacseq -- run -requirements: -- class: DockerRequirement - dockerPull: griffithlab/pvactools -inputs: - ivcf: - type: File - secondaryFiles: .tbi - inputBinding: - position: 1 - separate: true - sample: - type: string - inputBinding: - position: 2 - separate: true - allele: - type: string[] - inputBinding: - position: 3 - separate: true - itemSeparator: ',' - algorithms: - type: string[] - inputBinding: - position: 4 - separate: true - outdir: - type: string - inputBinding: - position: 5 - separate: true - default: pvacseq_out - length: - type: string - inputBinding: - position: 6 - prefix: -e - separate: true - default: '8,9,10,11' - phasedVcf: - type: File? - secondaryFiles: .tbi - inputBinding: - position: 7 - prefix: -p - separate: true -outputs: - Out: - type: Directory - outputBinding: - glob: $(inputs.outdir) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- pvacseq +- run +requirements: +- class: DockerRequirement + dockerPull: griffithlab/pvactools +inputs: + ivcf: + type: File + secondaryFiles: .tbi + inputBinding: + position: 1 + separate: true + sample: + type: string + inputBinding: + position: 2 + separate: true + allele: + type: string[] + inputBinding: + position: 3 + separate: true + itemSeparator: ',' + algorithms: + type: string[] + inputBinding: + position: 4 + separate: true + outdir: + type: string + inputBinding: + position: 5 + separate: true + default: pvacseq_out + length: + type: string + inputBinding: + position: 6 + prefix: -e + separate: true + default: '8,9,10,11' + phasedVcf: + type: File? + secondaryFiles: .tbi + inputBinding: + position: 7 + prefix: -p + separate: true +outputs: + Out: + type: Directory + outputBinding: + glob: $(inputs.outdir) diff --git a/cwl/pvacseq.yml b/cwl/pvacseq.yml index 790bc40..783b00e 100644 --- a/cwl/pvacseq.yml +++ b/cwl/pvacseq.yml @@ -1,2 +1,2 @@ -outdir: pvacseq_out -length: '8,9,10,11' +outdir: pvacseq_out +length: '8,9,10,11' diff --git a/cwl/rMATS.cwl b/cwl/rMATS.cwl index 3986473..c6088d1 100644 --- a/cwl/rMATS.cwl +++ b/cwl/rMATS.cwl @@ -1,58 +1,133 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: rmats_bam.sh -requirements: -- class: DockerRequirement - dockerPull: hubentu/rmats -inputs: - bam1: - type: File[] - inputBinding: - position: 1 - separate: true - itemSeparator: ',' - bam2: - type: File[] - inputBinding: - position: 2 - separate: true - itemSeparator: ',' - type: - type: string - inputBinding: - position: 3 - separate: true - default: paired - readLength: - type: int - inputBinding: - position: 4 - separate: true - gtf: - type: File - inputBinding: - position: 5 - separate: true - od: - type: string? - inputBinding: - position: 6 - separate: true - default: ./ - threads: - type: int - inputBinding: - position: 7 - separate: true - default: 4 - tstat: - type: int? - inputBinding: - position: 8 - separate: true - default: 4 -outputs: - res: - type: File[] - outputBinding: - glob: '*.txt' +cwlVersion: v1.0 +class: CommandLineTool +requirements: +- class: DockerRequirement + dockerPull: xinglab/rmats +- class: InlineJavascriptRequirement +- class: InitialWorkDirRequirement + listing: + - entryname: bam1 + entry: ${var x='';for(var i=0;i0){ + cr <- coverage(ranges(a1)) + if(length(cr) < end(gr[i])){ + cr <- c(cr, rep(0, end(gr[i]) - length(cr))) + } + cov1 <- cr[start(gr[i]):end(gr[i])] + cov <- c(cov, cov1) + } + } + cov <- unlist(RleList(cov)) + + ct <- as.integer(unlist(strsplit(ct, split = ","))) + cts <- sapply(ct, function(x)mean(cov>=x)) + csum <- c(mean(cov), cts) + csum <- rbind(csum) + colnames(csum) <- c("mean", paste0(">=", ct)) + write.csv(csum, paste0(sub(".bam", "", basename(bam)), "_cov.csv"), row.names=FALSE) +} +do.call(rbamCoverage, args) diff --git a/cwl/rbamCoverage.cwl b/cwl/rbamCoverage.cwl new file mode 100644 index 0000000..1edfbd9 --- /dev/null +++ b/cwl/rbamCoverage.cwl @@ -0,0 +1,50 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: Rscript +requirements: +- class: InitialWorkDirRequirement + listing: + - entryname: rbamCoverage.R + entry: ".libPaths(c('/projects/rpci/songliu/qhu/miniconda3/envs/r-base/lib/R/library'))\nsuppressPackageStartupMessages(library(R.utils))\nargs + <- commandArgs(trailingOnly = TRUE, asValues = TRUE)\nrbamCoverage <-\nfunction(bam, + bed, ct = \"1000,10000\"){\n library(GenomicAlignments)\n bed <- read.table(bed)\n + \ gr <- GRanges(bed[,1], IRanges(bed[,2]+1, bed[,3]))\n gr <- reduce(gr)\n + \ cov <- c()\n for(i in 1:length(gr)){\n a1 <- readGAlignments(bam, + param = ScanBamParam(which=gr[i]))\n if(length(a1)>0){\n cr + <- coverage(ranges(a1))\n if(length(cr) < end(gr[i])){\n cr + <- c(cr, rep(0, end(gr[i]) - length(cr)))\n }\n cov1 <- + cr[start(gr[i]):end(gr[i])]\n cov <- c(cov, cov1)\n }\n }\n + \ cov <- unlist(RleList(cov))\n \n ct <- as.integer(unlist(strsplit(ct, + split = \",\")))\n cts <- sapply(ct, function(x)mean(cov>=x))\n csum <- + c(mean(cov), cts)\n csum <- rbind(csum)\n colnames(csum) <- c(\"mean\", + paste0(\">=\", ct))\n write.csv(csum, paste0(sub(\".bam\", \"\", basename(bam)), + \"_cov.csv\"), row.names=FALSE)\n}\ndo.call(rbamCoverage, args)" + writable: false +arguments: +- rbamCoverage.R +inputs: + bam: + type: File + secondaryFiles: .bai + inputBinding: + position: 1 + prefix: bam= + separate: false + bed: + type: File + inputBinding: + position: 2 + prefix: bed= + separate: false + ct: + type: string[] + inputBinding: + position: 3 + prefix: ct= + separate: false + itemSeparator: ',' +outputs: + cov: + type: File + outputBinding: + glob: '*_cov.csv' diff --git a/cwl/rbamCoverage.yml b/cwl/rbamCoverage.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/rbamCoverage.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/read_distribution.cwl b/cwl/read_distribution.cwl index d311e10..30c1c65 100644 --- a/cwl/read_distribution.cwl +++ b/cwl/read_distribution.cwl @@ -1,23 +1,24 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: read_distribution.py -requirements: -- class: DockerRequirement - dockerPull: hubentu/rcwl-rnaseq -inputs: - bam: - type: File - inputBinding: - prefix: -i - separate: true - bed: - type: File - inputBinding: - prefix: -r - separate: true -outputs: - distOut: - type: File - outputBinding: - glob: $(inputs.bam.nameroot).distribution.txt -stdout: $(inputs.bam.nameroot).distribution.txt +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: read_distribution.py +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/rseqc:4.0.0--py38h4a8c8d9_1 +inputs: + bam: + type: File + secondaryFiles: .bai + inputBinding: + prefix: -i + separate: true + bed: + type: File + inputBinding: + prefix: -r + separate: true +outputs: + distOut: + type: File + outputBinding: + glob: $(inputs.bam.nameroot).distribution.txt +stdout: $(inputs.bam.nameroot).distribution.txt diff --git a/cwl/read_distribution.yml b/cwl/read_distribution.yml index 0967ef4..69a88e3 100644 --- a/cwl/read_distribution.yml +++ b/cwl/read_distribution.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/rnaseq/STAR.cwl b/cwl/rnaseq/STAR.cwl new file mode 100644 index 0000000..30162fd --- /dev/null +++ b/cwl/rnaseq/STAR.cwl @@ -0,0 +1,64 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: STAR +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/star:2.7.9a--h9ee0642_0 +arguments: +- --outSAMunmapped +- Within +- --outSAMstrandField +- intronMotif +- --outSAMtype +- BAM +- SortedByCoordinate +- --twopassMode +- Unsorted +- --quantMode +- GeneCounts +inputs: + prefix: + type: string + inputBinding: + prefix: --outFileNamePrefix + separate: true + readFilesIn: + type: File[] + inputBinding: + prefix: --readFilesIn + separate: true + genomeDir: + type: Directory + inputBinding: + prefix: --genomeDir + separate: true + sjdbGTFfile: + type: File + inputBinding: + prefix: --sjdbGTFfile + separate: true + runThreadN: + type: int + inputBinding: + prefix: --runThreadN + separate: true + default: 1 + readFileCommand: + type: string + inputBinding: + prefix: --readFilesCommand + separate: true + default: zcat +outputs: + outBAM: + type: File + outputBinding: + glob: '*.bam' + outLog: + type: File + outputBinding: + glob: '*Log.final.out' + outCount: + type: File + outputBinding: + glob: '*ReadsPerGene.out.tab' diff --git a/cwl/rnaseq/collapse_annotation.cwl b/cwl/rnaseq/collapse_annotation.cwl new file mode 100644 index 0000000..c0dcaa1 --- /dev/null +++ b/cwl/rnaseq/collapse_annotation.cwl @@ -0,0 +1,29 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- python +- /opt/collapse_annotation.py +requirements: +- class: DockerRequirement + dockerPull: hubentu/collapse_annotation +inputs: + gtf: + type: File + inputBinding: + position: 1 + separate: true + out: + type: string + inputBinding: + position: 2 + separate: true + blacklist: + type: File? + inputBinding: + prefix: --transcript_blacklist + separate: true +outputs: + gtfout: + type: File + outputBinding: + glob: $(inputs.out) diff --git a/cwl/rnaseq/fastqc.cwl b/cwl/rnaseq/fastqc.cwl new file mode 100644 index 0000000..c0ce9bc --- /dev/null +++ b/cwl/rnaseq/fastqc.cwl @@ -0,0 +1,19 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: fastqc +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/fastqc:0.12.1--hdfd78af_0 +arguments: +- --outdir +- ./ +inputs: + seqfile: + type: File + inputBinding: + separate: true +outputs: + QCfile: + type: File + outputBinding: + glob: '*.zip' diff --git a/cwl/rnaseq/featureCounts.cwl b/cwl/rnaseq/featureCounts.cwl new file mode 100644 index 0000000..f17e8f0 --- /dev/null +++ b/cwl/rnaseq/featureCounts.cwl @@ -0,0 +1,30 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: featureCounts +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/subread:2.0.1--h7132678_2 +arguments: +- -p +- --countReadPairs +inputs: + gtf: + type: File + inputBinding: + prefix: -a + separate: true + count: + type: string + inputBinding: + prefix: -o + separate: true + bam: + type: File + inputBinding: + separate: true +outputs: + Count: + type: File + secondaryFiles: .summary + outputBinding: + glob: $(inputs.count) diff --git a/cwl/rnaseq/rnaseq.cwl b/cwl/rnaseq/rnaseq.cwl new file mode 100644 index 0000000..cb36698 --- /dev/null +++ b/cwl/rnaseq/rnaseq.cwl @@ -0,0 +1,120 @@ +cwlVersion: v1.0 +class: Workflow +requirements: +- class: ScatterFeatureRequirement +- class: SubworkflowFeatureRequirement +- class: StepInputExpressionRequirement +inputs: + in_seqfiles: + type: File[] + in_prefix: + type: string + in_genomeDir: + type: Directory + in_GTFfile: + type: File + in_runThreadN: + type: int + default: 1 +outputs: + out_fastqc: + type: File[] + outputSource: fastqc/QCfile + out_BAM: + type: File + outputSource: samtools_index/idx + out_Log: + type: File + outputSource: STAR/outLog + out_Count: + type: File + outputSource: STAR/outCount + out_stat: + type: File + outputSource: samtools_flagstat/flagstat + out_count: + type: File + outputSource: featureCounts/Count + QCout: + type: File[] + outputSource: rnaseqc/qcOut + out_tpm: + type: File[] + outputSource: tpm/out + out_ent: + type: File[] + outputSource: tpm/ent + out_uni: + type: File[] + outputSource: tpm/uni +steps: + fastqc: + run: fastqc.cwl + in: + seqfile: in_seqfiles + out: + - QCfile + scatter: seqfile + STAR: + run: STAR.cwl + in: + prefix: in_prefix + genomeDir: in_genomeDir + sjdbGTFfile: in_GTFfile + readFilesIn: in_seqfiles + runThreadN: in_runThreadN + out: + - outBAM + - outLog + - outCount + sortBam: + run: sortBam.cwl + in: + bam: STAR/outBAM + out: + - sbam + samtools_index: + run: samtools_index.cwl + in: + bam: sortBam/sbam + out: + - idx + samtools_flagstat: + run: samtools_flagstat.cwl + in: + bam: sortBam/sbam + out: + - flagstat + featureCounts: + run: featureCounts.cwl + in: + gtf: in_GTFfile + bam: samtools_index/idx + count: + valueFrom: $(inputs.bam.nameroot).featureCounts.txt + out: + - Count + collapse_annotation: + run: collapse_annotation.cwl + in: + gtf: in_GTFfile + out: + valueFrom: collapse_annotation.gtf + out: + - gtfout + rnaseqc: + run: rnaseqc.cwl + in: + gtf: collapse_annotation/gtfout + bam: sortBam/sbam + out: + - qcOut + tpm: + run: tpm.cwl + in: + bam: samtools_index/idx + gtf: in_GTFfile + out: + - out + - ent + - uni diff --git a/cwl/rnaseq/rnaseq.yml b/cwl/rnaseq/rnaseq.yml new file mode 100644 index 0000000..dde43db --- /dev/null +++ b/cwl/rnaseq/rnaseq.yml @@ -0,0 +1 @@ +in_runThreadN: 1 diff --git a/cwl/rnaseq/rnaseqc.cwl b/cwl/rnaseq/rnaseqc.cwl new file mode 100644 index 0000000..0dfb25e --- /dev/null +++ b/cwl/rnaseq/rnaseqc.cwl @@ -0,0 +1,33 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: rnaseqc +requirements: +- class: DockerRequirement + dockerPull: gcr.io/broad-cga-aarong-gtex/rnaseqc:latest +inputs: + gtf: + type: File + inputBinding: + position: 1 + separate: true + bam: + type: File + inputBinding: + position: 2 + separate: true + bed: + type: File? + inputBinding: + prefix: --bed + separate: true + out: + type: string? + inputBinding: + position: 9 + separate: true + default: '.' +outputs: + qcOut: + type: File[] + outputBinding: + glob: $(inputs.bam.nameroot)* diff --git a/cwl/rnaseq/samtools_flagstat.cwl b/cwl/rnaseq/samtools_flagstat.cwl new file mode 100644 index 0000000..000949d --- /dev/null +++ b/cwl/rnaseq/samtools_flagstat.cwl @@ -0,0 +1,19 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- flagstat +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.15--h1170115_1 +inputs: + bam: + type: File + inputBinding: + separate: true +outputs: + flagstat: + type: File + outputBinding: + glob: $(inputs.bam.nameroot).flagstat.txt +stdout: $(inputs.bam.nameroot).flagstat.txt diff --git a/cwl/rnaseq/samtools_index.cwl b/cwl/rnaseq/samtools_index.cwl new file mode 100644 index 0000000..e779867 --- /dev/null +++ b/cwl/rnaseq/samtools_index.cwl @@ -0,0 +1,24 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- index +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.12--h9aed4be_1 +- class: InitialWorkDirRequirement + listing: + - $(inputs.bam) +inputs: + bam: + type: File + inputBinding: + position: 1 + separate: true +outputs: + idx: + type: File + secondaryFiles: + - .bai + outputBinding: + glob: $(inputs.bam.basename) diff --git a/cwl/bwaAlign/sortBam.cwl b/cwl/rnaseq/sortBam.cwl similarity index 95% rename from cwl/bwaAlign/sortBam.cwl rename to cwl/rnaseq/sortBam.cwl index bc3d45d..df3d4ba 100644 --- a/cwl/bwaAlign/sortBam.cwl +++ b/cwl/rnaseq/sortBam.cwl @@ -1,19 +1,19 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- samtools -- sort -requirements: -- class: DockerRequirement - dockerPull: biocontainers/samtools:v1.7.0_cv3 -inputs: - bam: - type: File - inputBinding: - separate: true -outputs: - sbam: - type: File - outputBinding: - glob: $(inputs.bam.nameroot).sorted.bam -stdout: $(inputs.bam.nameroot).sorted.bam +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- sort +requirements: +- class: DockerRequirement + dockerPull: biocontainers/samtools:v1.7.0_cv3 +inputs: + bam: + type: File + inputBinding: + separate: true +outputs: + sbam: + type: File + outputBinding: + glob: $(inputs.bam.nameroot).sorted.bam +stdout: $(inputs.bam.nameroot).sorted.bam diff --git a/cwl/rnaseq/tpm.cwl b/cwl/rnaseq/tpm.cwl new file mode 100644 index 0000000..a5f5124 --- /dev/null +++ b/cwl/rnaseq/tpm.cwl @@ -0,0 +1,42 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: TPMCalculator +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/tpmcalculator:0.0.4--hf393df8_3 +inputs: + bam: + type: File + inputBinding: + prefix: -b + separate: true + gtf: + type: File + inputBinding: + prefix: -g + separate: true + paired: + type: boolean? + inputBinding: + prefix: -p + separate: true + default: true + all: + type: boolean? + inputBinding: + prefix: -a + separate: true + default: true +outputs: + out: + type: File[] + outputBinding: + glob: '*.out' + ent: + type: File[]? + outputBinding: + glob: '*.ent' + uni: + type: File[]? + outputBinding: + glob: '*.uni' diff --git a/cwl/rnaseq_Sf/STAR.cwl b/cwl/rnaseq_Sf/STAR.cwl index b6bf874..30162fd 100644 --- a/cwl/rnaseq_Sf/STAR.cwl +++ b/cwl/rnaseq_Sf/STAR.cwl @@ -1,64 +1,64 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: STAR -requirements: -- class: DockerRequirement - dockerPull: hubentu/rcwl-rnaseq -arguments: -- --outFilterMultimapNmax -- '3' -- --outSAMunmapped -- Within -- --outFilterMismatchNmax -- '2' -- --outSAMstrandField -- intronMotif -- --readFilesCommand -- zcat -- --outSAMtype -- BAM -- Unsorted -- --twopassMode -- Basic -- --quantMode -- GeneCounts -inputs: - prefix: - type: string - inputBinding: - prefix: --outFileNamePrefix - separate: true - readFilesIn: - type: File[] - inputBinding: - prefix: --readFilesIn - separate: true - genomeDir: - type: Directory - inputBinding: - prefix: --genomeDir - separate: true - sjdbGTFfile: - type: File - inputBinding: - prefix: --sjdbGTFfile - separate: true - runThreadN: - type: int - inputBinding: - prefix: --runThreadN - separate: true - default: 1 -outputs: - outBAM: - type: File - outputBinding: - glob: '*.bam' - outLog: - type: File - outputBinding: - glob: '*Log.final.out' - outCount: - type: File - outputBinding: - glob: '*ReadsPerGene.out.tab' +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: STAR +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/star:2.7.9a--h9ee0642_0 +arguments: +- --outSAMunmapped +- Within +- --outSAMstrandField +- intronMotif +- --outSAMtype +- BAM +- SortedByCoordinate +- --twopassMode +- Unsorted +- --quantMode +- GeneCounts +inputs: + prefix: + type: string + inputBinding: + prefix: --outFileNamePrefix + separate: true + readFilesIn: + type: File[] + inputBinding: + prefix: --readFilesIn + separate: true + genomeDir: + type: Directory + inputBinding: + prefix: --genomeDir + separate: true + sjdbGTFfile: + type: File + inputBinding: + prefix: --sjdbGTFfile + separate: true + runThreadN: + type: int + inputBinding: + prefix: --runThreadN + separate: true + default: 1 + readFileCommand: + type: string + inputBinding: + prefix: --readFilesCommand + separate: true + default: zcat +outputs: + outBAM: + type: File + outputBinding: + glob: '*.bam' + outLog: + type: File + outputBinding: + glob: '*Log.final.out' + outCount: + type: File + outputBinding: + glob: '*ReadsPerGene.out.tab' diff --git a/cwl/rnaseq_Sf/fastqc.cwl b/cwl/rnaseq_Sf/fastqc.cwl index f068b16..c0ce9bc 100644 --- a/cwl/rnaseq_Sf/fastqc.cwl +++ b/cwl/rnaseq_Sf/fastqc.cwl @@ -1,19 +1,19 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: fastqc -requirements: -- class: DockerRequirement - dockerPull: hubentu/rcwl-rnaseq -arguments: -- --outdir -- ./ -inputs: - seqfile: - type: File - inputBinding: - separate: true -outputs: - QCfile: - type: File - outputBinding: - glob: '*.zip' +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: fastqc +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/fastqc:0.12.1--hdfd78af_0 +arguments: +- --outdir +- ./ +inputs: + seqfile: + type: File + inputBinding: + separate: true +outputs: + QCfile: + type: File + outputBinding: + glob: '*.zip' diff --git a/cwl/rnaseq_Sf/featureCounts.cwl b/cwl/rnaseq_Sf/featureCounts.cwl index 5a8f0ec..f17e8f0 100644 --- a/cwl/rnaseq_Sf/featureCounts.cwl +++ b/cwl/rnaseq_Sf/featureCounts.cwl @@ -1,27 +1,30 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: featureCounts -requirements: -- class: DockerRequirement - dockerPull: hubentu/rcwl-rnaseq -inputs: - gtf: - type: File - inputBinding: - prefix: -a - separate: true - count: - type: string - inputBinding: - prefix: -o - separate: true - bam: - type: File - inputBinding: - separate: true -outputs: - Count: - type: File - secondaryFiles: .summary - outputBinding: - glob: $(inputs.count) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: featureCounts +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/subread:2.0.1--h7132678_2 +arguments: +- -p +- --countReadPairs +inputs: + gtf: + type: File + inputBinding: + prefix: -a + separate: true + count: + type: string + inputBinding: + prefix: -o + separate: true + bam: + type: File + inputBinding: + separate: true +outputs: + Count: + type: File + secondaryFiles: .summary + outputBinding: + glob: $(inputs.count) diff --git a/cwl/rnaseq_Sf/gCoverage.cwl b/cwl/rnaseq_Sf/gCoverage.cwl index 054cd3c..ed9c24b 100644 --- a/cwl/rnaseq_Sf/gCoverage.cwl +++ b/cwl/rnaseq_Sf/gCoverage.cwl @@ -1,31 +1,31 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: geneBody_coverage.py -requirements: -- class: DockerRequirement - dockerPull: hubentu/rcwl-rnaseq -inputs: - bam: - type: File - inputBinding: - prefix: -i - separate: true - bed: - type: File - inputBinding: - prefix: -r - separate: true - prefix: - type: string - inputBinding: - prefix: -o - separate: true -outputs: - gCovPDF: - type: File - outputBinding: - glob: '*.geneBodyCoverage.curves.pdf' - gCovTXT: - type: File - outputBinding: - glob: '*.geneBodyCoverage.txt' +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: geneBody_coverage.py +requirements: +- class: DockerRequirement + dockerPull: hubentu/rcwl-rnaseq +inputs: + bam: + type: File + inputBinding: + prefix: -i + separate: true + bed: + type: File + inputBinding: + prefix: -r + separate: true + prefix: + type: string + inputBinding: + prefix: -o + separate: true +outputs: + gCovPDF: + type: File + outputBinding: + glob: '*.geneBodyCoverage.curves.pdf' + gCovTXT: + type: File + outputBinding: + glob: '*.geneBodyCoverage.txt' diff --git a/cwl/rnaseq_Sf/genePredToBed.cwl b/cwl/rnaseq_Sf/genePredToBed.cwl index da07d22..33ff2a7 100644 --- a/cwl/rnaseq_Sf/genePredToBed.cwl +++ b/cwl/rnaseq_Sf/genePredToBed.cwl @@ -1,22 +1,22 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: genePredToBed -requirements: -- class: DockerRequirement - dockerPull: hubentu/rcwl-rnaseq -inputs: - genePred: - type: File - inputBinding: - position: 1 - separate: true - Bed: - type: string - inputBinding: - position: 2 - separate: true -outputs: - bed: - type: File - outputBinding: - glob: $(inputs.Bed) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: genePredToBed +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/ucsc-genepredtobed:377--h0b8a92a_4 +inputs: + genePred: + type: File + inputBinding: + position: 1 + separate: true + Bed: + type: string + inputBinding: + position: 2 + separate: true +outputs: + bed: + type: File + outputBinding: + glob: $(inputs.Bed) diff --git a/cwl/rnaseq_Sf/gtfToGenePred.cwl b/cwl/rnaseq_Sf/gtfToGenePred.cwl index 59fd07a..d14f104 100644 --- a/cwl/rnaseq_Sf/gtfToGenePred.cwl +++ b/cwl/rnaseq_Sf/gtfToGenePred.cwl @@ -1,22 +1,24 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: gtfToGenePred -requirements: -- class: DockerRequirement - dockerPull: hubentu/rcwl-rnaseq -inputs: - gtf: - type: File - inputBinding: - position: 1 - separate: true - gPred: - type: string - inputBinding: - position: 2 - separate: true -outputs: - genePred: - type: File - outputBinding: - glob: $(inputs.gPred) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: gtfToGenePred +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/ucsc-gtftogenepred:377--h0b8a92a_4 +arguments: +- -genePredExt +inputs: + gtf: + type: File + inputBinding: + position: 1 + separate: true + gPred: + type: string + inputBinding: + position: 2 + separate: true +outputs: + genePred: + type: File + outputBinding: + glob: $(inputs.gPred) diff --git a/cwl/rnaseq_Sf/r_distribution.cwl b/cwl/rnaseq_Sf/r_distribution.cwl index d311e10..30c1c65 100644 --- a/cwl/rnaseq_Sf/r_distribution.cwl +++ b/cwl/rnaseq_Sf/r_distribution.cwl @@ -1,23 +1,24 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: read_distribution.py -requirements: -- class: DockerRequirement - dockerPull: hubentu/rcwl-rnaseq -inputs: - bam: - type: File - inputBinding: - prefix: -i - separate: true - bed: - type: File - inputBinding: - prefix: -r - separate: true -outputs: - distOut: - type: File - outputBinding: - glob: $(inputs.bam.nameroot).distribution.txt -stdout: $(inputs.bam.nameroot).distribution.txt +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: read_distribution.py +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/rseqc:4.0.0--py38h4a8c8d9_1 +inputs: + bam: + type: File + secondaryFiles: .bai + inputBinding: + prefix: -i + separate: true + bed: + type: File + inputBinding: + prefix: -r + separate: true +outputs: + distOut: + type: File + outputBinding: + glob: $(inputs.bam.nameroot).distribution.txt +stdout: $(inputs.bam.nameroot).distribution.txt diff --git a/cwl/rnaseq_Sf/rnaseq_Sf.cwl b/cwl/rnaseq_Sf/rnaseq_Sf.cwl index 054cd3c..e738f9d 100644 --- a/cwl/rnaseq_Sf/rnaseq_Sf.cwl +++ b/cwl/rnaseq_Sf/rnaseq_Sf.cwl @@ -1,31 +1,144 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: geneBody_coverage.py -requirements: -- class: DockerRequirement - dockerPull: hubentu/rcwl-rnaseq -inputs: - bam: - type: File - inputBinding: - prefix: -i - separate: true - bed: - type: File - inputBinding: - prefix: -r - separate: true - prefix: - type: string - inputBinding: - prefix: -o - separate: true -outputs: - gCovPDF: - type: File - outputBinding: - glob: '*.geneBodyCoverage.curves.pdf' - gCovTXT: - type: File - outputBinding: - glob: '*.geneBodyCoverage.txt' +cwlVersion: v1.0 +class: Workflow +requirements: +- class: ScatterFeatureRequirement +- class: SubworkflowFeatureRequirement +- class: StepInputExpressionRequirement +inputs: + in_seqfiles: + type: File[] + in_prefix: + type: string + in_genomeDir: + type: Directory + in_GTFfile: + type: File + in_runThreadN: + type: int + default: 1 +outputs: + out_fastqc: + type: File[] + outputSource: fastqc/QCfile + out_BAM: + type: File + outputSource: samtools_index/idx + out_Log: + type: File + outputSource: STAR/outLog + out_Count: + type: File + outputSource: STAR/outCount + out_stat: + type: File + outputSource: samtools_flagstat/flagstat + out_count: + type: File + outputSource: featureCounts/Count + out_distribution: + type: File + outputSource: r_distribution/distOut + out_gCovP: + type: File + outputSource: gCoverage/gCovPDF + out_gCovT: + type: File + outputSource: gCoverage/gCovTXT + out_tpm: + type: File[] + outputSource: tpm/out + out_ent: + type: File[] + outputSource: tpm/ent + out_uni: + type: File[] + outputSource: tpm/uni +steps: + fastqc: + run: fastqc.cwl + in: + seqfile: in_seqfiles + out: + - QCfile + scatter: seqfile + STAR: + run: STAR.cwl + in: + prefix: in_prefix + genomeDir: in_genomeDir + sjdbGTFfile: in_GTFfile + readFilesIn: in_seqfiles + runThreadN: in_runThreadN + out: + - outBAM + - outLog + - outCount + sortBam: + run: sortBam.cwl + in: + bam: STAR/outBAM + out: + - sbam + samtools_index: + run: samtools_index.cwl + in: + bam: sortBam/sbam + out: + - idx + samtools_flagstat: + run: samtools_flagstat.cwl + in: + bam: sortBam/sbam + out: + - flagstat + featureCounts: + run: featureCounts.cwl + in: + gtf: in_GTFfile + bam: samtools_index/idx + count: + valueFrom: $(inputs.bam.nameroot).featureCounts.txt + out: + - Count + gtfToGenePred: + run: gtfToGenePred.cwl + in: + gtf: in_GTFfile + gPred: + valueFrom: $(inputs.gtf.nameroot).genePred + out: + - genePred + genePredToBed: + run: genePredToBed.cwl + in: + genePred: gtfToGenePred/genePred + Bed: + valueFrom: $(inputs.genePred.nameroot).bed + out: + - bed + r_distribution: + run: r_distribution.cwl + in: + bam: samtools_index/idx + bed: genePredToBed/bed + out: + - distOut + gCoverage: + run: gCoverage.cwl + in: + bam: samtools_index/idx + bed: genePredToBed/bed + prefix: + valueFrom: $(inputs.bam.nameroot) + out: + - gCovPDF + - gCovTXT + tpm: + run: tpm.cwl + in: + bam: samtools_index/idx + gtf: in_GTFfile + out: + - out + - ent + - uni diff --git a/cwl/rnaseq_Sf/rnaseq_Sf.yml b/cwl/rnaseq_Sf/rnaseq_Sf.yml index 0967ef4..dde43db 100644 --- a/cwl/rnaseq_Sf/rnaseq_Sf.yml +++ b/cwl/rnaseq_Sf/rnaseq_Sf.yml @@ -1 +1 @@ -{} +in_runThreadN: 1 diff --git a/cwl/rnaseq_Sf/samtools_flagstat.cwl b/cwl/rnaseq_Sf/samtools_flagstat.cwl index 3c68178..000949d 100644 --- a/cwl/rnaseq_Sf/samtools_flagstat.cwl +++ b/cwl/rnaseq_Sf/samtools_flagstat.cwl @@ -1,19 +1,19 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- samtools -- flagstat -requirements: -- class: DockerRequirement - dockerPull: biocontainers/samtools:v1.7.0_cv3 -inputs: - bam: - type: File - inputBinding: - separate: true -outputs: - flagstat: - type: File - outputBinding: - glob: $(inputs.bam.nameroot).flagstat.txt -stdout: $(inputs.bam.nameroot).flagstat.txt +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- flagstat +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.15--h1170115_1 +inputs: + bam: + type: File + inputBinding: + separate: true +outputs: + flagstat: + type: File + outputBinding: + glob: $(inputs.bam.nameroot).flagstat.txt +stdout: $(inputs.bam.nameroot).flagstat.txt diff --git a/cwl/rnaseq_Sf/samtools_index.cwl b/cwl/rnaseq_Sf/samtools_index.cwl index f80966b..e779867 100644 --- a/cwl/rnaseq_Sf/samtools_index.cwl +++ b/cwl/rnaseq_Sf/samtools_index.cwl @@ -1,24 +1,24 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- samtools -- index -requirements: -- class: DockerRequirement - dockerPull: biocontainers/samtools:v1.7.0_cv3 -- class: InitialWorkDirRequirement - listing: - - $(inputs.bam) -inputs: - bam: - type: File - inputBinding: - position: 1 - separate: true -outputs: - idx: - type: File - secondaryFiles: - - .bai - outputBinding: - glob: $(inputs.bam.basename) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- index +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.12--h9aed4be_1 +- class: InitialWorkDirRequirement + listing: + - $(inputs.bam) +inputs: + bam: + type: File + inputBinding: + position: 1 + separate: true +outputs: + idx: + type: File + secondaryFiles: + - .bai + outputBinding: + glob: $(inputs.bam.basename) diff --git a/cwl/rnaseq_Sf/sortBam.cwl b/cwl/rnaseq_Sf/sortBam.cwl index bc3d45d..df3d4ba 100644 --- a/cwl/rnaseq_Sf/sortBam.cwl +++ b/cwl/rnaseq_Sf/sortBam.cwl @@ -1,19 +1,19 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- samtools -- sort -requirements: -- class: DockerRequirement - dockerPull: biocontainers/samtools:v1.7.0_cv3 -inputs: - bam: - type: File - inputBinding: - separate: true -outputs: - sbam: - type: File - outputBinding: - glob: $(inputs.bam.nameroot).sorted.bam -stdout: $(inputs.bam.nameroot).sorted.bam +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- sort +requirements: +- class: DockerRequirement + dockerPull: biocontainers/samtools:v1.7.0_cv3 +inputs: + bam: + type: File + inputBinding: + separate: true +outputs: + sbam: + type: File + outputBinding: + glob: $(inputs.bam.nameroot).sorted.bam +stdout: $(inputs.bam.nameroot).sorted.bam diff --git a/cwl/rnaseq_Sf/tpm.cwl b/cwl/rnaseq_Sf/tpm.cwl new file mode 100644 index 0000000..a5f5124 --- /dev/null +++ b/cwl/rnaseq_Sf/tpm.cwl @@ -0,0 +1,42 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: TPMCalculator +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/tpmcalculator:0.0.4--hf393df8_3 +inputs: + bam: + type: File + inputBinding: + prefix: -b + separate: true + gtf: + type: File + inputBinding: + prefix: -g + separate: true + paired: + type: boolean? + inputBinding: + prefix: -p + separate: true + default: true + all: + type: boolean? + inputBinding: + prefix: -a + separate: true + default: true +outputs: + out: + type: File[] + outputBinding: + glob: '*.out' + ent: + type: File[]? + outputBinding: + glob: '*.ent' + uni: + type: File[]? + outputBinding: + glob: '*.uni' diff --git a/cwl/rnaseq_quant/STAR.cwl b/cwl/rnaseq_quant/STAR.cwl new file mode 100644 index 0000000..f33572d --- /dev/null +++ b/cwl/rnaseq_quant/STAR.cwl @@ -0,0 +1,113 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: STAR +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/star:2.7.9a--h9ee0642_0 +arguments: +- --outSAMattrRGline +- '-' +- --alignIntronMax +- '1000000' +- --alignIntronMin +- '20' +- --alignMatesGapMax +- '1000000' +- --alignSJDBoverhangMin +- '1' +- --alignSJoverhangMin +- '8' +- --alignSoftClipAtReferenceEnds +- 'Yes' +- --chimJunctionOverhangMin +- '15' +- --chimMainSegmentMultNmax +- '1' +- --chimOutType +- Junctions +- WithinBAM +- SoftClip +- --chimSegmentMin +- '15' +- --genomeLoad +- NoSharedMemory +- --limitSjdbInsertNsj +- '1200000' +- --outFilterIntronMotifs +- None +- --outFilterMatchNminOverLread +- '0.33' +- --outFilterMismatchNmax +- '999' +- --outFilterMismatchNoverLmax +- '0.1' +- --outFilterMultimapNmax +- '20' +- --outFilterScoreMinOverLread +- '0.33' +- --outFilterType +- BySJout +- --outSAMattributes +- NH +- HI +- AS +- nM +- NM +- ch +- --outSAMstrandField +- intronMotif +- --outSAMtype +- BAM +- Unsorted +- --outSAMunmapped +- Within +- --quantMode +- GeneCounts +- --readFilesCommand +- zcat +- --twopassMode +- Basic +inputs: + prefix: + type: string + inputBinding: + prefix: --outFileNamePrefix + separate: true + readFilesIn: + type: File[] + inputBinding: + prefix: --readFilesIn + separate: true + genomeDir: + type: Directory + inputBinding: + prefix: --genomeDir + separate: true + sjdbGTFfile: + type: File + inputBinding: + prefix: --sjdbGTFfile + separate: true + runThreadN: + type: int + inputBinding: + prefix: --runThreadN + separate: true + default: 1 +outputs: + outBAM: + type: File + outputBinding: + glob: '*Aligned.out.bam' + outLog: + type: File + outputBinding: + glob: '*Log.final.out' + outCount: + type: File + outputBinding: + glob: '*ReadsPerGene.out.tab' + junction: + type: File + outputBinding: + glob: '*Chimeric.out.junction' diff --git a/cwl/rnaseq_quant/featureCounts.cwl b/cwl/rnaseq_quant/featureCounts.cwl new file mode 100644 index 0000000..f17e8f0 --- /dev/null +++ b/cwl/rnaseq_quant/featureCounts.cwl @@ -0,0 +1,30 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: featureCounts +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/subread:2.0.1--h7132678_2 +arguments: +- -p +- --countReadPairs +inputs: + gtf: + type: File + inputBinding: + prefix: -a + separate: true + count: + type: string + inputBinding: + prefix: -o + separate: true + bam: + type: File + inputBinding: + separate: true +outputs: + Count: + type: File + secondaryFiles: .summary + outputBinding: + glob: $(inputs.count) diff --git a/cwl/rnaseq_quant/genePredToBed.cwl b/cwl/rnaseq_quant/genePredToBed.cwl new file mode 100644 index 0000000..33ff2a7 --- /dev/null +++ b/cwl/rnaseq_quant/genePredToBed.cwl @@ -0,0 +1,22 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: genePredToBed +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/ucsc-genepredtobed:377--h0b8a92a_4 +inputs: + genePred: + type: File + inputBinding: + position: 1 + separate: true + Bed: + type: string + inputBinding: + position: 2 + separate: true +outputs: + bed: + type: File + outputBinding: + glob: $(inputs.Bed) diff --git a/cwl/rnaseq_quant/gtfToGenePred.cwl b/cwl/rnaseq_quant/gtfToGenePred.cwl new file mode 100644 index 0000000..d14f104 --- /dev/null +++ b/cwl/rnaseq_quant/gtfToGenePred.cwl @@ -0,0 +1,24 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: gtfToGenePred +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/ucsc-gtftogenepred:377--h0b8a92a_4 +arguments: +- -genePredExt +inputs: + gtf: + type: File + inputBinding: + position: 1 + separate: true + gPred: + type: string + inputBinding: + position: 2 + separate: true +outputs: + genePred: + type: File + outputBinding: + glob: $(inputs.gPred) diff --git a/cwl/rnaseq_quant/r_distribution.cwl b/cwl/rnaseq_quant/r_distribution.cwl new file mode 100644 index 0000000..30c1c65 --- /dev/null +++ b/cwl/rnaseq_quant/r_distribution.cwl @@ -0,0 +1,24 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: read_distribution.py +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/rseqc:4.0.0--py38h4a8c8d9_1 +inputs: + bam: + type: File + secondaryFiles: .bai + inputBinding: + prefix: -i + separate: true + bed: + type: File + inputBinding: + prefix: -r + separate: true +outputs: + distOut: + type: File + outputBinding: + glob: $(inputs.bam.nameroot).distribution.txt +stdout: $(inputs.bam.nameroot).distribution.txt diff --git a/cwl/rnaseq_quant/rnaseq_quant.cwl b/cwl/rnaseq_quant/rnaseq_quant.cwl new file mode 100644 index 0000000..de95058 --- /dev/null +++ b/cwl/rnaseq_quant/rnaseq_quant.cwl @@ -0,0 +1,126 @@ +cwlVersion: v1.0 +class: Workflow +requirements: +- class: MultipleInputFeatureRequirement +- class: InlineJavascriptRequirement +- class: StepInputExpressionRequirement +inputs: + in_fq1: + type: File + in_fq2: + type: File + in_prefix: + type: string + in_genomeDir: + type: Directory + in_GTFfile: + type: File + in_runThreadN: + type: int + default: 1 + salmon_index: + type: Directory +outputs: + out_BAM: + type: File + outputSource: samtools_index/idx + out_Log: + type: File + outputSource: STAR/outLog + out_junction: + type: File + outputSource: STAR/junction + out_stat: + type: File + outputSource: samtools_flagstat/flagstat + out_count: + type: File + outputSource: featureCounts/Count + out_salmon: + type: Directory + outputSource: salmon/out1 + out_rdist: + type: File + outputSource: r_distribution/distOut +steps: + STAR: + run: STAR.cwl + in: + prefix: + source: in_prefix + valueFrom: $(self)_ + genomeDir: in_genomeDir + sjdbGTFfile: in_GTFfile + readFilesIn: + source: + - in_fq1 + - in_fq2 + linkMerge: merge_flattened + runThreadN: in_runThreadN + out: + - outBAM + - outLog + - outCount + - junction + sortBam: + run: sortBam.cwl + in: + bam: STAR/outBAM + out: + - sbam + samtools_index: + run: samtools_index.cwl + in: + bam: sortBam/sbam + out: + - idx + samtools_flagstat: + run: samtools_flagstat.cwl + in: + bam: sortBam/sbam + out: + - flagstat + featureCounts: + run: featureCounts.cwl + in: + gtf: in_GTFfile + bam: samtools_index/idx + count: + valueFrom: $(inputs.bam.nameroot).featureCounts.txt + out: + - Count + gtfToGenePred: + run: gtfToGenePred.cwl + in: + gtf: in_GTFfile + gPred: + valueFrom: $(inputs.gtf.nameroot).genePred + out: + - genePred + genePredToBed: + run: genePredToBed.cwl + in: + genePred: gtfToGenePred/genePred + Bed: + valueFrom: $(inputs.genePred.nameroot).bed + out: + - bed + r_distribution: + run: r_distribution.cwl + in: + bam: samtools_index/idx + bed: genePredToBed/bed + out: + - distOut + salmon: + run: salmon.cwl + in: + threadN: in_runThreadN + ref: salmon_index + fq1: in_fq1 + fq2: in_fq2 + outPrefix: + source: in_prefix + valueFrom: $(self)_salmon + out: + - out1 diff --git a/cwl/rnaseq_quant/rnaseq_quant.yml b/cwl/rnaseq_quant/rnaseq_quant.yml new file mode 100644 index 0000000..dde43db --- /dev/null +++ b/cwl/rnaseq_quant/rnaseq_quant.yml @@ -0,0 +1 @@ +in_runThreadN: 1 diff --git a/cwl/rnaseq_quant/salmon.cwl b/cwl/rnaseq_quant/salmon.cwl new file mode 100644 index 0000000..6afe97b --- /dev/null +++ b/cwl/rnaseq_quant/salmon.cwl @@ -0,0 +1,49 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- salmon +- quant +requirements: +- class: DockerRequirement + dockerPull: combinelab/salmon +- class: InlineJavascriptRequirement +arguments: +- -l +- A +- --validateMappings +inputs: + threadN: + type: int + inputBinding: + position: 1 + prefix: -p + separate: true + ref: + type: Directory + inputBinding: + position: 2 + prefix: -i + separate: true + fq1: + type: File + inputBinding: + position: 3 + prefix: '-1' + separate: true + fq2: + type: File + inputBinding: + position: 4 + prefix: '-2' + separate: true + outPrefix: + type: string + inputBinding: + position: 5 + prefix: -o + separate: true +outputs: + out1: + type: Directory + outputBinding: + glob: $(inputs.outPrefix) diff --git a/cwl/rnaseq_quant/samtools_flagstat.cwl b/cwl/rnaseq_quant/samtools_flagstat.cwl new file mode 100644 index 0000000..000949d --- /dev/null +++ b/cwl/rnaseq_quant/samtools_flagstat.cwl @@ -0,0 +1,19 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- flagstat +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.15--h1170115_1 +inputs: + bam: + type: File + inputBinding: + separate: true +outputs: + flagstat: + type: File + outputBinding: + glob: $(inputs.bam.nameroot).flagstat.txt +stdout: $(inputs.bam.nameroot).flagstat.txt diff --git a/cwl/rnaseq_quant/samtools_index.cwl b/cwl/rnaseq_quant/samtools_index.cwl new file mode 100644 index 0000000..e779867 --- /dev/null +++ b/cwl/rnaseq_quant/samtools_index.cwl @@ -0,0 +1,24 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- index +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.12--h9aed4be_1 +- class: InitialWorkDirRequirement + listing: + - $(inputs.bam) +inputs: + bam: + type: File + inputBinding: + position: 1 + separate: true +outputs: + idx: + type: File + secondaryFiles: + - .bai + outputBinding: + glob: $(inputs.bam.basename) diff --git a/cwl/rnaseq_quant/sortBam.cwl b/cwl/rnaseq_quant/sortBam.cwl new file mode 100644 index 0000000..df3d4ba --- /dev/null +++ b/cwl/rnaseq_quant/sortBam.cwl @@ -0,0 +1,19 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- sort +requirements: +- class: DockerRequirement + dockerPull: biocontainers/samtools:v1.7.0_cv3 +inputs: + bam: + type: File + inputBinding: + separate: true +outputs: + sbam: + type: File + outputBinding: + glob: $(inputs.bam.nameroot).sorted.bam +stdout: $(inputs.bam.nameroot).sorted.bam diff --git a/cwl/rnaseqc.cwl b/cwl/rnaseqc.cwl new file mode 100644 index 0000000..0dfb25e --- /dev/null +++ b/cwl/rnaseqc.cwl @@ -0,0 +1,33 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: rnaseqc +requirements: +- class: DockerRequirement + dockerPull: gcr.io/broad-cga-aarong-gtex/rnaseqc:latest +inputs: + gtf: + type: File + inputBinding: + position: 1 + separate: true + bam: + type: File + inputBinding: + position: 2 + separate: true + bed: + type: File? + inputBinding: + prefix: --bed + separate: true + out: + type: string? + inputBinding: + position: 9 + separate: true + default: '.' +outputs: + qcOut: + type: File[] + outputBinding: + glob: $(inputs.bam.nameroot)* diff --git a/cwl/rnaseqc.yml b/cwl/rnaseqc.yml new file mode 100644 index 0000000..ae6eb1d --- /dev/null +++ b/cwl/rnaseqc.yml @@ -0,0 +1 @@ +out: '.' diff --git a/cwl/rrbs/bismark.cwl b/cwl/rrbs/bismark.cwl new file mode 100644 index 0000000..5147009 --- /dev/null +++ b/cwl/rrbs/bismark.cwl @@ -0,0 +1,50 @@ +cwlVersion: v1.2 +class: CommandLineTool +baseCommand: bismark +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/bismark:0.23.1--hdfd78af_0 +arguments: +- -o +- ./ +inputs: + genome: + type: Directory + inputBinding: + prefix: --genome + separate: true + fq1: + type: + - File + - File[] + inputBinding: + prefix: '-1' + separate: true + itemSeparator: ',' + fq2: + type: + - File + - File[] + inputBinding: + prefix: '-2' + separate: true + itemSeparator: ',' + sam: + type: boolean? + inputBinding: + prefix: --sam + separate: true + threads: + type: int? + inputBinding: + prefix: -p + separate: true +outputs: + align: + type: File + outputBinding: + glob: '*_bismark_bt2_pe.*' + report: + type: File + outputBinding: + glob: '*_report.txt' diff --git a/cwl/rrbs/extractor.cwl b/cwl/rrbs/extractor.cwl new file mode 100644 index 0000000..d0c912f --- /dev/null +++ b/cwl/rrbs/extractor.cwl @@ -0,0 +1,53 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: bismark_methylation_extractor +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/bismark:0.23.1--hdfd78af_0 +inputs: + paired: + type: boolean? + inputBinding: + prefix: -p + separate: true + single: + type: boolean? + inputBinding: + prefix: -s + separate: true + bedGraph: + type: boolean? + inputBinding: + prefix: --bedGraph + separate: true + default: true + gzip: + type: boolean? + inputBinding: + prefix: --gzip + separate: true + default: true + core: + type: int + inputBinding: + prefix: --multicore + separate: true + default: 4.0 + bam: + type: File + inputBinding: + position: 10 + separate: true +outputs: + cov: + type: File + outputBinding: + glob: '*.cov*' + Bed: + type: File? + outputBinding: + glob: '*.bedGraph*' + report: + type: File[] + outputBinding: + glob: '*.txt' diff --git a/cwl/rrbs/nudup.cwl b/cwl/rrbs/nudup.cwl new file mode 100644 index 0000000..bf8a505 --- /dev/null +++ b/cwl/rrbs/nudup.cwl @@ -0,0 +1,40 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: nudup.py +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/nudup:2.3.3--py_2 +inputs: + index: + type: File + inputBinding: + prefix: -f + separate: true + paired: + type: boolean? + inputBinding: + prefix: '-2' + separate: true + out: + type: string + inputBinding: + prefix: -o + separate: true + sam: + type: File + inputBinding: + position: 10 + separate: true +outputs: + mbam: + type: File + outputBinding: + glob: $(inputs.out).sorted.markdup.bam + dbam: + type: File + outputBinding: + glob: $(inputs.out).sorted.dedup.bam + report: + type: File + outputBinding: + glob: '*log.txt' diff --git a/cwl/rrbs/resort.cwl b/cwl/rrbs/resort.cwl new file mode 100644 index 0000000..4201d9f --- /dev/null +++ b/cwl/rrbs/resort.cwl @@ -0,0 +1,25 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- sort +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.12--h9aed4be_1 +arguments: +- -n +inputs: + bam: + type: File + inputBinding: + separate: true + obam: + type: string + inputBinding: + prefix: -o + separate: true +outputs: + sbam: + type: File + outputBinding: + glob: $(inputs.obam) diff --git a/cwl/rrbs/rrbs.cwl b/cwl/rrbs/rrbs.cwl new file mode 100644 index 0000000..a3e3845 --- /dev/null +++ b/cwl/rrbs/rrbs.cwl @@ -0,0 +1,100 @@ +cwlVersion: v1.0 +class: Workflow +requirements: +- class: InlineJavascriptRequirement +- class: StepInputExpressionRequirement +inputs: + fq1: + type: File + fq2: + type: File? + fq3: + type: File + sample: + type: string + genome: + type: Directory + threads: + type: int +outputs: + mbam: + type: File + outputSource: nudup/mbam + nbam: + type: File + outputSource: resort/sbam + cov: + type: File + outputSource: extractor/cov + Bed: + type: File? + outputSource: extractor/Bed + report: + type: File[] + outputSource: extractor/report +steps: + trim: + run: trim.cwl + in: + fq1: fq1 + fq2: fq2 + out: + - FQ1 + - FQ2 + - report + trimDiversity: + run: trimDiversity.cwl + in: + fq1: trim/FQ1 + fq2: trim/FQ2 + out: + - FQ1 + - FQ2 + bismark: + run: bismark.cwl + in: + genome: genome + fq1: trimDiversity/FQ1 + fq2: trimDiversity/FQ2 + sam: + valueFrom: $(true) + out: + - align + - report + stripSam: + run: stripSam.cwl + in: + sam: bismark/align + out: + - strip + nudup: + run: nudup.cwl + in: + index: fq3 + paired: + valueFrom: $(true) + out: sample + sam: stripSam/strip + out: + - mbam + - dbam + - report + resort: + run: resort.cwl + in: + bam: nudup/dbam + obam: + valueFrom: $(inputs.bam.nameroot)_nsort.bam + out: + - sbam + extractor: + run: extractor.cwl + in: + paired: + valueFrom: $(true) + core: threads + bam: resort/sbam + out: + - cov + - Bed + - report diff --git a/cwl/rrbs/rrbs.yml b/cwl/rrbs/rrbs.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/rrbs/rrbs.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/rrbs/stripSam.cwl b/cwl/rrbs/stripSam.cwl new file mode 100644 index 0000000..505c2ac --- /dev/null +++ b/cwl/rrbs/stripSam.cwl @@ -0,0 +1,21 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- bash +- /opt/strip_bismark_sam.sh +requirements: +- class: InitialWorkDirRequirement + listing: + - $(inputs.sam) +- class: DockerRequirement + dockerPull: hubentu/rrbs +inputs: + sam: + type: File + inputBinding: + separate: true +outputs: + strip: + type: File + outputBinding: + glob: '*_stripped.sam' diff --git a/cwl/rrbs/trim.cwl b/cwl/rrbs/trim.cwl new file mode 100644 index 0000000..c9a33d3 --- /dev/null +++ b/cwl/rrbs/trim.cwl @@ -0,0 +1,51 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: trim_galore +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/trim-galore:0.6.7--hdfd78af_0 +arguments: +- -o +- ./ +inputs: + fq1: + type: File + inputBinding: + position: 9 + separate: true + fq2: + type: File? + inputBinding: + position: 10 + separate: true + a1: + type: string + inputBinding: + prefix: -a + separate: true + default: AGATCGGAAGAGC + a2: + type: string? + inputBinding: + prefix: -a2 + separate: true + default: AAATCAAAAAAAC + paired: + type: boolean + inputBinding: + prefix: --paired + separate: true + default: true +outputs: + FQ1: + type: File + outputBinding: + glob: '*_1.fq.gz' + FQ2: + type: File + outputBinding: + glob: '*_2.fq.gz' + report: + type: File[] + outputBinding: + glob: '*.txt' diff --git a/cwl/rrbs/trimDiversity.cwl b/cwl/rrbs/trimDiversity.cwl new file mode 100644 index 0000000..2f8370f --- /dev/null +++ b/cwl/rrbs/trimDiversity.cwl @@ -0,0 +1,32 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- python +- /opt/trimRRBSdiversityAdaptCustomers.py +requirements: +- class: InitialWorkDirRequirement + listing: + - $(inputs.fq1) + - $(inputs.fq2) +- class: DockerRequirement + dockerPull: hubentu/rrbs +inputs: + fq1: + type: File + inputBinding: + prefix: '-1' + separate: true + fq2: + type: File + inputBinding: + prefix: '-2' + separate: true +outputs: + FQ1: + type: File + outputBinding: + glob: $(inputs.fq1.nameroot)_* + FQ2: + type: File + outputBinding: + glob: $(inputs.fq2.nameroot)_* diff --git a/cwl/runWDL.cwl b/cwl/runWDL.cwl index c947ce1..171aed0 100644 --- a/cwl/runWDL.cwl +++ b/cwl/runWDL.cwl @@ -1,33 +1,33 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: java -inputs: - cromwell: - type: File - inputBinding: - position: 1 - prefix: -jar - separate: true - run: - type: string - inputBinding: - position: 2 - separate: true - default: run - wdl: - type: File - inputBinding: - position: 3 - separate: true - json: - type: File - inputBinding: - position: 4 - prefix: -i - separate: true -outputs: - log: - type: File - outputBinding: - glob: $(inputs.wdl.basename).log -stdout: $(inputs.wdl.basename).log +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: java +inputs: + cromwell: + type: File + inputBinding: + position: 1 + prefix: -jar + separate: true + run: + type: string + inputBinding: + position: 2 + separate: true + default: run + wdl: + type: File + inputBinding: + position: 3 + separate: true + json: + type: File + inputBinding: + position: 4 + prefix: -i + separate: true +outputs: + log: + type: File + outputBinding: + glob: $(inputs.wdl.basename).log +stdout: $(inputs.wdl.basename).log diff --git a/cwl/runWDL.yml b/cwl/runWDL.yml index bffcaff..5480c82 100644 --- a/cwl/runWDL.yml +++ b/cwl/runWDL.yml @@ -1 +1 @@ -run: run +run: run diff --git a/cwl/salmon_index.cwl b/cwl/salmon_index.cwl index afa59be..e5463de 100644 --- a/cwl/salmon_index.cwl +++ b/cwl/salmon_index.cwl @@ -1,42 +1,42 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- salmon -- index -requirements: -- class: DockerRequirement - dockerPull: combinelab/salmon -- class: InlineJavascriptRequirement -arguments: -- --type -- quasi -inputs: - threadN: - type: int - inputBinding: - position: 1 - prefix: -p - separate: true - kmer: - type: int - inputBinding: - position: 2 - prefix: -k - separate: true - refFasta: - type: File - inputBinding: - position: 3 - prefix: -t - separate: true - outPrefix: - type: string - inputBinding: - position: 4 - prefix: -i - separate: true -outputs: - out1: - type: Directory - outputBinding: - glob: $(inputs.outPrefix) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- salmon +- index +requirements: +- class: DockerRequirement + dockerPull: combinelab/salmon +- class: InlineJavascriptRequirement +arguments: +- --type +- quasi +inputs: + threadN: + type: int + inputBinding: + position: 1 + prefix: -p + separate: true + kmer: + type: int + inputBinding: + position: 2 + prefix: -k + separate: true + refFasta: + type: File + inputBinding: + position: 3 + prefix: -t + separate: true + outPrefix: + type: string + inputBinding: + position: 4 + prefix: -i + separate: true +outputs: + out1: + type: Directory + outputBinding: + glob: $(inputs.outPrefix) diff --git a/cwl/salmon_index.yml b/cwl/salmon_index.yml index 0967ef4..69a88e3 100644 --- a/cwl/salmon_index.yml +++ b/cwl/salmon_index.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/salmon_quant.cwl b/cwl/salmon_quant.cwl index 483e76e..6afe97b 100644 --- a/cwl/salmon_quant.cwl +++ b/cwl/salmon_quant.cwl @@ -1,52 +1,49 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- salmon -- quant -requirements: -- class: DockerRequirement - dockerPull: combinelab/salmon -- class: InlineJavascriptRequirement -arguments: -- -l -- A -- --validateMappings -- --seqBias -- --gcBias -- --posBias -inputs: - threadN: - type: int - inputBinding: - position: 1 - prefix: -p - separate: true - ref: - type: Directory - inputBinding: - position: 2 - prefix: -i - separate: true - fq1: - type: File - inputBinding: - position: 3 - prefix: '-1' - separate: true - fq2: - type: File - inputBinding: - position: 4 - prefix: '-2' - separate: true - outPrefix: - type: string - inputBinding: - position: 5 - prefix: -o - separate: true -outputs: - out1: - type: Directory - outputBinding: - glob: $(inputs.outPrefix) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- salmon +- quant +requirements: +- class: DockerRequirement + dockerPull: combinelab/salmon +- class: InlineJavascriptRequirement +arguments: +- -l +- A +- --validateMappings +inputs: + threadN: + type: int + inputBinding: + position: 1 + prefix: -p + separate: true + ref: + type: Directory + inputBinding: + position: 2 + prefix: -i + separate: true + fq1: + type: File + inputBinding: + position: 3 + prefix: '-1' + separate: true + fq2: + type: File + inputBinding: + position: 4 + prefix: '-2' + separate: true + outPrefix: + type: string + inputBinding: + position: 5 + prefix: -o + separate: true +outputs: + out1: + type: Directory + outputBinding: + glob: $(inputs.outPrefix) diff --git a/cwl/salmon_quant.yml b/cwl/salmon_quant.yml index 0967ef4..69a88e3 100644 --- a/cwl/salmon_quant.yml +++ b/cwl/salmon_quant.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/sam2bam.cwl b/cwl/sam2bam.cwl index 621e78d..0cb2aa8 100644 --- a/cwl/sam2bam.cwl +++ b/cwl/sam2bam.cwl @@ -1,21 +1,21 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- samtools -- view -requirements: -- class: DockerRequirement - dockerPull: biocontainers/samtools:v1.7.0_cv3 -arguments: -- -b -inputs: - sam: - type: File - inputBinding: - separate: true -outputs: - bam: - type: File - outputBinding: - glob: $(inputs.sam.basename).bam -stdout: $(inputs.sam.basename).bam +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- view +requirements: +- class: DockerRequirement + dockerPull: biocontainers/samtools:v1.7.0_cv3 +arguments: +- -b +inputs: + sam: + type: File + inputBinding: + separate: true +outputs: + bam: + type: File + outputBinding: + glob: $(inputs.sam.basename).bam +stdout: $(inputs.sam.basename).bam diff --git a/cwl/sam2bam.yml b/cwl/sam2bam.yml index 0967ef4..69a88e3 100644 --- a/cwl/sam2bam.yml +++ b/cwl/sam2bam.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/samtools_collate.cwl b/cwl/samtools_collate.cwl new file mode 100644 index 0000000..3d3e8dc --- /dev/null +++ b/cwl/samtools_collate.cwl @@ -0,0 +1,34 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- collate +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.16.1--h6899075_1 +inputs: + fast: + type: boolean? + inputBinding: + prefix: -f + separate: true + out: + type: string + inputBinding: + prefix: -o + separate: true + threads: + type: int? + inputBinding: + prefix: --threads + separate: true + bam: + type: File + inputBinding: + position: 99 + separate: true +outputs: + obam: + type: File + outputBinding: + glob: $(inputs.out) diff --git a/cwl/samtools_collate.yml b/cwl/samtools_collate.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/samtools_collate.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/samtools_depth.cwl b/cwl/samtools_depth.cwl index a9da0aa..b1fbeb9 100644 --- a/cwl/samtools_depth.cwl +++ b/cwl/samtools_depth.cwl @@ -1,19 +1,19 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- samtools -- depth -requirements: -- class: DockerRequirement - dockerPull: biocontainers/samtools:v1.7.0_cv3 -inputs: - bam: - type: File - inputBinding: - separate: true -outputs: - pileup: - type: File - outputBinding: - glob: $(inputs.bam.nameroot).depth.txt -stdout: $(inputs.bam.nameroot).depth.txt +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- depth +requirements: +- class: DockerRequirement + dockerPull: biocontainers/samtools:v1.7.0_cv3 +inputs: + bam: + type: File + inputBinding: + separate: true +outputs: + pileup: + type: File + outputBinding: + glob: $(inputs.bam.nameroot).depth.txt +stdout: $(inputs.bam.nameroot).depth.txt diff --git a/cwl/samtools_depth.yml b/cwl/samtools_depth.yml index 0967ef4..69a88e3 100644 --- a/cwl/samtools_depth.yml +++ b/cwl/samtools_depth.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/samtools_faidx.cwl b/cwl/samtools_faidx.cwl new file mode 100644 index 0000000..123e869 --- /dev/null +++ b/cwl/samtools_faidx.cwl @@ -0,0 +1,25 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- faidx +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.15--h1170115_1 +inputs: + fa: + type: File + secondaryFiles: .fai + inputBinding: + separate: true + region: + type: string + inputBinding: + position: 1 + separate: true +outputs: + fout: + type: File + outputBinding: + glob: $(inputs.fa.nameroot)_$(inputs.region).fa +stdout: $(inputs.fa.nameroot)_$(inputs.region).fa diff --git a/cwl/samtools_faidx.yml b/cwl/samtools_faidx.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/samtools_faidx.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/samtools_fastq.cwl b/cwl/samtools_fastq.cwl new file mode 100644 index 0000000..547ecdb --- /dev/null +++ b/cwl/samtools_fastq.cwl @@ -0,0 +1,47 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- fastq +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.16.1--h6899075_1 +inputs: + fq1: + type: string + inputBinding: + prefix: '-1' + separate: true + fq2: + type: string? + inputBinding: + prefix: '-2' + separate: true + fq0: + type: string? + inputBinding: + prefix: '-0' + separate: true + bam: + type: File + inputBinding: + position: 99 + separate: true + threads: + type: int? + inputBinding: + prefix: --threads + separate: true +outputs: + FQ1: + type: File + outputBinding: + glob: $(inputs.fq1) + FQ2: + type: File? + outputBinding: + glob: $(inputs.fq2) + FQ0: + type: File? + outputBinding: + glob: $(inputs.fq0) diff --git a/cwl/samtools_fastq.yml b/cwl/samtools_fastq.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/samtools_fastq.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/samtools_flagstat.cwl b/cwl/samtools_flagstat.cwl index 3c68178..000949d 100644 --- a/cwl/samtools_flagstat.cwl +++ b/cwl/samtools_flagstat.cwl @@ -1,19 +1,19 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- samtools -- flagstat -requirements: -- class: DockerRequirement - dockerPull: biocontainers/samtools:v1.7.0_cv3 -inputs: - bam: - type: File - inputBinding: - separate: true -outputs: - flagstat: - type: File - outputBinding: - glob: $(inputs.bam.nameroot).flagstat.txt -stdout: $(inputs.bam.nameroot).flagstat.txt +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- flagstat +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.15--h1170115_1 +inputs: + bam: + type: File + inputBinding: + separate: true +outputs: + flagstat: + type: File + outputBinding: + glob: $(inputs.bam.nameroot).flagstat.txt +stdout: $(inputs.bam.nameroot).flagstat.txt diff --git a/cwl/samtools_flagstat.yml b/cwl/samtools_flagstat.yml index 0967ef4..69a88e3 100644 --- a/cwl/samtools_flagstat.yml +++ b/cwl/samtools_flagstat.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/samtools_index.cwl b/cwl/samtools_index.cwl index f80966b..e779867 100644 --- a/cwl/samtools_index.cwl +++ b/cwl/samtools_index.cwl @@ -1,24 +1,24 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- samtools -- index -requirements: -- class: DockerRequirement - dockerPull: biocontainers/samtools:v1.7.0_cv3 -- class: InitialWorkDirRequirement - listing: - - $(inputs.bam) -inputs: - bam: - type: File - inputBinding: - position: 1 - separate: true -outputs: - idx: - type: File - secondaryFiles: - - .bai - outputBinding: - glob: $(inputs.bam.basename) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- index +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.12--h9aed4be_1 +- class: InitialWorkDirRequirement + listing: + - $(inputs.bam) +inputs: + bam: + type: File + inputBinding: + position: 1 + separate: true +outputs: + idx: + type: File + secondaryFiles: + - .bai + outputBinding: + glob: $(inputs.bam.basename) diff --git a/cwl/samtools_index.yml b/cwl/samtools_index.yml index 0967ef4..69a88e3 100644 --- a/cwl/samtools_index.yml +++ b/cwl/samtools_index.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/samtools_merge.cwl b/cwl/samtools_merge.cwl new file mode 100644 index 0000000..59f3b35 --- /dev/null +++ b/cwl/samtools_merge.cwl @@ -0,0 +1,24 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- merge +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.12--h9aed4be_1 +inputs: + bam: + type: File[] + inputBinding: + position: 99 + separate: true + mbam: + type: string + inputBinding: + position: 1 + separate: true +outputs: + mBam: + type: File + outputBinding: + glob: $(inputs.mbam) diff --git a/cwl/samtools_merge.yml b/cwl/samtools_merge.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/samtools_merge.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/samtools_mpileup.cwl b/cwl/samtools_mpileup.cwl index 1d0d9e1..2c4bd18 100644 --- a/cwl/samtools_mpileup.cwl +++ b/cwl/samtools_mpileup.cwl @@ -1,30 +1,30 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- samtools -- mpileup -requirements: -- class: DockerRequirement - dockerPull: biocontainers/samtools:v1.7.0_cv3 -inputs: - bam: - type: File - inputBinding: - separate: true - ref: - type: File - secondaryFiles: .fai - inputBinding: - prefix: -f - separate: true - region: - type: File? - inputBinding: - prefix: -l - separate: true -outputs: - pileup: - type: File - outputBinding: - glob: $(inputs.bam.nameroot).pileup -stdout: $(inputs.bam.nameroot).pileup +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- mpileup +requirements: +- class: DockerRequirement + dockerPull: biocontainers/samtools:v1.7.0_cv3 +inputs: + bam: + type: File + inputBinding: + separate: true + ref: + type: File + secondaryFiles: .fai + inputBinding: + prefix: -f + separate: true + region: + type: File? + inputBinding: + prefix: -l + separate: true +outputs: + pileup: + type: File + outputBinding: + glob: $(inputs.bam.nameroot).pileup +stdout: $(inputs.bam.nameroot).pileup diff --git a/cwl/samtools_mpileup.yml b/cwl/samtools_mpileup.yml index 0967ef4..69a88e3 100644 --- a/cwl/samtools_mpileup.yml +++ b/cwl/samtools_mpileup.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/samtools_sort.cwl b/cwl/samtools_sort.cwl new file mode 100644 index 0000000..be772d7 --- /dev/null +++ b/cwl/samtools_sort.cwl @@ -0,0 +1,23 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- sort +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.12--h9aed4be_1 +inputs: + bam: + type: File + inputBinding: + separate: true + obam: + type: string + inputBinding: + prefix: -o + separate: true +outputs: + sbam: + type: File + outputBinding: + glob: $(inputs.obam) diff --git a/cwl/samtools_sort.yml b/cwl/samtools_sort.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/samtools_sort.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/samtools_stats.cwl b/cwl/samtools_stats.cwl index a5709bd..c054631 100644 --- a/cwl/samtools_stats.cwl +++ b/cwl/samtools_stats.cwl @@ -1,19 +1,19 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- samtools -- stats -requirements: -- class: DockerRequirement - dockerPull: biocontainers/samtools:v1.7.0_cv3 -inputs: - bam: - type: File - inputBinding: - separate: true -outputs: - stats: - type: File - outputBinding: - glob: $(inputs.bam.nameroot).stats.txt -stdout: $(inputs.bam.nameroot).stats.txt +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- stats +requirements: +- class: DockerRequirement + dockerPull: biocontainers/samtools:v1.7.0_cv3 +inputs: + bam: + type: File + inputBinding: + separate: true +outputs: + stats: + type: File + outputBinding: + glob: $(inputs.bam.nameroot).stats.txt +stdout: $(inputs.bam.nameroot).stats.txt diff --git a/cwl/samtools_stats.yml b/cwl/samtools_stats.yml index 0967ef4..69a88e3 100644 --- a/cwl/samtools_stats.yml +++ b/cwl/samtools_stats.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/samtools_view.cwl b/cwl/samtools_view.cwl new file mode 100644 index 0000000..48b492e --- /dev/null +++ b/cwl/samtools_view.cwl @@ -0,0 +1,67 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- view +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.16.1--h6899075_1 +inputs: + bam: + type: File + secondaryFiles: .bai + inputBinding: + position: 99 + separate: true + bed: + type: File? + inputBinding: + position: 1 + prefix: -L + separate: true + obam: + type: string + inputBinding: + position: 2 + prefix: -o + separate: true + region: + type: string? + inputBinding: + position: 100 + separate: true + outb: + type: boolean? + inputBinding: + prefix: -b + separate: true + exFlag: + type: int? + inputBinding: + prefix: -F + separate: true + reqFlag: + type: int? + inputBinding: + prefix: -f + separate: true + qname: + type: File? + inputBinding: + prefix: -N + separate: true + threads: + type: int? + inputBinding: + prefix: --threads + separate: true + mapq: + type: int? + inputBinding: + prefix: -q + separate: true +outputs: + oBam: + type: File + outputBinding: + glob: $(inputs.obam) diff --git a/cwl/samtools_view.yml b/cwl/samtools_view.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/samtools_view.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/scar_HRD.R b/cwl/scar_HRD.R new file mode 100644 index 0000000..715bce5 --- /dev/null +++ b/cwl/scar_HRD.R @@ -0,0 +1,10 @@ +.libPaths(c('/projects/rpci/songliu/qhu/miniconda3/envs/r-base/lib/R/library')) +suppressPackageStartupMessages(library(R.utils)) +args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) +scar_D.R <- +function(seg, reference, seqz = TRUE, chr.in.names = FALSE){ + Sys.setenv(VROOM_CONNECTION_SIZE = 131072 * 10000) + ss <- scarHRD::scar_score(seg, reference = reference, seqz = seqz, chr.in.names = chr.in.names) + write.table(ss, "scarHRD.txt", row.names=FALSE, quote=FALSE, sep="\t") +} +do.call(scar_D.R, args) diff --git a/cwl/scar_HRD.cwl b/cwl/scar_HRD.cwl new file mode 100644 index 0000000..7b5f4ae --- /dev/null +++ b/cwl/scar_HRD.cwl @@ -0,0 +1,37 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: Rscript +requirements: +- class: InitialWorkDirRequirement + listing: + - entryname: scar_HRD.R + entry: |- + .libPaths(c('/projects/rpci/songliu/qhu/miniconda3/envs/r-base/lib/R/library')) + suppressPackageStartupMessages(library(R.utils)) + args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) + scar_D.R <- + function(seg, reference, seqz = TRUE, chr.in.names = FALSE){ + Sys.setenv(VROOM_CONNECTION_SIZE = 131072 * 10000) + ss <- scarHRD::scar_score(seg, reference = reference, seqz = seqz, chr.in.names = chr.in.names) + write.table(ss, "scarHRD.txt", row.names=FALSE, quote=FALSE, sep="\t") + } + do.call(scar_D.R, args) + writable: false +arguments: +- scar_HRD.R +inputs: + seg: + type: File + inputBinding: + position: 1 + separate: true + reference: + type: string + inputBinding: + position: 2 + separate: true +outputs: + HRD: + type: File + outputBinding: + glob: scarHRD.txt diff --git a/cwl/scar_HRD.yml b/cwl/scar_HRD.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/scar_HRD.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/seqtk_sample.cwl b/cwl/seqtk_sample.cwl new file mode 100644 index 0000000..1302e8b --- /dev/null +++ b/cwl/seqtk_sample.cwl @@ -0,0 +1,40 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- seqtk +- sample +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/seqtk:1.4--he4a0461_1 +inputs: + seq: + type: File + inputBinding: + position: 1 + separate: true + frac: + type: float? + inputBinding: + position: 2 + separate: true + num: + type: int? + inputBinding: + position: 2 + separate: true + seed: + type: int? + inputBinding: + prefix: -s + separate: true + pass: + type: boolean? + inputBinding: + prefix: '-2' + separate: true +outputs: + fq: + type: File + outputBinding: + glob: $(inputs.seq.nameroot)_s.fq +stdout: $(inputs.seq.nameroot)_s.fq diff --git a/cwl/seqtk_sample.yml b/cwl/seqtk_sample.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/seqtk_sample.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/seqz_binning.cwl b/cwl/seqz_binning.cwl new file mode 100644 index 0000000..ef2f673 --- /dev/null +++ b/cwl/seqz_binning.cwl @@ -0,0 +1,29 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- sequenza-utils +- seqz_binning +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/sequenza-utils:3.0.0--py39h67e14b5_5 +inputs: + seqz: + type: File + inputBinding: + prefix: --seqz + separate: true + window: + type: int + inputBinding: + prefix: -w + separate: true + out: + type: string + inputBinding: + prefix: -o + separate: true +outputs: + seqzs: + type: File + outputBinding: + glob: $(inputs.out) diff --git a/cwl/seqz_binning.yml b/cwl/seqz_binning.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/seqz_binning.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/sigproSS.cwl b/cwl/sigproSS.cwl new file mode 100644 index 0000000..d692dab --- /dev/null +++ b/cwl/sigproSS.cwl @@ -0,0 +1,19 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- python +- /usr/local/bin/spss.py +requirements: +- class: DockerRequirement + dockerPull: hubentu/sigpro:v2 +inputs: + vcf: + type: File + inputBinding: + position: 1 + separate: true +outputs: + out: + type: Directory + outputBinding: + glob: results diff --git a/cwl/sigproSS.yml b/cwl/sigproSS.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/sigproSS.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/somatic_combiner.cwl b/cwl/somatic_combiner.cwl new file mode 100644 index 0000000..2de274d --- /dev/null +++ b/cwl/somatic_combiner.cwl @@ -0,0 +1,74 @@ +cwlVersion: v1.2 +class: CommandLineTool +requirements: +- class: DockerRequirement + dockerPull: hubentu/somatic_combiner +inputs: + vardict: + type: File? + inputBinding: + prefix: -D + separate: true + lofreqSNV: + type: File? + secondaryFiles: .tbi + inputBinding: + prefix: -l + separate: true + lofreqIndel: + type: File? + secondaryFiles: .tbi + inputBinding: + prefix: -L + separate: true + mutect: + type: File? + secondaryFiles: .tbi + inputBinding: + prefix: -m + separate: true + mutect2: + type: File? + secondaryFiles: + pattern: .tbi + required: false + inputBinding: + prefix: -M + separate: true + strelkaSNV: + type: File? + secondaryFiles: .tbi + inputBinding: + prefix: -s + separate: true + strelkaIndel: + type: File? + secondaryFiles: .tbi + inputBinding: + prefix: -S + separate: true + muse: + type: File? + inputBinding: + prefix: -u + separate: true + varscanSNV: + type: File? + inputBinding: + prefix: -v + separate: true + varscanIndel: + type: File? + inputBinding: + prefix: -V + separate: true + outvcf: + type: string + inputBinding: + prefix: -o + separate: true +outputs: + ovcf: + type: File + outputBinding: + glob: $(inputs.outvcf) diff --git a/cwl/somatic_combiner.yml b/cwl/somatic_combiner.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/somatic_combiner.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/sortBam.cwl b/cwl/sortBam.cwl index bc3d45d..df3d4ba 100644 --- a/cwl/sortBam.cwl +++ b/cwl/sortBam.cwl @@ -1,19 +1,19 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- samtools -- sort -requirements: -- class: DockerRequirement - dockerPull: biocontainers/samtools:v1.7.0_cv3 -inputs: - bam: - type: File - inputBinding: - separate: true -outputs: - sbam: - type: File - outputBinding: - glob: $(inputs.bam.nameroot).sorted.bam -stdout: $(inputs.bam.nameroot).sorted.bam +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- sort +requirements: +- class: DockerRequirement + dockerPull: biocontainers/samtools:v1.7.0_cv3 +inputs: + bam: + type: File + inputBinding: + separate: true +outputs: + sbam: + type: File + outputBinding: + glob: $(inputs.bam.nameroot).sorted.bam +stdout: $(inputs.bam.nameroot).sorted.bam diff --git a/cwl/sortBam.yml b/cwl/sortBam.yml index 0967ef4..69a88e3 100644 --- a/cwl/sortBam.yml +++ b/cwl/sortBam.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/starFusion.cwl b/cwl/starFusion.cwl index 0719397..cb318f8 100644 --- a/cwl/starFusion.cwl +++ b/cwl/starFusion.cwl @@ -1,37 +1,37 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: /usr/local/src/STAR-Fusion/STAR-Fusion -requirements: -- class: DockerRequirement - dockerPull: trinityctat/ctatfusion -inputs: - fq1: - type: File - inputBinding: - prefix: --left_fq - separate: true - fq2: - type: File? - inputBinding: - prefix: --right_fq - separate: true - genomedir: - type: Directory - inputBinding: - prefix: --genome_lib_dir - separate: true - odir: - type: string - inputBinding: - prefix: --output_dir - separate: true - cpu: - type: int - inputBinding: - prefix: --CPU - separate: true -outputs: - sout: - type: Directory - outputBinding: - glob: $(inputs.odir) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: /usr/local/src/STAR-Fusion/STAR-Fusion +requirements: +- class: DockerRequirement + dockerPull: trinityctat/starfusion +inputs: + fq1: + type: File + inputBinding: + prefix: --left_fq + separate: true + fq2: + type: File? + inputBinding: + prefix: --right_fq + separate: true + genomedir: + type: Directory + inputBinding: + prefix: --genome_lib_dir + separate: true + odir: + type: string + inputBinding: + prefix: --output_dir + separate: true + cpu: + type: int + inputBinding: + prefix: --CPU + separate: true +outputs: + sout: + type: Directory + outputBinding: + glob: $(inputs.odir) diff --git a/cwl/starFusion.yml b/cwl/starFusion.yml index 0967ef4..69a88e3 100644 --- a/cwl/starFusion.yml +++ b/cwl/starFusion.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/strelka.cwl b/cwl/strelka.cwl index fc90b0d..eed3af6 100644 --- a/cwl/strelka.cwl +++ b/cwl/strelka.cwl @@ -1,65 +1,71 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: configureStrelkaSomaticWorkflow.py -requirements: -- class: DockerRequirement - dockerPull: cmopipeline/strelka2_manta -- class: ShellCommandRequirement -arguments: -- --runDir -- strelkaRunDir -- --exome -- valueFrom: ' && ' - position: 6 -- valueFrom: strelkaRunDir/runWorkflow.py - position: 7 -- valueFrom: -m - position: 8 -- valueFrom: local - position: 9 -inputs: - tbam: - type: File - secondaryFiles: .bai - inputBinding: - position: 1 - prefix: --tumorBam - separate: true - nbam: - type: File - secondaryFiles: .bai - inputBinding: - position: 2 - prefix: --normalBam - separate: true - ref: - type: File - secondaryFiles: .fai - inputBinding: - position: 3 - prefix: --referenceFasta - separate: true - callRegions: - type: File? - secondaryFiles: .tbi - inputBinding: - position: 4 - prefix: --callRegions - separate: true - indelCandidates: - type: File? - inputBinding: - position: 5 - prefix: --indelCandidates - separate: true -outputs: - snvs: - type: File - secondaryFiles: .tbi - outputBinding: - glob: strelkaRunDir/results/variants/somatic.snvs.vcf.gz - indels: - type: File - secondaryFiles: .tbi - outputBinding: - glob: strelkaRunDir/results/variants/somatic.indels.vcf.gz +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: configureStrelkaSomaticWorkflow.py +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/strelka:2.9.10--h9ee0642_1 +- class: ShellCommandRequirement +arguments: +- --runDir +- strelkaRunDir +- valueFrom: ' && ' + position: 6 + shellQuote: false +- valueFrom: strelkaRunDir/runWorkflow.py + position: 7 +- valueFrom: -m + position: 8 +- valueFrom: local + position: 9 +inputs: + tbam: + type: File + secondaryFiles: .bai + inputBinding: + position: 1 + prefix: --tumorBam + separate: true + nbam: + type: File + secondaryFiles: .bai + inputBinding: + position: 2 + prefix: --normalBam + separate: true + ref: + type: File + secondaryFiles: .fai + inputBinding: + position: 3 + prefix: --referenceFasta + separate: true + callRegions: + type: File? + secondaryFiles: .tbi + inputBinding: + position: 4 + prefix: --callRegions + separate: true + indelCandidates: + type: File? + inputBinding: + position: 5 + prefix: --indelCandidates + separate: true + exome: + type: boolean + inputBinding: + prefix: --exome + separate: true + default: true +outputs: + snvs: + type: File + secondaryFiles: .tbi + outputBinding: + glob: strelkaRunDir/results/variants/somatic.snvs.vcf.gz + indels: + type: File + secondaryFiles: .tbi + outputBinding: + glob: strelkaRunDir/results/variants/somatic.indels.vcf.gz diff --git a/cwl/strelka.yml b/cwl/strelka.yml index 0967ef4..de00f73 100644 --- a/cwl/strelka.yml +++ b/cwl/strelka.yml @@ -1 +1 @@ -{} +exome: true diff --git a/cwl/strelka2PL/manta.cwl b/cwl/strelka2PL/manta.cwl new file mode 100644 index 0000000..bfdd688 --- /dev/null +++ b/cwl/strelka2PL/manta.cwl @@ -0,0 +1,75 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: configManta.py +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/manta:1.6.0--h9ee0642_1 +- class: ShellCommandRequirement +arguments: +- --runDir +- mantaRunDir +- valueFrom: ' && ' + position: 5 + shellQuote: false +- valueFrom: mantaRunDir/runWorkflow.py + position: 6 +- valueFrom: -m + position: 7 +- valueFrom: local + position: 8 +inputs: + tbam: + type: File + secondaryFiles: .bai + inputBinding: + position: 1 + prefix: --tumorBam + separate: true + nbam: + type: File + secondaryFiles: .bai + inputBinding: + position: 2 + prefix: --normalBam + separate: true + ref: + type: File + secondaryFiles: .fai + inputBinding: + position: 3 + prefix: --referenceFasta + separate: true + callRegions: + type: File? + secondaryFiles: .tbi + inputBinding: + position: 4 + prefix: --callRegions + separate: true + exome: + type: boolean + inputBinding: + prefix: --exome + separate: true + default: true +outputs: + somaticSV: + type: File + secondaryFiles: .tbi + outputBinding: + glob: mantaRunDir/results/variants/somaticSV.vcf.gz + diploidSV: + type: File + secondaryFiles: .tbi + outputBinding: + glob: mantaRunDir/results/variants/diploidSV.vcf.gz + candidateSV: + type: File + secondaryFiles: .tbi + outputBinding: + glob: mantaRunDir/results/variants/candidateSV.vcf.gz + candidateSmallIndels: + type: File + secondaryFiles: .tbi + outputBinding: + glob: mantaRunDir/results/variants/candidateSmallIndels.vcf.gz diff --git a/cwl/strelka2PL/strelka.cwl b/cwl/strelka2PL/strelka.cwl new file mode 100644 index 0000000..eed3af6 --- /dev/null +++ b/cwl/strelka2PL/strelka.cwl @@ -0,0 +1,71 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: configureStrelkaSomaticWorkflow.py +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/strelka:2.9.10--h9ee0642_1 +- class: ShellCommandRequirement +arguments: +- --runDir +- strelkaRunDir +- valueFrom: ' && ' + position: 6 + shellQuote: false +- valueFrom: strelkaRunDir/runWorkflow.py + position: 7 +- valueFrom: -m + position: 8 +- valueFrom: local + position: 9 +inputs: + tbam: + type: File + secondaryFiles: .bai + inputBinding: + position: 1 + prefix: --tumorBam + separate: true + nbam: + type: File + secondaryFiles: .bai + inputBinding: + position: 2 + prefix: --normalBam + separate: true + ref: + type: File + secondaryFiles: .fai + inputBinding: + position: 3 + prefix: --referenceFasta + separate: true + callRegions: + type: File? + secondaryFiles: .tbi + inputBinding: + position: 4 + prefix: --callRegions + separate: true + indelCandidates: + type: File? + inputBinding: + position: 5 + prefix: --indelCandidates + separate: true + exome: + type: boolean + inputBinding: + prefix: --exome + separate: true + default: true +outputs: + snvs: + type: File + secondaryFiles: .tbi + outputBinding: + glob: strelkaRunDir/results/variants/somatic.snvs.vcf.gz + indels: + type: File + secondaryFiles: .tbi + outputBinding: + glob: strelkaRunDir/results/variants/somatic.indels.vcf.gz diff --git a/cwl/strelka2PL/strelka2PL.cwl b/cwl/strelka2PL/strelka2PL.cwl new file mode 100644 index 0000000..9ce19db --- /dev/null +++ b/cwl/strelka2PL/strelka2PL.cwl @@ -0,0 +1,75 @@ +cwlVersion: v1.0 +class: Workflow +requirements: +- class: StepInputExpressionRequirement +inputs: + tbam: + type: File + secondaryFiles: .bai + nbam: + type: File + secondaryFiles: .bai + ref: + type: File + secondaryFiles: .fai + region: + type: File? + secondaryFiles: .tbi + exome: + type: boolean + default: true +outputs: + snvs: + type: File + outputSource: strelkaSNV/Fout + indels: + type: File + outputSource: strelkaIndel/Fout +steps: + manta: + run: manta.cwl + in: + tbam: tbam + nbam: nbam + ref: ref + callRegions: region + exome: exome + out: + - somaticSV + - diploidSV + - candidateSV + - candidateSmallIndels + strelka: + run: strelka.cwl + in: + tbam: tbam + nbam: nbam + ref: ref + callRegions: region + indelCandidates: manta/candidateSmallIndels + exome: exome + out: + - snvs + - indels + strelkaSNV: + run: strelkaSNV.cwl + in: + vcf: strelka/snvs + filter: + valueFrom: PASS + fout: + source: tbam + valueFrom: $(self.nameroot)_strelka2.somatic.snvs.vcf + out: + - Fout + strelkaIndel: + run: strelkaIndel.cwl + in: + vcf: strelka/indels + filter: + valueFrom: PASS + fout: + source: tbam + valueFrom: $(self.nameroot)_strelka2.somatic.indels.vcf + out: + - Fout diff --git a/cwl/strelka2PL/strelka2PL.yml b/cwl/strelka2PL/strelka2PL.yml new file mode 100644 index 0000000..de00f73 --- /dev/null +++ b/cwl/strelka2PL/strelka2PL.yml @@ -0,0 +1 @@ +exome: true diff --git a/cwl/strelka2PL/strelkaIndel.cwl b/cwl/strelka2PL/strelkaIndel.cwl new file mode 100644 index 0000000..488dd8f --- /dev/null +++ b/cwl/strelka2PL/strelkaIndel.cwl @@ -0,0 +1,59 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- bcftools +- view +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/bcftools:1.13--h3a49de5_0 +inputs: + vcf: + type: File + inputBinding: + separate: true + filter: + type: string? + inputBinding: + prefix: -f + separate: true + fout: + type: string + inputBinding: + prefix: -o + separate: true + otype: + type: string? + inputBinding: + prefix: -O + separate: true + default: v + sample: + type: string? + inputBinding: + prefix: -s + separate: true + samplefile: + type: File? + inputBinding: + prefix: -S + separate: true + genotype: + type: string? + inputBinding: + prefix: -g + separate: true + include: + type: string? + inputBinding: + prefix: -i + separate: true + exclude: + type: string? + inputBinding: + prefix: -e + separate: true +outputs: + Fout: + type: File + outputBinding: + glob: $(inputs.fout) diff --git a/cwl/strelka2PL/strelkaSNV.cwl b/cwl/strelka2PL/strelkaSNV.cwl new file mode 100644 index 0000000..488dd8f --- /dev/null +++ b/cwl/strelka2PL/strelkaSNV.cwl @@ -0,0 +1,59 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- bcftools +- view +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/bcftools:1.13--h3a49de5_0 +inputs: + vcf: + type: File + inputBinding: + separate: true + filter: + type: string? + inputBinding: + prefix: -f + separate: true + fout: + type: string + inputBinding: + prefix: -o + separate: true + otype: + type: string? + inputBinding: + prefix: -O + separate: true + default: v + sample: + type: string? + inputBinding: + prefix: -s + separate: true + samplefile: + type: File? + inputBinding: + prefix: -S + separate: true + genotype: + type: string? + inputBinding: + prefix: -g + separate: true + include: + type: string? + inputBinding: + prefix: -i + separate: true + exclude: + type: string? + inputBinding: + prefix: -e + separate: true +outputs: + Fout: + type: File + outputBinding: + glob: $(inputs.fout) diff --git a/cwl/strip_sam.cwl b/cwl/strip_sam.cwl new file mode 100644 index 0000000..505c2ac --- /dev/null +++ b/cwl/strip_sam.cwl @@ -0,0 +1,21 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- bash +- /opt/strip_bismark_sam.sh +requirements: +- class: InitialWorkDirRequirement + listing: + - $(inputs.sam) +- class: DockerRequirement + dockerPull: hubentu/rrbs +inputs: + sam: + type: File + inputBinding: + separate: true +outputs: + strip: + type: File + outputBinding: + glob: '*_stripped.sam' diff --git a/cwl/strip_sam.yml b/cwl/strip_sam.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/strip_sam.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/subBamByVcf/samtoolsidx.cwl b/cwl/subBamByVcf/samtoolsidx.cwl new file mode 100644 index 0000000..e779867 --- /dev/null +++ b/cwl/subBamByVcf/samtoolsidx.cwl @@ -0,0 +1,24 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- index +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.12--h9aed4be_1 +- class: InitialWorkDirRequirement + listing: + - $(inputs.bam) +inputs: + bam: + type: File + inputBinding: + position: 1 + separate: true +outputs: + idx: + type: File + secondaryFiles: + - .bai + outputBinding: + glob: $(inputs.bam.basename) diff --git a/cwl/subBamByVcf/samtoolsview.cwl b/cwl/subBamByVcf/samtoolsview.cwl new file mode 100644 index 0000000..08dbcbf --- /dev/null +++ b/cwl/subBamByVcf/samtoolsview.cwl @@ -0,0 +1,41 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- view +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.12--h9aed4be_1 +inputs: + bam: + type: File + inputBinding: + position: 3 + separate: true + bed: + type: File? + inputBinding: + position: 1 + prefix: -L + separate: true + obam: + type: string + inputBinding: + position: 2 + prefix: -o + separate: true + region: + type: string? + inputBinding: + position: 4 + separate: true + outb: + type: boolean? + inputBinding: + prefix: -b + separate: true +outputs: + oBam: + type: File + outputBinding: + glob: $(inputs.obam) diff --git a/cwl/subBamByVcf/subBamByVcf.cwl b/cwl/subBamByVcf/subBamByVcf.cwl new file mode 100644 index 0000000..7e9a680 --- /dev/null +++ b/cwl/subBamByVcf/subBamByVcf.cwl @@ -0,0 +1,41 @@ +cwlVersion: v1.0 +class: Workflow +requirements: +- class: StepInputExpressionRequirement +- class: InlineJavascriptRequirement +inputs: + vcf: + type: File + bam: + type: File + secondaryFiles: .bai +outputs: + mBam: + type: File + outputSource: samtoolsidx/idx +steps: + vcf2bed: + run: vcf2bed.cwl + in: + vcf: vcf + out: + valueFrom: $(inputs.vcf.nameroot).bed + out: + - bed + samtoolsview: + run: samtoolsview.cwl + in: + bam: bam + bed: vcf2bed/bed + outb: + valueFrom: $(true) + obam: + valueFrom: $(inputs.bam.nameroot).mini.bam + out: + - oBam + samtoolsidx: + run: samtoolsidx.cwl + in: + bam: samtoolsview/oBam + out: + - idx diff --git a/cwl/subBamByVcf/subBamByVcf.yml b/cwl/subBamByVcf/subBamByVcf.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/subBamByVcf/subBamByVcf.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/subBamByVcf/vcf2bed.R b/cwl/subBamByVcf/vcf2bed.R new file mode 100644 index 0000000..03e8081 --- /dev/null +++ b/cwl/subBamByVcf/vcf2bed.R @@ -0,0 +1,11 @@ +suppressPackageStartupMessages(library(R.utils)) +args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) +args[["window"]] <- as.integer(args[["window"]]) +vcf2bed <- +function(vcf, out, window = 200){ + reg <- read.table(vcf, comment = "#", sep = "\t") + bed <- cbind(reg[,1], reg[,2]-window, reg[,2]+window) + bed <- unique(bed) + write.table(bed, out, row.names = FALSE, col.names = FALSE, quote = FALSE, sep = "\t") +} +do.call(vcf2bed, args) diff --git a/cwl/subBamByVcf/vcf2bed.cwl b/cwl/subBamByVcf/vcf2bed.cwl new file mode 100644 index 0000000..5745b32 --- /dev/null +++ b/cwl/subBamByVcf/vcf2bed.cwl @@ -0,0 +1,46 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: Rscript +requirements: +- class: InitialWorkDirRequirement + listing: + - entryname: vcf2bed.R + entry: |- + suppressPackageStartupMessages(library(R.utils)) + args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) + args[["window"]] <- as.integer(args[["window"]]) + vcf2bed <- + function(vcf, out, window = 200){ + reg <- read.table(vcf, comment = "#", sep = "\t") + bed <- cbind(reg[,1], reg[,2]-window, reg[,2]+window) + bed <- unique(bed) + write.table(bed, out, row.names = FALSE, col.names = FALSE, quote = FALSE, sep = "\t") + } + do.call(vcf2bed, args) + writable: false +- class: DockerRequirement + dockerPull: hubentu/r-utils +arguments: +- vcf2bed.R +inputs: + vcf: + type: File + inputBinding: + prefix: vcf= + separate: false + out: + type: string + inputBinding: + prefix: out= + separate: false + window: + type: int + inputBinding: + prefix: window= + separate: false + default: 200 +outputs: + bed: + type: File + outputBinding: + glob: $(inputs.out) diff --git a/cwl/svaba_germline.cwl b/cwl/svaba_germline.cwl new file mode 100644 index 0000000..1924860 --- /dev/null +++ b/cwl/svaba_germline.cwl @@ -0,0 +1,84 @@ +cwlVersion: v1.2 +class: CommandLineTool +baseCommand: +- svaba +- run +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/svaba:1.1.0--h7d7f7ad_2 +- class: InlineJavascriptRequirement +arguments: +- -I +inputs: + bam: + type: File + secondaryFiles: + - .bai? + - ^.bai? + inputBinding: + prefix: -t + separate: true + mate: + type: int? + inputBinding: + prefix: -L + separate: true + target: + type: File? + inputBinding: + prefix: -k + separate: true + dbsnp: + type: File? + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + inputBinding: + prefix: -D + separate: true + ref: + type: File + secondaryFiles: + - .amb + - .ann + - .bwt + - .pac + - .sa + - .fai + inputBinding: + prefix: -G + separate: true + cores: + type: int + inputBinding: + prefix: -p + separate: true + default: 4 + prefix: + type: string + inputBinding: + prefix: -a + separate: true +outputs: + raw: + type: File + outputBinding: + glob: '*.bps.txt.gz' + contig: + type: File + outputBinding: + glob: '*.contigs.bam' + discordants: + type: File + outputBinding: + glob: '*.discordant.txt.gz' + log: + type: File + outputBinding: + glob: '*.log' + align: + type: File + outputBinding: + glob: '*.alignments.txt.gz' + vcf: + type: File[] + outputBinding: + glob: '*.vcf' diff --git a/cwl/svaba_germline.yml b/cwl/svaba_germline.yml new file mode 100644 index 0000000..1688e2d --- /dev/null +++ b/cwl/svaba_germline.yml @@ -0,0 +1 @@ +cores: 4 diff --git a/cwl/svaba_somatic.cwl b/cwl/svaba_somatic.cwl index d1bc2c6..9d34faa 100644 --- a/cwl/svaba_somatic.cwl +++ b/cwl/svaba_somatic.cwl @@ -1,72 +1,93 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- svaba -- run -requirements: -- class: DockerRequirement - dockerPull: ken01nn/svaba -arguments: -- -a -- somatic_run -inputs: - tbam: - type: File - secondaryFiles: .bai - inputBinding: - prefix: -t - separate: true - nbam: - type: File - secondaryFiles: .bai - inputBinding: - prefix: -n - separate: true - dbsnp: - type: File - inputBinding: - prefix: -D - separate: true - ref: - type: File - secondaryFiles: - - .amb - - .ann - - .bwt - - .pac - - .sa - - .fai - inputBinding: - prefix: -G - separate: true - cores: - type: int - inputBinding: - prefix: -p - separate: true - default: 4 -outputs: - raw: - type: File - outputBinding: - glob: '*.bps.txt.gz' - contig: - type: File - outputBinding: - glob: '*.contigs.bam' - discordants: - type: File - outputBinding: - glob: '*.discordant.txt.gz' - log: - type: File - outputBinding: - glob: '*.log' - align: - type: File - outputBinding: - glob: '*.alignments.txt.gz' - vcf: - type: File[] - outputBinding: - glob: '*.vcf' +cwlVersion: v1.2 +class: CommandLineTool +baseCommand: +- svaba +- run +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/svaba:1.1.0--h7d7f7ad_2 +- class: InlineJavascriptRequirement +inputs: + tbam: + type: File + secondaryFiles: + - .bai? + - ^.bai? + inputBinding: + prefix: -t + separate: true + nbam: + type: File + secondaryFiles: + - .bai? + - ^.bai? + inputBinding: + prefix: -n + separate: true + target: + type: File? + inputBinding: + prefix: -k + separate: true + dbsnp: + type: File + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + inputBinding: + prefix: -D + separate: true + ref: + type: File + secondaryFiles: + - .amb + - .ann + - .bwt + - .pac + - .sa + - .fai + inputBinding: + prefix: -G + separate: true + cores: + type: int + inputBinding: + prefix: -p + separate: true + default: 4 + prefix: + type: string + inputBinding: + prefix: -a + separate: true +outputs: + raw: + type: File + outputBinding: + glob: '*.bps.txt.gz' + contig: + type: File + outputBinding: + glob: '*.contigs.bam' + discordants: + type: File + outputBinding: + glob: '*.discordant.txt.gz' + log: + type: File + outputBinding: + glob: '*.log' + align: + type: File + outputBinding: + glob: '*.alignments.txt.gz' + uvcf: + type: File[] + outputBinding: + glob: '*unfiltered.*' + svcf: + type: File[] + outputBinding: + glob: '*svaba.somatic*' + gvcf: + type: File[] + outputBinding: + glob: '*svaba.germline*' diff --git a/cwl/svaba_somatic.yml b/cwl/svaba_somatic.yml index 4c01b1b..1688e2d 100644 --- a/cwl/svaba_somatic.yml +++ b/cwl/svaba_somatic.yml @@ -1 +1 @@ -cores: 4 +cores: 4 diff --git a/cwl/tabix_index.cwl b/cwl/tabix_index.cwl index f506ee0..591a0ea 100644 --- a/cwl/tabix_index.cwl +++ b/cwl/tabix_index.cwl @@ -1,28 +1,28 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: tabix -requirements: -- class: DockerRequirement - dockerPull: biocontainers/tabix:v1.3.2-2-deb_cv1 -- class: InitialWorkDirRequirement - listing: - - $(inputs.tfile) -inputs: - tfile: - type: File - inputBinding: - position: 1 - separate: true - type: - type: string - inputBinding: - prefix: -p - separate: true - default: vcf -outputs: - idx: - type: File - secondaryFiles: - - .tbi - outputBinding: - glob: $(inputs.tfile.basename) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: tabix +requirements: +- class: DockerRequirement + dockerPull: biocontainers/tabix:v1.3.2-2-deb_cv1 +- class: InitialWorkDirRequirement + listing: + - $(inputs.tfile) +inputs: + tfile: + type: File + inputBinding: + position: 1 + separate: true + type: + type: string + inputBinding: + prefix: -p + separate: true + default: vcf +outputs: + idx: + type: File + secondaryFiles: + - .tbi + outputBinding: + glob: $(inputs.tfile.basename) diff --git a/cwl/tabix_index.yml b/cwl/tabix_index.yml index e877996..99fd201 100644 --- a/cwl/tabix_index.yml +++ b/cwl/tabix_index.yml @@ -1 +1 @@ -type: vcf +type: vcf diff --git a/cwl/tar_c.cwl b/cwl/tar_c.cwl new file mode 100644 index 0000000..e9ab8c6 --- /dev/null +++ b/cwl/tar_c.cwl @@ -0,0 +1,41 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: tar +inputs: + create: + type: boolean? + inputBinding: + position: 1 + prefix: -c + separate: true + default: true + compress: + type: boolean? + inputBinding: + position: 2 + prefix: -z + separate: true + default: true + tar: + type: string + inputBinding: + position: 3 + prefix: -f + separate: true + files: + type: + - File[]? + - File? + inputBinding: + position: 4 + separate: true + dir: + type: Directory[]? + inputBinding: + position: 5 + separate: true +outputs: + tarfile: + type: File + outputBinding: + glob: $(inputs.tar) diff --git a/cwl/tar_c.yml b/cwl/tar_c.yml new file mode 100644 index 0000000..de39753 --- /dev/null +++ b/cwl/tar_c.yml @@ -0,0 +1,2 @@ +create: true +compress: true diff --git a/cwl/targetVarCall/ApplyBQSR.cwl b/cwl/targetVarCall/ApplyBQSR.cwl index 018b8fd..567e86b 100644 --- a/cwl/targetVarCall/ApplyBQSR.cwl +++ b/cwl/targetVarCall/ApplyBQSR.cwl @@ -1,37 +1,37 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- gatk -- ApplyBQSR -requirements: -- class: DockerRequirement - dockerPull: broadinstitute/gatk:latest -inputs: - bam: - type: File - inputBinding: - prefix: -I - separate: true - ref: - type: File - secondaryFiles: - - .fai - - $(self.nameroot).dict - inputBinding: - prefix: -R - separate: true - rtable: - type: File - inputBinding: - prefix: --bqsr-recal-file - separate: true - oBam: - type: string - inputBinding: - prefix: -O - separate: true -outputs: - Bam: - type: File - outputBinding: - glob: $(inputs.oBam) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- gatk +- ApplyBQSR +requirements: +- class: DockerRequirement + dockerPull: broadinstitute/gatk:latest +inputs: + bam: + type: File + inputBinding: + prefix: -I + separate: true + ref: + type: File + secondaryFiles: + - .fai + - $(self.nameroot).dict + inputBinding: + prefix: -R + separate: true + rtable: + type: File + inputBinding: + prefix: --bqsr-recal-file + separate: true + oBam: + type: string + inputBinding: + prefix: -O + separate: true +outputs: + Bam: + type: File + outputBinding: + glob: $(inputs.oBam) diff --git a/cwl/targetVarCall/BaseRecal.cwl b/cwl/targetVarCall/BaseRecal.cwl index 75635cb..52b427c 100644 --- a/cwl/targetVarCall/BaseRecal.cwl +++ b/cwl/targetVarCall/BaseRecal.cwl @@ -1,71 +1,70 @@ -cwlVersion: v1.0 -class: Workflow -requirements: -- class: StepInputExpressionRequirement -- class: InlineJavascriptRequirement -inputs: - bam: - type: File - ref: - type: File - secondaryFiles: - - .fai - - $(self.nameroot).dict - knowSites: - type: - type: array - items: File - inputBinding: - separate: true - secondaryFiles: .idx - oBam: - type: string -outputs: - rcBam: - type: File - secondaryFiles: .bai - outputSource: samtools_index/idx - flagstat: - type: File - outputSource: samtools_flagstat/flagstat - stats: - type: File - outputSource: samtools_stats/stats -steps: - BaseRecalibrator: - run: BaseRecalibrator.cwl - in: - bam: bam - ref: ref - knowSites: knowSites - recal: - valueFrom: $(inputs.bam.nameroot).recal.txt - out: - - rtable - ApplyBQSR: - run: ApplyBQSR.cwl - in: - bam: bam - ref: ref - rtable: BaseRecalibrator/rtable - oBam: oBam - out: - - Bam - samtools_index: - run: samtools_index.cwl - in: - bam: ApplyBQSR/Bam - out: - - idx - samtools_flagstat: - run: samtools_flagstat.cwl - in: - bam: ApplyBQSR/Bam - out: - - flagstat - samtools_stats: - run: samtools_stats.cwl - in: - bam: ApplyBQSR/Bam - out: - - stats +cwlVersion: v1.0 +class: Workflow +requirements: +- class: StepInputExpressionRequirement +- class: InlineJavascriptRequirement +- class: InlineJavascriptRequirement +inputs: + bam: + type: File + ref: + type: File + secondaryFiles: + - .fai + - $(self.nameroot).dict + knowSites: + type: + type: array + items: File + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + oBam: + type: string +outputs: + rcBam: + type: File + secondaryFiles: .bai + outputSource: samtools_index/idx + flagstat: + type: File + outputSource: samtools_flagstat/flagstat + stats: + type: File + outputSource: samtools_stats/stats +steps: + BaseRecalibrator: + run: BaseRecalibrator.cwl + in: + bam: bam + ref: ref + knowSites: knowSites + recal: + valueFrom: $(inputs.bam.nameroot).recal.txt + out: + - rtable + ApplyBQSR: + run: ApplyBQSR.cwl + in: + bam: bam + ref: ref + rtable: BaseRecalibrator/rtable + oBam: oBam + out: + - Bam + samtools_index: + run: samtools_index.cwl + in: + bam: ApplyBQSR/Bam + out: + - idx + samtools_flagstat: + run: samtools_flagstat.cwl + in: + bam: ApplyBQSR/Bam + out: + - flagstat + samtools_stats: + run: samtools_stats.cwl + in: + bam: ApplyBQSR/Bam + out: + - stats diff --git a/cwl/targetVarCall/BaseRecalibrator.cwl b/cwl/targetVarCall/BaseRecalibrator.cwl index 0353c15..f92210e 100644 --- a/cwl/targetVarCall/BaseRecalibrator.cwl +++ b/cwl/targetVarCall/BaseRecalibrator.cwl @@ -1,42 +1,43 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- gatk -- BaseRecalibrator -requirements: -- class: DockerRequirement - dockerPull: broadinstitute/gatk:latest -inputs: - bam: - type: File - inputBinding: - prefix: -I - separate: true - ref: - type: File - secondaryFiles: - - .fai - - $(self.nameroot).dict - inputBinding: - prefix: -R - separate: true - knowSites: - type: - type: array - items: File - inputBinding: - prefix: --known-sites - separate: true - secondaryFiles: .idx - inputBinding: - separate: true - recal: - type: string - inputBinding: - prefix: -O - separate: true -outputs: - rtable: - type: File - outputBinding: - glob: $(inputs.recal) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- gatk +- BaseRecalibrator +requirements: +- class: DockerRequirement + dockerPull: broadinstitute/gatk:latest +- class: InlineJavascriptRequirement +inputs: + bam: + type: File + inputBinding: + prefix: -I + separate: true + ref: + type: File + secondaryFiles: + - .fai + - $(self.nameroot).dict + inputBinding: + prefix: -R + separate: true + knowSites: + type: + type: array + items: File + inputBinding: + prefix: --known-sites + separate: true + secondaryFiles: '$(self.nameext == ''.gz'' ? self.basename+''.tbi'' : self.basename+''.idx'')' + inputBinding: + separate: true + recal: + type: string + inputBinding: + prefix: -O + separate: true +outputs: + rtable: + type: File + outputBinding: + glob: $(inputs.recal) diff --git a/cwl/targetVarCall/GenotypeGVCFs.cwl b/cwl/targetVarCall/GenotypeGVCFs.cwl index 32f5618..71a0524 100644 --- a/cwl/targetVarCall/GenotypeGVCFs.cwl +++ b/cwl/targetVarCall/GenotypeGVCFs.cwl @@ -1,34 +1,34 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- gatk -- GenotypeGVCFs -requirements: -- class: DockerRequirement - dockerPull: broadinstitute/gatk:latest -inputs: - variant: - type: File - secondaryFiles: .idx - inputBinding: - prefix: -V - separate: true - ref: - type: File - secondaryFiles: - - .fai - - $(self.nameroot).dict - inputBinding: - prefix: -R - separate: true - vout: - type: string - inputBinding: - prefix: -O - separate: true -outputs: - vcf: - type: File - secondaryFiles: .idx - outputBinding: - glob: $(inputs.vout) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- gatk +- GenotypeGVCFs +requirements: +- class: DockerRequirement + dockerPull: broadinstitute/gatk:latest +inputs: + variant: + type: File + secondaryFiles: .idx + inputBinding: + prefix: -V + separate: true + ref: + type: File + secondaryFiles: + - .fai + - $(self.nameroot).dict + inputBinding: + prefix: -R + separate: true + vout: + type: string + inputBinding: + prefix: -O + separate: true +outputs: + vcf: + type: File + secondaryFiles: .idx + outputBinding: + glob: $(inputs.vout) diff --git a/cwl/targetVarCall/HaplotypeCaller.cwl b/cwl/targetVarCall/HaplotypeCaller.cwl index 528c3bb..af0e435 100644 --- a/cwl/targetVarCall/HaplotypeCaller.cwl +++ b/cwl/targetVarCall/HaplotypeCaller.cwl @@ -1,51 +1,51 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- gatk -- HaplotypeCaller -requirements: -- class: DockerRequirement - dockerPull: broadinstitute/gatk:latest -inputs: - bam: - type: File - secondaryFiles: .bai - inputBinding: - prefix: -I - separate: true - interval: - type: File - inputBinding: - prefix: -L - separate: true - ref: - type: File - secondaryFiles: - - .fai - - $(self.nameroot).dict - inputBinding: - prefix: -R - separate: true - gout: - type: string - inputBinding: - prefix: -O - separate: true - emit: - type: string - inputBinding: - prefix: -ERC - separate: true - default: GVCF - downsampling: - type: int - inputBinding: - prefix: --max-reads-per-alignment-start - separate: true - default: 50 -outputs: - gvcf: - type: File - secondaryFiles: .idx - outputBinding: - glob: $(inputs.gout) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- gatk +- HaplotypeCaller +requirements: +- class: DockerRequirement + dockerPull: broadinstitute/gatk:latest +inputs: + bam: + type: File + secondaryFiles: .bai + inputBinding: + prefix: -I + separate: true + interval: + type: File + inputBinding: + prefix: -L + separate: true + ref: + type: File + secondaryFiles: + - .fai + - $(self.nameroot).dict + inputBinding: + prefix: -R + separate: true + gout: + type: string + inputBinding: + prefix: -O + separate: true + emit: + type: string + inputBinding: + prefix: -ERC + separate: true + default: GVCF + downsampling: + type: int + inputBinding: + prefix: --max-reads-per-alignment-start + separate: true + default: 50 +outputs: + gvcf: + type: File + secondaryFiles: .idx + outputBinding: + glob: $(inputs.gout) diff --git a/cwl/targetVarCall/bedtolist.cwl b/cwl/targetVarCall/bedtolist.cwl index 10a50b4..976d80f 100644 --- a/cwl/targetVarCall/bedtolist.cwl +++ b/cwl/targetVarCall/bedtolist.cwl @@ -1,29 +1,29 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- picard -- BedToIntervalList -requirements: -- class: DockerRequirement - dockerPull: quay.io/biocontainers/picard:2.21.1--0 -inputs: - bed: - type: File - inputBinding: - prefix: I= - separate: false - SD: - type: File - inputBinding: - prefix: SD= - separate: false - out: - type: string - inputBinding: - prefix: O= - separate: false -outputs: - intval: - type: File - outputBinding: - glob: $(inputs.out) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- picard +- BedToIntervalList +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/picard:2.21.1--0 +inputs: + bed: + type: File + inputBinding: + prefix: I= + separate: false + SD: + type: File + inputBinding: + prefix: SD= + separate: false + out: + type: string + inputBinding: + prefix: O= + separate: false +outputs: + intval: + type: File + outputBinding: + glob: $(inputs.out) diff --git a/cwl/targetVarCall/bwa.cwl b/cwl/targetVarCall/bwa.cwl index 03d69d3..7b63bc4 100644 --- a/cwl/targetVarCall/bwa.cwl +++ b/cwl/targetVarCall/bwa.cwl @@ -1,48 +1,48 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- bwa -- mem -requirements: -- class: DockerRequirement - dockerPull: biocontainers/bwa:v0.7.17-3-deb_cv1 -inputs: - threads: - type: int - inputBinding: - position: 1 - prefix: -t - separate: true - RG: - type: string - inputBinding: - position: 2 - prefix: -R - separate: true - Ref: - type: File - secondaryFiles: - - .amb - - .ann - - .bwt - - .pac - - .sa - inputBinding: - position: 3 - separate: true - FQ1: - type: File - inputBinding: - position: 4 - separate: true - FQ2: - type: File? - inputBinding: - position: 5 - separate: true -outputs: - sam: - type: File - outputBinding: - glob: '*.sam' -stdout: bwaOutput.sam +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- bwa +- mem +requirements: +- class: DockerRequirement + dockerPull: biocontainers/bwa:v0.7.17-3-deb_cv1 +inputs: + threads: + type: int + inputBinding: + position: 1 + prefix: -t + separate: true + RG: + type: string? + inputBinding: + position: 2 + prefix: -R + separate: true + Ref: + type: File + secondaryFiles: + - .amb + - .ann + - .bwt + - .pac + - .sa + inputBinding: + position: 3 + separate: true + FQ1: + type: File + inputBinding: + position: 4 + separate: true + FQ2: + type: File? + inputBinding: + position: 5 + separate: true +outputs: + sam: + type: File + outputBinding: + glob: '*.sam' +stdout: bwaOutput.sam diff --git a/cwl/targetVarCall/bwaAlign.cwl b/cwl/targetVarCall/bwaAlign.cwl index 8d95f6e..7faf4df 100644 --- a/cwl/targetVarCall/bwaAlign.cwl +++ b/cwl/targetVarCall/bwaAlign.cwl @@ -1,55 +1,61 @@ -cwlVersion: v1.0 -class: Workflow -inputs: - threads: - type: int - RG: - type: string - Ref: - type: File - secondaryFiles: - - .amb - - .ann - - .bwt - - .pac - - .sa - FQ1: - type: File - FQ2: - type: File? -outputs: - Bam: - type: File - outputSource: sortBam/sbam - Idx: - type: File - outputSource: idxBam/idx -steps: - bwa: - run: bwa.cwl - in: - threads: threads - RG: RG - Ref: Ref - FQ1: FQ1 - FQ2: FQ2 - out: - - sam - sam2bam: - run: sam2bam.cwl - in: - sam: bwa/sam - out: - - bam - sortBam: - run: sortBam.cwl - in: - bam: sam2bam/bam - out: - - sbam - idxBam: - run: idxBam.cwl - in: - bam: sortBam/sbam - out: - - idx +cwlVersion: v1.0 +class: Workflow +requirements: +- class: StepInputExpressionRequirement +inputs: + threads: + type: int + RG: + type: string + Ref: + type: File + secondaryFiles: + - .amb + - .ann + - .bwt + - .pac + - .sa + FQ1: + type: File + FQ2: + type: File? +outputs: + Bam: + type: File + outputSource: sortBam/sbam + Idx: + type: File + outputSource: idxBam/idx +steps: + bwa: + run: bwa.cwl + in: + threads: threads + RG: RG + Ref: Ref + FQ1: FQ1 + FQ2: FQ2 + out: + - sam + sam2bam: + run: sam2bam.cwl + in: + bam: bwa/sam + obam: + valueFrom: $(inputs.bam.nameroot).bam + out: + - oBam + sortBam: + run: sortBam.cwl + in: + bam: sam2bam/oBam + obam: + valueFrom: $(inputs.bam.nameroot)_sort.bam + out: + - sbam + idxBam: + run: idxBam.cwl + in: + bam: sortBam/sbam + out: + - idx diff --git a/cwl/targetVarCall/idxBam.cwl b/cwl/targetVarCall/idxBam.cwl index f80966b..e779867 100644 --- a/cwl/targetVarCall/idxBam.cwl +++ b/cwl/targetVarCall/idxBam.cwl @@ -1,24 +1,24 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- samtools -- index -requirements: -- class: DockerRequirement - dockerPull: biocontainers/samtools:v1.7.0_cv3 -- class: InitialWorkDirRequirement - listing: - - $(inputs.bam) -inputs: - bam: - type: File - inputBinding: - position: 1 - separate: true -outputs: - idx: - type: File - secondaryFiles: - - .bai - outputBinding: - glob: $(inputs.bam.basename) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- index +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.12--h9aed4be_1 +- class: InitialWorkDirRequirement + listing: + - $(inputs.bam) +inputs: + bam: + type: File + inputBinding: + position: 1 + separate: true +outputs: + idx: + type: File + secondaryFiles: + - .bai + outputBinding: + glob: $(inputs.bam.basename) diff --git a/cwl/targetVarCall/sam2bam.cwl b/cwl/targetVarCall/sam2bam.cwl index 621e78d..48b492e 100644 --- a/cwl/targetVarCall/sam2bam.cwl +++ b/cwl/targetVarCall/sam2bam.cwl @@ -1,21 +1,67 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- samtools -- view -requirements: -- class: DockerRequirement - dockerPull: biocontainers/samtools:v1.7.0_cv3 -arguments: -- -b -inputs: - sam: - type: File - inputBinding: - separate: true -outputs: - bam: - type: File - outputBinding: - glob: $(inputs.sam.basename).bam -stdout: $(inputs.sam.basename).bam +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- view +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.16.1--h6899075_1 +inputs: + bam: + type: File + secondaryFiles: .bai + inputBinding: + position: 99 + separate: true + bed: + type: File? + inputBinding: + position: 1 + prefix: -L + separate: true + obam: + type: string + inputBinding: + position: 2 + prefix: -o + separate: true + region: + type: string? + inputBinding: + position: 100 + separate: true + outb: + type: boolean? + inputBinding: + prefix: -b + separate: true + exFlag: + type: int? + inputBinding: + prefix: -F + separate: true + reqFlag: + type: int? + inputBinding: + prefix: -f + separate: true + qname: + type: File? + inputBinding: + prefix: -N + separate: true + threads: + type: int? + inputBinding: + prefix: --threads + separate: true + mapq: + type: int? + inputBinding: + prefix: -q + separate: true +outputs: + oBam: + type: File + outputBinding: + glob: $(inputs.obam) diff --git a/cwl/targetVarCall/samtools_flagstat.cwl b/cwl/targetVarCall/samtools_flagstat.cwl index 3c68178..000949d 100644 --- a/cwl/targetVarCall/samtools_flagstat.cwl +++ b/cwl/targetVarCall/samtools_flagstat.cwl @@ -1,19 +1,19 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- samtools -- flagstat -requirements: -- class: DockerRequirement - dockerPull: biocontainers/samtools:v1.7.0_cv3 -inputs: - bam: - type: File - inputBinding: - separate: true -outputs: - flagstat: - type: File - outputBinding: - glob: $(inputs.bam.nameroot).flagstat.txt -stdout: $(inputs.bam.nameroot).flagstat.txt +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- flagstat +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.15--h1170115_1 +inputs: + bam: + type: File + inputBinding: + separate: true +outputs: + flagstat: + type: File + outputBinding: + glob: $(inputs.bam.nameroot).flagstat.txt +stdout: $(inputs.bam.nameroot).flagstat.txt diff --git a/cwl/targetVarCall/samtools_index.cwl b/cwl/targetVarCall/samtools_index.cwl index f80966b..e779867 100644 --- a/cwl/targetVarCall/samtools_index.cwl +++ b/cwl/targetVarCall/samtools_index.cwl @@ -1,24 +1,24 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- samtools -- index -requirements: -- class: DockerRequirement - dockerPull: biocontainers/samtools:v1.7.0_cv3 -- class: InitialWorkDirRequirement - listing: - - $(inputs.bam) -inputs: - bam: - type: File - inputBinding: - position: 1 - separate: true -outputs: - idx: - type: File - secondaryFiles: - - .bai - outputBinding: - glob: $(inputs.bam.basename) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- index +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.12--h9aed4be_1 +- class: InitialWorkDirRequirement + listing: + - $(inputs.bam) +inputs: + bam: + type: File + inputBinding: + position: 1 + separate: true +outputs: + idx: + type: File + secondaryFiles: + - .bai + outputBinding: + glob: $(inputs.bam.basename) diff --git a/cwl/targetVarCall/samtools_stats.cwl b/cwl/targetVarCall/samtools_stats.cwl index a5709bd..c054631 100644 --- a/cwl/targetVarCall/samtools_stats.cwl +++ b/cwl/targetVarCall/samtools_stats.cwl @@ -1,19 +1,19 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- samtools -- stats -requirements: -- class: DockerRequirement - dockerPull: biocontainers/samtools:v1.7.0_cv3 -inputs: - bam: - type: File - inputBinding: - separate: true -outputs: - stats: - type: File - outputBinding: - glob: $(inputs.bam.nameroot).stats.txt -stdout: $(inputs.bam.nameroot).stats.txt +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- stats +requirements: +- class: DockerRequirement + dockerPull: biocontainers/samtools:v1.7.0_cv3 +inputs: + bam: + type: File + inputBinding: + separate: true +outputs: + stats: + type: File + outputBinding: + glob: $(inputs.bam.nameroot).stats.txt +stdout: $(inputs.bam.nameroot).stats.txt diff --git a/cwl/targetVarCall/sortBam.cwl b/cwl/targetVarCall/sortBam.cwl index bc3d45d..be772d7 100644 --- a/cwl/targetVarCall/sortBam.cwl +++ b/cwl/targetVarCall/sortBam.cwl @@ -1,19 +1,23 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- samtools -- sort -requirements: -- class: DockerRequirement - dockerPull: biocontainers/samtools:v1.7.0_cv3 -inputs: - bam: - type: File - inputBinding: - separate: true -outputs: - sbam: - type: File - outputBinding: - glob: $(inputs.bam.nameroot).sorted.bam -stdout: $(inputs.bam.nameroot).sorted.bam +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- sort +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.12--h9aed4be_1 +inputs: + bam: + type: File + inputBinding: + separate: true + obam: + type: string + inputBinding: + prefix: -o + separate: true +outputs: + sbam: + type: File + outputBinding: + glob: $(inputs.obam) diff --git a/cwl/targetVarCall/targetVarCall.cwl b/cwl/targetVarCall/targetVarCall.cwl index fbfa7e8..3942359 100644 --- a/cwl/targetVarCall/targetVarCall.cwl +++ b/cwl/targetVarCall/targetVarCall.cwl @@ -1,113 +1,111 @@ -cwlVersion: v1.0 -class: Workflow -requirements: -- class: SubworkflowFeatureRequirement -- class: StepInputExpressionRequirement -- class: InlineJavascriptRequirement -inputs: - Sample: - type: string - RG: - type: string - threads: - type: int - Ref: - type: File - secondaryFiles: - - .amb - - .ann - - .bwt - - .pac - - .sa - - .fai - - $(self.nameroot).dict - FQ1: - type: File - FQ2: - type: File - knowSites: - type: - type: array - items: File - inputBinding: - separate: true - secondaryFiles: .idx - bed: - type: File - downsampling: - type: int - default: 0 -outputs: - BAM: - type: File - outputSource: BaseRecal/rcBam - flagstat: - type: File - outputSource: BaseRecal/flagstat - stats: - type: File - outputSource: BaseRecal/stats - gVCF: - type: File - outputSource: HaplotypeCaller/gvcf - VCF: - type: File - outputSource: GenotypeGVCFs/vcf -steps: - bwaAlign: - run: cwl/targetVarCall/bwaAlign.cwl - in: - threads: threads - RG: RG - Ref: Ref - FQ1: FQ1 - FQ2: FQ2 - out: - - Bam - - Idx - BaseRecal: - run: cwl/targetVarCall/BaseRecal.cwl - in: - bam: bwaAlign/Idx - ref: Ref - knowSites: knowSites - oBam: - source: Sample - valueFrom: $(self).bam - out: - - rcBam - - flagstat - - stats - bedtolist: - run: cwl/targetVarCall/bedtolist.cwl - in: - bed: bed - SD: - source: Ref - valueFrom: $(self.secondaryFiles[6]) - out: - valueFrom: $(inputs.bed.nameroot).list - out: - - intval - HaplotypeCaller: - run: cwl/targetVarCall/HaplotypeCaller.cwl - in: - bam: BaseRecal/rcBam - interval: bedtolist/intval - ref: Ref - gout: - source: Sample - valueFrom: $(self).g.vcf - downsampling: downsampling - out: - - gvcf - GenotypeGVCFs: - run: cwl/targetVarCall/GenotypeGVCFs.cwl - in: - variant: HaplotypeCaller/gvcf - ref: Ref - vout: - source: Sample - valueFrom: $(self).vcf - out: - - vcf +cwlVersion: v1.0 +class: Workflow +requirements: +- class: SubworkflowFeatureRequirement +- class: StepInputExpressionRequirement +- class: InlineJavascriptRequirement +inputs: + Sample: + type: string + RG: + type: string + threads: + type: int + Ref: + type: File + secondaryFiles: + - .amb + - .ann + - .bwt + - .pac + - .sa + - .fai + - $(self.nameroot).dict + FQ1: + type: File + FQ2: + type: File + knowSites: + type: + type: array + items: File + secondaryFiles: .idx + bed: + type: File + downsampling: + type: int + default: 0 +outputs: + BAM: + type: File + outputSource: BaseRecal/rcBam + flagstat: + type: File + outputSource: BaseRecal/flagstat + stats: + type: File + outputSource: BaseRecal/stats + gVCF: + type: File + outputSource: HaplotypeCaller/gvcf + VCF: + type: File + outputSource: GenotypeGVCFs/vcf +steps: + bwaAlign: + run: bwaAlign.cwl + in: + threads: threads + RG: RG + Ref: Ref + FQ1: FQ1 + FQ2: FQ2 + out: + - Bam + - Idx + BaseRecal: + run: BaseRecal.cwl + in: + bam: bwaAlign/Idx + ref: Ref + knowSites: knowSites + oBam: + source: Sample + valueFrom: $(self).bam + out: + - rcBam + - flagstat + - stats + bedtolist: + run: bedtolist.cwl + in: + bed: bed + SD: + source: Ref + valueFrom: $(self.secondaryFiles[6]) + out: + valueFrom: $(inputs.bed.nameroot).list + out: + - intval + HaplotypeCaller: + run: HaplotypeCaller.cwl + in: + bam: BaseRecal/rcBam + interval: bedtolist/intval + ref: Ref + gout: + source: Sample + valueFrom: $(self).g.vcf + downsampling: downsampling + out: + - gvcf + GenotypeGVCFs: + run: GenotypeGVCFs.cwl + in: + variant: HaplotypeCaller/gvcf + ref: Ref + vout: + source: Sample + valueFrom: $(self).vcf + out: + - vcf diff --git a/cwl/targetVarCall/targetVarCall.yml b/cwl/targetVarCall/targetVarCall.yml index 9978158..64d6a76 100644 --- a/cwl/targetVarCall/targetVarCall.yml +++ b/cwl/targetVarCall/targetVarCall.yml @@ -1 +1 @@ -downsampling: 0 +downsampling: 0 diff --git a/cwl/trimRRBSdiversity.cwl b/cwl/trimRRBSdiversity.cwl new file mode 100644 index 0000000..2f8370f --- /dev/null +++ b/cwl/trimRRBSdiversity.cwl @@ -0,0 +1,32 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- python +- /opt/trimRRBSdiversityAdaptCustomers.py +requirements: +- class: InitialWorkDirRequirement + listing: + - $(inputs.fq1) + - $(inputs.fq2) +- class: DockerRequirement + dockerPull: hubentu/rrbs +inputs: + fq1: + type: File + inputBinding: + prefix: '-1' + separate: true + fq2: + type: File + inputBinding: + prefix: '-2' + separate: true +outputs: + FQ1: + type: File + outputBinding: + glob: $(inputs.fq1.nameroot)_* + FQ2: + type: File + outputBinding: + glob: $(inputs.fq2.nameroot)_* diff --git a/cwl/trimRRBSdiversity.yml b/cwl/trimRRBSdiversity.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/trimRRBSdiversity.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/trim_galore.cwl b/cwl/trim_galore.cwl new file mode 100644 index 0000000..c9a33d3 --- /dev/null +++ b/cwl/trim_galore.cwl @@ -0,0 +1,51 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: trim_galore +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/trim-galore:0.6.7--hdfd78af_0 +arguments: +- -o +- ./ +inputs: + fq1: + type: File + inputBinding: + position: 9 + separate: true + fq2: + type: File? + inputBinding: + position: 10 + separate: true + a1: + type: string + inputBinding: + prefix: -a + separate: true + default: AGATCGGAAGAGC + a2: + type: string? + inputBinding: + prefix: -a2 + separate: true + default: AAATCAAAAAAAC + paired: + type: boolean + inputBinding: + prefix: --paired + separate: true + default: true +outputs: + FQ1: + type: File + outputBinding: + glob: '*_1.fq.gz' + FQ2: + type: File + outputBinding: + glob: '*_2.fq.gz' + report: + type: File[] + outputBinding: + glob: '*.txt' diff --git a/cwl/trim_galore.yml b/cwl/trim_galore.yml new file mode 100644 index 0000000..e817e29 --- /dev/null +++ b/cwl/trim_galore.yml @@ -0,0 +1,3 @@ +a1: AGATCGGAAGAGC +a2: AAATCAAAAAAAC +paired: true diff --git a/cwl/vcf2bed.R b/cwl/vcf2bed.R new file mode 100644 index 0000000..83a336c --- /dev/null +++ b/cwl/vcf2bed.R @@ -0,0 +1,12 @@ +.libPaths('/home/qhu/miniconda3/envs/r-base/lib/R/library') +suppressPackageStartupMessages(library(R.utils)) +args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) +args[["window"]] <- as.integer(args[["window"]]) +vcf2bed <- +function(vcf, out, window = 200){ + reg <- read.table(vcf, comment = "#", sep = "\t") + bed <- cbind(reg[,1], reg[,2]-window, reg[,2]+window) + bed <- unique(bed) + write.table(bed, out, row.names = FALSE, col.names = FALSE, quote = FALSE, sep = "\t") +} +do.call(vcf2bed, args) diff --git a/cwl/vcf2bed.cwl b/cwl/vcf2bed.cwl new file mode 100644 index 0000000..06b194b --- /dev/null +++ b/cwl/vcf2bed.cwl @@ -0,0 +1,42 @@ +cwlVersion: v1.2 +class: CommandLineTool +baseCommand: +- bash +- script.sh +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/bedtools:2.30.0--h7d7f7ad_2 +- class: InitialWorkDirRequirement + listing: + - entryname: script.sh + entry: |2 + + vcf=$1 + fai=$2 + win=$3 + + vn=`basename $vcf .bed` + awk '{if($0 !~ "^#")print $1"\t"$2-1"\t"$2}' $vcf > vcfbed + bedtools slop -i vcfbed -b $win -g $fai > $vn.$win.bed + writable: false +inputs: + vcf: + type: File + inputBinding: + position: 1 + separate: true + fai: + type: File + inputBinding: + position: 2 + separate: true + win: + type: int + inputBinding: + position: 3 + separate: true +outputs: + bed: + type: File + outputBinding: + glob: '*.bed' diff --git a/cwl/vcf2bed.yml b/cwl/vcf2bed.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/vcf2bed.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/vcfCoverage/decompose.cwl b/cwl/vcfCoverage/decompose.cwl index 4d3d142..0321a52 100644 --- a/cwl/vcfCoverage/decompose.cwl +++ b/cwl/vcfCoverage/decompose.cwl @@ -1,27 +1,27 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- vt -- decompose -requirements: -- class: DockerRequirement - dockerPull: hubentu/vt -arguments: -- -s -inputs: - ivcf: - type: File - inputBinding: - position: 1 - separate: true - ovcf: - type: string - inputBinding: - position: 2 - prefix: -o - separate: true -outputs: - oVcf: - type: File - outputBinding: - glob: $(inputs.ovcf) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- vt +- decompose +requirements: +- class: DockerRequirement + dockerPull: hubentu/vt +arguments: +- -s +inputs: + ivcf: + type: File + inputBinding: + position: 1 + separate: true + ovcf: + type: string + inputBinding: + position: 2 + prefix: -o + separate: true +outputs: + oVcf: + type: File + outputBinding: + glob: $(inputs.ovcf) diff --git a/cwl/vcfCoverage/readcount.cwl b/cwl/vcfCoverage/readcount.cwl index 8c1d310..2bb5533 100644 --- a/cwl/vcfCoverage/readcount.cwl +++ b/cwl/vcfCoverage/readcount.cwl @@ -1,46 +1,46 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- /usr/bin/python -- /usr/bin/bam_readcount_helper.py -requirements: -- class: DockerRequirement - dockerPull: mgibio/bam_readcount_helper-cwl:1.1.1 -arguments: -- valueFrom: NOPREFIX - position: 5 -- valueFrom: ./ - position: 6 - shellQuote: false -inputs: - vcf: - type: File - inputBinding: - position: 1 - separate: true - sample: - type: string - inputBinding: - position: 2 - separate: true - ref: - type: File - secondaryFiles: .fai - inputBinding: - position: 3 - separate: true - bam: - type: File - secondaryFiles: .bai - inputBinding: - position: 4 - separate: true -outputs: - snv: - type: File - outputBinding: - glob: $(inputs.sample)_bam_readcount_snv.tsv - indel: - type: File - outputBinding: - glob: $(inputs.sample)_bam_readcount_indel.tsv +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- /usr/bin/python +- /usr/bin/bam_readcount_helper.py +requirements: +- class: DockerRequirement + dockerPull: mgibio/bam_readcount_helper-cwl:1.1.1 +arguments: +- valueFrom: NOPREFIX + position: 5 +- valueFrom: ./ + position: 6 + shellQuote: false +inputs: + vcf: + type: File + inputBinding: + position: 1 + separate: true + sample: + type: string + inputBinding: + position: 2 + separate: true + ref: + type: File + secondaryFiles: .fai + inputBinding: + position: 3 + separate: true + bam: + type: File + secondaryFiles: .bai + inputBinding: + position: 4 + separate: true +outputs: + snv: + type: File + outputBinding: + glob: $(inputs.sample)_bam_readcount_snv.tsv + indel: + type: File + outputBinding: + glob: $(inputs.sample)_bam_readcount_indel.tsv diff --git a/cwl/vcfCoverage/readcount_annotator_indel.cwl b/cwl/vcfCoverage/readcount_annotator_indel.cwl index 5f271fe..bc8ad4e 100644 --- a/cwl/vcfCoverage/readcount_annotator_indel.cwl +++ b/cwl/vcfCoverage/readcount_annotator_indel.cwl @@ -1,44 +1,44 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: vcf-readcount-annotator -requirements: -- class: DockerRequirement - dockerPull: griffithlab/vatools:3.1.0 -inputs: - ivcf: - type: File - inputBinding: - position: 1 - separate: true - readcount: - type: File - inputBinding: - position: 2 - separate: true - ntype: - type: string - inputBinding: - position: 3 - separate: true - default: DNA - sample: - type: string? - inputBinding: - prefix: -s - separate: true - vtype: - type: string - inputBinding: - prefix: -t - separate: true - default: snv - ovcf: - type: string - inputBinding: - prefix: -o - separate: true -outputs: - oVcf: - type: File - outputBinding: - glob: $(inputs.ovcf) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: vcf-readcount-annotator +requirements: +- class: DockerRequirement + dockerPull: griffithlab/vatools:3.1.0 +inputs: + ivcf: + type: File + inputBinding: + position: 1 + separate: true + readcount: + type: File + inputBinding: + position: 2 + separate: true + ntype: + type: string + inputBinding: + position: 3 + separate: true + default: DNA + sample: + type: string? + inputBinding: + prefix: -s + separate: true + vtype: + type: string + inputBinding: + prefix: -t + separate: true + default: snv + ovcf: + type: string + inputBinding: + prefix: -o + separate: true +outputs: + oVcf: + type: File + outputBinding: + glob: $(inputs.ovcf) diff --git a/cwl/vcfCoverage/readcount_annotator_snv.cwl b/cwl/vcfCoverage/readcount_annotator_snv.cwl index 5f271fe..bc8ad4e 100644 --- a/cwl/vcfCoverage/readcount_annotator_snv.cwl +++ b/cwl/vcfCoverage/readcount_annotator_snv.cwl @@ -1,44 +1,44 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: vcf-readcount-annotator -requirements: -- class: DockerRequirement - dockerPull: griffithlab/vatools:3.1.0 -inputs: - ivcf: - type: File - inputBinding: - position: 1 - separate: true - readcount: - type: File - inputBinding: - position: 2 - separate: true - ntype: - type: string - inputBinding: - position: 3 - separate: true - default: DNA - sample: - type: string? - inputBinding: - prefix: -s - separate: true - vtype: - type: string - inputBinding: - prefix: -t - separate: true - default: snv - ovcf: - type: string - inputBinding: - prefix: -o - separate: true -outputs: - oVcf: - type: File - outputBinding: - glob: $(inputs.ovcf) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: vcf-readcount-annotator +requirements: +- class: DockerRequirement + dockerPull: griffithlab/vatools:3.1.0 +inputs: + ivcf: + type: File + inputBinding: + position: 1 + separate: true + readcount: + type: File + inputBinding: + position: 2 + separate: true + ntype: + type: string + inputBinding: + position: 3 + separate: true + default: DNA + sample: + type: string? + inputBinding: + prefix: -s + separate: true + vtype: + type: string + inputBinding: + prefix: -t + separate: true + default: snv + ovcf: + type: string + inputBinding: + prefix: -o + separate: true +outputs: + oVcf: + type: File + outputBinding: + glob: $(inputs.ovcf) diff --git a/cwl/vcfCoverage/vcfCoverage.cwl b/cwl/vcfCoverage/vcfCoverage.cwl index 5f25bdf..0636e3f 100644 --- a/cwl/vcfCoverage/vcfCoverage.cwl +++ b/cwl/vcfCoverage/vcfCoverage.cwl @@ -1,67 +1,67 @@ -cwlVersion: v1.0 -class: Workflow -requirements: -- class: InlineJavascriptRequirement -- class: StepInputExpressionRequirement -- class: SubworkflowFeatureRequirement -inputs: - vcf: - type: File - sample: - type: string - bam: - type: File - secondaryFiles: .bai - ntype: - type: string - default: DNA - ref: - type: File - secondaryFiles: .fai -outputs: - outvcf: - type: File - outputSource: readcount_annotator_indel/oVcf -steps: - decompose: - run: cwl/vcfCoverage/decompose.cwl - in: - ivcf: vcf - ovcf: - valueFrom: $(inputs.ivcf.nameroot)_dc.vcf - out: - - oVcf - readcount: - run: cwl/vcfCoverage/readcount.cwl - in: - vcf: decompose/oVcf - sample: sample - ref: ref - bam: bam - out: - - snv - - indel - readcount_annotator_snv: - run: cwl/vcfCoverage/readcount_annotator_snv.cwl - in: - ivcf: decompose/oVcf - readcount: readcount/snv - ntype: ntype - sample: sample - ovcf: - valueFrom: $(inputs.ivcf.nameroot)_snv.vcf - out: - - oVcf - readcount_annotator_indel: - run: cwl/vcfCoverage/readcount_annotator_indel.cwl - in: - ivcf: readcount_annotator_snv/oVcf - readcount: readcount/indel - ntype: ntype - sample: sample - vtype: - valueFrom: indel - ovcf: - valueFrom: $(inputs.ivcf.nameroot)_indel.vcf - out: - - oVcf +cwlVersion: v1.0 +class: Workflow +requirements: +- class: InlineJavascriptRequirement +- class: StepInputExpressionRequirement +- class: SubworkflowFeatureRequirement +inputs: + vcf: + type: File + sample: + type: string + bam: + type: File + secondaryFiles: .bai + ntype: + type: string + default: DNA + ref: + type: File + secondaryFiles: .fai +outputs: + outvcf: + type: File + outputSource: readcount_annotator_indel/oVcf +steps: + decompose: + run: decompose.cwl + in: + ivcf: vcf + ovcf: + valueFrom: $(inputs.ivcf.nameroot)_dc.vcf + out: + - oVcf + readcount: + run: readcount.cwl + in: + vcf: decompose/oVcf + sample: sample + ref: ref + bam: bam + out: + - snv + - indel + readcount_annotator_snv: + run: readcount_annotator_snv.cwl + in: + ivcf: decompose/oVcf + readcount: readcount/snv + ntype: ntype + sample: sample + ovcf: + valueFrom: $(inputs.ivcf.nameroot)_snv.vcf + out: + - oVcf + readcount_annotator_indel: + run: readcount_annotator_indel.cwl + in: + ivcf: readcount_annotator_snv/oVcf + readcount: readcount/indel + ntype: ntype + sample: sample + vtype: + valueFrom: indel + ovcf: + valueFrom: $(inputs.ivcf.nameroot)_indel.vcf + out: + - oVcf diff --git a/cwl/vcfCoverage/vcfCoverage.yml b/cwl/vcfCoverage/vcfCoverage.yml index b4d0411..1721634 100644 --- a/cwl/vcfCoverage/vcfCoverage.yml +++ b/cwl/vcfCoverage/vcfCoverage.yml @@ -1 +1 @@ -ntype: DNA +ntype: DNA diff --git a/cwl/vcfExpression/T2Gene.R b/cwl/vcfExpression/T2Gene.R index d26e653..362020e 100644 --- a/cwl/vcfExpression/T2Gene.R +++ b/cwl/vcfExpression/T2Gene.R @@ -1,16 +1,15 @@ -suppressPackageStartupMessages(library(R.utils)) -suppressPackageStartupMessages(library(codetools)) -args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) -T2Gene <- -function(kexp){ - e1 <- read.table(kexp, header = TRUE, check.names = FALSE, - stringsAsFactors = FALSE, sep = "\t") - ids <- do.call(rbind, base::strsplit(e1$target_id, split = "\\|")) - tx2gene <- data.frame(ids[,1:2]) - gexp <- tximport::tximport(kexp, type = "kallisto", tx2gene = tx2gene, ignoreAfterBar=TRUE) - gExp <- data.frame(gene = sub("\\..*", "", rownames(gexp$abundance)), - abundance = gexp$abundance) - write.table(gExp, file = "abundance_gene.tsv", row.names = FALSE, - col.names = TRUE, quote = FALSE, sep = "\t") -} -do.call(T2Gene, args) +suppressPackageStartupMessages(library(R.utils)) +args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) +T2Gene <- +function(kexp){ + e1 <- read.table(kexp, header = TRUE, check.names = FALSE, + stringsAsFactors = FALSE, sep = "\t") + ids <- do.call(rbind, base::strsplit(e1$target_id, split = "\\|")) + tx2gene <- data.frame(ids[,1:2]) + gexp <- tximport::tximport(kexp, type = "kallisto", tx2gene = tx2gene, ignoreAfterBar=TRUE) + gExp <- data.frame(gene = sub("\\..*", "", rownames(gexp$abundance)), + abundance = gexp$abundance) + write.table(gExp, file = "abundance_gene.tsv", row.names = FALSE, + col.names = TRUE, quote = FALSE, sep = "\t") +} +do.call(T2Gene, args) diff --git a/cwl/vcfExpression/T2Gene.cwl b/cwl/vcfExpression/T2Gene.cwl index c05ab6d..a89a824 100644 --- a/cwl/vcfExpression/T2Gene.cwl +++ b/cwl/vcfExpression/T2Gene.cwl @@ -1,16 +1,39 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- Rscript -- cwl/vcfExpression/T2Gene.R -inputs: - kexp: - type: File - inputBinding: - prefix: kexp= - separate: false -outputs: - gout: - type: File - outputBinding: - glob: abundance_gene.tsv +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: Rscript +requirements: +- class: InitialWorkDirRequirement + listing: + - entryname: T2Gene.R + entry: |- + suppressPackageStartupMessages(library(R.utils)) + args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) + T2Gene <- + function(kexp){ + e1 <- read.table(kexp, header = TRUE, check.names = FALSE, + stringsAsFactors = FALSE, sep = "\t") + ids <- do.call(rbind, base::strsplit(e1$target_id, split = "\\|")) + tx2gene <- data.frame(ids[,1:2]) + gexp <- tximport::tximport(kexp, type = "kallisto", tx2gene = tx2gene, ignoreAfterBar=TRUE) + gExp <- data.frame(gene = sub("\\..*", "", rownames(gexp$abundance)), + abundance = gexp$abundance) + write.table(gExp, file = "abundance_gene.tsv", row.names = FALSE, + col.names = TRUE, quote = FALSE, sep = "\t") + } + do.call(T2Gene, args) + writable: false +- class: DockerRequirement + dockerPull: quay.io/biocontainers/bioconductor-tximport:1.22.0--r41hdfd78af_0 +arguments: +- T2Gene.R +inputs: + kexp: + type: File + inputBinding: + prefix: kexp= + separate: false +outputs: + gout: + type: File + outputBinding: + glob: abundance_gene.tsv diff --git a/cwl/vcfExpression/bgzip.cwl b/cwl/vcfExpression/bgzip.cwl index 8d9129b..a3f9938 100644 --- a/cwl/vcfExpression/bgzip.cwl +++ b/cwl/vcfExpression/bgzip.cwl @@ -1,19 +1,19 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- bgzip -- -c -requirements: -- class: DockerRequirement - dockerPull: biocontainers/tabix:v1.3.2-2-deb_cv1 -inputs: - ifile: - type: File - inputBinding: - separate: true -outputs: - zfile: - type: File - outputBinding: - glob: $(inputs.ifile.basename).gz -stdout: $(inputs.ifile.basename).gz +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- bgzip +- -c +requirements: +- class: DockerRequirement + dockerPull: biocontainers/tabix:v1.3.2-2-deb_cv1 +inputs: + ifile: + type: File + inputBinding: + separate: true +outputs: + zfile: + type: File + outputBinding: + glob: $(inputs.ifile.basename).gz +stdout: $(inputs.ifile.basename).gz diff --git a/cwl/vcfExpression/cleanExp.R b/cwl/vcfExpression/cleanExp.R index 0416f77..e9f4f6e 100644 --- a/cwl/vcfExpression/cleanExp.R +++ b/cwl/vcfExpression/cleanExp.R @@ -1,11 +1,10 @@ -suppressPackageStartupMessages(library(R.utils)) -suppressPackageStartupMessages(library(codetools)) -args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) -cleanExp <- -function(afile) { - exp1 <- read.table(afile, header = TRUE, stringsAsFactors = FALSE) - exp1[,1] <- sub("\\|ENSG.*", "", exp1[,1]) - write.table(exp1, file = "abundance_clean.tsv", - row.names = FALSE, quote = FALSE, sep = "\t") -} -do.call(cleanExp, args) +suppressPackageStartupMessages(library(R.utils)) +args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) +cleanExp <- +function(afile) { + exp1 <- read.table(afile, header = TRUE, stringsAsFactors = FALSE) + exp1[,1] <- sub("\\|ENSG.*", "", exp1[,1]) + write.table(exp1, file = "abundance_clean.tsv", + row.names = FALSE, quote = FALSE, sep = "\t") +} +do.call(cleanExp, args) diff --git a/cwl/vcfExpression/cleanExp.cwl b/cwl/vcfExpression/cleanExp.cwl index 93f37ab..b7deae5 100644 --- a/cwl/vcfExpression/cleanExp.cwl +++ b/cwl/vcfExpression/cleanExp.cwl @@ -1,16 +1,32 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- Rscript -- cwl/vcfExpression/cleanExp.R -inputs: - afile: - type: File - inputBinding: - prefix: afile= - separate: false -outputs: - aout: - type: File - outputBinding: - glob: abundance_clean.tsv +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: Rscript +requirements: +- class: InitialWorkDirRequirement + listing: + - entryname: cleanExp.R + entry: |- + suppressPackageStartupMessages(library(R.utils)) + args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) + cleanExp <- + function(afile) { + exp1 <- read.table(afile, header = TRUE, stringsAsFactors = FALSE) + exp1[,1] <- sub("\\|ENSG.*", "", exp1[,1]) + write.table(exp1, file = "abundance_clean.tsv", + row.names = FALSE, quote = FALSE, sep = "\t") + } + do.call(cleanExp, args) + writable: false +arguments: +- cleanExp.R +inputs: + afile: + type: File + inputBinding: + prefix: afile= + separate: false +outputs: + aout: + type: File + outputBinding: + glob: abundance_clean.tsv diff --git a/cwl/vcfExpression/kallistoQuant.cwl b/cwl/vcfExpression/kallistoQuant.cwl index b57262f..e9bad11 100644 --- a/cwl/vcfExpression/kallistoQuant.cwl +++ b/cwl/vcfExpression/kallistoQuant.cwl @@ -1,39 +1,39 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- kallisto -- quant -requirements: -- class: DockerRequirement - dockerPull: zlskidmore/kallisto -arguments: -- -o -- ./ -inputs: - index: - type: File - inputBinding: - prefix: -i - separate: true - fastq: - type: File[] - inputBinding: - separate: true - threads: - type: int - inputBinding: - prefix: -t - separate: true -outputs: - h5: - type: File - outputBinding: - glob: abundance.h5 - tsv: - type: File - outputBinding: - glob: abundance.tsv - info: - type: File - outputBinding: - glob: run_info.json +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- kallisto +- quant +requirements: +- class: DockerRequirement + dockerPull: zlskidmore/kallisto +arguments: +- -o +- ./ +inputs: + index: + type: File + inputBinding: + prefix: -i + separate: true + fastq: + type: File[] + inputBinding: + separate: true + threads: + type: int + inputBinding: + prefix: -t + separate: true +outputs: + h5: + type: File + outputBinding: + glob: abundance.h5 + tsv: + type: File + outputBinding: + glob: abundance.tsv + info: + type: File + outputBinding: + glob: run_info.json diff --git a/cwl/vcfExpression/tabixIndex.cwl b/cwl/vcfExpression/tabixIndex.cwl index f506ee0..591a0ea 100644 --- a/cwl/vcfExpression/tabixIndex.cwl +++ b/cwl/vcfExpression/tabixIndex.cwl @@ -1,28 +1,28 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: tabix -requirements: -- class: DockerRequirement - dockerPull: biocontainers/tabix:v1.3.2-2-deb_cv1 -- class: InitialWorkDirRequirement - listing: - - $(inputs.tfile) -inputs: - tfile: - type: File - inputBinding: - position: 1 - separate: true - type: - type: string - inputBinding: - prefix: -p - separate: true - default: vcf -outputs: - idx: - type: File - secondaryFiles: - - .tbi - outputBinding: - glob: $(inputs.tfile.basename) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: tabix +requirements: +- class: DockerRequirement + dockerPull: biocontainers/tabix:v1.3.2-2-deb_cv1 +- class: InitialWorkDirRequirement + listing: + - $(inputs.tfile) +inputs: + tfile: + type: File + inputBinding: + position: 1 + separate: true + type: + type: string + inputBinding: + prefix: -p + separate: true + default: vcf +outputs: + idx: + type: File + secondaryFiles: + - .tbi + outputBinding: + glob: $(inputs.tfile.basename) diff --git a/cwl/vcfExpression/vcfExpAnn.cwl b/cwl/vcfExpression/vcfExpAnn.cwl index bff7bd1..6dab26a 100644 --- a/cwl/vcfExpression/vcfExpAnn.cwl +++ b/cwl/vcfExpression/vcfExpAnn.cwl @@ -1,56 +1,56 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: vcf-expression-annotator -requirements: -- class: DockerRequirement - dockerPull: griffithlab/vatools:3.1.0 -arguments: -- --ignore-transcript-version -inputs: - ivcf: - type: File - inputBinding: - position: 1 - separate: true - expression: - type: File - inputBinding: - position: 2 - separate: true - etype: - type: string - inputBinding: - position: 3 - separate: true - default: kallisto - gtype: - type: string - inputBinding: - position: 4 - separate: true - default: transcript - idCol: - type: string? - inputBinding: - prefix: -i - separate: true - expCol: - type: string? - inputBinding: - prefix: -e - separate: true - sample: - type: string? - inputBinding: - prefix: -s - separate: true - ovcf: - type: string - inputBinding: - prefix: -o - separate: true -outputs: - oVcf: - type: File - outputBinding: - glob: $(inputs.ovcf) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: vcf-expression-annotator +requirements: +- class: DockerRequirement + dockerPull: griffithlab/vatools:3.1.0 +arguments: +- --ignore-transcript-version +inputs: + ivcf: + type: File + inputBinding: + position: 1 + separate: true + expression: + type: File + inputBinding: + position: 2 + separate: true + etype: + type: string + inputBinding: + position: 3 + separate: true + default: kallisto + gtype: + type: string + inputBinding: + position: 4 + separate: true + default: transcript + idCol: + type: string? + inputBinding: + prefix: -i + separate: true + expCol: + type: string? + inputBinding: + prefix: -e + separate: true + sample: + type: string? + inputBinding: + prefix: -s + separate: true + ovcf: + type: string + inputBinding: + prefix: -o + separate: true +outputs: + oVcf: + type: File + outputBinding: + glob: $(inputs.ovcf) diff --git a/cwl/vcfExpression/vcfExpression.R b/cwl/vcfExpression/vcfExpression.R deleted file mode 100644 index c3b85c5..0000000 --- a/cwl/vcfExpression/vcfExpression.R +++ /dev/null @@ -1,12 +0,0 @@ -.libPaths('/home/hq/R/x86_64-pc-linux-gnu-library/4.0') -suppressPackageStartupMessages(library(R.utils)) -suppressPackageStartupMessages(library(codetools)) -args <- commandArgs(trailingOnly = TRUE, asValues = TRUE) -vcfExpression <- -function(afile) { - exp1 <- read.table(afile, header = TRUE, stringsAsFactors = FALSE) - exp1[,1] <- sub("\\|ENSG.*", "", exp1[,1]) - write.table(exp1, file = "abundance_clean.tsv", - row.names = FALSE, quote = FALSE, sep = "\t") -} -do.call(vcfExpression, args) diff --git a/cwl/vcfExpression/vcfExpression.cwl b/cwl/vcfExpression/vcfExpression.cwl index 2750c2f..d2da62a 100644 --- a/cwl/vcfExpression/vcfExpression.cwl +++ b/cwl/vcfExpression/vcfExpression.cwl @@ -1,16 +1,89 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- Rscript -- cwl/vcfExpression/vcfExpression.R -inputs: - afile: - type: File - inputBinding: - prefix: afile= - separate: false -outputs: - aout: - type: File - outputBinding: - glob: abundance_clean.tsv +cwlVersion: v1.0 +class: Workflow +requirements: +- class: InlineJavascriptRequirement +- class: StepInputExpressionRequirement +inputs: + rnafqs: + type: File[] + kallistoIdx: + type: File + threads: + type: int + default: 16 + svcf: + type: File +outputs: + ExpVcf: + type: File + secondaryFiles: .tbi + outputSource: tabixIndex/idx +steps: + kallistoQuant: + run: kallistoQuant.cwl + in: + fastq: rnafqs + index: kallistoIdx + threads: threads + out: + - h5 + - tsv + - info + cleanExp: + run: cleanExp.cwl + in: + afile: kallistoQuant/tsv + out: + - aout + vcfExpAnn: + run: vcfExpAnn.cwl + in: + ivcf: svcf + ovcf: + valueFrom: $(inputs.ivcf.nameroot)_ExpAnn.vcf + expression: cleanExp/aout + gtype: + valueFrom: transcript + etype: + valueFrom: kallisto + out: + - oVcf + T2Gene: + run: T2Gene.cwl + in: + kexp: kallistoQuant/tsv + out: + - gout + vcfgExpAnn: + run: vcfgExpAnn.cwl + in: + ivcf: vcfExpAnn/oVcf + ovcf: + source: + - svcf + valueFrom: $(self[0].nameroot)_gAnn.vcf + expression: T2Gene/gout + gtype: + valueFrom: gene + etype: + valueFrom: custom + idCol: + valueFrom: gene + expCol: + valueFrom: abundance + out: + - oVcf + bgzip: + run: bgzip.cwl + in: + ifile: vcfgExpAnn/oVcf + out: + - zfile + tabixIndex: + run: tabixIndex.cwl + in: + tfile: bgzip/zfile + type: + valueFrom: vcf + out: + - idx diff --git a/cwl/vcfExpression/vcfExpression.yml b/cwl/vcfExpression/vcfExpression.yml index 0967ef4..6a00a1a 100644 --- a/cwl/vcfExpression/vcfExpression.yml +++ b/cwl/vcfExpression/vcfExpression.yml @@ -1 +1 @@ -{} +threads: 16 diff --git a/cwl/vcfExpression/vcfgExpAnn.cwl b/cwl/vcfExpression/vcfgExpAnn.cwl index bff7bd1..6dab26a 100644 --- a/cwl/vcfExpression/vcfgExpAnn.cwl +++ b/cwl/vcfExpression/vcfgExpAnn.cwl @@ -1,56 +1,56 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: vcf-expression-annotator -requirements: -- class: DockerRequirement - dockerPull: griffithlab/vatools:3.1.0 -arguments: -- --ignore-transcript-version -inputs: - ivcf: - type: File - inputBinding: - position: 1 - separate: true - expression: - type: File - inputBinding: - position: 2 - separate: true - etype: - type: string - inputBinding: - position: 3 - separate: true - default: kallisto - gtype: - type: string - inputBinding: - position: 4 - separate: true - default: transcript - idCol: - type: string? - inputBinding: - prefix: -i - separate: true - expCol: - type: string? - inputBinding: - prefix: -e - separate: true - sample: - type: string? - inputBinding: - prefix: -s - separate: true - ovcf: - type: string - inputBinding: - prefix: -o - separate: true -outputs: - oVcf: - type: File - outputBinding: - glob: $(inputs.ovcf) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: vcf-expression-annotator +requirements: +- class: DockerRequirement + dockerPull: griffithlab/vatools:3.1.0 +arguments: +- --ignore-transcript-version +inputs: + ivcf: + type: File + inputBinding: + position: 1 + separate: true + expression: + type: File + inputBinding: + position: 2 + separate: true + etype: + type: string + inputBinding: + position: 3 + separate: true + default: kallisto + gtype: + type: string + inputBinding: + position: 4 + separate: true + default: transcript + idCol: + type: string? + inputBinding: + prefix: -i + separate: true + expCol: + type: string? + inputBinding: + prefix: -e + separate: true + sample: + type: string? + inputBinding: + prefix: -s + separate: true + ovcf: + type: string + inputBinding: + prefix: -o + separate: true +outputs: + oVcf: + type: File + outputBinding: + glob: $(inputs.ovcf) diff --git a/cwl/vcfSubBam/idxBam.cwl b/cwl/vcfSubBam/idxBam.cwl new file mode 100644 index 0000000..e779867 --- /dev/null +++ b/cwl/vcfSubBam/idxBam.cwl @@ -0,0 +1,24 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- index +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.12--h9aed4be_1 +- class: InitialWorkDirRequirement + listing: + - $(inputs.bam) +inputs: + bam: + type: File + inputBinding: + position: 1 + separate: true +outputs: + idx: + type: File + secondaryFiles: + - .bai + outputBinding: + glob: $(inputs.bam.basename) diff --git a/cwl/vcfSubBam/subBam.cwl b/cwl/vcfSubBam/subBam.cwl new file mode 100644 index 0000000..48b492e --- /dev/null +++ b/cwl/vcfSubBam/subBam.cwl @@ -0,0 +1,67 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- samtools +- view +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/samtools:1.16.1--h6899075_1 +inputs: + bam: + type: File + secondaryFiles: .bai + inputBinding: + position: 99 + separate: true + bed: + type: File? + inputBinding: + position: 1 + prefix: -L + separate: true + obam: + type: string + inputBinding: + position: 2 + prefix: -o + separate: true + region: + type: string? + inputBinding: + position: 100 + separate: true + outb: + type: boolean? + inputBinding: + prefix: -b + separate: true + exFlag: + type: int? + inputBinding: + prefix: -F + separate: true + reqFlag: + type: int? + inputBinding: + prefix: -f + separate: true + qname: + type: File? + inputBinding: + prefix: -N + separate: true + threads: + type: int? + inputBinding: + prefix: --threads + separate: true + mapq: + type: int? + inputBinding: + prefix: -q + separate: true +outputs: + oBam: + type: File + outputBinding: + glob: $(inputs.obam) diff --git a/cwl/vcfSubBam/vcf2bed.cwl b/cwl/vcfSubBam/vcf2bed.cwl new file mode 100644 index 0000000..06b194b --- /dev/null +++ b/cwl/vcfSubBam/vcf2bed.cwl @@ -0,0 +1,42 @@ +cwlVersion: v1.2 +class: CommandLineTool +baseCommand: +- bash +- script.sh +requirements: +- class: DockerRequirement + dockerPull: quay.io/biocontainers/bedtools:2.30.0--h7d7f7ad_2 +- class: InitialWorkDirRequirement + listing: + - entryname: script.sh + entry: |2 + + vcf=$1 + fai=$2 + win=$3 + + vn=`basename $vcf .bed` + awk '{if($0 !~ "^#")print $1"\t"$2-1"\t"$2}' $vcf > vcfbed + bedtools slop -i vcfbed -b $win -g $fai > $vn.$win.bed + writable: false +inputs: + vcf: + type: File + inputBinding: + position: 1 + separate: true + fai: + type: File + inputBinding: + position: 2 + separate: true + win: + type: int + inputBinding: + position: 3 + separate: true +outputs: + bed: + type: File + outputBinding: + glob: '*.bed' diff --git a/cwl/vcfSubBam/vcfSubBam.cwl b/cwl/vcfSubBam/vcfSubBam.cwl new file mode 100644 index 0000000..4e51935 --- /dev/null +++ b/cwl/vcfSubBam/vcfSubBam.cwl @@ -0,0 +1,45 @@ +cwlVersion: v1.0 +class: Workflow +requirements: +- class: StepInputExpressionRequirement +- class: InlineJavascriptRequirement +inputs: + vcf: + type: File + fai: + type: File + win: + type: int + bam: + type: File +outputs: + outBam: + type: File + secondaryFiles: .bai + outputSource: idxBam/idx +steps: + vcf2bed: + run: vcf2bed.cwl + in: + vcf: vcf + fai: fai + win: win + out: + - bed + subBam: + run: subBam.cwl + in: + bam: bam + bed: vcf2bed/bed + outb: + valueFrom: $(true) + obam: + valueFrom: $(inputs.bam.nameroot).sub.bam + out: + - oBam + idxBam: + run: idxBam.cwl + in: + bam: subBam/oBam + out: + - idx diff --git a/cwl/vcfSubBam/vcfSubBam.yml b/cwl/vcfSubBam/vcfSubBam.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/vcfSubBam/vcfSubBam.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/vcf_expression_annotator.cwl b/cwl/vcf_expression_annotator.cwl index bff7bd1..6dab26a 100644 --- a/cwl/vcf_expression_annotator.cwl +++ b/cwl/vcf_expression_annotator.cwl @@ -1,56 +1,56 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: vcf-expression-annotator -requirements: -- class: DockerRequirement - dockerPull: griffithlab/vatools:3.1.0 -arguments: -- --ignore-transcript-version -inputs: - ivcf: - type: File - inputBinding: - position: 1 - separate: true - expression: - type: File - inputBinding: - position: 2 - separate: true - etype: - type: string - inputBinding: - position: 3 - separate: true - default: kallisto - gtype: - type: string - inputBinding: - position: 4 - separate: true - default: transcript - idCol: - type: string? - inputBinding: - prefix: -i - separate: true - expCol: - type: string? - inputBinding: - prefix: -e - separate: true - sample: - type: string? - inputBinding: - prefix: -s - separate: true - ovcf: - type: string - inputBinding: - prefix: -o - separate: true -outputs: - oVcf: - type: File - outputBinding: - glob: $(inputs.ovcf) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: vcf-expression-annotator +requirements: +- class: DockerRequirement + dockerPull: griffithlab/vatools:3.1.0 +arguments: +- --ignore-transcript-version +inputs: + ivcf: + type: File + inputBinding: + position: 1 + separate: true + expression: + type: File + inputBinding: + position: 2 + separate: true + etype: + type: string + inputBinding: + position: 3 + separate: true + default: kallisto + gtype: + type: string + inputBinding: + position: 4 + separate: true + default: transcript + idCol: + type: string? + inputBinding: + prefix: -i + separate: true + expCol: + type: string? + inputBinding: + prefix: -e + separate: true + sample: + type: string? + inputBinding: + prefix: -s + separate: true + ovcf: + type: string + inputBinding: + prefix: -o + separate: true +outputs: + oVcf: + type: File + outputBinding: + glob: $(inputs.ovcf) diff --git a/cwl/vcf_expression_annotator.yml b/cwl/vcf_expression_annotator.yml index b1d3c9c..bf97a50 100644 --- a/cwl/vcf_expression_annotator.yml +++ b/cwl/vcf_expression_annotator.yml @@ -1,2 +1,2 @@ -etype: kallisto -gtype: transcript +etype: kallisto +gtype: transcript diff --git a/cwl/vcf_index/bgzip.cwl b/cwl/vcf_index/bgzip.cwl new file mode 100644 index 0000000..a3f9938 --- /dev/null +++ b/cwl/vcf_index/bgzip.cwl @@ -0,0 +1,19 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- bgzip +- -c +requirements: +- class: DockerRequirement + dockerPull: biocontainers/tabix:v1.3.2-2-deb_cv1 +inputs: + ifile: + type: File + inputBinding: + separate: true +outputs: + zfile: + type: File + outputBinding: + glob: $(inputs.ifile.basename).gz +stdout: $(inputs.ifile.basename).gz diff --git a/cwl/vcf_index/index.cwl b/cwl/vcf_index/index.cwl new file mode 100644 index 0000000..591a0ea --- /dev/null +++ b/cwl/vcf_index/index.cwl @@ -0,0 +1,28 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: tabix +requirements: +- class: DockerRequirement + dockerPull: biocontainers/tabix:v1.3.2-2-deb_cv1 +- class: InitialWorkDirRequirement + listing: + - $(inputs.tfile) +inputs: + tfile: + type: File + inputBinding: + position: 1 + separate: true + type: + type: string + inputBinding: + prefix: -p + separate: true + default: vcf +outputs: + idx: + type: File + secondaryFiles: + - .tbi + outputBinding: + glob: $(inputs.tfile.basename) diff --git a/cwl/vcf_index/vcf_index.cwl b/cwl/vcf_index/vcf_index.cwl new file mode 100644 index 0000000..7e391c7 --- /dev/null +++ b/cwl/vcf_index/vcf_index.cwl @@ -0,0 +1,26 @@ +cwlVersion: v1.0 +class: Workflow +requirements: +- class: StepInputExpressionRequirement +inputs: + vcf: + type: File +outputs: + tbi: + type: File + outputSource: index/idx +steps: + bgzip: + run: bgzip.cwl + in: + ifile: vcf + out: + - zfile + index: + run: index.cwl + in: + tfile: bgzip/zfile + type: + valueFrom: vcf + out: + - idx diff --git a/cwl/vcf_index/vcf_index.yml b/cwl/vcf_index/vcf_index.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/vcf_index/vcf_index.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/vcf_readcount_annotator.cwl b/cwl/vcf_readcount_annotator.cwl index 5f271fe..bc8ad4e 100644 --- a/cwl/vcf_readcount_annotator.cwl +++ b/cwl/vcf_readcount_annotator.cwl @@ -1,44 +1,44 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: vcf-readcount-annotator -requirements: -- class: DockerRequirement - dockerPull: griffithlab/vatools:3.1.0 -inputs: - ivcf: - type: File - inputBinding: - position: 1 - separate: true - readcount: - type: File - inputBinding: - position: 2 - separate: true - ntype: - type: string - inputBinding: - position: 3 - separate: true - default: DNA - sample: - type: string? - inputBinding: - prefix: -s - separate: true - vtype: - type: string - inputBinding: - prefix: -t - separate: true - default: snv - ovcf: - type: string - inputBinding: - prefix: -o - separate: true -outputs: - oVcf: - type: File - outputBinding: - glob: $(inputs.ovcf) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: vcf-readcount-annotator +requirements: +- class: DockerRequirement + dockerPull: griffithlab/vatools:3.1.0 +inputs: + ivcf: + type: File + inputBinding: + position: 1 + separate: true + readcount: + type: File + inputBinding: + position: 2 + separate: true + ntype: + type: string + inputBinding: + position: 3 + separate: true + default: DNA + sample: + type: string? + inputBinding: + prefix: -s + separate: true + vtype: + type: string + inputBinding: + prefix: -t + separate: true + default: snv + ovcf: + type: string + inputBinding: + prefix: -o + separate: true +outputs: + oVcf: + type: File + outputBinding: + glob: $(inputs.ovcf) diff --git a/cwl/vcf_readcount_annotator.yml b/cwl/vcf_readcount_annotator.yml index 717b6c7..b507cc4 100644 --- a/cwl/vcf_readcount_annotator.yml +++ b/cwl/vcf_readcount_annotator.yml @@ -1,2 +1,2 @@ -ntype: DNA -vtype: snv +ntype: DNA +vtype: snv diff --git a/cwl/vep.cwl b/cwl/vep.cwl index 1e55b0f..4ab992f 100644 --- a/cwl/vep.cwl +++ b/cwl/vep.cwl @@ -1,54 +1,60 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: vep -requirements: -- class: DockerRequirement - dockerPull: hubentu/ensembl-vep-plugins -hints: - cwltool:LoadListingRequirement: - loadListing: no_listing -arguments: -- --format -- vcf -- --vcf -- --symbol -- --terms -- SO -- --tsl -- --hgvs -- --offline -- --dir_plugins -- /opt/vep/src/VEP_plugins -- --plugin -- Downstream -- --plugin -- Wildtype -inputs: - ivcf: - type: File - inputBinding: - prefix: --input_file - separate: true - ovcf: - type: string - inputBinding: - prefix: --output_file - separate: true - ref: - type: File - secondaryFiles: .fai - inputBinding: - prefix: --fasta - separate: true - cacheDir: - type: Directory - inputBinding: - prefix: --dir_cache - separate: true -outputs: - oVcf: - type: File - outputBinding: - glob: $(inputs.ovcf) -$namespaces: - cwltool: http://commonwl.org/cwltool# +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: vep +requirements: +- class: DockerRequirement + dockerPull: ensemblorg/ensembl-vep +hints: + cwltool:LoadListingRequirement: + loadListing: no_listing +arguments: +- --format +- vcf +- --vcf +- --cache +- --symbol +- --offline +inputs: + ivcf: + type: File + inputBinding: + prefix: --input_file + separate: true + ovcf: + type: string + inputBinding: + prefix: --output_file + separate: true + ref: + type: File + secondaryFiles: .fai + inputBinding: + prefix: --fasta + separate: true + cacheDir: + type: Directory + inputBinding: + prefix: --dir_cache + separate: true + version: + type: string + inputBinding: + prefix: --cache_version + separate: true + merged: + type: boolean? + inputBinding: + prefix: --merged + separate: true + species: + type: string? + inputBinding: + prefix: --species + separate: true +outputs: + oVcf: + type: File + outputBinding: + glob: $(inputs.ovcf) +$namespaces: + cwltool: http://commonwl.org/cwltool# diff --git a/cwl/vep.yml b/cwl/vep.yml index 0967ef4..69a88e3 100644 --- a/cwl/vep.yml +++ b/cwl/vep.yml @@ -1 +1 @@ -{} +{} diff --git a/cwl/vep_plugin.cwl b/cwl/vep_plugin.cwl new file mode 100644 index 0000000..d285c95 --- /dev/null +++ b/cwl/vep_plugin.cwl @@ -0,0 +1,54 @@ +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: vep +requirements: +- class: DockerRequirement + dockerPull: hubentu/ensembl-vep-plugins +hints: + cwltool:LoadListingRequirement: + loadListing: no_listing +arguments: +- --format +- vcf +- --vcf +- --symbol +- --terms +- SO +- --tsl +- --hgvs +- --offline +- --dir_plugins +- /opt/vep/src/VEP_plugins +- --plugin +- Downstream +- --plugin +- Wildtype +inputs: + ivcf: + type: File + inputBinding: + prefix: --input_file + separate: true + ovcf: + type: string + inputBinding: + prefix: --output_file + separate: true + ref: + type: File + secondaryFiles: .fai + inputBinding: + prefix: --fasta + separate: true + cacheDir: + type: Directory + inputBinding: + prefix: --dir_cache + separate: true +outputs: + oVcf: + type: File + outputBinding: + glob: $(inputs.ovcf) +$namespaces: + cwltool: http://commonwl.org/cwltool# diff --git a/cwl/vep_plugin.yml b/cwl/vep_plugin.yml new file mode 100644 index 0000000..69a88e3 --- /dev/null +++ b/cwl/vep_plugin.yml @@ -0,0 +1 @@ +{} diff --git a/cwl/vt_decompose.cwl b/cwl/vt_decompose.cwl index 4d3d142..0321a52 100644 --- a/cwl/vt_decompose.cwl +++ b/cwl/vt_decompose.cwl @@ -1,27 +1,27 @@ -cwlVersion: v1.0 -class: CommandLineTool -baseCommand: -- vt -- decompose -requirements: -- class: DockerRequirement - dockerPull: hubentu/vt -arguments: -- -s -inputs: - ivcf: - type: File - inputBinding: - position: 1 - separate: true - ovcf: - type: string - inputBinding: - position: 2 - prefix: -o - separate: true -outputs: - oVcf: - type: File - outputBinding: - glob: $(inputs.ovcf) +cwlVersion: v1.0 +class: CommandLineTool +baseCommand: +- vt +- decompose +requirements: +- class: DockerRequirement + dockerPull: hubentu/vt +arguments: +- -s +inputs: + ivcf: + type: File + inputBinding: + position: 1 + separate: true + ovcf: + type: string + inputBinding: + position: 2 + prefix: -o + separate: true +outputs: + oVcf: + type: File + outputBinding: + glob: $(inputs.ovcf) diff --git a/cwl/vt_decompose.yml b/cwl/vt_decompose.yml index 0967ef4..69a88e3 100644 --- a/cwl/vt_decompose.yml +++ b/cwl/vt_decompose.yml @@ -1 +1 @@ -{} +{} diff --git a/cwlMeta.csv b/cwlMeta.csv index 6287afa..a834b57 100644 --- a/cwlMeta.csv +++ b/cwlMeta.csv @@ -1,131 +1,252 @@ -"","Type","Command","Container" -"pl_alignMerge","pipeline","bwaAlign+mergeBamDup",NA -"pl_AnnPhaseVcf","pipeline","VCFvep+dVCFcoverage+rVCFcoverage+VCFexpression+PhaseVcf",NA -"pl_BaseRecal","pipeline","BaseRecalibrator+ApplyBQSR+samtools_index+samtools_flagstat+samtools_stats",NA -"pl_bwaAlign","pipeline","bwa+sam2bam+sortBam+idxBam",NA -"pl_bwaMMRecal","pipeline","bwaAlign+mergeBamDup+BaseRecal",NA -"pl_bwaMRecal","pipeline","bwaAlign+markdup+BaseRecal",NA -"pl_CombineGenotypeGVCFs","pipeline","CombineGVCFs+GenotypeGVCFs",NA -"pl_GAlign","pipeline","fqJson+fq2ubam+ubam2bamJson+align+mvOut",NA -"pl_GPoN","pipeline","GenomicsDB+PoN",NA -"pl_hapCall","pipeline","hapJson+HC+mvOut",NA -"pl_jdCall","pipeline","jdJson+JD+mvOut",NA -"pl_mantaStrelka","pipeline","manta+strelka",NA -"pl_mergeBamDup","pipeline","mergeBam+markdup+samtools_index+samtools_flagstat",NA -"pl_miRDeep2PL","pipeline","Mapper+miRDeep2",NA -"pl_Mutect2PL","pipeline","Mutect2+GetPileupSummariesT+GetPileupSummariesN+CalculateContamination+FilterMutectCalls+ColSeqArtifact+FilterOBias+bcfview",NA -"pl_neusomatic","pipeline","preprocess+call+postprocess",NA -"pl_phaseVcf","pipeline","splitSample+renameGVcf+renameSVcf+combineVariants+sortVcf+ReadBackedPhasing+bgzip+tabixIndex",NA -"pl_rnaseq_Sf","pipeline","fastqc+STAR+sortBam+samtools_index+samtools_flagstat+featureCounts+gtfToGenePred+genePredToBed+r_distribution+gCoverage",NA -"pl_RSeQC","pipeline","gtfToGenePred+genePredToBed+r_distribution+gCoverage",NA -"pl_SomaticCallers","pipeline","Mutect2PL+MuSE+bgzip+tabixIndex+mantaStrelka+SomaticSniper+VarDict+LoFreq+VarScanPL+Wrapper+mergeTSV+neusomaticPL",NA -"pl_STARsoloDropletUtils","pipeline","STARsolo+DropletUtils",NA -"pl_SUPPA","pipeline","quantMerge+genEvents+mergeEvents+psiPerEvent+splitEventsG1+splitEventsG2+splitExpG1+splitExpG2+diffSplice",NA -"pl_targetVarCall","pipeline","bwaAlign+BaseRecal+bedtolist+HaplotypeCaller+GenotypeGVCFs",NA -"pl_VarScan2Somatic","pipeline","mpileupT+mpileupN+somatic+processSomatic+somaticFilter",NA -"pl_vcfCoverage","pipeline","decompose+readcount+readcount_annotator_snv+readcount_annotator_indel",NA -"pl_vcfExpression","pipeline","kallistoQuant+cleanExp+vcfExpAnn+T2Gene+vcfgExpAnn+bgzip+tabixIndex",NA -"tl_annovar","tool","table_annovar.pl","bioinfochrustrasbourg/annovar" -"tl_ApplyBQSR","tool","gatk ApplyBQSR","broadinstitute/gatk:latest" -"tl_awk_merge","tool","awk",NA -"tl_bam_readcount","tool","/usr/bin/python /usr/bin/bam_readcount_helper.py","mgibio/bam_readcount_helper-cwl:1.1.1" -"tl_bamCoverage","tool","bamCoverage","quay.io/biocontainers/deeptools:3.4.3--py_0" -"tl_BaseRecalibrator","tool","gatk BaseRecalibrator","broadinstitute/gatk:latest" -"tl_bcfview","tool","bcftools view","biocontainers/bcftools:v1.5_cv3" -"tl_BedToIntervalList","tool","picard BedToIntervalList","quay.io/biocontainers/picard:2.21.1--0" -"tl_bedtools_genomecov","tool","bedtools genomecov","quay.io/biocontainers/bedtools:2.29.2--hc088bd4_0" -"tl_bgzip","tool","bgzip -c","biocontainers/tabix:v1.3.2-2-deb_cv1" -"tl_bigWigToWig","tool","bigWigToWig","biowardrobe2/ucscuserapps:v358_2" -"tl_blastn","tool","blastn","biocontainers/blast:v2.2.31_cv2" -"tl_bowtie_build","tool","bowtie-build","biocontainers/bowtie:v1.2.2dfsg-4-deb_cv1" -"tl_bowtie2_build","tool","bowtie2-build","biocontainers/bowtie2:v2.2.9_cv2" -"tl_bowtie2","tool","bowtie2","biocontainers/bowtie2:v2.2.9_cv2" -"tl_bwa_index","tool","bwa index","biocontainers/bwa:v0.7.17-3-deb_cv1" -"tl_bwa","tool","bwa mem","biocontainers/bwa:v0.7.17-3-deb_cv1" -"tl_CalculateContamination","tool","gatk CalculateContamination","broadinstitute/gatk:latest" -"tl_Cat","tool","cat",NA -"tl_cnv_facets","tool","cnv_facets.R","hubuntu/cnv_facets" -"tl_cnvkit_batch","tool","cnvkit.py batch","etal/cnvkit" -"tl_ColSeqArtifact","tool","gatk CollectSequencingArtifactMetrics","broadinstitute/gatk:latest" -"tl_CombineGVCFs","tool","gatk CombineGVCFs","broadinstitute/gatk:latest" -"tl_CombineVariants","tool","java -jar /usr/GenomeAnalysisTK.jar -T CombineVariants","broadinstitute/gatk3:3.8-1" -"tl_cutadapt","tool","cutadapt","kfdrc/cutadapt" -"tl_DepthOfCoverage","tool","java -jar /usr/GenomeAnalysisTK.jar -T DepthOfCoverage","broadinstitute/gatk3:3.8-1" -"tl_DropletUtils","tool","R function",NA -"tl_fastqc","tool","fastqc","hubentu/rcwl-rnaseq" -"tl_featureCounts","tool","featureCounts","hubentu/rcwl-rnaseq" -"tl_FilterMutectCalls","tool","gatk FilterMutectCalls","broadinstitute/gatk:latest" -"tl_FilterOBias","tool","gatk FilterByOrientationBias","broadinstitute/gatk:latest" -"tl_Funcotator","tool","gatk Funcotator","broadinstitute/gatk:latest" -"tl_geneBody_coverage","tool","geneBody_coverage.py","hubentu/rcwl-rnaseq" -"tl_genePredToBed","tool","genePredToBed","hubentu/rcwl-rnaseq" -"tl_GenomicsDB","tool","gatk GenomicsDBImport","broadinstitute/gatk:latest" -"tl_GenotypeGVCFs","tool","gatk GenotypeGVCFs","broadinstitute/gatk:latest" -"tl_GetPileupSummaries","tool","gatk GetPileupSummaries","broadinstitute/gatk:latest" -"tl_gtfToGenePred","tool","gtfToGenePred","hubentu/rcwl-rnaseq" -"tl_HaplotypeCaller","tool","gatk HaplotypeCaller","broadinstitute/gatk:latest" -"tl_hisat2_align","tool","hisat2","biocontainers/hisat2:v2.0.5-1-deb_cv1" -"tl_hisat2_build","tool","hisat2-build","biocontainers/hisat2:v2.0.5-1-deb_cv1" -"tl_htseq","tool","htseq-count","genomicpariscentre/htseq" -"tl_kallisto_index","tool","kallisto index","zlskidmore/kallisto" -"tl_kallisto_quant","tool","kallisto quant","zlskidmore/kallisto" -"tl_lancet","tool","/lancet-1.0.7/lancet","kfdrc/lancet:1.0.7" -"tl_LoFreq","tool","lofreq somatic","andreaswilm/lofreq:v2.1.2" -"tl_makeblastdb","tool","makeblastdb","biocontainers/blast:v2.2.31_cv2" -"tl_manta","tool","configManta.py","cmopipeline/strelka2_manta" -"tl_markdup","tool","picard MarkDuplicates","quay.io/biocontainers/picard:2.21.1--0" -"tl_mergeBam","tool","picard MergeSamFiles","quay.io/biocontainers/picard:2.21.1--0" -"tl_miRDeep2","tool","miRDeep2.pl","hubentu/mirdeep2" -"tl_miRMapper","tool","mapper.pl","hubentu/mirdeep2" -"tl_multiqc","tool","multiqc","hubentu/rcwl-rnaseq" -"tl_MuSE","tool","MuSEv1.0rc_submission_c039ffa call","marghoob/muse:1.0rc_c" -"tl_Mutect2_gatk3","tool","java -jar /usr/GenomeAnalysisTK.jar -T MuTect2","broadinstitute/gatk3:3.8-1" -"tl_Mutect2","tool","gatk Mutect2","broadinstitute/gatk:4.1.3.0" -"tl_mvOut","tool","R function",NA -"tl_neusomatic_call","tool","python /opt/neusomatic/neusomatic/python/call.py","msahraeian/neusomatic" -"tl_neusomatic_postprocess","tool","python /opt/neusomatic/neusomatic/python/postprocess.py","msahraeian/neusomatic" -"tl_neusomatic_preprocess","tool","python /opt/neusomatic/neusomatic/python/preprocess.py","msahraeian/neusomatic" -"tl_polysolver","tool","bash /home/polysolver/scripts/shell_call_hla_type","sachet/polysolver:v4" -"tl_PoN","tool","gatk CreateSomaticPanelOfNormals","broadinstitute/gatk:latest" -"tl_pvacseq","tool","pvacseq run","griffithlab/pvactools" -"tl_read_distribution","tool","read_distribution.py","hubentu/rcwl-rnaseq" -"tl_ReadBackedPhasing","tool","java -jar /usr/GenomeAnalysisTK.jar -T ReadBackedPhasing","broadinstitute/gatk3:3.8-1" -"tl_RenameSampleInVcf","tool","picard RenameSampleInVcf","quay.io/biocontainers/picard:2.21.1--0" -"tl_rMATS","tool","rmats_bam.sh","hubentu/rmats" -"tl_Rsplit","tool","R function",NA -"tl_runWDL","tool","java",NA -"tl_salmon_index","tool","salmon index","combinelab/salmon" -"tl_salmon_quant","tool","salmon quant","combinelab/salmon" -"tl_sam2bam","tool","samtools view","biocontainers/samtools:v1.7.0_cv3" -"tl_SamToFastq","tool","picard SamToFastq","quay.io/biocontainers/picard:2.21.1--0" -"tl_samtools_depth","tool","samtools depth","biocontainers/samtools:v1.7.0_cv3" -"tl_samtools_flagstat","tool","samtools flagstat","biocontainers/samtools:v1.7.0_cv3" -"tl_samtools_index","tool","samtools index","biocontainers/samtools:v1.7.0_cv3" -"tl_samtools_mpileup","tool","samtools mpileup","biocontainers/samtools:v1.7.0_cv3" -"tl_samtools_stats","tool","samtools stats","biocontainers/samtools:v1.7.0_cv3" -"tl_SomaticSeq_Wrapper","tool","/opt/somaticseq/SomaticSeq.Wrapper.sh","lethalfang/somaticseq:2.7.2" -"tl_SomaticSniper","tool","/opt/somatic-sniper/build/bin/bam-somaticsniper","lethalfang/somaticsniper:1.0.5.0-2" -"tl_sortBam","tool","samtools sort","biocontainers/samtools:v1.7.0_cv3" -"tl_SortVcf","tool","java -jar /usr/picard/picard.jar SortVcf","broadinstitute/picard" -"tl_STAR","tool","STAR","quay.io/biocontainers/star:2.7.3a--0" -"tl_starFusion","tool","/usr/local/src/STAR-Fusion/STAR-Fusion","trinityctat/ctatfusion" -"tl_STARindex","tool","STAR","quay.io/biocontainers/star:2.7.5a--0" -"tl_STARsolo","tool","STAR","quay.io/biocontainers/star:2.7.5a--0" -"tl_strelka","tool","configureStrelkaSomaticWorkflow.py","cmopipeline/strelka2_manta" -"tl_SUPPA_diffSplice","tool","python /opt/SUPPA/suppa.py diffSplice","hubentu/suppa" -"tl_SUPPA_generateEvents","tool","python /opt/SUPPA/suppa.py generateEvents","hubentu/suppa" -"tl_SUPPA_multipleFieldSelection","tool","python /opt/SUPPA/multipleFieldSelection.py","hubentu/suppa" -"tl_SUPPA_psiPerEvent","tool","python /opt/SUPPA/suppa.py psiPerEvent","hubentu/suppa" -"tl_svaba_somatic","tool","svaba run","ken01nn/svaba" -"tl_SVE_VP","tool","/software/SVE/scripts/variant_processor.py","timothyjamesbecker/sve" -"tl_SVE","tool","/software/SVE/scripts/auto.py","timothyjamesbecker/sve" -"tl_tabix_index","tool","tabix","biocontainers/tabix:v1.3.2-2-deb_cv1" -"tl_VarDict","tool","/opt/VarDict-1.5.1/bin/VarDict","lethalfang/vardictjava:1.5.1" -"tl_VarScan2_processSomatic","tool","java -jar /opt/varscan/VarScan.jar processSomatic","mgibio/varscan-cwl:v2.4.2-samtools1.3.1" -"tl_VarScan2_somatic","tool","java -jar /opt/varscan/VarScan.jar somatic","mgibio/varscan-cwl:v2.4.2-samtools1.3.1" -"tl_VarScan2_somaticFilter","tool","java -jar /opt/varscan/VarScan.jar somaticFilter","mgibio/varscan-cwl:v2.4.2-samtools1.3.1" -"tl_VarScan2","tool","","serge2016/varscan:v0.1.1" -"tl_vcf_expression_annotator","tool","vcf-expression-annotator","griffithlab/vatools:3.1.0" -"tl_vcf_readcount_annotator","tool","vcf-readcount-annotator","griffithlab/vatools:3.1.0" -"tl_vep","tool","vep","hubentu/ensembl-vep-plugins" -"tl_vt_decompose","tool","vt decompose","hubentu/vt" +"","Type","Command","Container","mtime" +"pl_alignMerge","pipeline","bwaAlign+mergeBamDup",NA,2021-10-25 12:58:44.493181 +"pl_AnnPhaseVcf","pipeline","VCFvep+dVCFcoverage+rVCFcoverage+VCFexpression+PhaseVcf",NA,2022-02-16 11:36:10.6357 +"pl_arcasHLA_pl","pipeline","Extract+Genotype+Partial",NA,2023-08-16 12:15:01.152409 +"pl_arriba_pl","pipeline","STAR+arriba",NA,2024-03-07 17:13:37.751693 +"pl_BaseRecal","pipeline","BaseRecalibrator+ApplyBQSR+samtools_index+samtools_flagstat+samtools_stats",NA,2021-10-25 12:58:44.272502 +"pl_bismarkPL","pipeline","bismark_align+deduplicate+meth",NA,2023-06-05 12:50:21.039179 +"pl_bwa_align","pipeline","bwa+sam2bam+sortBam+idxBam",NA,2022-07-27 11:04:03.590647 +"pl_bwaAlign","pipeline","bwa+sam2bam+sortBam+idxBam",NA,2022-02-16 11:36:10.671269 +"pl_bwaDup","pipeline","bwaAlign+mergeBam+markdup+samtools_index+samtools_flagstat+samtools_stats+md5sum",NA,2022-07-27 11:04:50.050937 +"pl_bwaMM","pipeline","bwaAlign+mergeBamDup",NA,2022-02-16 11:36:10.685683 +"pl_bwaMMRecal","pipeline","bwaAlign+mergeBamDup+BaseRecal",NA,2021-10-25 12:58:44.538453 +"pl_bwaMRecal","pipeline","bwaAlign+markdup+BaseRecal",NA,2021-10-25 12:58:44.559903 +"pl_CombineGenotypeGVCFs","pipeline","CombineGVCFs+GenotypeGVCFs",NA,2023-02-24 10:52:10.855483 +"pl_COMPSRA_rn","pipeline","copy+compsra",NA,2021-10-25 14:07:37.962479 +"pl_delly_somatic","pipeline","dellyCall+listSample+echo+fpaste+dellyFilter",NA,2021-10-25 12:58:44.570953 +"pl_GAlign","pipeline","fqJson+fq2ubam+ubam2bamJson+align+mvOut",NA,2021-10-25 12:58:44.309204 +"pl_glnexus_joint","pipeline","glnexus+bcf",NA,2022-06-16 17:40:40.815876 +"pl_GPoN","pipeline","GenomicsDB+PoN",NA,2021-10-25 14:07:37.969894 +"pl_hapCall","pipeline","hapJson+HC+mvOut",NA,2021-10-25 12:58:44.593973 +"pl_jdCall","pipeline","jdJson+JD+mvOut",NA,2021-10-25 12:58:44.605326 +"pl_lancet_scatter","pipeline","lancet_bed+mergeVcf",NA,2021-10-25 14:07:37.9956 +"pl_lofreq_indel","pipeline","indelq+bamIdx",NA,2021-10-25 12:58:44.628164 +"pl_lofreq_realign","pipeline","realign+sortBam+indelq+bamIdx",NA,2022-02-16 11:36:10.704485 +"pl_LoFreqPL","pipeline","tbamR+nbamR+lofreqCall",NA,2021-10-25 12:58:44.333076 +"pl_LoFreqSI","pipeline","tbamR+nbamR+lofreqCall",NA,2021-10-25 12:58:44.345849 +"pl_lumpy","pipeline","discord+sam+split+sam2bam+discord_idx+split_idx+lumpy",NA,2022-06-16 17:40:40.823653 +"pl_mantaStrelka","pipeline","manta+strelka",NA,2021-10-25 12:58:44.653999 +"pl_mergeBamDup","pipeline","mergeBam+markdup+samtools_index+samtools_flagstat",NA,2021-10-25 12:58:44.665453 +"pl_miRDeep2PL","pipeline","Mapper+miRDeep2",NA,2021-10-25 12:58:44.679923 +"pl_MuSE_scatter","pipeline","MuSEchr+mergeVcf+sortVcf+normVcf",NA,2021-10-25 14:07:37.974469 +"pl_Mutect2PL","pipeline","Mutect2+GetPileupSummariesT+GetPileupSummariesN+CalculateContamination+LearnReadOrientationModel+FilterMutectCalls+bcfview",NA,2021-10-25 14:07:37.982033 +"pl_neusomatic","pipeline","preprocess+call+postprocess",NA,2021-10-25 12:58:44.691402 +"pl_phaseVcf","pipeline","splitSample+renameGVcf+renameSVcf+combineVariants+sortVcf+ReadBackedPhasing+bgzip+tabixIndex",NA,2021-10-25 12:58:44.702998 +"pl_rnaseq_quant","pipeline","STAR+sortBam+samtools_index+samtools_flagstat+featureCounts+gtfToGenePred+genePredToBed+r_distribution+salmon",NA,2022-02-16 11:36:10.716245 +"pl_rnaseq_Sf","pipeline","fastqc+STAR+sortBam+samtools_index+samtools_flagstat+featureCounts+gtfToGenePred+genePredToBed+r_distribution+gCoverage+tpm",NA,2023-03-21 15:05:50.995124 +"pl_rnaseq","pipeline","fastqc+STAR+sortBam+samtools_index+samtools_flagstat+featureCounts+collapse_annotation+rnaseqc+tpm",NA,2023-06-22 14:27:31.72305 +"pl_rrbs","pipeline","trim+trimDiversity+bismark+stripSam+nudup+resort+extractor",NA,2023-06-05 13:09:32.148317 +"pl_RSeQC","pipeline","gtfToGenePred+genePredToBed+r_distribution+gCoverage",NA,2021-10-25 12:58:44.381481 +"pl_ScarHRD","pipeline","bam2seqz+seqz_binning+hrd",NA,2022-06-16 17:40:40.769524 +"pl_SomaticCaller_mouse","pipeline","Mutect2+MuSE+bgzip+tabixIndex+mantaStrelka+VarDict+combine",NA,2022-08-16 00:08:09.9442 +"pl_SomaticCaller4","pipeline","Mutect2PL+MuSE+bgzip+tabixIndex+mantaStrelka+VarDict+combine",NA,2022-06-24 15:39:37.843157 +"pl_SomaticCallers","pipeline","Mutect2PL+MuSE+bgzip+tabixIndex+mantaStrelka+SomaticSniper+VarDict+VarScanPL+Wrapper+mergeTSV+neusomaticPL",NA,2021-10-25 14:07:37.991019 +"pl_STARsolo2sce","pipeline","STARsolo+counts2sce",NA,2023-01-05 15:48:02.186733 +"pl_STARsoloDropletUtils","pipeline","STARsolo+DropletUtils",NA,2022-07-27 11:29:33.382676 +"pl_strelka2PL","pipeline","manta+strelka+strelkaSNV+strelkaIndel",NA,2021-10-25 12:58:44.748059 +"pl_SUPPA","pipeline","quantMerge+genEvents+mergeEvents+psiPerEvent+splitEventsG1+splitEventsG2+splitExpG1+splitExpG2+diffSplice",NA,2021-10-25 12:58:44.414908 +"pl_targetVarCall","pipeline","bwaAlign+BaseRecal+bedtolist+HaplotypeCaller+GenotypeGVCFs",NA,2021-10-25 12:58:44.770959 +"pl_VarScan2Somatic","pipeline","mpileupT+mpileupN+somatic+processSomatic+somaticFilter",NA,2021-10-25 12:58:44.470135 +"pl_vcf_index","pipeline","bgzip+index",NA,2021-10-25 12:58:44.80359 +"pl_vcfCoverage","pipeline","decompose+readcount+readcount_annotator_snv+readcount_annotator_indel",NA,2021-10-25 12:58:44.781788 +"pl_vcfExpression","pipeline","kallistoQuant+cleanExp+vcfExpAnn+T2Gene+vcfgExpAnn+bgzip+tabixIndex",NA,2022-06-16 17:40:40.832022 +"pl_vcfSubBam","pipeline","vcf2bed+subBam+idxBam",NA,2021-10-25 14:07:38.015346 +"tl_annovar","tool","table_annovar.pl","bioinfochrustrasbourg/annovar",2021-10-25 12:58:45.540892 +"tl_ApplyBQSR","tool","gatk ApplyBQSR","broadinstitute/gatk:latest",2021-10-25 12:58:44.814732 +"tl_arcasHLA_extract","tool","arcasHLA extract","hubentu/arcas-hla",2023-08-16 12:11:25.77914 +"tl_arcasHLA_genotype","tool","arcasHLA genotype","hubentu/arcas-hla",2024-01-15 15:17:00.258394 +"tl_arcasHLA_partial","tool","arcasHLA partial","hubentu/arcas-hla",2024-01-15 15:17:10.328277 +"tl_arriba","tool","arriba","quay.io/biocontainers/arriba:2.4.0--h0033a41_2",2024-03-07 17:11:32.5179 +"tl_awk_merge","tool","awk",NA,2021-10-25 12:58:45.554635 +"tl_bam_readcount","tool","/usr/bin/python /usr/bin/bam_readcount_helper.py","mgibio/bam_readcount_helper-cwl:1.1.1",2021-10-25 12:58:45.606266 +"tl_bam_stat.py","tool","bam_stat.py","quay.io/biocontainers/rseqc:4.0.0--py38h4a8c8d9_1",2021-10-25 14:07:38.108818 +"tl_bam2seqz","tool","sequenza-utils bam2seqz","quay.io/biocontainers/sequenza-utils:3.0.0--py39h67e14b5_5",2022-06-16 17:40:40.837385 +"tl_bambino","tool","/opt/run.sh","hubentu/bambino",2023-06-12 11:23:12.304835 +"tl_bamCoverage","tool","bamCoverage","quay.io/biocontainers/deeptools:3.4.3--py_0",2021-10-25 12:58:45.571134 +"tl_BaseRecalibrator","tool","gatk BaseRecalibrator","broadinstitute/gatk:latest",2021-10-25 12:58:44.825614 +"tl_bcftools_concat_file","tool","bcftools concat","quay.io/biocontainers/bcftools:1.13--h3a49de5_0",2023-02-06 11:48:32.438462 +"tl_bcftools_concat","tool","bcftools concat","quay.io/biocontainers/bcftools:1.13--h3a49de5_0",2023-02-06 13:15:08.979508 +"tl_bcftools_norm","tool","bcftools norm","quay.io/biocontainers/bcftools:1.13--h3a49de5_0",2021-10-25 14:07:38.121449 +"tl_bcftools_query","tool","bcftools query","quay.io/biocontainers/bcftools:1.13--h3a49de5_0",2021-10-25 14:07:38.142264 +"tl_bcftools_reheader","tool","bcftools reheader","quay.io/biocontainers/bcftools:1.13--h3a49de5_0",2021-10-25 14:07:38.149844 +"tl_bcftools_sort","tool","bcftools sort","quay.io/biocontainers/bcftools:1.13--h3a49de5_0",2021-10-25 14:07:38.157032 +"tl_bcftools_view","tool","bcftools view","quay.io/biocontainers/bcftools:1.13--h3a49de5_0",2021-10-25 14:07:38.165304 +"tl_bcfview","tool","bcftools view","biocontainers/bcftools:v1.5_cv3",2021-10-25 12:58:45.760599 +"tl_BedToIntervalList","tool","picard BedToIntervalList","quay.io/biocontainers/picard:2.21.1--0",2021-10-25 12:58:44.83668 +"tl_bedtools_genomecov","tool","bedtools genomecov","quay.io/biocontainers/bedtools:2.29.2--hc088bd4_0",2021-10-25 12:58:45.772994 +"tl_bgzip","tool","bgzip -c","biocontainers/tabix:v1.3.2-2-deb_cv1",2021-10-25 12:58:45.785078 +"tl_bigWigToWig","tool","bigWigToWig","biowardrobe2/ucscuserapps:v358_2",2021-10-25 12:58:45.796871 +"tl_bismark_methylation_extractor","tool","bismark_methylation_extractor","quay.io/biocontainers/bismark:0.23.1--hdfd78af_0",2022-06-16 17:40:40.85321 +"tl_bismark","tool","bismark","quay.io/biocontainers/bismark:0.23.1--hdfd78af_0",2023-06-08 16:36:03.681119 +"tl_blastn","tool","blastn","biocontainers/blast:v2.2.31_cv2",2021-10-25 12:58:45.808841 +"tl_bowtie_build","tool","bowtie-build","biocontainers/bowtie:v1.2.2dfsg-4-deb_cv1",2021-10-25 12:58:45.844681 +"tl_bowtie2_build","tool","bowtie2-build","biocontainers/bowtie2:v2.2.9_cv2",2021-10-25 12:58:45.833078 +"tl_bowtie2","tool","bowtie2","biocontainers/bowtie2:v2.2.9_cv2",2021-10-25 12:58:45.82144 +"tl_bwa_index","tool","bwa index","biocontainers/bwa:v0.7.17-3-deb_cv1",2021-10-25 12:58:45.868653 +"tl_bwa","tool","bwa mem","biocontainers/bwa:v0.7.17-3-deb_cv1",2021-10-25 12:58:45.856837 +"tl_CalculateContamination","tool","gatk CalculateContamination","broadinstitute/gatk:latest",2021-10-25 12:58:44.871474 +"tl_Cat","tool","cat",NA,2021-10-25 12:58:44.885803 +"tl_cnv_facets","tool","cnv_facets.R","hubentu/facets:0.6.2",2022-06-16 17:40:40.861318 +"tl_cnvkit_batch","tool","cnvkit.py batch","etal/cnvkit",2021-10-25 12:58:45.892098 +"tl_collapse_annotation","tool","python /opt/collapse_annotation.py","hubentu/collapse_annotation",2023-06-22 13:11:25.101479 +"tl_CollectGcBiasMetrics","tool","picard CollectGcBiasMetrics","quay.io/biocontainers/picard:2.26.4--hdfd78af_0",2022-02-16 11:36:10.723484 +"tl_CollectInsertSizeMetrics","tool","picard CollectInsertSizeMetrics","quay.io/biocontainers/picard:2.21.1--0",2021-10-25 12:58:44.912234 +"tl_ColSeqArtifact","tool","gatk CollectSequencingArtifactMetrics","broadinstitute/gatk:latest",2021-10-25 12:58:44.900707 +"tl_CombineGVCFs","tool","gatk CombineGVCFs","broadinstitute/gatk:latest",2023-02-24 15:51:49.770653 +"tl_CombineVariants","tool","java -jar /usr/GenomeAnalysisTK.jar -T CombineVariants","broadinstitute/gatk3:3.8-1",2021-10-25 12:58:44.95282 +"tl_COMPSRA","tool","java -jar /opt/COMPSRA.jar","hubentu/compsra",2021-10-25 14:07:38.020915 +"tl_convert2bed","tool","convert2bed","quay.io/biocontainers/bedops:2.4.39--h7d875b9_1",2021-10-25 12:58:45.903881 +"tl_counts2sce","tool","R function",NA,2023-01-05 15:48:02.199473 +"tl_cp","tool","cp",NA,2021-10-25 14:07:38.18125 +"tl_CREST","tool","/opt/CREST/CREST.sh","hubentu/crest",2021-10-25 12:58:44.860292 +"tl_cutadapt","tool","cutadapt","quay.io/biocontainers/cutadapt:4.2--py310h1425a21_0",2023-02-07 10:32:43.667327 +"tl_deduplicate_bismark","tool","deduplicate_bismark","quay.io/biocontainers/bismark:0.23.1--hdfd78af_0",2023-06-05 12:49:10.43755 +"tl_deepvariant","tool","/opt/deepvariant/bin/run_deepvariant","google/deepvariant",2021-10-25 12:58:45.94895 +"tl_delly_call","tool","delly call","quay.io/biocontainers/delly:0.8.7--he03298f_1",2022-06-16 17:40:40.869966 +"tl_delly_filter","tool","delly filter","quay.io/biocontainers/delly:0.8.7--he03298f_1",2021-10-25 12:58:45.986192 +"tl_DepthOfCoverage","tool","java -jar /usr/GenomeAnalysisTK.jar -T DepthOfCoverage","broadinstitute/gatk3:3.8-1",2021-10-25 12:58:44.973188 +"tl_DepthOfCoverage4","tool","gatk DepthOfCoverage","broadinstitute/gatk:latest",2021-10-25 14:07:38.027236 +"tl_DropletUtils","tool","R function",NA,2021-10-25 12:58:45.0033 +"tl_echo","tool","echo",NA,2021-10-25 12:58:46.004747 +"tl_fastqc","tool","fastqc","quay.io/biocontainers/fastqc:0.12.1--hdfd78af_0",2023-03-17 11:54:05.409305 +"tl_fastqdump","tool","fastq-dump","quay.io/biocontainers/sra-tools:3.1.0--h9f5acd7_0",2024-03-29 10:18:46.256173 +"tl_featureCounts","tool","featureCounts","quay.io/biocontainers/subread:2.0.1--h7132678_2",2024-04-20 14:40:32.699636 +"tl_FilterMutectCalls","tool","gatk FilterMutectCalls","broadinstitute/gatk:latest",2021-10-25 14:07:38.034801 +"tl_FilterOBias","tool","gatk FilterByOrientationBias","broadinstitute/gatk:latest",2021-10-25 12:58:45.02689 +"tl_fpaste","tool","paste",NA,2021-10-25 12:58:46.050044 +"tl_fragCounter","tool","frag","hubentu/jabba",2024-03-25 10:37:40.593546 +"tl_Funcotator","tool","gatk Funcotator","broadinstitute/gatk:latest",2021-10-25 12:58:45.046024 +"tl_gc_wiggle","tool","sequenza-utils gc_wiggle","quay.io/biocontainers/sequenza-utils:3.0.0--py39h67e14b5_5",2022-06-16 17:40:40.875768 +"tl_geneBody_coverage","tool","geneBody_coverage.py","hubentu/rcwl-rnaseq",2021-10-25 12:58:46.063726 +"tl_genePredToBed","tool","genePredToBed","quay.io/biocontainers/ucsc-genepredtobed:377--h0b8a92a_4",2021-10-25 14:07:38.200199 +"tl_GenomicsDB","tool","gatk GenomicsDBImport","broadinstitute/gatk:latest",2021-10-25 14:07:38.04258 +"tl_GenotypeGVCFs","tool","gatk GenotypeGVCFs","broadinstitute/gatk:latest",2021-10-25 12:58:45.084435 +"tl_GetPileupSummaries","tool","gatk GetPileupSummaries","broadinstitute/gatk:latest",2021-10-25 14:07:38.050654 +"tl_ggsashimi","tool","","guigolab/ggsashimi:1.0.0",2023-08-23 15:33:34.462371 +"tl_gistic2","tool","gistic2","hubentu/gistic2",2024-03-29 16:24:32.711079 +"tl_glnexus_cli_list","tool","glnexus_cli","ghcr.io/dnanexus-rnd/glnexus:v1.4.1",2022-06-16 17:40:40.881449 +"tl_glnexus_cli","tool","glnexus_cli","ghcr.io/dnanexus-rnd/glnexus:v1.4.1",2022-04-01 12:09:51.040904 +"tl_gridss","tool","gridss","quay.io/biocontainers/gridss:2.13.2--h20b1175_1",2022-06-16 17:40:40.888018 +"tl_gtf2bed","tool","bash script.sh","quay.io/biocontainers/bedops:2.4.39--h7d875b9_1",2021-10-25 14:07:38.206248 +"tl_gtfToGenePred","tool","gtfToGenePred","quay.io/biocontainers/ucsc-gtftogenepred:377--h0b8a92a_4",2021-10-25 14:07:38.214996 +"tl_HaplotypeCaller","tool","gatk HaplotypeCaller","broadinstitute/gatk:latest",2021-10-25 12:58:45.145524 +"tl_hisat2_align","tool","hisat2","biocontainers/hisat2:v2.0.5-1-deb_cv1",2021-10-25 12:58:46.154725 +"tl_hisat2_build","tool","hisat2-build","biocontainers/hisat2:v2.0.5-1-deb_cv1",2021-10-25 12:58:46.166155 +"tl_htseq","tool","htseq-count","genomicpariscentre/htseq",2021-10-25 12:58:46.177739 +"tl_infer_experiment","tool","infer_experiment.py","quay.io/biocontainers/rseqc:4.0.0--py38h4a8c8d9_1",2022-07-11 23:12:29.29236 +"tl_jabba","tool","jba","hubentu/jabba",2024-03-22 12:37:03.922705 +"tl_kallisto_index","tool","kallisto index","zlskidmore/kallisto",2021-10-25 12:58:46.1891 +"tl_kallisto_quant","tool","kallisto quant","zlskidmore/kallisto",2021-10-25 12:58:46.200473 +"tl_lancet","tool","lancet","hubentu/lancet",2021-10-25 14:07:38.222061 +"tl_LearnReadOrientationModel","tool","gatk LearnReadOrientationModel","broadinstitute/gatk:latest",2021-10-25 12:58:45.166606 +"tl_liftOver","tool","liftOver","biowardrobe2/ucscuserapps:v358_2",2021-10-25 12:58:46.236892 +"tl_lofreq_indelqual","tool","lofreq indelqual","quay.io/biocontainers/lofreq:2.1.5--py37h916d2e8_4",2021-10-25 12:58:46.258855 +"tl_lofreq_viterbi","tool","lofreq viterbi","quay.io/biocontainers/lofreq:2.1.5--py37h916d2e8_4",2021-10-25 12:58:46.282733 +"tl_LoFreq","tool","lofreq somatic","quay.io/biocontainers/lofreq:2.1.5--py37h916d2e8_4",2021-10-25 12:58:45.185043 +"tl_lumpy_extractSplitReads_BwaMem","tool","extractSplitReads_BwaMem","quay.io/biocontainers/lumpy-sv:0.3.1--hdfd78af_3",2022-06-16 17:40:40.899422 +"tl_lumpy","tool","lumpyexpress","quay.io/biocontainers/lumpy-sv:0.3.1--hdfd78af_3",2022-06-16 17:40:40.893403 +"tl_mageck_count","tool","mageck count","quay.io/biocontainers/mageck:0.5.9.4--py38hed8969a_0",2021-10-25 12:58:46.307599 +"tl_mageck_mle","tool","mageck mle","quay.io/biocontainers/mageck:0.5.9.4--py38hed8969a_0",2021-10-25 12:58:46.329446 +"tl_mageck_pathway","tool","mageck pathway","quay.io/biocontainers/mageck:0.5.9.4--py38hed8969a_0",2021-10-25 12:58:46.352851 +"tl_mageck_test","tool","mageck test","quay.io/biocontainers/mageck:0.5.9.4--py38hed8969a_0",2021-10-25 12:58:46.367611 +"tl_makeblastdb","tool","makeblastdb","biocontainers/blast:v2.2.31_cv2",2021-10-25 12:58:46.37986 +"tl_manta","tool","configManta.py","quay.io/biocontainers/manta:1.6.0--h9ee0642_1",2021-10-25 14:07:38.231351 +"tl_markdup","tool","picard MarkDuplicates","quay.io/biocontainers/picard:2.21.1--0",2021-10-25 12:58:46.403466 +"tl_md5sum","tool","md5sum",NA,2022-06-16 17:40:40.907486 +"tl_mergeBam","tool","picard MergeSamFiles","quay.io/biocontainers/picard:2.21.1--0",2021-10-25 12:58:46.416529 +"tl_MergeVcf_MMS","tool","R function","hubentu/variantcombiner",2021-10-25 12:58:45.202648 +"tl_miRDeep2","tool","miRDeep2.pl","hubentu/mirdeep2",2021-10-25 12:58:46.428265 +"tl_miRMapper","tool","mapper.pl","hubentu/mirdeep2",2021-10-25 12:58:46.452589 +"tl_mosdepth","tool","mosdepth","quay.io/biocontainers/mosdepth:0.3.3--h37c5b7d_2",2023-05-24 22:02:09.933515 +"tl_msisensor_pro_msi","tool","msisensor-pro msi","pengjia1110/msisensor-pro",2022-06-16 17:40:40.913598 +"tl_msisensor_pro_scan","tool","msisensor-pro scan","pengjia1110/msisensor-pro",2022-06-16 17:40:40.918931 +"tl_multiqc","tool","multiqc","quay.io/biocontainers/multiqc:1.11--pyhdfd78af_0",2021-10-25 14:07:38.241265 +"tl_MuSE","tool","MuSE call","quay.io/biocontainers/muse:1.0.rc--h2e03b76_5",2021-10-25 14:07:38.057563 +"tl_MuSEv2","tool","MuSE call","quay.io/biocontainers/muse:1.0.rc--0",2021-10-25 14:07:38.061694 +"tl_Mutect2_gatk3","tool","java -jar /usr/GenomeAnalysisTK.jar -T MuTect2","broadinstitute/gatk3:3.8-1",2021-10-25 12:58:45.259296 +"tl_Mutect2","tool","gatk Mutect2","broadinstitute/gatk:latest",2021-10-25 14:07:38.076074 +"tl_MutSigCV","tool","gp_MutSigCV","genepattern/docker-mutsigcv:2a",2022-07-12 12:36:23.58694 +"tl_mv","tool","mv",NA,2021-10-25 14:07:38.247673 +"tl_mvOut","tool","R function",NA,2021-10-25 12:58:46.489092 +"tl_neusomatic_call","tool","python /opt/neusomatic/neusomatic/python/call.py","msahraeian/neusomatic",2021-10-25 12:58:46.501187 +"tl_neusomatic_postprocess","tool","python /opt/neusomatic/neusomatic/python/postprocess.py","msahraeian/neusomatic",2021-10-25 12:58:46.513144 +"tl_neusomatic_preprocess","tool","python /opt/neusomatic/neusomatic/python/preprocess.py","msahraeian/neusomatic",2021-10-25 12:58:46.525103 +"tl_Nirvana_download","tool","dotnet /opt/nirvana/Downloader.dll","annotation/nirvana:3.14",2023-01-05 14:49:29.696818 +"tl_Nirvana","tool","dotnet /opt/nirvana/Nirvana.dll","annotation/nirvana:3.14",2023-01-06 09:03:33.327042 +"tl_nudup","tool","nudup.py","quay.io/biocontainers/nudup:2.3.3--py_2",2023-02-08 10:19:48.0382 +"tl_octopus_somatic","tool","octopus","dancooke/octopus",2021-10-25 14:07:38.251807 +"tl_oncokb_CnaAnnotator","tool","python /opt/CnaAnnotator.py","hubentu/oncokb-annotator",2024-03-28 11:14:48.458991 +"tl_oncokb_FusionAnnotator","tool","python /opt/FusionAnnotator.py","hubentu/oncokb-annotator",2024-03-28 11:13:55.106637 +"tl_oncokb_MafAnnotator","tool","python /opt/MafAnnotator.py","hubentu/oncokb-annotator",2024-03-28 11:13:22.167838 +"tl_oncokb_StructuralVariantAnnotator","tool","python /opt/StructuralVariantAnnotator.py","hubentu/oncokb-annotator",2024-03-28 11:14:23.603913 +"tl_polysolver","tool","bash /home/polysolver/scripts/shell_call_hla_type","sachet/polysolver:v4",2021-10-25 12:58:46.547474 +"tl_PoN","tool","gatk CreateSomaticPanelOfNormals","broadinstitute/gatk:latest",2021-10-25 14:07:38.085878 +"tl_pvacseq","tool","pvacseq run","griffithlab/pvactools",2021-10-25 12:58:46.561025 +"tl_rbamCoverage","tool","R function",NA,2023-01-03 16:43:10.410504 +"tl_read_distribution","tool","read_distribution.py","quay.io/biocontainers/rseqc:4.0.0--py38h4a8c8d9_1",2021-10-25 14:07:38.260648 +"tl_ReadBackedPhasing","tool","java -jar /usr/GenomeAnalysisTK.jar -T ReadBackedPhasing","broadinstitute/gatk3:3.8-1",2021-10-25 12:58:45.281997 +"tl_RenameSampleInVcf","tool","picard RenameSampleInVcf","quay.io/biocontainers/picard:2.21.1--0",2021-10-25 12:58:45.293443 +"tl_ReorderSam","tool","picard ReorderSam","quay.io/biocontainers/picard:2.21.1--0",2021-10-25 12:58:45.304991 +"tl_rMATS_bam","tool","python /rmats/rmats.py","rmats_darts",2024-01-15 15:13:42.116325 +"tl_rMATS_fq","tool","","xinglab/rmats",2022-02-16 11:36:10.808787 +"tl_rMATS_task","tool","python /rmats/rmats.py","rmats_darts",2024-01-15 15:13:48.522374 +"tl_rMATS","tool","","xinglab/rmats",2022-02-16 11:36:10.784218 +"tl_rnaseqc","tool","rnaseqc","gcr.io/broad-cga-aarong-gtex/rnaseqc:latest",2023-06-22 13:12:07.255464 +"tl_Rsplit","tool","R function",NA,2021-10-25 12:58:45.316683 +"tl_runWDL","tool","java",NA,2021-10-25 12:58:46.634154 +"tl_salmon_index","tool","salmon index","combinelab/salmon",2021-10-25 12:58:46.645364 +"tl_salmon_quant","tool","salmon quant","combinelab/salmon",2022-02-16 11:36:10.821322 +"tl_sam2bam","tool","samtools view","biocontainers/samtools:v1.7.0_cv3",2021-10-25 12:58:46.667695 +"tl_SamToFastq","tool","picard SamToFastq","quay.io/biocontainers/picard:2.21.1--0",2021-10-25 12:58:45.43622 +"tl_samtools_collate","tool","samtools collate","quay.io/biocontainers/samtools:1.16.1--h6899075_1",2023-01-06 10:50:42.672143 +"tl_samtools_depth","tool","samtools depth","biocontainers/samtools:v1.7.0_cv3",2021-10-25 12:58:46.679114 +"tl_samtools_faidx","tool","samtools faidx","quay.io/biocontainers/samtools:1.15--h1170115_1",2022-07-25 23:36:54.767109 +"tl_samtools_fastq","tool","samtools fastq","quay.io/biocontainers/samtools:1.16.1--h6899075_1",2023-01-06 10:58:31.650584 +"tl_samtools_flagstat","tool","samtools flagstat","quay.io/biocontainers/samtools:1.15--h1170115_1",2022-06-16 17:40:40.93514 +"tl_samtools_index","tool","samtools index","quay.io/biocontainers/samtools:1.12--h9aed4be_1",2021-10-25 12:58:46.70222 +"tl_samtools_merge","tool","samtools merge","quay.io/biocontainers/samtools:1.12--h9aed4be_1",2021-10-25 14:07:38.284231 +"tl_samtools_mpileup","tool","samtools mpileup","biocontainers/samtools:v1.7.0_cv3",2021-10-25 12:58:46.724795 +"tl_samtools_sort","tool","samtools sort","quay.io/biocontainers/samtools:1.12--h9aed4be_1",2022-02-16 11:36:10.833519 +"tl_samtools_stats","tool","samtools stats","biocontainers/samtools:v1.7.0_cv3",2021-10-25 12:58:46.763984 +"tl_samtools_view","tool","samtools view","quay.io/biocontainers/samtools:1.16.1--h6899075_1",2024-04-10 19:06:51.176349 +"tl_scar_HRD","tool","R function",NA,2022-06-16 17:40:40.949107 +"tl_seqtk_sample","tool","seqtk sample","quay.io/biocontainers/seqtk:1.4--he4a0461_1",2024-01-10 11:10:10.12264 +"tl_seqz_binning","tool","sequenza-utils seqz_binning","quay.io/biocontainers/sequenza-utils:3.0.0--py39h67e14b5_5",2022-06-16 17:40:40.955239 +"tl_sigproSS","tool","python /usr/local/bin/spss.py","hubentu/sigpro:v2",2022-08-10 16:51:24.806715 +"tl_somatic_combiner","tool","","hubentu/somatic_combiner",2021-10-25 14:07:38.291886 +"tl_SomaticSeq_Wrapper","tool","/opt/somaticseq/SomaticSeq.Wrapper.sh","lethalfang/somaticseq:2.7.2",2021-10-25 14:07:38.102757 +"tl_SomaticSniper","tool","/opt/somatic-sniper/build/bin/bam-somaticsniper","lethalfang/somaticsniper:1.0.5.0-2",2021-10-25 12:58:45.459956 +"tl_sortBam","tool","samtools sort","biocontainers/samtools:v1.7.0_cv3",2021-11-22 13:13:49.990965 +"tl_SortVcf","tool","java -jar /usr/picard/picard.jar SortVcf","broadinstitute/picard",2021-10-25 12:58:45.471538 +"tl_STAR_FFPE","tool","STAR","quay.io/biocontainers/star:2.7.9a--h9ee0642_0",2022-02-16 11:36:10.730111 +"tl_STAR_rMATS","tool","STAR","quay.io/biocontainers/star:2.7.9a--h9ee0642_0",2022-02-16 11:36:10.736266 +"tl_STAR","tool","STAR","quay.io/biocontainers/star:2.7.9a--h9ee0642_0",2024-01-10 11:38:14.556231 +"tl_starFusion","tool","/usr/local/src/STAR-Fusion/STAR-Fusion","trinityctat/starfusion",2024-03-06 16:00:09.970868 +"tl_STARindex","tool","STAR","quay.io/biocontainers/star:2.7.10a--h9ee0642_0",2022-07-27 11:06:12.189086 +"tl_STARsolo","tool","STAR","quay.io/biocontainers/star:2.7.10a--h9ee0642_0",2022-07-27 11:06:12.217557 +"tl_strelka","tool","configureStrelkaSomaticWorkflow.py","quay.io/biocontainers/strelka:2.9.10--h9ee0642_1",2021-10-25 14:07:38.300839 +"tl_strip_sam","tool","bash /opt/strip_bismark_sam.sh","hubentu/rrbs",2023-02-08 11:10:51.884368 +"tl_SUPPA_diffSplice","tool","python /opt/SUPPA/suppa.py diffSplice","hubentu/suppa",2021-10-25 12:58:45.363866 +"tl_SUPPA_generateEvents","tool","python /opt/SUPPA/suppa.py generateEvents","hubentu/suppa",2021-10-25 12:58:45.375574 +"tl_SUPPA_multipleFieldSelection","tool","python /opt/SUPPA/multipleFieldSelection.py","hubentu/suppa",2021-10-25 12:58:45.387511 +"tl_SUPPA_psiPerEvent","tool","python /opt/SUPPA/suppa.py psiPerEvent","hubentu/suppa",2021-10-25 12:58:45.399683 +"tl_svaba_germline","tool","svaba run","quay.io/biocontainers/svaba:1.1.0--h7d7f7ad_2",2022-06-16 17:40:40.96201 +"tl_svaba_somatic","tool","svaba run","quay.io/biocontainers/svaba:1.1.0--h7d7f7ad_2",2021-10-25 14:07:38.309711 +"tl_SVE_VP","tool","/software/SVE/scripts/variant_processor.py","timothyjamesbecker/sve",2021-10-25 12:58:45.42399 +"tl_SVE","tool","/software/SVE/scripts/auto.py","timothyjamesbecker/sve",2021-10-25 12:58:45.412418 +"tl_tabix_index","tool","tabix","biocontainers/tabix:v1.3.2-2-deb_cv1",2021-10-25 12:58:46.910818 +"tl_tar_c","tool","tar",NA,2022-06-16 17:40:40.969363 +"tl_TPMCalculator","tool","TPMCalculator","quay.io/biocontainers/tpmcalculator:0.0.4--hf393df8_3",2023-02-17 17:26:20.749143 +"tl_trim_galore","tool","trim_galore","quay.io/biocontainers/trim-galore:0.6.7--hdfd78af_0",2022-06-16 17:40:40.974733 +"tl_trimRRBSdiversity","tool","python /opt/trimRRBSdiversityAdaptCustomers.py","hubentu/rrbs",2023-02-08 11:10:27.52523 +"tl_VarDict","tool","vardict-java","quay.io/biocontainers/vardict-java:1.8.2--hdfd78af_1",2021-10-25 12:58:45.482558 +"tl_VarScan2_processSomatic","tool","java -jar /opt/varscan/VarScan.jar processSomatic","mgibio/varscan-cwl:v2.4.2-samtools1.3.1",2021-10-25 12:58:45.506051 +"tl_VarScan2_somatic","tool","java -jar /opt/varscan/VarScan.jar somatic","mgibio/varscan-cwl:v2.4.2-samtools1.3.1",2021-10-25 12:58:45.517826 +"tl_VarScan2_somaticFilter","tool","java -jar /opt/varscan/VarScan.jar somaticFilter","mgibio/varscan-cwl:v2.4.2-samtools1.3.1",2021-10-25 12:58:45.52898 +"tl_VarScan2","tool","","serge2016/varscan:v0.1.1",2021-10-25 12:58:45.49449 +"tl_vcf_expression_annotator","tool","vcf-expression-annotator","griffithlab/vatools:3.1.0",2021-10-25 12:58:46.943358 +"tl_vcf_readcount_annotator","tool","vcf-readcount-annotator","griffithlab/vatools:3.1.0",2021-10-25 12:58:46.954903 +"tl_vcf2bed","tool","bash script.sh","quay.io/biocontainers/bedtools:2.30.0--h7d7f7ad_2",2021-10-25 14:07:38.318969 +"tl_vep_plugin","tool","vep","hubentu/ensembl-vep-plugins",2021-10-25 14:07:38.325295 +"tl_vep","tool","vep","ensemblorg/ensembl-vep",2022-02-16 11:36:10.857375 +"tl_vt_decompose","tool","vt decompose","hubentu/vt",2021-10-25 12:58:46.978366 diff --git a/util.R b/util.R index 28aadc3..e1e8b8a 100644 --- a/util.R +++ b/util.R @@ -1,20 +1,34 @@ +## Convert Rcwl recipes into cwl descriptions library(Rcwl) library(RcwlPipelines) + +rfiles <- list.files("Rcwl", "*.R$", full.names = TRUE) +#rfiles <- list.files("Rcwl", "tl_", full.names = TRUE) +for(f in rfiles){ + tl <- cwlLoad(f) + tl_n <- sub(".R$", "", basename(f)) + message("checking ", tl_n) + tdir <- tempfile() + writeCWL(tl, prefix = tl_n, outdir = tdir) + re <- system(paste("cwltool --validate", file.path(tdir, paste0(tl_n, ".cwl"))), intern = TRUE) + if(grepl("is valid CWL", re))message(paste(f, "is validated")) +} + pp <- list.files("Rcwl", "pl_", full.names = TRUE) for(p in pp){ pid <- sub(".R$", "", sub("^pl_", "", basename(p))) assign(pid, cwlLoad(p)) dir.create(file.path("cwl", pid), recursive = TRUE, showWarnings = FALSE) - writeCWL(get(pid), prefix = file.path("cwl", pid, pid)) + writeCWL(get(pid), prefix = pid, outdir = file.path("cwl", pid), libPaths = FALSE) } tl <- list.files("Rcwl", "tl_", full.names = TRUE) for(p in tl){ pid <- sub(".R$", "", sub("^tl_", "", basename(p))) assign(pid, cwlLoad(p)) - writeCWL(get(pid), prefix = file.path("cwl", pid)) + writeCWL(get(pid), prefix = pid, outdir = "cwl") } meta <- RcwlPipelines:::cwlMeta(list.files("Rcwl", full.names = TRUE)) -write.csv(BM, "cwlMeta.csv") +write.csv(meta, "cwlMeta.csv") diff --git a/util.out b/util.out new file mode 100644 index 0000000..10ff3c9 --- /dev/null +++ b/util.out @@ -0,0 +1,87 @@ +Loading required package: yaml +Loading required package: S4Vectors +Loading required package: stats4 +Loading required package: BiocGenerics + +Attaching package: ‘BiocGenerics’ + +The following objects are masked from ‘package:stats’: + + IQR, mad, sd, var, xtabs + +The following objects are masked from ‘package:base’: + + anyDuplicated, aperm, append, as.data.frame, basename, cbind, + colnames, dirname, do.call, duplicated, eval, evalq, Filter, Find, + get, grep, grepl, intersect, is.unsorted, lapply, Map, mapply, + match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, + Position, rank, rbind, Reduce, rownames, sapply, setdiff, table, + tapply, union, unique, unsplit, which.max, which.min + + +Attaching package: ‘S4Vectors’ + +The following object is masked from ‘package:utils’: + + findMatches + +The following objects are masked from ‘package:base’: + + expand.grid, I, unname + +Loading required package: BiocFileCache +Loading required package: dbplyr + +Attaching package: ‘RcwlPipelines’ + +The following object is masked from ‘package:graphics’: + + title + +checking pl_alignMerge +INFO /projects/rpci/songliu/qhu/miniconda3/bin//cwltool 3.1.20240708091337 +INFO Resolved '/tmp/RtmpTqjTO9/file26500c4cf99137/pl_alignMerge.cwl' to 'file:///tmp/RtmpTqjTO9/file26500c4cf99137/pl_alignMerge.cwl' +Rcwl/pl_alignMerge.R is validated +vep_plugin loaded +checking pl_AnnPhaseVcf +INFO /projects/rpci/songliu/qhu/miniconda3/bin//cwltool 3.1.20240708091337 +INFO Resolved '/tmp/RtmpTqjTO9/file26500c4405eba2/pl_AnnPhaseVcf.cwl' to 'file:///tmp/RtmpTqjTO9/file26500c4405eba2/pl_AnnPhaseVcf.cwl' +../../../../../../../../tmp/RtmpTqjTO9/file26500c4405eba2/pl_AnnPhaseVcf.cwl:8:3: Warning: checking + item + Warning: Field + 'class' contains + undefined reference + to + 'http://commonwl.org/cwltool#LoadListingRequirement' +WARNING ../../../../../../../../tmp/RtmpTqjTO9/file26500c4405eba2/pl_AnnPhaseVcf.cwl:8:3: Warning: checking + item + Warning: Field + 'class' contains + undefined reference + to + 'http://commonwl.org/cwltool#LoadListingRequirement' +URI prefix 'cwltool' of 'cwltool:LoadListingRequirement' not recognized, are you missing a $namespaces section? +WARNING URI prefix 'cwltool' of 'cwltool:LoadListingRequirement' not recognized, are you missing a $namespaces section? +../../../../../../../../tmp/RtmpTqjTO9/file26500c4405eba2/VCFvep.cwl:8:3: Warning: checking item + Warning: Unsupported + scheme 'cwltool' in url: + cwltool:LoadListingRequirement +WARNING ../../../../../../../../tmp/RtmpTqjTO9/file26500c4405eba2/VCFvep.cwl:8:3: Warning: checking item + Warning: Unsupported + scheme 'cwltool' in url: + cwltool:LoadListingRequirement +INFO ../../../../../../../../tmp/RtmpTqjTO9/file26500c4405eba2/VCFvep.cwl:1:1: Unknown hint + cwltool:LoadListingRequirement +Rcwl/pl_AnnPhaseVcf.R is validated +arcasHLA_extract loaded +arcasHLA_genotype loaded +arcasHLA_partial loaded +checking pl_arcasHLA_pl +INFO /projects/rpci/songliu/qhu/miniconda3/bin//cwltool 3.1.20240708091337 +INFO Resolved '/tmp/RtmpTqjTO9/file26500c37905f49/pl_arcasHLA_pl.cwl' to 'file:///tmp/RtmpTqjTO9/file26500c37905f49/pl_arcasHLA_pl.cwl' +Rcwl/pl_arcasHLA_pl.R is validated +STAR loaded +arriba loaded +Error in stepInputs(list(s1, s2)) : could not find function "stepInputs" +Calls: cwlLoad ... eval -> cwlWorkflow -> new -> initialize -> initialize +Execution halted