toil 8.0.0__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 +4 -39
- 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/options.py +1 -0
- toil/batchSystems/singleMachine.py +1 -1
- toil/batchSystems/slurm.py +229 -84
- toil/bus.py +5 -3
- toil/common.py +198 -54
- toil/cwl/cwltoil.py +32 -11
- toil/job.py +110 -86
- toil/jobStores/abstractJobStore.py +24 -3
- toil/jobStores/aws/jobStore.py +46 -10
- 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/session.py +14 -3
- toil/lib/aws/utils.py +92 -35
- toil/lib/aws/utils.py.orig +504 -0
- toil/lib/bioio.py +1 -1
- toil/lib/docker.py +252 -91
- toil/lib/dockstore.py +387 -0
- toil/lib/ec2nodes.py +3 -2
- toil/lib/exceptions.py +5 -3
- toil/lib/history.py +1345 -0
- toil/lib/history_submission.py +695 -0
- toil/lib/io.py +56 -23
- toil/lib/misc.py +25 -1
- toil/lib/resources.py +2 -1
- toil/lib/retry.py +10 -10
- toil/lib/threading.py +11 -10
- toil/lib/{integration.py → trs.py} +95 -46
- toil/lib/web.py +38 -0
- toil/options/common.py +25 -2
- toil/options/cwl.py +10 -0
- toil/options/wdl.py +11 -0
- toil/provisioners/gceProvisioner.py +4 -4
- toil/server/api_spec/LICENSE +201 -0
- toil/server/api_spec/README.rst +5 -0
- toil/server/cli/wes_cwl_runner.py +5 -4
- toil/server/utils.py +2 -3
- toil/statsAndLogging.py +35 -1
- toil/test/__init__.py +275 -115
- toil/test/batchSystems/batchSystemTest.py +227 -205
- toil/test/batchSystems/test_slurm.py +199 -2
- 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 +39 -0
- toil/test/cwl/cwlTest.py +1015 -780
- 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/optional-file.cwl +18 -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 +236 -0
- toil/test/lib/test_trs.py +161 -0
- 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 +681 -408
- toil/test/wdl/wdltoil_test_kubernetes.py +2 -2
- toil/version.py +10 -10
- toil/wdl/wdltoil.py +350 -123
- toil/worker.py +113 -33
- {toil-8.0.0.dist-info → toil-8.2.0.dist-info}/METADATA +13 -7
- toil-8.2.0.dist-info/RECORD +439 -0
- {toil-8.0.0.dist-info → toil-8.2.0.dist-info}/WHEEL +1 -1
- toil/test/lib/test_integration.py +0 -104
- toil-8.0.0.dist-info/RECORD +0 -253
- {toil-8.0.0.dist-info → toil-8.2.0.dist-info}/entry_points.txt +0 -0
- {toil-8.0.0.dist-info → toil-8.2.0.dist-info/licenses}/LICENSE +0 -0
- {toil-8.0.0.dist-info → toil-8.2.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
workflow readMapWorkflow {
|
|
2
|
+
# this workflow depends on stdout() and write_lines()
|
|
3
|
+
File in_file
|
|
4
|
+
|
|
5
|
+
call read_map {input: in_file=in_file}
|
|
6
|
+
call copy_output {input: in_map=read_map.out_map}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
task read_map {
|
|
10
|
+
File in_file
|
|
11
|
+
|
|
12
|
+
command {
|
|
13
|
+
cat ${in_file}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
output {
|
|
17
|
+
Map[String, String] out_map = read_map(stdout())
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
task copy_output {
|
|
22
|
+
Map[String, String] in_map
|
|
23
|
+
|
|
24
|
+
command {
|
|
25
|
+
cp ${write_map(in_map)} output.txt
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
output {
|
|
29
|
+
File the_output = 'output.txt'
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
workflow readStringWorkflow {
|
|
2
|
+
File in_file
|
|
3
|
+
|
|
4
|
+
call read_string {input: in_file=in_file}
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
task read_string {
|
|
8
|
+
File in_file
|
|
9
|
+
|
|
10
|
+
command {
|
|
11
|
+
echo "${read_string(in_file)}" > output.txt
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
output {
|
|
15
|
+
File the_output = 'output.txt'
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
workflow readTsvWorkflow {
|
|
2
|
+
# this workflow depends on stdout() and write_lines()
|
|
3
|
+
File in_file
|
|
4
|
+
|
|
5
|
+
call read_tsv {input: in_file=in_file}
|
|
6
|
+
call copy_output {input: in_tsv=read_tsv.out_tsv}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
task read_tsv {
|
|
10
|
+
File in_file
|
|
11
|
+
|
|
12
|
+
command {
|
|
13
|
+
cat ${in_file}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
output {
|
|
17
|
+
Array[Array[String]] out_tsv = read_tsv(stdout())
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
task copy_output {
|
|
22
|
+
Array[Array[String]] in_tsv
|
|
23
|
+
|
|
24
|
+
command {
|
|
25
|
+
cp ${write_tsv(in_tsv)} output.txt
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
output {
|
|
29
|
+
File the_output = 'output.txt'
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
workflow sizeWorkflow {
|
|
2
|
+
call get_size
|
|
3
|
+
call copy_output {
|
|
4
|
+
input:
|
|
5
|
+
float_0 = get_size.created_file_size,
|
|
6
|
+
float_1 = get_size.created_file_size_in_KB,
|
|
7
|
+
float_2 = get_size.created_file_size_in_KiB
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
task get_size {
|
|
12
|
+
|
|
13
|
+
command {
|
|
14
|
+
echo "this file is 22 bytes" > created_file
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
output {
|
|
18
|
+
Float created_file_size = size("created_file") # 22.0
|
|
19
|
+
Float created_file_size_in_KB = size("created_file", "K") # 0.022
|
|
20
|
+
Float created_file_size_in_KiB = size("created_file", "Ki") # 0.021484375
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
task copy_output {
|
|
25
|
+
Float float_0
|
|
26
|
+
Float float_1
|
|
27
|
+
Float float_2
|
|
28
|
+
|
|
29
|
+
command {
|
|
30
|
+
echo "${float_0} ${float_1} ${float_2}" > output.txt
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
output {
|
|
34
|
+
File the_output = 'output.txt'
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
workflow stderrWorkflow {
|
|
2
|
+
String message
|
|
3
|
+
call get_stderr { input: message=message }
|
|
4
|
+
call copy_output { input: in_file=get_stderr.check_this }
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
task get_stderr {
|
|
8
|
+
String message
|
|
9
|
+
|
|
10
|
+
command {
|
|
11
|
+
>&2 echo "${message}"
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
output {
|
|
15
|
+
File check_this = stderr()
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
# comply with builtinTest
|
|
20
|
+
task copy_output {
|
|
21
|
+
File in_file
|
|
22
|
+
|
|
23
|
+
command {
|
|
24
|
+
cp ${in_file} output.txt
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
output {
|
|
28
|
+
File the_output = 'output.txt'
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
workflow stdoutWorkflow {
|
|
2
|
+
String message
|
|
3
|
+
call get_stdout { input: message=message }
|
|
4
|
+
call copy_output { input: in_file=get_stdout.check_this }
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
task get_stdout {
|
|
8
|
+
String message
|
|
9
|
+
|
|
10
|
+
command {
|
|
11
|
+
echo "${message}"
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
output {
|
|
15
|
+
File check_this = stdout()
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
# comply with builtinTest
|
|
20
|
+
task copy_output {
|
|
21
|
+
File in_file
|
|
22
|
+
|
|
23
|
+
command {
|
|
24
|
+
cp ${in_file} output.txt
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
output {
|
|
28
|
+
File the_output = 'output.txt'
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
workflow subWorkflow {
|
|
2
|
+
String in_file
|
|
3
|
+
call get_sub {input: in_file=in_file}
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
task get_sub {
|
|
7
|
+
String in_file
|
|
8
|
+
String out_file_name = sub(in_file, "\\.tsv$", ".csv")
|
|
9
|
+
|
|
10
|
+
command {
|
|
11
|
+
echo "${out_file_name}" > output.txt
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
output {
|
|
15
|
+
File the_output = 'output.txt'
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
workflow subWorkflow {
|
|
2
|
+
File in_file
|
|
3
|
+
call get_sub {input: in_file=in_file}
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
task get_sub {
|
|
7
|
+
File in_file
|
|
8
|
+
String out_file_name = sub(in_file, "\\.tsv$", ".csv")
|
|
9
|
+
|
|
10
|
+
command {
|
|
11
|
+
echo "${out_file_name}" > output.txt
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
output {
|
|
15
|
+
File the_output = 'output.txt'
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
workflow transposeWorkflow {
|
|
2
|
+
# this workflow depends on write_tsv()
|
|
3
|
+
Array[Array[Int]] in_array
|
|
4
|
+
|
|
5
|
+
call copy_output {input: in_array=transpose(in_array)}
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
task copy_output {
|
|
9
|
+
Array[Array[Int]] in_array
|
|
10
|
+
|
|
11
|
+
command {
|
|
12
|
+
cp ${write_tsv(in_array)} output.txt
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
output {
|
|
16
|
+
File the_output = 'output.txt'
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
workflow writeJsonWorkflow {
|
|
2
|
+
Map[String, String] in_map
|
|
3
|
+
|
|
4
|
+
call write_json {input: in_map=in_map}
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
task write_json {
|
|
8
|
+
Map[String, String] in_map
|
|
9
|
+
|
|
10
|
+
command {
|
|
11
|
+
cp ${write_json(in_map)} output.txt
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
output {
|
|
15
|
+
File the_output = 'output.txt'
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
workflow writeLinesWorkflow {
|
|
2
|
+
Array[String] in_array
|
|
3
|
+
|
|
4
|
+
call write_lines {input: in_array=in_array}
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
task write_lines {
|
|
8
|
+
Array[String] in_array
|
|
9
|
+
|
|
10
|
+
command {
|
|
11
|
+
cp ${write_lines(in_array)} output.txt
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
output {
|
|
15
|
+
File the_output = 'output.txt'
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
workflow writeMapWorkflow {
|
|
2
|
+
Map[String, String] in_map
|
|
3
|
+
|
|
4
|
+
call write_map {input: in_map=in_map}
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
task write_map {
|
|
8
|
+
Map[String, String] in_map
|
|
9
|
+
|
|
10
|
+
command {
|
|
11
|
+
cp ${write_map(in_map)} output.txt
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
output {
|
|
15
|
+
File the_output = 'output.txt'
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
workflow writeTsvWorkflow {
|
|
2
|
+
Array[Array[String]] in_tsv
|
|
3
|
+
|
|
4
|
+
call write_tsv {input: in_tsv=in_tsv}
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
task write_tsv {
|
|
8
|
+
Array[Array[String]] in_tsv
|
|
9
|
+
|
|
10
|
+
command {
|
|
11
|
+
cp ${write_tsv(in_tsv)} output.txt
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
output {
|
|
15
|
+
File the_output = 'output.txt'
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
workflow zipWorkflow {
|
|
2
|
+
# this workflow depends on write_json()
|
|
3
|
+
Array[Int] in_array_1
|
|
4
|
+
Array[String] in_array_2
|
|
5
|
+
|
|
6
|
+
call copy_output {input: in_array=zip(in_array_1, in_array_2)}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
task copy_output {
|
|
10
|
+
Array[Pair[Int, String]] in_array
|
|
11
|
+
|
|
12
|
+
command {
|
|
13
|
+
cp ${write_json(in_array)} output.txt
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
output {
|
|
17
|
+
File the_output = 'output.txt'
|
|
18
|
+
}
|
|
19
|
+
}
|
toil/test/wdl/test.csv
ADDED
toil/test/wdl/test.tsv
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
version 1.0
|
|
2
|
+
|
|
3
|
+
workflow wf {
|
|
4
|
+
meta {
|
|
5
|
+
# Advertise as needing the Cromwell Output Organizer
|
|
6
|
+
croo_out_def: 'https://storage.googleapis.com/encode-pipeline-output-definition/atac.croo.v5.json'
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
input {
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
call do_math {
|
|
13
|
+
input:
|
|
14
|
+
number = 3
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
Int should_never_output = do_math.cube - 1
|
|
18
|
+
|
|
19
|
+
output {
|
|
20
|
+
Int only_result = do_math.square
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
task do_math {
|
|
25
|
+
input {
|
|
26
|
+
Int number
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
# Not allowed to not have a command
|
|
30
|
+
command <<<
|
|
31
|
+
>>>
|
|
32
|
+
|
|
33
|
+
output {
|
|
34
|
+
Int square = number * number
|
|
35
|
+
Int cube = number * number * number
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
version 1.0
|
|
2
|
+
|
|
3
|
+
import "drop_files_subworkflow.wdl" as subwf
|
|
4
|
+
|
|
5
|
+
# Workflow for testing discarding un-output files at the end of a workflow.
|
|
6
|
+
# Does a bunch of unusual things with files.
|
|
7
|
+
workflow wf {
|
|
8
|
+
input {
|
|
9
|
+
File file_in
|
|
10
|
+
File? file_in_default = "localfile.txt"
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
call make_file {
|
|
14
|
+
input:
|
|
15
|
+
number = 3,
|
|
16
|
+
needed_only_for_task = write_lines(["This file is consumed by a task call"])
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
File will_discard = write_lines(["This file should be discarded"])
|
|
20
|
+
File will_keep = write_lines(["This file should be kept"])
|
|
21
|
+
File will_keep_because = will_keep
|
|
22
|
+
|
|
23
|
+
call subwf.subwf {
|
|
24
|
+
input:
|
|
25
|
+
kept_file = write_lines(["This file is kept by a subworkflow"]),
|
|
26
|
+
# Even though we pass will_keep to the subworkflow and it doesn't output it, it should not get deleted.
|
|
27
|
+
dropped_files = [write_lines(["This file is dropped by a subworkflow"]), will_keep]
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
File will_remember_one_of = select_first([write_lines(["This file gets stored in a variable"]), write_lines(["This file never gets stored in a variable"])])
|
|
31
|
+
|
|
32
|
+
output {
|
|
33
|
+
Array[File] files_kept = [make_file.out_file_1, make_file.out_file_2, will_keep_because, subwf.keep]
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
task make_file {
|
|
38
|
+
input {
|
|
39
|
+
Int number = 5
|
|
40
|
+
File needed_only_for_task
|
|
41
|
+
File file_with_default = write_lines(["This file is created in a task inputs section"])
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
command <<<
|
|
45
|
+
echo ~{number}
|
|
46
|
+
echo "This file is collected as a task output twice" >testfile.txt
|
|
47
|
+
echo "This task file is not used" >badfile.txt
|
|
48
|
+
>>>
|
|
49
|
+
|
|
50
|
+
runtime {
|
|
51
|
+
runtime_file: write_lines(["This file is created in a runtime section"])
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
output {
|
|
55
|
+
File out_file_1 = stdout()
|
|
56
|
+
File out_file_2 = "testfile.txt"
|
|
57
|
+
File out_file_3 = "testfile.txt"
|
|
58
|
+
File out_file_4 = write_lines(["Again", "~{number}"])
|
|
59
|
+
File out_file_5 = "badfile.txt"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
File without changes
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
version 1.0
|
|
2
|
+
|
|
3
|
+
workflow wf {
|
|
4
|
+
input {
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
call do_math {
|
|
8
|
+
input:
|
|
9
|
+
number = 3
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
Int should_never_output = do_math.cube - 1
|
|
13
|
+
|
|
14
|
+
output {
|
|
15
|
+
Int only_result = do_math.square
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
task do_math {
|
|
20
|
+
input {
|
|
21
|
+
Int number
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
# Not allowed to not have a command
|
|
25
|
+
command <<<
|
|
26
|
+
>>>
|
|
27
|
+
|
|
28
|
+
output {
|
|
29
|
+
Int square = number * number
|
|
30
|
+
Int cube = number * number * number
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|