[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EGC7QQGMPJP4ANW22AMV13":3,"skill-same:01M7EGC7QQGMPJP4ANW22AMV13":62},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":30,"commitSha":31,"skillDirectory":32,"forksCount":14,"repositoryHtmlUrl":33,"repositoryHomepageUrl":33,"ownerHtmlUrl":34,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":35,"install":36,"resources":49},"01M7EGC7QQGMPJP4ANW22AMV13","bio-workflow-management-wdl-workflows",null,"Authors bioinformatics pipelines in WDL (Workflow Description Language) run by Cromwell or miniwdl, targeting the GATK\u002FBroad and Terra\u002FAnVIL\u002FBioData Catalyst cloud ecosystem, with tasks, workflows, scatter-gather parallelism, structs, and a runtime block that sizes the cloud VM. Use when deciding to target Terra\u002FAnVIL\u002FGATK\u002FWARP (chosen for the ecosystem, not the language); sizing runtime disks dynamically for a fresh-per-task cloud VM (ceil(size(f)*factor)+buffer); choosing preemptible vs on-demand VMs by task length and idempotency; picking Cromwell (production, cloud, call-caching) vs miniwdl (local dev, miniwdl check linting, readable errors); enabling and debugging call-caching silent-miss modes; pinning Docker by digest for reproducibility and cache stability; or scattering an array for parallel fan-out.","Mr-Nobody-Anonymous\u002FAll-skills","Mr-Nobody-Anonymous","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F184253119?v=4","01M7AEXFJHKTYQW5R0ZCQQTWFV","anonymous","01M7C00M3GQR4QKP9GZA42GFAK",0,"MIT","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-workflow-management-wdl-workflows\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: bio-workflow-management-wdl-workflows\ndescription: Authors bioinformatics pipelines in WDL (Workflow Description Language) run by Cromwell or miniwdl, targeting the GATK\u002FBroad and Terra\u002FAnVIL\u002FBioData Catalyst cloud ecosystem, with tasks, workflows, scatter-gather parallelism, structs, and a runtime block that sizes the cloud VM. Use when deciding to target Terra\u002FAnVIL\u002FGATK\u002FWARP (chosen for the ecosystem, not the language); sizing runtime disks dynamically for a fresh-per-task cloud VM (ceil(size(f)*factor)+buffer); choosing preemptible vs on-demand VMs by task length and idempotency; picking Cromwell (production, cloud, call-caching) vs miniwdl (local dev, miniwdl check linting, readable errors); enabling and debugging call-caching silent-miss modes; pinning Docker by digest for reproducibility and cache stability; or scattering an array for parallel fan-out.\ntool_type: cli\nprimary_tool: cromwell\nsource: \"https:\u002F\u002Fgithub.com\u002FGPTomics\u002FbioSkills\"\nsource_repository: \"GPTomics\u002FbioSkills\"\nsource_path: \"workflow-management\u002Fwdl-workflows\u002FSKILL.md\"\nlicense: \"MIT\"\nimported_at: \"2026-09-20\"\n---\n\n## Version Compatibility\n\nReference examples tested with: Cromwell 87+, miniwdl 1.12+, WDL spec 1.0\u002F1.1\u002F1.2\n\nBefore using code patterns, verify installed versions match. If versions differ:\n- CLI: `\u003Ctool> --version` then `\u003Ctool> --help` to confirm flags\n\nIf code throws ImportError, AttributeError, or TypeError, introspect the installed\npackage and adapt the example to match the actual API rather than retrying.\n\nNote: every WDL file must open with a `version 1.0`\u002F`1.1`\u002F`1.2` header; omitting it selects the old draft-2 dialect with no `~{}` interpolation. The first-class `Directory` type is a 1.2 feature, NOT 1.1; `min`\u002F`max`\u002F`None` arrived in 1.1. Cromwell is the JVM production engine that powers Terra; miniwdl is the Python engine used for local dev, static linting (`miniwdl check`), and readable errors. Pin every `docker:` by `@sha256:` digest, never a floating tag.\n\n# WDL Workflows\n\n**\"Build a WDL pipeline for Terra\u002FAnVIL or a GATK best-practices run\"** -> Declare `task`s (a containerized command with typed inputs\u002Foutputs and a runtime block) and wire them in a `workflow`, then run on Cromwell (cloud\u002FTerra) or miniwdl (local).\n- CLI: `womtool validate` \u002F `womtool inputs` (Cromwell toolkit), `miniwdl check` (static lint + ShellCheck), `cromwell run` \u002F `miniwdl run` (execute)\n- WDL: `version` header, `task`\u002F`workflow`\u002F`call`, `scatter` fan-out, `runtime { docker, cpu, memory, disks }`\n\n## The governing principle: the runtime block is a cost + reliability CONTRACT\n\nWDL is not chosen on language merits; it is the language of a gravitational system - GATK Best Practices -> Cromwell -> Terra\u002FAnVIL\u002FBioData Catalyst -> Dockstore -> WARP (Van der Auwera & O'Connor 2020). One targets WDL because the data or the collaborators already live in that NIH-cloud ecosystem, and to run vetted GATK pipelines without reinventing them. The design bet is human readability over expressive power. The corollary that governs every real decision: on a cloud backend the engine spins up a FRESH VM per task, so the author must declare its CPU, memory, and disk. The `runtime` block is therefore a cost-and-reliability contract, not decoration, and three traps follow from it:\n\n- Localization dominates cost and wall-time. The engine COPIES (localizes) every input `File` from object storage onto the VM's local disk before the command runs, then delocalizes outputs back. A 30 GB CRAM's transfer can dwarf the compute. Disk math, call caching, and preemptibles all exist to manage bytes moved - subset early and avoid re-localizing the same reference into every scatter shard.\n- Under-sized `disks` kills the job LATE. A static `disks: \"local-disk 100 HDD\"` fails on the one sample bigger than guessed, after an hour of localization, with a cryptic \"No space left on device\". Size disk dynamically from `size()`.\n- A pipeline without pinned containers is not reproducible. `docker: \"gatk:latest\"` silently breaks reproducibility AND busts call caching, because the cache key hashes the resolved image identity. Pin by `@sha256:` digest.\n\nA clean WDL over unpinned tools is not reproducible: the engine pins step order (layer 1); the author must still pin the container by digest, the reference build, and the parameters.\n\n## Decision: choose WDL, and choose its engine\n\n| Author picks WDL when... | Fails \u002F friction when... |\n|--------------------------|--------------------------|\n| Controlled-access data is in AnVIL\u002FTerra\u002FBioData Catalyst | The pipeline is dynamic\u002Fstreaming (WDL has no channels; use nextflow-pipelines) |\n| Running GATK Best Practices at population scale | Maximum vendor-neutral portability across institutions is the goal (use cwl-workflows) |\n| A WARP\u002FDockstore pipeline already encodes the analysis | Tight Python\u002Fpandas HPC integration is wanted (use snakemake-workflows) |\n\n| Engine | Runtime | Reach for it when | Weakness |\n|--------|---------|-------------------|----------|\n| Cromwell | Scala\u002FJVM | Production cloud, Terra, robust call caching at scale | Cryptic JVM errors; needs MySQL\u002FPostgres for persistent cache; slow startup |\n| miniwdl | Python | Local dev, CI, debugging; `miniwdl check` static lint + ShellCheck; readable errors | Not the Terra engine; smaller cloud story |\n| womtool | JVM utility | `validate`, generate the inputs JSON skeleton, `graph` the DAG | Not an executor - validation only |\n\nPractical loop: author and lint with `miniwdl check` locally -> validate and scaffold inputs with `womtool` -> run at scale on Cromwell\u002FTerra. When Cromwell throws a JVM stack trace, reproduce under `miniwdl run` for a message that points at the WDL line.\n\n| Factor | Preemptible \u002F spot (`preemptible: N`) | On-demand |\n|--------|---------------------------------------|-----------|\n| Cost | ~60-91% cheaper | full price |\n| Interruption | reclaimable any second, work discarded | stable |\n| Fit | short (\u003C~2-4h), idempotent, restart-safe, scatter shards | long, stateful, near-deadline, non-idempotent |\n| Anti-pattern | long non-idempotent task -> retry thrash, can cost MORE than on-demand | over-paying for a trivially restartable 20-min task |\n\n`preemptible: 3` is an Int (retry on a preemptible VM up to 3 times, then fall back to on-demand), NOT a Boolean.\n\n## Task and workflow: the reference shape\n\nA `task` bundles a container, typed inputs, a heredoc command with `~{}` placeholders, typed outputs, and a runtime block. A `workflow` `call`s tasks and passes one call's output to the next by name.\n\n```wdl\nversion 1.0\n\ntask fastp {\n    input {\n        String sample_id\n        File reads_1\n        File reads_2\n        Int threads = 4\n    }\n    # ~{} is the WDL-idiomatic placeholder; ${} collides with bash parameter expansion.\n    command \u003C\u003C\u003C\n        fastp -i ~{reads_1} -I ~{reads_2} \\\n            -o ~{sample_id}_R1.fq.gz -O ~{sample_id}_R2.fq.gz \\\n            --json ~{sample_id}.json --thread ~{threads}\n    >>>\n    output {\n        File trimmed_1 = \"~{sample_id}_R1.fq.gz\"\n        File trimmed_2 = \"~{sample_id}_R2.fq.gz\"\n    }\n    runtime {\n        docker: \"quay.io\u002Fbiocontainers\u002Ffastp@sha256:\u003Cdigest>\"   # digest, not :latest\n        cpu: threads\n        memory: \"4 GB\"\n    }\n}\n\nworkflow trim {\n    input { String sample_id; File r1; File r2 }\n    call fastp { input: sample_id = sample_id, reads_1 = r1, reads_2 = r2 }\n    output { File out_1 = fastp.trimmed_1 }\n}\n```\n\n## Scatter: explicit parallel fan-out (no channels)\n\nWDL parallelism is explicit: build an `Array`, `scatter` over it (implicitly parallel), and the engine auto-gathers each shard's output into an `Array` in input order. There is no lazy channel to drain.\n\n```wdl\nscatter (idx in range(length(sample_ids))) {\n    call align {\n        input: sample_id = sample_ids[idx], reads = fastq_files[idx], reference = reference\n    }\n}\n# align.bam outside the scatter is an Array[File], gathered in input order.\noutput { Array[File] bams = align.bam }\n```\n\nBundle per-sample fields into a `struct` (`struct SampleData { String id; File bam }`) and scatter over `Array[SampleData]` to avoid parallel-array index bugs; see usage-guide.md.\n\n## Runtime as a cost contract + dynamic disk sizing\n\n**Goal:** Size the fresh cloud VM so the task neither fails on disk nor over-pays.\n\n**Approach:** Compute disk from actual input size with a multiplier for outputs\u002Fintermediates plus headroom, round UP with `ceil()`, and make it overridable.\n\n```wdl\ntask bwa_mem {\n    input { File reads_1; File reads_2; File reference; Int? override_disk_gb }\n    # size(f,\"GiB\") is binary GiB (be consistent); *2.5 covers input+output+intermediates,\n    # +20 is headroom. ceil() always rounds UP - disk must never under-size.\n    Int disk_gb = select_first([override_disk_gb,\n                  ceil((size(reads_1, \"GiB\") + size(reads_2, \"GiB\") + size(reference, \"GiB\")) * 2.5) + 20])\n    command \u003C\u003C\u003C bwa mem ~{reference} ~{reads_1} ~{reads_2} > aligned.sam >>>\n    output { File sam = \"aligned.sam\" }\n    runtime {\n        docker: \"quay.io\u002Fbiocontainers\u002Fbwa@sha256:\u003Cdigest>\"\n        cpu: 8\n        memory: \"16 GB\"\n        disks: \"local-disk ~{disk_gb} HDD\"   # mount, GB Int, type; HDD cheap\u002Fslow, SSD fast\u002Fpricey\n        bootDiskSizeGb: 20                    # boot disk holds the image; raise for large images\n        preemptible: 3                        # Int = # attempts, then on-demand fallback\n        maxRetries: 1                         # retries on ANY failure (distinct from preemptible)\n    }\n}\n```\n\n## Call caching: the `-resume` analog, and how it silently misses\n\nCromwell hashes each call from its command template, input values (including file CONTENT hashes), Docker image identity, and runtime attributes; on a rerun an identical hash reuses prior outputs. Unlike Nextflow's `-resume`, it is NOT on by default: the in-memory HSQLDB loses the cache on restart, so a persistent DB plus config is required (Terra manages this behind a checkbox).\n\n```\ncall-caching { enabled = true, invalidate-bad-cache-results = true }\n# plus a MySQL\u002FPostgreSQL database stanza - the default HSQLDB does not persist the cache.\n```\n\nSilent-miss modes: a floating `:latest` tag resolves to a new digest -> new hash -> miss (pin by digest); a touched\u002Fre-staged input whose content or mtime changed busts the cache; a path-based hashing strategy misconfigured on a container backend disables caching; and any whitespace change in the `command` block changes the hash.\n\n## Validate, generate inputs, run\n\n```bash\nminiwdl check workflow.wdl              # static lint + ShellCheck (add --strict to gate CI)\nwomtool validate workflow.wdl          # Cromwell-side structural validation\nwomtool inputs workflow.wdl > inputs.json   # scaffold the namespaced input JSON\nminiwdl run workflow.wdl -i inputs.json     # local run, readable errors\njava -jar cromwell.jar run workflow.wdl -i inputs.json   # one-off; `cromwell server` = REST (Terra mode)\n```\n\nInput JSON keys are fully namespaced `Workflow.[subworkflow.]call_alias.input_name`, e.g. `{\"rnaseq.fastp.threads\": 8}`; optional inputs may be omitted. See usage-guide.md for structs, subworkflows, and the full namespacing rules.\n\nDo not hand-roll joint genotyping or CRAM->GVCF: WARP publishes production-vetted, cost-tuned WDL to imitate for disk and preemptible discipline (WARP team 2025).\n\n## Common Errors\n\n| Symptom | Cause | Fix |\n|---------|-------|-----|\n| Task dies late with \"No space left on device\" | static under-sized `disks` | dynamic `ceil(size(f,\"GiB\")*factor)+buffer` |\n| Job cost balloons; wall-time is mostly \"waiting\" | localizing huge inputs to every scatter shard | subset early; co-locate data + compute zones; reuse the reference where the backend caches it |\n| Reruns recompute everything | call caching off, no persistent DB, or a floating docker tag | enable caching + MySQL\u002FPostgres + digest-pin docker |\n| Preemptible task never finishes, costs more than on-demand | long non-idempotent task on `preemptible: N` | move to on-demand or shorten\u002Fcheckpoint the task |\n| VM fails to boot | Docker image larger than the boot disk | raise `bootDiskSizeGb` |\n| \"Works on my Cromwell, not on Terra\" | env drift not baked into the container; unpinned tag | bake everything into a digest-pinned image |\n| Cryptic JVM stack trace from Cromwell | engine surfacing an internal error | reproduce under `miniwdl run` for a legible, line-pointing message |\n| `${VAR}` in a command expands wrong or breaks | `${}` collides with bash parameter expansion | use `~{}` for WDL interpolation inside `command \u003C\u003C\u003C >>>` |\n| Engine rejects `Directory` under `version 1.1` | first-class `Directory` is a 1.2 feature | move the header to `version 1.2` (or `version development` on old engines) |\n\n## Related Skills\n\n- workflow-management\u002Fcwl-workflows - Vendor-neutral portable spec; choose it over WDL when handing a pipeline across institutions\n- workflow-management\u002Fnextflow-pipelines - Channel\u002Fdataflow engine + nf-core; choose it for dynamic\u002Fstreaming cloud pipelines\n- workflow-management\u002Fsnakemake-workflows - Python-native pull engine for HPC and file-pattern logic\n- workflows\u002Ffastq-to-variants - The end-to-end variant-calling analysis a GATK WDL orchestrates\n- variant-calling\u002Fgatk-variant-calling - The GATK Best Practices steps WDL encodes for Terra\u002FWARP\n\n## References\n\n- Van der Auwera GA, Carneiro MO, Hartl C, et al. 2013. From FastQ data to high-confidence variant calls: the Genome Analysis Toolkit best practices pipeline. *Curr Protoc Bioinformatics* 43:11.10.1-11.10.33.\n- Voss K, Gentry J, Van der Auwera G. 2017. Full-stack genomics pipelining with GATK4 + WDL + Cromwell. *F1000Research* 6:1379 (ISCB Comm J, poster).\n- Van der Auwera GA, O'Connor BD. 2020. *Genomics in the Cloud: Using Docker, GATK, and WDL in Terra.* O'Reilly Media. ISBN 9781491975190.\n- WARP team (Broad Institute). 2025. WARP analysis research pipelines: cloud-optimized workflows for biological data processing and reproducible analysis. *Bioinformatics* 41(10):btaf494.\n- OpenWDL specification. github.com\u002Fopenwdl\u002Fwdl - versioned SPEC on branches wdl-1.0, wdl-1.1 (1.1.3), wdl-1.2; docs at docs.openwdl.org.\n","## Version Compatibility\n\nReference examples tested with: Cromwell 87+, miniwdl 1.12+, WDL spec 1.0\u002F1.1\u002F1.2\n\nBefore using code patterns, verify installed versions match. If versions differ:\n- CLI: `\u003Ctool> --version` then `\u003Ctool> --help` to confirm flags\n\nIf code throws ImportError, AttributeError, or TypeError, introspect the installed\npackage and adapt the example to match the actual API rather than retrying.\n\nNote: every WDL file must open with a `version 1.0`\u002F`1.1`\u002F`1.2` header; omitting it selects the old draft-2 dialect with no `~{}` interpolation. The first-class `Directory` type is a 1.2 feature, NOT 1.1; `min`\u002F`max`\u002F`None` arrived in 1.1. Cromwell is the JVM production engine that powers Terra; miniwdl is the Python engine used for local dev, static linting (`miniwdl check`), and readable errors. Pin every `docker:` by `@sha256:` digest, never a floating tag.\n\n# WDL Workflows\n\n**\"Build a WDL pipeline for Terra\u002FAnVIL or a GATK best-practices run\"** -> Declare `task`s (a containerized command with typed inputs\u002Foutputs and a runtime block) and wire them in a `workflow`, then run on Cromwell (cloud\u002FTerra) or miniwdl (local).\n- CLI: `womtool validate` \u002F `womtool inputs` (Cromwell toolkit), `miniwdl check` (static lint + ShellCheck), `cromwell run` \u002F `miniwdl run` (execute)\n- WDL: `version` header, `task`\u002F`workflow`\u002F`call`, `scatter` fan-out, `runtime { docker, cpu, memory, disks }`\n\n## The governing principle: the runtime block is a cost + reliability CONTRACT\n\nWDL is not chosen on language merits; it is the language of a gravitational system - GATK Best Practices -> Cromwell -> Terra\u002FAnVIL\u002FBioData Catalyst -> Dockstore -> WARP (Van der Auwera & O'Connor 2020). One targets WDL because the data or the collaborators already live in that NIH-cloud ecosystem, and to run vetted GATK pipelines without reinventing them. The design bet is human readability over expressive power. The corollary that governs every real decision: on a cloud backend the engine spins up a FRESH VM per task, so the author must declare its CPU, memory, and disk. The `runtime` block is therefore a cost-and-reliability contract, not decoration, and three traps follow from it:\n\n- Localization dominates cost and wall-time. The engine COPIES (localizes) every input `File` from object storage onto the VM's local disk before the command runs, then delocalizes outputs back. A 30 GB CRAM's transfer can dwarf the compute. Disk math, call caching, and preemptibles all exist to manage bytes moved - subset early and avoid re-localizing the same reference into every scatter shard.\n- Under-sized `disks` kills the job LATE. A static `disks: \"local-disk 100 HDD\"` fails on the one sample bigger than guessed, after an hour of localization, with a cryptic \"No space left on device\". Size disk dynamically from `size()`.\n- A pipeline without pinned containers is not reproducible. `docker: \"gatk:latest\"` silently breaks reproducibility AND busts call caching, because the cache key hashes the resolved image identity. Pin by `@sha256:` digest.\n\nA clean WDL over unpinned tools is not reproducible: the engine pins step order (layer 1); the author must still pin the container by digest, the reference build, and the parameters.\n\n## Decision: choose WDL, and choose its engine\n\n| Author picks WDL when... | Fails \u002F friction when... |\n|--------------------------|--------------------------|\n| Controlled-access data is in AnVIL\u002FTerra\u002FBioData Catalyst | The pipeline is dynamic\u002Fstreaming (WDL has no channels; use nextflow-pipelines) |\n| Running GATK Best Practices at population scale | Maximum vendor-neutral portability across institutions is the goal (use cwl-workflows) |\n| A WARP\u002FDockstore pipeline already encodes the analysis | Tight Python\u002Fpandas HPC integration is wanted (use snakemake-workflows) |\n\n| Engine | Runtime | Reach for it when | Weakness |\n|--------|---------|-------------------|----------|\n| Cromwell | Scala\u002FJVM | Production cloud, Terra, robust call caching at scale | Cryptic JVM errors; needs MySQL\u002FPostgres for persistent cache; slow startup |\n| miniwdl | Python | Local dev, CI, debugging; `miniwdl check` static lint + ShellCheck; readable errors | Not the Terra engine; smaller cloud story |\n| womtool | JVM utility | `validate`, generate the inputs JSON skeleton, `graph` the DAG | Not an executor - validation only |\n\nPractical loop: author and lint with `miniwdl check` locally -> validate and scaffold inputs with `womtool` -> run at scale on Cromwell\u002FTerra. When Cromwell throws a JVM stack trace, reproduce under `miniwdl run` for a message that points at the WDL line.\n\n| Factor | Preemptible \u002F spot (`preemptible: N`) | On-demand |\n|--------|---------------------------------------|-----------|\n| Cost | ~60-91% cheaper | full price |\n| Interruption | reclaimable any second, work discarded | stable |\n| Fit | short (\u003C~2-4h), idempotent, restart-safe, scatter shards | long, stateful, near-deadline, non-idempotent |\n| Anti-pattern | long non-idempotent task -> retry thrash, can cost MORE than on-demand | over-paying for a trivially restartable 20-min task |\n\n`preemptible: 3` is an Int (retry on a preemptible VM up to 3 times, then fall back to on-demand), NOT a Boolean.\n\n## Task and workflow: the reference shape\n\nA `task` bundles a container, typed inputs, a heredoc command with `~{}` placeholders, typed outputs, and a runtime block. A `workflow` `call`s tasks and passes one call's output to the next by name.\n\n```wdl\nversion 1.0\n\ntask fastp {\n    input {\n        String sample_id\n        File reads_1\n        File reads_2\n        Int threads = 4\n    }\n    # ~{} is the WDL-idiomatic placeholder; ${} collides with bash parameter expansion.\n    command \u003C\u003C\u003C\n        fastp -i ~{reads_1} -I ~{reads_2} \\\n            -o ~{sample_id}_R1.fq.gz -O ~{sample_id}_R2.fq.gz \\\n            --json ~{sample_id}.json --thread ~{threads}\n    >>>\n    output {\n        File trimmed_1 = \"~{sample_id}_R1.fq.gz\"\n        File trimmed_2 = \"~{sample_id}_R2.fq.gz\"\n    }\n    runtime {\n        docker: \"quay.io\u002Fbiocontainers\u002Ffastp@sha256:\u003Cdigest>\"   # digest, not :latest\n        cpu: threads\n        memory: \"4 GB\"\n    }\n}\n\nworkflow trim {\n    input { String sample_id; File r1; File r2 }\n    call fastp { input: sample_id = sample_id, reads_1 = r1, reads_2 = r2 }\n    output { File out_1 = fastp.trimmed_1 }\n}\n```\n\n## Scatter: explicit parallel fan-out (no channels)\n\nWDL parallelism is explicit: build an `Array`, `scatter` over it (implicitly parallel), and the engine auto-gathers each shard's output into an `Array` in input order. There is no lazy channel to drain.\n\n```wdl\nscatter (idx in range(length(sample_ids))) {\n    call align {\n        input: sample_id = sample_ids[idx], reads = fastq_files[idx], reference = reference\n    }\n}\n# align.bam outside the scatter is an Array[File], gathered in input order.\noutput { Array[File] bams = align.bam }\n```\n\nBundle per-sample fields into a `struct` (`struct SampleData { String id; File bam }`) and scatter over `Array[SampleData]` to avoid parallel-array index bugs; see usage-guide.md.\n\n## Runtime as a cost contract + dynamic disk sizing\n\n**Goal:** Size the fresh cloud VM so the task neither fails on disk nor over-pays.\n\n**Approach:** Compute disk from actual input size with a multiplier for outputs\u002Fintermediates plus headroom, round UP with `ceil()`, and make it overridable.\n\n```wdl\ntask bwa_mem {\n    input { File reads_1; File reads_2; File reference; Int? override_disk_gb }\n    # size(f,\"GiB\") is binary GiB (be consistent); *2.5 covers input+output+intermediates,\n    # +20 is headroom. ceil() always rounds UP - disk must never under-size.\n    Int disk_gb = select_first([override_disk_gb,\n                  ceil((size(reads_1, \"GiB\") + size(reads_2, \"GiB\") + size(reference, \"GiB\")) * 2.5) + 20])\n    command \u003C\u003C\u003C bwa mem ~{reference} ~{reads_1} ~{reads_2} > aligned.sam >>>\n    output { File sam = \"aligned.sam\" }\n    runtime {\n        docker: \"quay.io\u002Fbiocontainers\u002Fbwa@sha256:\u003Cdigest>\"\n        cpu: 8\n        memory: \"16 GB\"\n        disks: \"local-disk ~{disk_gb} HDD\"   # mount, GB Int, type; HDD cheap\u002Fslow, SSD fast\u002Fpricey\n        bootDiskSizeGb: 20                    # boot disk holds the image; raise for large images\n        preemptible: 3                        # Int = # attempts, then on-demand fallback\n        maxRetries: 1                         # retries on ANY failure (distinct from preemptible)\n    }\n}\n```\n\n## Call caching: the `-resume` analog, and how it silently misses\n\nCromwell hashes each call from its command template, input values (including file CONTENT hashes), Docker image identity, and runtime attributes; on a rerun an identical hash reuses prior outputs. Unlike Nextflow's `-resume`, it is NOT on by default: the in-memory HSQLDB loses the cache on restart, so a persistent DB plus config is required (Terra manages this behind a checkbox).\n\n```\ncall-caching { enabled = true, invalidate-bad-cache-results = true }\n# plus a MySQL\u002FPostgreSQL database stanza - the default HSQLDB does not persist the cache.\n```\n\nSilent-miss modes: a floating `:latest` tag resolves to a new digest -> new hash -> miss (pin by digest); a touched\u002Fre-staged input whose content or mtime changed busts the cache; a path-based hashing strategy misconfigured on a container backend disables caching; and any whitespace change in the `command` block changes the hash.\n\n## Validate, generate inputs, run\n\n```bash\nminiwdl check workflow.wdl              # static lint + ShellCheck (add --strict to gate CI)\nwomtool validate workflow.wdl          # Cromwell-side structural validation\nwomtool inputs workflow.wdl > inputs.json   # scaffold the namespaced input JSON\nminiwdl run workflow.wdl -i inputs.json     # local run, readable errors\njava -jar cromwell.jar run workflow.wdl -i inputs.json   # one-off; `cromwell server` = REST (Terra mode)\n```\n\nInput JSON keys are fully namespaced `Workflow.[subworkflow.]call_alias.input_name`, e.g. `{\"rnaseq.fastp.threads\": 8}`; optional inputs may be omitted. See usage-guide.md for structs, subworkflows, and the full namespacing rules.\n\nDo not hand-roll joint genotyping or CRAM->GVCF: WARP publishes production-vetted, cost-tuned WDL to imitate for disk and preemptible discipline (WARP team 2025).\n\n## Common Errors\n\n| Symptom | Cause | Fix |\n|---------|-------|-----|\n| Task dies late with \"No space left on device\" | static under-sized `disks` | dynamic `ceil(size(f,\"GiB\")*factor)+buffer` |\n| Job cost balloons; wall-time is mostly \"waiting\" | localizing huge inputs to every scatter shard | subset early; co-locate data + compute zones; reuse the reference where the backend caches it |\n| Reruns recompute everything | call caching off, no persistent DB, or a floating docker tag | enable caching + MySQL\u002FPostgres + digest-pin docker |\n| Preemptible task never finishes, costs more than on-demand | long non-idempotent task on `preemptible: N` | move to on-demand or shorten\u002Fcheckpoint the task |\n| VM fails to boot | Docker image larger than the boot disk | raise `bootDiskSizeGb` |\n| \"Works on my Cromwell, not on Terra\" | env drift not baked into the container; unpinned tag | bake everything into a digest-pinned image |\n| Cryptic JVM stack trace from Cromwell | engine surfacing an internal error | reproduce under `miniwdl run` for a legible, line-pointing message |\n| `${VAR}` in a command expands wrong or breaks | `${}` collides with bash parameter expansion | use `~{}` for WDL interpolation inside `command \u003C\u003C\u003C >>>` |\n| Engine rejects `Directory` under `version 1.1` | first-class `Directory` is a 1.2 feature | move the header to `version 1.2` (or `version development` on old engines) |\n\n## Related Skills\n\n- workflow-management\u002Fcwl-workflows - Vendor-neutral portable spec; choose it over WDL when handing a pipeline across institutions\n- workflow-management\u002Fnextflow-pipelines - Channel\u002Fdataflow engine + nf-core; choose it for dynamic\u002Fstreaming cloud pipelines\n- workflow-management\u002Fsnakemake-workflows - Python-native pull engine for HPC and file-pattern logic\n- workflows\u002Ffastq-to-variants - The end-to-end variant-calling analysis a GATK WDL orchestrates\n- variant-calling\u002Fgatk-variant-calling - The GATK Best Practices steps WDL encodes for Terra\u002FWARP\n\n## References\n\n- Van der Auwera GA, Carneiro MO, Hartl C, et al. 2013. From FastQ data to high-confidence variant calls: the Genome Analysis Toolkit best practices pipeline. *Curr Protoc Bioinformatics* 43:11.10.1-11.10.33.\n- Voss K, Gentry J, Van der Auwera G. 2017. Full-stack genomics pipelining with GATK4 + WDL + Cromwell. *F1000Research* 6:1379 (ISCB Comm J, poster).\n- Van der Auwera GA, O'Connor BD. 2020. *Genomics in the Cloud: Using Docker, GATK, and WDL in Terra.* O'Reilly Media. ISBN 9781491975190.\n- WARP team (Broad Institute). 2025. WARP analysis research pipelines: cloud-optimized workflows for biological data processing and reproducible analysis. *Bioinformatics* 41(10):btaf494.\n- OpenWDL specification. github.com\u002Fopenwdl\u002Fwdl - versioned SPEC on branches wdl-1.0, wdl-1.1 (1.1.3), wdl-1.2; docs at docs.openwdl.org.\n",{"name":5,"source":24,"license":15,"tool_type":25,"description":7,"imported_at":26,"source_path":27,"primary_tool":28,"source_repository":29},"https:\u002F\u002Fgithub.com\u002FGPTomics\u002FbioSkills","cli","2026-09-20","workflow-management\u002Fwdl-workflows\u002FSKILL.md","cromwell","GPTomics\u002FbioSkills","main","2d1750717747097b602acf30bd09a7cbd4b4c6ea","awesome_skills\u002Fbiology\u002Fbio-workflow-management-wdl-workflows","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous","2026-11-09 11:45:36",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":48},[38,41,44],{"tool":39,"command":40},"npx","npx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill bio-workflow-management-wdl-workflows",{"tool":42,"command":43},"bunx","bunx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill bio-workflow-management-wdl-workflows",{"tool":45,"command":46},"pnpm","pnpm dlx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill bio-workflow-management-wdl-workflows","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-workflow-management-wdl-workflows\u002FSKILL.md",true,[50,56],{"path":51,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":54,"sourceHtmlUrl":55},"examples\u002Frnaseq.wdl","OTHER","其他",3758,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-workflow-management-wdl-workflows\u002Fexamples\u002Frnaseq.wdl",{"path":57,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":60,"sourceHtmlUrl":61},"usage-guide.md","REFERENCE","参考文档",7759,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-workflow-management-wdl-workflows\u002Fusage-guide.md",[63,71,78,85,92,99],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":70},"01M7FFFZPC2025JQQHPHDX154J","dei-assessment","Assess diversity, equity, and inclusion with metrics. TRIGGERS - Use when user needs help with dei-assessment related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fdei-assessment\u002FSKILL.md",[],[],"2026-11-16 10:05:34",{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":70},"01M7FFFWN8H4WA7A6Y398QKB6J","dei-action-plan","Create DEI action plans with goals and initiatives. TRIGGERS - Use when user needs help with dei-action-plan related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fdei-action-plan\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":70},"01M7FFFSHTM0QZRVZ2NRJTJ0PY","culture-fit-assessment","Design culture add assessment processes. TRIGGERS - Use when user needs help with culture-fit-assessment related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fculture-fit-assessment\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":70},"01M7FFFMA12RKEQA38KHJSXXPS","cowork-to-code-bridge","Use an already-installed, independently verified cowork-to-code bridge to run narrowly approved actions on the user's own macOS, Linux, or WSL2 machine through a local file queue.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcowork-to-code-bridge\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":70},"01M7FFFH1F6M8YRGW5V487GH1K","counter-offer-response","Draft counter-offer responses for retention. TRIGGERS - Use when user needs help with counter-offer-response related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcounter-offer-response\u002FSKILL.md",[],[],{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":70},"01M7FFFDGEHV8Y7J9N40HZXW52","continuous-feedback-system","Design continuous feedback systems. TRIGGERS - Use when user needs help with continuous-feedback-system related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcontinuous-feedback-system\u002FSKILL.md",[],[]]