From 011ee91183d98224004b7d2f3550d5719d0b1701 Mon Sep 17 00:00:00 2001 From: Michal-Babins Date: Fri, 7 May 2021 09:37:36 -0500 Subject: [PATCH 1/2] test validation wdl metaAssembly --- test_assembly.wdl | 71 +++++++++++++++++++++++++++++++++++ test_output/test_assembly.wdl | 71 +++++++++++++++++++++++++++++++++++ 2 files changed, 142 insertions(+) create mode 100644 test_assembly.wdl create mode 100644 test_output/test_assembly.wdl diff --git a/test_assembly.wdl b/test_assembly.wdl new file mode 100644 index 0000000..dd68547 --- /dev/null +++ b/test_assembly.wdl @@ -0,0 +1,71 @@ +import "jgi_assembly.wdl" as jgi + +workflow test_assembly { + String bbtools_container="microbiomedata/bbtools:38.90" + String spades_container="microbiomedata/spades:3.15.0" + String validate_container="mbabinski17/comparejson:0.1" + String rename_contig_prefix="scaffold" + Float uniquekmer=1000 + String? memory="60G" + String? threads="8" + String? outdir="/vol_b/nmdc_workflows/test_nmdc/metaAssembly/test_output" + String url="https://portal.nersc.gov/cfs/m3408/test_data/Ecoli_10x-int.fastq.gz" + String ref_json="https://raw.githubusercontent.com/microbiomedata/metaAssembly/master/test_output/small_test_stats.json" + + call prepare { + input: container=bbtools_container, + url=url, + ref_json=ref_json + } + call jgi.jgi_metaASM as asm { + input: input_file=[prepare.fastq], + bbtools_container=bbtools_container, + spades_container=spades_container, + memory=memory, + threads=threads, + uniquekmer=uniquekmer, + rename_contig_prefix=rename_contig_prefix, + outdir=outdir + } + call validate { + input: container=validate_container, + refjson=prepare.refjson, + user_json=asm.final_asmstat + } +} +task prepare { + String container + String ref_json + String url + command{ + wget -O "input.fastq.gz" ${url} + wget -O "ref_json.json" ${ref_json} + } + output{ + File fastq = "input.fastq.gz" + File refjson = "ref_json.json" + } + runtime { + memory: "1 GiB" + cpu: 2 + maxRetries: 1 + docker: container + } +} +task validate { + String container + File refjson + File user_json + command { + compare_json.py -i ${refjson} -f ${user_json} + } + output { + Array[String] result = read_lines(stdout()) + } + runtime { + memory: "1 GiB" + cpu: 1 + maxRetries: 1 + docker: container + } +} diff --git a/test_output/test_assembly.wdl b/test_output/test_assembly.wdl new file mode 100644 index 0000000..dd68547 --- /dev/null +++ b/test_output/test_assembly.wdl @@ -0,0 +1,71 @@ +import "jgi_assembly.wdl" as jgi + +workflow test_assembly { + String bbtools_container="microbiomedata/bbtools:38.90" + String spades_container="microbiomedata/spades:3.15.0" + String validate_container="mbabinski17/comparejson:0.1" + String rename_contig_prefix="scaffold" + Float uniquekmer=1000 + String? memory="60G" + String? threads="8" + String? outdir="/vol_b/nmdc_workflows/test_nmdc/metaAssembly/test_output" + String url="https://portal.nersc.gov/cfs/m3408/test_data/Ecoli_10x-int.fastq.gz" + String ref_json="https://raw.githubusercontent.com/microbiomedata/metaAssembly/master/test_output/small_test_stats.json" + + call prepare { + input: container=bbtools_container, + url=url, + ref_json=ref_json + } + call jgi.jgi_metaASM as asm { + input: input_file=[prepare.fastq], + bbtools_container=bbtools_container, + spades_container=spades_container, + memory=memory, + threads=threads, + uniquekmer=uniquekmer, + rename_contig_prefix=rename_contig_prefix, + outdir=outdir + } + call validate { + input: container=validate_container, + refjson=prepare.refjson, + user_json=asm.final_asmstat + } +} +task prepare { + String container + String ref_json + String url + command{ + wget -O "input.fastq.gz" ${url} + wget -O "ref_json.json" ${ref_json} + } + output{ + File fastq = "input.fastq.gz" + File refjson = "ref_json.json" + } + runtime { + memory: "1 GiB" + cpu: 2 + maxRetries: 1 + docker: container + } +} +task validate { + String container + File refjson + File user_json + command { + compare_json.py -i ${refjson} -f ${user_json} + } + output { + Array[String] result = read_lines(stdout()) + } + runtime { + memory: "1 GiB" + cpu: 1 + maxRetries: 1 + docker: container + } +} From 805737e391d2c4cf242af7803429e95443544320 Mon Sep 17 00:00:00 2001 From: Michal-Babins Date: Fri, 7 May 2021 08:39:07 -0600 Subject: [PATCH 2/2] Delete test_assembly.wdl --- test_assembly.wdl | 71 ----------------------------------------------- 1 file changed, 71 deletions(-) delete mode 100644 test_assembly.wdl diff --git a/test_assembly.wdl b/test_assembly.wdl deleted file mode 100644 index dd68547..0000000 --- a/test_assembly.wdl +++ /dev/null @@ -1,71 +0,0 @@ -import "jgi_assembly.wdl" as jgi - -workflow test_assembly { - String bbtools_container="microbiomedata/bbtools:38.90" - String spades_container="microbiomedata/spades:3.15.0" - String validate_container="mbabinski17/comparejson:0.1" - String rename_contig_prefix="scaffold" - Float uniquekmer=1000 - String? memory="60G" - String? threads="8" - String? outdir="/vol_b/nmdc_workflows/test_nmdc/metaAssembly/test_output" - String url="https://portal.nersc.gov/cfs/m3408/test_data/Ecoli_10x-int.fastq.gz" - String ref_json="https://raw.githubusercontent.com/microbiomedata/metaAssembly/master/test_output/small_test_stats.json" - - call prepare { - input: container=bbtools_container, - url=url, - ref_json=ref_json - } - call jgi.jgi_metaASM as asm { - input: input_file=[prepare.fastq], - bbtools_container=bbtools_container, - spades_container=spades_container, - memory=memory, - threads=threads, - uniquekmer=uniquekmer, - rename_contig_prefix=rename_contig_prefix, - outdir=outdir - } - call validate { - input: container=validate_container, - refjson=prepare.refjson, - user_json=asm.final_asmstat - } -} -task prepare { - String container - String ref_json - String url - command{ - wget -O "input.fastq.gz" ${url} - wget -O "ref_json.json" ${ref_json} - } - output{ - File fastq = "input.fastq.gz" - File refjson = "ref_json.json" - } - runtime { - memory: "1 GiB" - cpu: 2 - maxRetries: 1 - docker: container - } -} -task validate { - String container - File refjson - File user_json - command { - compare_json.py -i ${refjson} -f ${user_json} - } - output { - Array[String] result = read_lines(stdout()) - } - runtime { - memory: "1 GiB" - cpu: 1 - maxRetries: 1 - docker: container - } -}