toil 8.1.0b1__py3-none-any.whl → 9.0.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/registry.py +15 -118
- toil/batchSystems/singleMachine.py +1 -1
- toil/batchSystems/slurm.py +27 -26
- toil/bus.py +5 -3
- toil/common.py +59 -12
- toil/cwl/cwltoil.py +81 -38
- toil/cwl/utils.py +103 -3
- toil/job.py +64 -49
- toil/jobStores/abstractJobStore.py +35 -239
- toil/jobStores/aws/jobStore.py +2 -1
- toil/jobStores/fileJobStore.py +27 -2
- toil/jobStores/googleJobStore.py +110 -33
- toil/leader.py +9 -0
- toil/lib/accelerators.py +4 -2
- 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/generatedEC2Lists.py +81 -19
- toil/lib/history.py +87 -13
- toil/lib/history_submission.py +23 -9
- toil/lib/io.py +34 -22
- toil/lib/misc.py +8 -2
- toil/lib/plugins.py +106 -0
- toil/lib/resources.py +2 -1
- toil/lib/threading.py +11 -10
- toil/lib/url.py +320 -0
- toil/options/common.py +8 -0
- toil/options/cwl.py +13 -1
- toil/options/runner.py +17 -10
- toil/options/wdl.py +22 -0
- toil/provisioners/aws/awsProvisioner.py +25 -2
- toil/server/api_spec/LICENSE +201 -0
- toil/server/api_spec/README.rst +5 -0
- toil/server/app.py +12 -6
- toil/server/cli/wes_cwl_runner.py +3 -2
- toil/server/wes/abstract_backend.py +21 -43
- toil/server/wes/toil_backend.py +2 -2
- toil/test/__init__.py +275 -115
- toil/test/batchSystems/batchSystemTest.py +228 -213
- toil/test/batchSystems/batch_system_plugin_test.py +7 -0
- 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 +1175 -870
- 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/docs/scriptsTest.py +2 -1
- 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/lib/test_url.py +69 -0
- toil/test/lib/url_plugin_test.py +105 -0
- toil/test/provisioners/aws/awsProvisionerTest.py +13 -10
- toil/test/provisioners/clusterTest.py +17 -4
- toil/test/provisioners/gceProvisionerTest.py +17 -15
- toil/test/server/serverTest.py +78 -36
- 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/read_file.wdl +18 -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 +14 -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 +751 -529
- toil/test/wdl/wdltoil_test_kubernetes.py +2 -2
- toil/utils/toilSshCluster.py +23 -0
- toil/utils/toilUpdateEC2Instances.py +1 -0
- toil/version.py +5 -5
- toil/wdl/wdltoil.py +518 -437
- toil/worker.py +11 -6
- {toil-8.1.0b1.dist-info → toil-9.0.0.dist-info}/METADATA +25 -24
- toil-9.0.0.dist-info/RECORD +444 -0
- {toil-8.1.0b1.dist-info → toil-9.0.0.dist-info}/WHEEL +1 -1
- toil-8.1.0b1.dist-info/RECORD +0 -259
- {toil-8.1.0b1.dist-info → toil-9.0.0.dist-info}/entry_points.txt +0 -0
- {toil-8.1.0b1.dist-info → toil-9.0.0.dist-info/licenses}/LICENSE +0 -0
- {toil-8.1.0b1.dist-info → toil-9.0.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"ga4ghMd5.inputFile": ""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"ga4ghMd5.inputFile": "gs://gcp-public-data-landsat/LT04/01/003/027/LT04_L1TP_003027_19830202_20170220_01_T1/README.GTF"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
version 1.0
|
|
2
|
+
|
|
3
|
+
task md5 {
|
|
4
|
+
input {
|
|
5
|
+
File inputFile
|
|
6
|
+
}
|
|
7
|
+
command <<<
|
|
8
|
+
set -euf -o pipefail
|
|
9
|
+
md5sum ~{inputFile} | awk '{print $1}' > md5sum.txt
|
|
10
|
+
>>>
|
|
11
|
+
|
|
12
|
+
output {
|
|
13
|
+
File value = "md5sum.txt"
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
runtime {
|
|
17
|
+
docker: "ubuntu:22.04"
|
|
18
|
+
cpu: 1
|
|
19
|
+
memory: "512 MB"
|
|
20
|
+
disks: "local-disk 10 HDD"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
workflow ga4ghMd5 {
|
|
25
|
+
input {
|
|
26
|
+
File inputFile
|
|
27
|
+
}
|
|
28
|
+
call md5 { input: inputFile=inputFile }
|
|
29
|
+
output {
|
|
30
|
+
File value = md5.value
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
this is the test file that will be used when calculating an md5sum
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"ga4ghMd5.inputFile": "src/toil/test/wdl/md5sum/md5sum.input"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Note that this is a draft-WDL file; we don't have input sections, or output
|
|
2
|
+
# sections on the workflow.
|
|
3
|
+
task md5 {
|
|
4
|
+
File inputFile
|
|
5
|
+
|
|
6
|
+
command {
|
|
7
|
+
/bin/my_md5sum ${inputFile}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
output {
|
|
11
|
+
File value = "md5sum.txt"
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
runtime {
|
|
15
|
+
docker: "quay.io/briandoconnor/dockstore-tool-md5sum:1.0.4"
|
|
16
|
+
cpu: 1
|
|
17
|
+
memory: "512 MB"
|
|
18
|
+
disks: "local-disk 10 HDD"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
workflow ga4ghMd5 {
|
|
23
|
+
File inputFile
|
|
24
|
+
call md5 { input: inputFile=inputFile }
|
|
25
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"hello_caller.who": "https://raw.githubusercontent.com/chanzuckerberg/miniwdl/main/tests/alyssa_ben.txt"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"who": "https://raw.githubusercontent.com/chanzuckerberg/miniwdl/main/tests/alyssa_ben.txt"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# MiniWDL self-test workflow from https://github.com/chanzuckerberg/miniwdl/blob/ec4cceeb0cd277d2b4633a7fa81a9593c139e2dd/WDL/CLI.py#L1364
|
|
2
|
+
version 1.0
|
|
3
|
+
workflow hello_caller {
|
|
4
|
+
input {
|
|
5
|
+
File who
|
|
6
|
+
}
|
|
7
|
+
scatter (name in read_lines(who)) {
|
|
8
|
+
call hello {
|
|
9
|
+
input:
|
|
10
|
+
who = write_lines([name])
|
|
11
|
+
}
|
|
12
|
+
if (defined(hello.message)) {
|
|
13
|
+
String msg = read_string(select_first([hello.message]))
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
output {
|
|
17
|
+
Array[String] messages = select_all(msg)
|
|
18
|
+
Array[File] message_files = select_all(hello.message)
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
task hello {
|
|
22
|
+
input {
|
|
23
|
+
File who
|
|
24
|
+
}
|
|
25
|
+
command {
|
|
26
|
+
set -x
|
|
27
|
+
if grep -qv ^\# "${who}" ; then
|
|
28
|
+
name="$(cat ${who})"
|
|
29
|
+
mkdir messages
|
|
30
|
+
echo "Hello, $name!" | tee "messages/$name.txt" 1>&2
|
|
31
|
+
fi
|
|
32
|
+
}
|
|
33
|
+
output {
|
|
34
|
+
File? message = select_first(flatten([glob("messages/*.txt"), ["nonexistent"]]))
|
|
35
|
+
}
|
|
36
|
+
runtime {
|
|
37
|
+
docker: "ubuntu:18.04"
|
|
38
|
+
memory: "1G"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
version development
|
|
2
|
+
|
|
3
|
+
workflow asMapWorkflow {
|
|
4
|
+
input {
|
|
5
|
+
Array[Pair[String, Int]] in_array
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
call copy_output {input: in_map=as_map(in_array)}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
task copy_output {
|
|
12
|
+
input {
|
|
13
|
+
Map[String, Int] in_map
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
command {
|
|
17
|
+
cp ~{write_json(in_map)} output.txt
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
output {
|
|
21
|
+
File the_output = 'output.txt'
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
version development
|
|
2
|
+
|
|
3
|
+
workflow asPairsWorkflow {
|
|
4
|
+
input {
|
|
5
|
+
Map[String, Int] in_map
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
call copy_output {input: in_pairs=as_pairs(in_map)}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
task copy_output {
|
|
12
|
+
input {
|
|
13
|
+
Array[Pair[String, Int]] in_pairs
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
command {
|
|
17
|
+
cp ~{write_json(in_pairs)} output.txt
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
output {
|
|
21
|
+
File the_output = 'output.txt'
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
version development
|
|
2
|
+
|
|
3
|
+
workflow collectByKeyWorkflow {
|
|
4
|
+
input {
|
|
5
|
+
Array[Pair[String, Int]] in_array = [("a", 1), ("b", 2), ("a", 3)]
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
call copy_output {input: in_map=collect_by_key(in_array)}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
task copy_output {
|
|
12
|
+
input {
|
|
13
|
+
Map[String, Array[Int]] in_map
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
command <<<
|
|
17
|
+
cp ~{write_json(in_map)} output.txt
|
|
18
|
+
>>>
|
|
19
|
+
|
|
20
|
+
output {
|
|
21
|
+
File the_output = 'output.txt'
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
workflow crossWorkflow {
|
|
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=cross(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
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
workflow flattenWorkflow {
|
|
2
|
+
Array[Array[Int]] in_array
|
|
3
|
+
|
|
4
|
+
call copy_output {input: in_array=flatten(in_array)}
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
task copy_output {
|
|
8
|
+
|
|
9
|
+
Array[Int] in_array
|
|
10
|
+
|
|
11
|
+
command {
|
|
12
|
+
cp ${write_json(in_array)} output.txt
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
output {
|
|
16
|
+
File the_output = 'output.txt'
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
version development
|
|
2
|
+
|
|
3
|
+
workflow keysWorkflow {
|
|
4
|
+
input {
|
|
5
|
+
Map[String, Int] in_map
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
call copy_output {input: in_array=keys(in_map)}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
task copy_output {
|
|
12
|
+
input {
|
|
13
|
+
Array[String] in_array
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
command {
|
|
17
|
+
cp ~{write_json(in_array)} output.txt
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
output {
|
|
21
|
+
File the_output = 'output.txt'
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
workflow lengthWorkflow {
|
|
2
|
+
# this workflow should throw an error. length() does not work with Map[X, Y].
|
|
3
|
+
Map[String, String] in_map
|
|
4
|
+
call copy_output {input: num=length(in_map)}
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
task copy_output {
|
|
8
|
+
Int num
|
|
9
|
+
|
|
10
|
+
command {
|
|
11
|
+
echo ${num} > output.txt
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
output {
|
|
15
|
+
File the_output = 'output.txt'
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
workflow rangeWorkflow {
|
|
2
|
+
# this workflow depends on write_lines()
|
|
3
|
+
Int num
|
|
4
|
+
call copy_output {input: in_array=range(num)}
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
task copy_output {
|
|
8
|
+
Array[Int] 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 readBooleanWorkflow {
|
|
2
|
+
File in_file
|
|
3
|
+
|
|
4
|
+
call read_boolean {input: in_file=in_file}
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
task read_boolean {
|
|
8
|
+
File in_file
|
|
9
|
+
|
|
10
|
+
command {
|
|
11
|
+
echo "${read_boolean(in_file)}" > output.txt
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
output {
|
|
15
|
+
File the_output = 'output.txt'
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
workflow readFloatWorkflow {
|
|
2
|
+
File in_file
|
|
3
|
+
|
|
4
|
+
call read_float {input: in_file=in_file}
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
task read_float {
|
|
8
|
+
File in_file
|
|
9
|
+
|
|
10
|
+
command {
|
|
11
|
+
echo "${read_float(in_file)}" > output.txt
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
output {
|
|
15
|
+
File the_output = 'output.txt'
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
workflow readJsonWorkflow {
|
|
2
|
+
# this workflow depends on stdout() and write_lines()
|
|
3
|
+
File in_file
|
|
4
|
+
|
|
5
|
+
call read_json {input: in_file=in_file}
|
|
6
|
+
call copy_output {input: in_json=read_json.out_json}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
task read_json {
|
|
10
|
+
File in_file
|
|
11
|
+
|
|
12
|
+
command {
|
|
13
|
+
cat ${in_file}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
output {
|
|
17
|
+
Map[String, String] out_json = read_json(stdout())
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
task copy_output {
|
|
22
|
+
Map[String, String] in_json
|
|
23
|
+
|
|
24
|
+
command {
|
|
25
|
+
cp ${write_json(in_json)} output.txt
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
output {
|
|
29
|
+
File the_output = 'output.txt'
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
workflow readLinesWorkflow {
|
|
2
|
+
# this workflow depends on stdout() and write_lines()
|
|
3
|
+
File in_file
|
|
4
|
+
|
|
5
|
+
call read_lines {input: in_file=in_file}
|
|
6
|
+
call copy_output {input: in_array=read_lines.out_array}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
task read_lines {
|
|
10
|
+
File in_file
|
|
11
|
+
|
|
12
|
+
command {
|
|
13
|
+
cat ${in_file}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
output {
|
|
17
|
+
Array[String] out_array = read_lines(stdout())
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
task copy_output {
|
|
22
|
+
Array[String] in_array
|
|
23
|
+
|
|
24
|
+
command {
|
|
25
|
+
cp ${write_lines(in_array)} output.txt
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
output {
|
|
29
|
+
File the_output = 'output.txt'
|
|
30
|
+
}
|
|
31
|
+
}
|