mirror of
https://github.com/KevinMidboe/linguist.git
synced 2026-02-17 05:39:32 +00:00
Add WDL language support (#3858)
* Add WDL language support * Add ace mode
This commit is contained in:
committed by
Colin Seymour
parent
a47008ea00
commit
e51b5ec9b7
44
samples/wdl/ifs_in_scatters.wdl
Normal file
44
samples/wdl/ifs_in_scatters.wdl
Normal 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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user