toil 8.1.0b1__py3-none-any.whl → 8.2.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- toil/__init__.py +0 -35
- toil/batchSystems/abstractBatchSystem.py +1 -1
- toil/batchSystems/abstractGridEngineBatchSystem.py +1 -1
- toil/batchSystems/awsBatch.py +1 -1
- toil/batchSystems/cleanup_support.py +1 -1
- toil/batchSystems/kubernetes.py +53 -7
- toil/batchSystems/local_support.py +1 -1
- toil/batchSystems/mesos/batchSystem.py +13 -8
- toil/batchSystems/mesos/test/__init__.py +3 -2
- toil/batchSystems/singleMachine.py +1 -1
- toil/batchSystems/slurm.py +27 -26
- toil/bus.py +5 -3
- toil/common.py +39 -11
- toil/cwl/cwltoil.py +1 -1
- toil/job.py +64 -49
- toil/jobStores/abstractJobStore.py +24 -3
- toil/jobStores/fileJobStore.py +25 -1
- toil/jobStores/googleJobStore.py +104 -30
- toil/leader.py +9 -0
- toil/lib/accelerators.py +3 -1
- toil/lib/aws/utils.py.orig +504 -0
- toil/lib/bioio.py +1 -1
- toil/lib/docker.py +252 -91
- toil/lib/dockstore.py +11 -3
- toil/lib/exceptions.py +5 -3
- toil/lib/history.py +87 -13
- toil/lib/history_submission.py +23 -9
- toil/lib/io.py +34 -22
- toil/lib/misc.py +7 -1
- toil/lib/resources.py +2 -1
- toil/lib/threading.py +11 -10
- toil/options/common.py +8 -0
- toil/options/wdl.py +11 -0
- toil/server/api_spec/LICENSE +201 -0
- toil/server/api_spec/README.rst +5 -0
- toil/server/cli/wes_cwl_runner.py +2 -1
- toil/test/__init__.py +275 -115
- toil/test/batchSystems/batchSystemTest.py +227 -205
- toil/test/batchSystems/test_slurm.py +27 -0
- toil/test/cactus/pestis.tar.gz +0 -0
- toil/test/conftest.py +7 -0
- toil/test/cwl/2.fasta +11 -0
- toil/test/cwl/2.fastq +12 -0
- toil/test/cwl/conftest.py +1 -1
- toil/test/cwl/cwlTest.py +999 -867
- toil/test/cwl/directory/directory/file.txt +15 -0
- toil/test/cwl/download_directory_file.json +4 -0
- toil/test/cwl/download_directory_s3.json +4 -0
- toil/test/cwl/download_file.json +6 -0
- toil/test/cwl/download_http.json +6 -0
- toil/test/cwl/download_https.json +6 -0
- toil/test/cwl/download_s3.json +6 -0
- toil/test/cwl/download_subdirectory_file.json +5 -0
- toil/test/cwl/download_subdirectory_s3.json +5 -0
- toil/test/cwl/empty.json +1 -0
- toil/test/cwl/mock_mpi/fake_mpi.yml +8 -0
- toil/test/cwl/mock_mpi/fake_mpi_run.py +42 -0
- toil/test/cwl/optional-file-exists.json +6 -0
- toil/test/cwl/optional-file-missing.json +6 -0
- toil/test/cwl/preemptible_expression.json +1 -0
- toil/test/cwl/revsort-job-missing.json +6 -0
- toil/test/cwl/revsort-job.json +6 -0
- toil/test/cwl/s3_secondary_file.json +16 -0
- toil/test/cwl/seqtk_seq_job.json +6 -0
- toil/test/cwl/stream.json +6 -0
- toil/test/cwl/test_filename_conflict_resolution.ms/table.dat +0 -0
- toil/test/cwl/test_filename_conflict_resolution.ms/table.f0 +0 -0
- toil/test/cwl/test_filename_conflict_resolution.ms/table.f1 +0 -0
- toil/test/cwl/test_filename_conflict_resolution.ms/table.f1i +0 -0
- toil/test/cwl/test_filename_conflict_resolution.ms/table.f2 +0 -0
- toil/test/cwl/test_filename_conflict_resolution.ms/table.f2_TSM0 +0 -0
- toil/test/cwl/test_filename_conflict_resolution.ms/table.f3 +0 -0
- toil/test/cwl/test_filename_conflict_resolution.ms/table.f3_TSM0 +0 -0
- toil/test/cwl/test_filename_conflict_resolution.ms/table.f4 +0 -0
- toil/test/cwl/test_filename_conflict_resolution.ms/table.f4_TSM0 +0 -0
- toil/test/cwl/test_filename_conflict_resolution.ms/table.f5 +0 -0
- toil/test/cwl/test_filename_conflict_resolution.ms/table.info +0 -0
- toil/test/cwl/test_filename_conflict_resolution.ms/table.lock +0 -0
- toil/test/cwl/whale.txt +16 -0
- toil/test/docs/scripts/example_alwaysfail.py +38 -0
- toil/test/docs/scripts/example_alwaysfail_with_files.wdl +33 -0
- toil/test/docs/scripts/example_cachingbenchmark.py +117 -0
- toil/test/docs/scripts/stagingExampleFiles/in.txt +1 -0
- toil/test/docs/scripts/stagingExampleFiles/out.txt +2 -0
- toil/test/docs/scripts/tutorial_arguments.py +23 -0
- toil/test/docs/scripts/tutorial_debugging.patch +12 -0
- toil/test/docs/scripts/tutorial_debugging_hangs.wdl +126 -0
- toil/test/docs/scripts/tutorial_debugging_works.wdl +129 -0
- toil/test/docs/scripts/tutorial_docker.py +20 -0
- toil/test/docs/scripts/tutorial_dynamic.py +24 -0
- toil/test/docs/scripts/tutorial_encapsulation.py +28 -0
- toil/test/docs/scripts/tutorial_encapsulation2.py +29 -0
- toil/test/docs/scripts/tutorial_helloworld.py +15 -0
- toil/test/docs/scripts/tutorial_invokeworkflow.py +27 -0
- toil/test/docs/scripts/tutorial_invokeworkflow2.py +30 -0
- toil/test/docs/scripts/tutorial_jobfunctions.py +22 -0
- toil/test/docs/scripts/tutorial_managing.py +29 -0
- toil/test/docs/scripts/tutorial_managing2.py +56 -0
- toil/test/docs/scripts/tutorial_multiplejobs.py +25 -0
- toil/test/docs/scripts/tutorial_multiplejobs2.py +21 -0
- toil/test/docs/scripts/tutorial_multiplejobs3.py +22 -0
- toil/test/docs/scripts/tutorial_promises.py +25 -0
- toil/test/docs/scripts/tutorial_promises2.py +30 -0
- toil/test/docs/scripts/tutorial_quickstart.py +22 -0
- toil/test/docs/scripts/tutorial_requirements.py +44 -0
- toil/test/docs/scripts/tutorial_services.py +45 -0
- toil/test/docs/scripts/tutorial_staging.py +45 -0
- toil/test/docs/scripts/tutorial_stats.py +64 -0
- toil/test/lib/aws/test_iam.py +3 -1
- toil/test/lib/dockerTest.py +205 -122
- toil/test/lib/test_history.py +101 -77
- toil/test/provisioners/aws/awsProvisionerTest.py +12 -9
- toil/test/provisioners/clusterTest.py +4 -4
- toil/test/provisioners/gceProvisionerTest.py +16 -14
- toil/test/sort/sort.py +4 -1
- toil/test/src/busTest.py +17 -17
- toil/test/src/deferredFunctionTest.py +145 -132
- toil/test/src/importExportFileTest.py +71 -63
- toil/test/src/jobEncapsulationTest.py +27 -28
- toil/test/src/jobServiceTest.py +149 -133
- toil/test/src/jobTest.py +219 -211
- toil/test/src/miscTests.py +66 -60
- toil/test/src/promisedRequirementTest.py +163 -169
- toil/test/src/regularLogTest.py +24 -24
- toil/test/src/resourceTest.py +82 -76
- toil/test/src/restartDAGTest.py +51 -47
- toil/test/src/resumabilityTest.py +24 -19
- toil/test/src/retainTempDirTest.py +60 -57
- toil/test/src/systemTest.py +17 -13
- toil/test/src/threadingTest.py +29 -32
- toil/test/utils/ABCWorkflowDebug/B_file.txt +1 -0
- toil/test/utils/ABCWorkflowDebug/debugWorkflow.py +204 -0
- toil/test/utils/ABCWorkflowDebug/mkFile.py +16 -0
- toil/test/utils/ABCWorkflowDebug/sleep.cwl +12 -0
- toil/test/utils/ABCWorkflowDebug/sleep.yaml +1 -0
- toil/test/utils/toilDebugTest.py +117 -102
- toil/test/utils/toilKillTest.py +54 -53
- toil/test/utils/utilsTest.py +303 -229
- toil/test/wdl/lint_error.wdl +9 -0
- toil/test/wdl/md5sum/empty_file.json +1 -0
- toil/test/wdl/md5sum/md5sum-gs.json +1 -0
- toil/test/wdl/md5sum/md5sum.1.0.wdl +32 -0
- toil/test/wdl/md5sum/md5sum.input +1 -0
- toil/test/wdl/md5sum/md5sum.json +1 -0
- toil/test/wdl/md5sum/md5sum.wdl +25 -0
- toil/test/wdl/miniwdl_self_test/inputs-namespaced.json +1 -0
- toil/test/wdl/miniwdl_self_test/inputs.json +1 -0
- toil/test/wdl/miniwdl_self_test/self_test.wdl +40 -0
- toil/test/wdl/standard_library/as_map.json +16 -0
- toil/test/wdl/standard_library/as_map_as_input.wdl +23 -0
- toil/test/wdl/standard_library/as_pairs.json +7 -0
- toil/test/wdl/standard_library/as_pairs_as_input.wdl +23 -0
- toil/test/wdl/standard_library/ceil.json +3 -0
- toil/test/wdl/standard_library/ceil_as_command.wdl +16 -0
- toil/test/wdl/standard_library/ceil_as_input.wdl +16 -0
- toil/test/wdl/standard_library/collect_by_key.json +1 -0
- toil/test/wdl/standard_library/collect_by_key_as_input.wdl +23 -0
- toil/test/wdl/standard_library/cross.json +11 -0
- toil/test/wdl/standard_library/cross_as_input.wdl +19 -0
- toil/test/wdl/standard_library/flatten.json +7 -0
- toil/test/wdl/standard_library/flatten_as_input.wdl +18 -0
- toil/test/wdl/standard_library/floor.json +3 -0
- toil/test/wdl/standard_library/floor_as_command.wdl +16 -0
- toil/test/wdl/standard_library/floor_as_input.wdl +16 -0
- toil/test/wdl/standard_library/keys.json +8 -0
- toil/test/wdl/standard_library/keys_as_input.wdl +24 -0
- toil/test/wdl/standard_library/length.json +7 -0
- toil/test/wdl/standard_library/length_as_input.wdl +16 -0
- toil/test/wdl/standard_library/length_as_input_with_map.json +7 -0
- toil/test/wdl/standard_library/length_as_input_with_map.wdl +17 -0
- toil/test/wdl/standard_library/length_invalid.json +3 -0
- toil/test/wdl/standard_library/range.json +3 -0
- toil/test/wdl/standard_library/range_0.json +3 -0
- toil/test/wdl/standard_library/range_as_input.wdl +17 -0
- toil/test/wdl/standard_library/range_invalid.json +3 -0
- toil/test/wdl/standard_library/read_boolean.json +3 -0
- toil/test/wdl/standard_library/read_boolean_as_command.wdl +17 -0
- toil/test/wdl/standard_library/read_float.json +3 -0
- toil/test/wdl/standard_library/read_float_as_command.wdl +17 -0
- toil/test/wdl/standard_library/read_int.json +3 -0
- toil/test/wdl/standard_library/read_int_as_command.wdl +17 -0
- toil/test/wdl/standard_library/read_json.json +3 -0
- toil/test/wdl/standard_library/read_json_as_output.wdl +31 -0
- toil/test/wdl/standard_library/read_lines.json +3 -0
- toil/test/wdl/standard_library/read_lines_as_output.wdl +31 -0
- toil/test/wdl/standard_library/read_map.json +3 -0
- toil/test/wdl/standard_library/read_map_as_output.wdl +31 -0
- toil/test/wdl/standard_library/read_string.json +3 -0
- toil/test/wdl/standard_library/read_string_as_command.wdl +17 -0
- toil/test/wdl/standard_library/read_tsv.json +3 -0
- toil/test/wdl/standard_library/read_tsv_as_output.wdl +31 -0
- toil/test/wdl/standard_library/round.json +3 -0
- toil/test/wdl/standard_library/round_as_command.wdl +16 -0
- toil/test/wdl/standard_library/round_as_input.wdl +16 -0
- toil/test/wdl/standard_library/size.json +3 -0
- toil/test/wdl/standard_library/size_as_command.wdl +17 -0
- toil/test/wdl/standard_library/size_as_output.wdl +36 -0
- toil/test/wdl/standard_library/stderr.json +3 -0
- toil/test/wdl/standard_library/stderr_as_output.wdl +30 -0
- toil/test/wdl/standard_library/stdout.json +3 -0
- toil/test/wdl/standard_library/stdout_as_output.wdl +30 -0
- toil/test/wdl/standard_library/sub.json +3 -0
- toil/test/wdl/standard_library/sub_as_input.wdl +17 -0
- toil/test/wdl/standard_library/sub_as_input_with_file.wdl +17 -0
- toil/test/wdl/standard_library/transpose.json +6 -0
- toil/test/wdl/standard_library/transpose_as_input.wdl +18 -0
- toil/test/wdl/standard_library/write_json.json +6 -0
- toil/test/wdl/standard_library/write_json_as_command.wdl +17 -0
- toil/test/wdl/standard_library/write_lines.json +7 -0
- toil/test/wdl/standard_library/write_lines_as_command.wdl +17 -0
- toil/test/wdl/standard_library/write_map.json +6 -0
- toil/test/wdl/standard_library/write_map_as_command.wdl +17 -0
- toil/test/wdl/standard_library/write_tsv.json +6 -0
- toil/test/wdl/standard_library/write_tsv_as_command.wdl +17 -0
- toil/test/wdl/standard_library/zip.json +12 -0
- toil/test/wdl/standard_library/zip_as_input.wdl +19 -0
- toil/test/wdl/test.csv +3 -0
- toil/test/wdl/test.tsv +3 -0
- toil/test/wdl/testfiles/croo.wdl +38 -0
- toil/test/wdl/testfiles/drop_files.wdl +62 -0
- toil/test/wdl/testfiles/drop_files_subworkflow.wdl +13 -0
- toil/test/wdl/testfiles/empty.txt +0 -0
- toil/test/wdl/testfiles/not_enough_outputs.wdl +33 -0
- toil/test/wdl/testfiles/random.wdl +66 -0
- toil/test/wdl/testfiles/string_file_coercion.json +1 -0
- toil/test/wdl/testfiles/string_file_coercion.wdl +35 -0
- toil/test/wdl/testfiles/test.json +4 -0
- toil/test/wdl/testfiles/test_boolean.txt +1 -0
- toil/test/wdl/testfiles/test_float.txt +1 -0
- toil/test/wdl/testfiles/test_int.txt +1 -0
- toil/test/wdl/testfiles/test_lines.txt +5 -0
- toil/test/wdl/testfiles/test_map.txt +2 -0
- toil/test/wdl/testfiles/test_string.txt +1 -0
- toil/test/wdl/testfiles/url_to_file.wdl +13 -0
- toil/test/wdl/testfiles/url_to_optional_file.wdl +13 -0
- toil/test/wdl/testfiles/vocab.json +1 -0
- toil/test/wdl/testfiles/vocab.wdl +66 -0
- toil/test/wdl/testfiles/wait.wdl +34 -0
- toil/test/wdl/wdl_specification/type_pair.json +23 -0
- toil/test/wdl/wdl_specification/type_pair_basic.wdl +36 -0
- toil/test/wdl/wdl_specification/type_pair_with_files.wdl +36 -0
- toil/test/wdl/wdl_specification/v1_spec.json +1 -0
- toil/test/wdl/wdl_specification/v1_spec_declaration.wdl +39 -0
- toil/test/wdl/wdltoil_test.py +680 -407
- toil/test/wdl/wdltoil_test_kubernetes.py +2 -2
- toil/version.py +9 -9
- toil/wdl/wdltoil.py +336 -123
- {toil-8.1.0b1.dist-info → toil-8.2.0.dist-info}/METADATA +5 -4
- toil-8.2.0.dist-info/RECORD +439 -0
- {toil-8.1.0b1.dist-info → toil-8.2.0.dist-info}/WHEEL +1 -1
- toil-8.1.0b1.dist-info/RECORD +0 -259
- {toil-8.1.0b1.dist-info → toil-8.2.0.dist-info}/entry_points.txt +0 -0
- {toil-8.1.0b1.dist-info → toil-8.2.0.dist-info/licenses}/LICENSE +0 -0
- {toil-8.1.0b1.dist-info → toil-8.2.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
version 1.0
|
|
2
|
+
|
|
3
|
+
workflow random {
|
|
4
|
+
input {
|
|
5
|
+
Int wf_input = 1
|
|
6
|
+
Int task_1_input = 1
|
|
7
|
+
Int task_2_input = 1
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
call dice_task {
|
|
11
|
+
input:
|
|
12
|
+
task_input=task_1_input
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
call read_task {
|
|
16
|
+
input:
|
|
17
|
+
to_read=dice_task.out,
|
|
18
|
+
task_input=task_2_input
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
output {
|
|
22
|
+
String value_seen = read_task.read
|
|
23
|
+
String value_written = read_task.wrote
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
task dice_task {
|
|
28
|
+
input {
|
|
29
|
+
Int task_input
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
command <<<
|
|
33
|
+
cat /proc/sys/kernel/random/uuid
|
|
34
|
+
>>>
|
|
35
|
+
|
|
36
|
+
output {
|
|
37
|
+
File out = stdout()
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
runtime {
|
|
41
|
+
docker: "ubuntu:24.04"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
task read_task {
|
|
46
|
+
input {
|
|
47
|
+
File to_read
|
|
48
|
+
Int task_input
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
String value_read = read_lines(to_read)[0]
|
|
52
|
+
|
|
53
|
+
command <<<
|
|
54
|
+
echo "~{value_read} $(cat /proc/sys/kernel/random/uuid)"
|
|
55
|
+
>>>
|
|
56
|
+
|
|
57
|
+
output {
|
|
58
|
+
String read = value_read
|
|
59
|
+
String wrote = read_lines(stdout())[0]
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
runtime {
|
|
63
|
+
docker: "ubuntu:24.04"
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"StringFileCoercion.opt_file": "empty.txt"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
version 1.0
|
|
2
|
+
|
|
3
|
+
workflow StringFileCoercion {
|
|
4
|
+
|
|
5
|
+
input {
|
|
6
|
+
File? opt_file
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
if (defined(opt_file)) {
|
|
10
|
+
call UseFile {
|
|
11
|
+
input:
|
|
12
|
+
# Exciting trick from https://github.com/broadinstitute/GATK-for-Microbes/blob/51f60135abd3f61efd0dcbe1e87c9aa89f5fb91c/wdl/shortReads/MicrobialGenomePipeline.wdl#L79C35-L79C44
|
|
13
|
+
input_file = select_first([opt_file, ""])
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
output {
|
|
18
|
+
File? output_file = UseFile.output_file
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
task UseFile {
|
|
24
|
+
input {
|
|
25
|
+
File input_file
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
command <<<
|
|
29
|
+
cat ~{input_file} | wc -c > output.txt
|
|
30
|
+
>>>
|
|
31
|
+
|
|
32
|
+
output {
|
|
33
|
+
File output_file = "output.txt"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
true
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
11.2345
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
11
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
A Whale of a Tale.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
workflow vocabulary {
|
|
2
|
+
|
|
3
|
+
#####################################################################
|
|
4
|
+
# $primitive_type = ('Boolean' | 'Int' | 'Float' | 'File' | 'String')
|
|
5
|
+
Boolean bool1
|
|
6
|
+
Int int1
|
|
7
|
+
Float float1
|
|
8
|
+
File file1
|
|
9
|
+
String string1
|
|
10
|
+
|
|
11
|
+
Boolean bool2 = true
|
|
12
|
+
Int int2 = 1
|
|
13
|
+
Float float2 = 1.1
|
|
14
|
+
File file2 = 'src/toil/test/wdl/test.tsv'
|
|
15
|
+
String string2 = 'x'
|
|
16
|
+
|
|
17
|
+
Boolean bool3 = true
|
|
18
|
+
Int int3 = 1
|
|
19
|
+
Float float3 = 1.1
|
|
20
|
+
File file3 = 'src/toil/test/wdl/test.csv'
|
|
21
|
+
String string3 = 'x'
|
|
22
|
+
|
|
23
|
+
#####################################################################
|
|
24
|
+
# $array_type = 'Array' '[' ($primitive_type | $object_type | $array_type) ']'
|
|
25
|
+
Array[Boolean] arraybool1
|
|
26
|
+
Array[Int] arrayint1
|
|
27
|
+
Array[Float] arrayfloat1
|
|
28
|
+
Array[File] arrayfile1
|
|
29
|
+
Array[String] arraystring1
|
|
30
|
+
|
|
31
|
+
Array[Array[Boolean]] arrayarraybool1
|
|
32
|
+
Array[Array[Int]] arrayarrayint1
|
|
33
|
+
Array[Array[Float]] arrayarrayfloat1
|
|
34
|
+
Array[Array[File]] arrayarrayfile1
|
|
35
|
+
Array[Array[String]] arrayarraystring1
|
|
36
|
+
|
|
37
|
+
#####################################################################
|
|
38
|
+
# $type_postfix_quantifier = '?' | '+'
|
|
39
|
+
String joinedstring = string2 + string3 + "x"
|
|
40
|
+
Int joinedint = int2 + int3 + 1
|
|
41
|
+
Float joinedfloat = float2 + float3 + 1.1
|
|
42
|
+
|
|
43
|
+
Boolean? boolo1
|
|
44
|
+
Int? into1
|
|
45
|
+
Float? floato1
|
|
46
|
+
File? fileo1
|
|
47
|
+
String? stringo1
|
|
48
|
+
|
|
49
|
+
Boolean? boolo2 = true
|
|
50
|
+
Int? into2 = 1
|
|
51
|
+
Float? floato2 = 1.1
|
|
52
|
+
File? fileo2 = 'src/toil/test/wdl/test.csv'
|
|
53
|
+
String? stringo2 = 'x'
|
|
54
|
+
|
|
55
|
+
#####################################################################
|
|
56
|
+
# $object_type = 'Object'
|
|
57
|
+
# $map_type = 'Map' '[' $primitive_type ',' ($primitive_type | $array_type | $map_type | $object_type) ']'
|
|
58
|
+
# currently unsupported
|
|
59
|
+
|
|
60
|
+
#####################################################################
|
|
61
|
+
# demonstrate function usage
|
|
62
|
+
Int additional_disk = select_first([into1, 20])
|
|
63
|
+
Int num_of_bqsr_scatters = length([1,1,1,1])
|
|
64
|
+
Int bqsr_divisor = if int3 > 1 then additional_disk else 1
|
|
65
|
+
Float disk_size = (floato2 / bqsr_divisor) + additional_disk
|
|
66
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
version 1.0
|
|
2
|
+
|
|
3
|
+
workflow wait {
|
|
4
|
+
input {
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
call waiter_task {
|
|
8
|
+
input:
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
output {
|
|
12
|
+
String result = read_lines(waiter_task.out)[0]
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
task waiter_task {
|
|
17
|
+
input {
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
command <<<
|
|
21
|
+
sleep 10 &
|
|
22
|
+
sleep 2 &
|
|
23
|
+
wait
|
|
24
|
+
echo "waited"
|
|
25
|
+
>>>
|
|
26
|
+
|
|
27
|
+
output {
|
|
28
|
+
File out = stdout()
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
runtime {
|
|
32
|
+
docker: "ubuntu:22.04"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"typePairWorkflow.test_pair": {
|
|
3
|
+
"left": 23,
|
|
4
|
+
"right": "twenty-three"
|
|
5
|
+
},
|
|
6
|
+
"typePairWorkflow.test_pair_pair": {
|
|
7
|
+
"left": "a",
|
|
8
|
+
"right": {
|
|
9
|
+
"left": "a.bam",
|
|
10
|
+
"right": "a.bai"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"typePairWorkflow.test_pair_file": {
|
|
14
|
+
"left": "whale",
|
|
15
|
+
"right": "src/toil/test/wdl/testfiles/test_string.txt"
|
|
16
|
+
},
|
|
17
|
+
"typePairWorkflow.test_array_pair_file": [
|
|
18
|
+
{
|
|
19
|
+
"left": "test_A",
|
|
20
|
+
"right": "src/toil/test/wdl/testfiles/test_boolean.txt"
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
workflow typePairWorkflow {
|
|
2
|
+
# test conformance with the WDL language specification - Pair Literals
|
|
3
|
+
|
|
4
|
+
Pair[Int, String] test_pair
|
|
5
|
+
|
|
6
|
+
# a pair inside a pair
|
|
7
|
+
Pair[String, Pair[String, String]] test_pair_pair
|
|
8
|
+
|
|
9
|
+
# a pair defined inside WDL
|
|
10
|
+
Pair[Int, String] test_pair_from_wdl = (23, "twenty-three")
|
|
11
|
+
|
|
12
|
+
call copy_output {
|
|
13
|
+
input:
|
|
14
|
+
test_pair=test_pair,
|
|
15
|
+
test_pair_pair=test_pair_pair,
|
|
16
|
+
test_pair_from_wdl=test_pair_from_wdl
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
task copy_output {
|
|
21
|
+
Pair[Int, String] test_pair
|
|
22
|
+
Pair[String, Pair[String, String]] test_pair_pair
|
|
23
|
+
Pair[Int, String] test_pair_from_wdl
|
|
24
|
+
|
|
25
|
+
command {
|
|
26
|
+
cp ${write_json([
|
|
27
|
+
test_pair.left,
|
|
28
|
+
test_pair.right,
|
|
29
|
+
test_pair_pair.right.right,
|
|
30
|
+
test_pair_from_wdl])} output.txt
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
output {
|
|
34
|
+
File the_output = 'output.txt'
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
workflow typePairWorkflow {
|
|
2
|
+
# test conformance with the WDL language specification - Pair Literals
|
|
3
|
+
|
|
4
|
+
# file import
|
|
5
|
+
Pair[String, File] test_pair_file
|
|
6
|
+
|
|
7
|
+
# file import with arrays
|
|
8
|
+
Array[Pair[String, File]] test_array_pair_file
|
|
9
|
+
|
|
10
|
+
call copy_output {
|
|
11
|
+
input:
|
|
12
|
+
test_pair_file=test_pair_file,
|
|
13
|
+
test_array_pair_file=test_array_pair_file
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
task copy_output {
|
|
18
|
+
Pair[String, File] test_pair_file
|
|
19
|
+
Array[Pair[String, File]] test_array_pair_file
|
|
20
|
+
|
|
21
|
+
# pairs defined in WDL in task
|
|
22
|
+
Array[Pair[String, File]] test_array_pair_file_from_wdl_in_task = [
|
|
23
|
+
('test_A', 'src/toil/test/wdl/testfiles/test_int.txt'),
|
|
24
|
+
('test_B', 'src/toil/test/wdl/testfiles/test_string.txt')]
|
|
25
|
+
|
|
26
|
+
command {
|
|
27
|
+
cp ${write_json([
|
|
28
|
+
read_lines(test_pair_file.right),
|
|
29
|
+
read_lines(select_first(test_array_pair_file).right),
|
|
30
|
+
read_lines(select_first(test_array_pair_file_from_wdl_in_task).right)])} output.txt
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
output {
|
|
34
|
+
File the_output = 'output.txt'
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
|
|
2
|
+
# Basic declaration example modified from the WDL 1.0 spec:
|
|
3
|
+
# https://github.com/openwdl/wdl/blob/main/versions/1.0/SPEC.md#declarations
|
|
4
|
+
|
|
5
|
+
version 1.0
|
|
6
|
+
|
|
7
|
+
task test {
|
|
8
|
+
input {
|
|
9
|
+
String var
|
|
10
|
+
}
|
|
11
|
+
command <<<
|
|
12
|
+
echo "Hello, ~{var}!"
|
|
13
|
+
>>>
|
|
14
|
+
|
|
15
|
+
output {
|
|
16
|
+
String value = read_string(stdout())
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
task test2 {
|
|
21
|
+
input {
|
|
22
|
+
Array[String] array
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
command <<<
|
|
26
|
+
echo "~{sep='; ' array}" > output.txt
|
|
27
|
+
>>>
|
|
28
|
+
|
|
29
|
+
output {
|
|
30
|
+
File the_output = 'output.txt'
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
workflow wf {
|
|
35
|
+
call test as x {input: var="x"}
|
|
36
|
+
call test as y {input: var="y"}
|
|
37
|
+
Array[String] strs = [x.value, y.value]
|
|
38
|
+
call test2 as z {input: array=strs}
|
|
39
|
+
}
|