From b7b4c55c2ee412894a920f103837dc4a55feb29b Mon Sep 17 00:00:00 2001 From: Yueyao Gao Date: Sat, 6 Jul 2024 16:24:36 -0400 Subject: [PATCH] first commit of cnv prober --- .dockstore.yml | 5 ++ CNV_Array_Prober/cnvArrayProber.inputs.json | 11 ++++ CNV_Array_Prober/cnvArrayProber.wdl | 63 +++++++++++++++++++++ 3 files changed, 79 insertions(+) create mode 100644 CNV_Array_Prober/cnvArrayProber.inputs.json create mode 100644 CNV_Array_Prober/cnvArrayProber.wdl diff --git a/.dockstore.yml b/.dockstore.yml index 4ce4927..60df846 100644 --- a/.dockstore.yml +++ b/.dockstore.yml @@ -129,3 +129,8 @@ workflows: primaryDescriptorPath: /PECGS-QUICviz/QUICviz.wdl testParameterFiles: - /PECGS-QUICviz/QUICviz.inputs.json + - name: cnvArrayProber + subclass: WDL + primaryDescriptorPath: /CNV_Array_Prober/cnvArrayProber.wdl + testParameterFiles: + - /CNV_Array_Prober/cnvArrayProber.inputs.json \ No newline at end of file diff --git a/CNV_Array_Prober/cnvArrayProber.inputs.json b/CNV_Array_Prober/cnvArrayProber.inputs.json new file mode 100644 index 0000000..de8564f --- /dev/null +++ b/CNV_Array_Prober/cnvArrayProber.inputs.json @@ -0,0 +1,11 @@ +{ + "cnvArrayProber.cnvArrayProber.cpu": "Int (optional, default = 1)", + "cnvArrayProber.cnvProberDocker": "String (optional, default = \"us.gcr.io/tag-public/cnv-array-prober:0.0.0\")", + "cnvArrayProber.cnvBedFile": "File", + "cnvArrayProber.CytoSNP850K_Support_Csv": "File", + "cnvArrayProber.sampleName": "String", + "cnvArrayProber.GDA_Support_Csv": "File", + "cnvArrayProber.cnvArrayProber.disk": "Int (optional, default = 100)", + "cnvArrayProber.cnvArrayProber.memory": "Int (optional, default = 4)" +} + diff --git a/CNV_Array_Prober/cnvArrayProber.wdl b/CNV_Array_Prober/cnvArrayProber.wdl new file mode 100644 index 0000000..ba07f38 --- /dev/null +++ b/CNV_Array_Prober/cnvArrayProber.wdl @@ -0,0 +1,63 @@ +version 1.0 + +workflow cnvArrayProber { + input{ + String sampleName + File cnvBedFile + File CytoSNP850K_Support_Csv + File GDA_Support_Csv + String cnvProberDocker = "us.gcr.io/tag-public/cnv-array-prober:0.0.0" + } + call cnvArrayProber { + input: + sampleName = sampleName, + cnvBedFile = cnvBedFile, + CytoSNP850K_Support_Csv = CytoSNP850K_Support_Csv, + GDA_Support_Csv = GDA_Support_Csv, + cnvProberDocker = cnvProberDocker + } + output{ + File cnvProbeAnnotation = cnvArrayProber.cnvProbeAnnotation + File cnvProbePlots = cnvArrayProber.cnvProbePlots + } + meta { + author: "Yueyao Gao" + email: "tag@broadinstitute.org" + description: "This workflow takes a CNV bed file and CytoSNP-850K and GDA support files as input and outputs a csv file with probe information for each CNV interval. Additionally, output a PDF file with plots for each CNV interval the number of probes in the CytoSNP-850K and GDA arrays." + } +} + +task cnvArrayProber { + input{ + String sampleName + File cnvBedFile + File CytoSNP850K_Support_Csv + File GDA_Support_Csv + String cnvProberDocker + Int memory = 4 + Int cpu = 1 + Int disk = 100 + } + command <<< + set -e + mkdir output + + conda run --no-capture-output \ + -n prober_env \ + python3 /BaseImage/cnvArrayProber/scripts/cnvArrayProber.py \ + -b ~{cnvBedFile} \ + -c ~{CytoSNP850K_Support_Csv} \ + -g ~{GDA_Support_Csv} \ + -o output/~{sampleName} + >>> + output{ + File cnvProbeAnnotation = "output/~{sampleName}CNV_Probe_Mappings.csv" + File cnvProbePlots = "output/~{sampleName}CNV_Probe_Mappings_Plots.pdf" + } + runtime { + docker: cnvProberDocker + memory: memory + cpu: cpu + disk: disk + } +} \ No newline at end of file