Add WDL language support (#3858)

* Add WDL language support

* Add ace mode
This commit is contained in:
Chris Llanwarne
2017-10-14 12:12:47 -04:00
committed by Colin Seymour
parent a47008ea00
commit e51b5ec9b7
9 changed files with 156 additions and 0 deletions

21
samples/wdl/hello.wdl Normal file
View File

@@ -0,0 +1,21 @@
# Sample originally from https://github.com/broadinstitute/centaur
task hello {
String addressee
command {
echo "Hello ${addressee}!"
}
output {
String salutation = read_string(stdout())
}
runtime {
docker: "ubuntu@sha256:71cd81252a3563a03ad8daee81047b62ab5d892ebbfbf71cf53415f29c130950"
}
}
workflow wf_hello {
call hello
output {
hello.salutation
}
}

View File

@@ -0,0 +1,44 @@
# Sample originally from https://github.com/broadinstitute/centaur
task validate_int {
Int i
command {
echo $(( ${i} % 2 ))
}
output {
Boolean validation = read_int(stdout()) == 1
}
runtime {
docker: "ubuntu:latest"
}
}
task mirror {
Int i
command {
echo ${i}
}
output {
Int out = read_int(stdout())
}
runtime {
docker: "ubuntu:latest"
}
}
workflow ifs_in_scatters {
Array[Int] numbers = range(5)
scatter (n in numbers) {
call validate_int { input: i = n }
if (validate_int.validation) {
Int incremented = n + 1
call mirror { input: i = incremented }
}
}
output {
Array[Int?] mirrors = mirror.out
}
}

View File

@@ -0,0 +1,42 @@
# Sample originally from https://github.com/broadinstitute/centaur
##
# Check that we can:
# - Create a file from a task and feed it into subsequent commands.
# - Create a file output by interpolating a file name
# - Use engine functions on an interpolated file name
##
task mkFile {
command {
echo "small file contents" > out.txt
}
output { File out = "out.txt" }
runtime { docker: "ubuntu:latest" }
}
task consumeFile {
File in_file
String out_name
command {
cat ${in_file} > ${out_name}
}
runtime {
docker: "ubuntu:latest"
}
output {
File out_interpolation = "${out_name}"
String contents = read_string("${out_name}")
String contentsAlt = read_string(out_interpolation)
}
}
workflow filepassing {
call mkFile
call consumeFile {input: in_file=mkFile.out, out_name = "myFileName.abc.txt" }
output {
consumeFile.contents
consumeFile.contentsAlt
}
}