-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Michal-Babins
committed
May 7, 2021
1 parent
466f903
commit 011ee91
Showing
2 changed files
with
142 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} | ||
} |