Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
217 commits
Select commit Hold shift + click to select a range
f911ef4
feat: minimap2 tool wrapper
adthrasher Dec 3, 2025
fd2bca4
refactor: handle optionally gzipped reference
adthrasher Dec 3, 2025
1ebe2a0
chore: fill in options
adthrasher Dec 3, 2025
9533656
chore: add samtools to minimap2 image and convert to BAM
adthrasher Dec 3, 2025
1b28075
chore: lint
adthrasher Dec 3, 2025
0ac46db
chore: add disk specification
adthrasher Dec 3, 2025
5161669
feat: add bwa-mem2 task
adthrasher Dec 3, 2025
af994e2
chore: lint
adthrasher Dec 4, 2025
00deed4
feat: add hisat2 task
adthrasher Dec 4, 2025
4434666
chore: change base image as other segfaults
adthrasher Dec 4, 2025
b07d769
feat: add `vg` indexing
adthrasher Dec 5, 2025
cb47772
chore: localize fasta for indexing
adthrasher Dec 5, 2025
39ca901
feat: add vg giraffe task
adthrasher Dec 5, 2025
a921e17
chore: avoid writing intermediate SAM to disk
adthrasher Dec 9, 2025
733368e
Merge branch 'feat/minimap2' of https://github.com/stjudecloud/workfl…
adthrasher Dec 9, 2025
2dc478a
chore: use database prefix
adthrasher Dec 12, 2025
1c832fc
chore: bump resources for azure
adthrasher Dec 12, 2025
bd84132
chore: format+lint
adthrasher Dec 12, 2025
8abaf9c
chore: remove memory oversubscribe
adthrasher Dec 18, 2025
d42fbfb
feat: add strelka and manta wrappers
adthrasher Dec 18, 2025
589190d
feat: add clair3 wrapper
adthrasher Dec 18, 2025
efb1d50
chore: fix invocation
adthrasher Dec 18, 2025
25681c7
feat: add NGSEP wrapper
adthrasher Dec 18, 2025
1083326
feat: add deepsomatic and deepvariant wrappers with GPU support
adthrasher Dec 18, 2025
30d1159
chore: change hisat2 output to BAM
adthrasher Dec 19, 2025
e58c2ed
chore: write to stdout instead of fifo
adthrasher Dec 19, 2025
e680a5b
chore: add undocumented FAI requirement
adthrasher Dec 22, 2025
60dce46
chore: add error checking to minimap2
adthrasher Dec 23, 2025
f614485
chore: cleanup reference files
adthrasher Jan 15, 2026
352fa6f
chore: minimum cores to 1
adthrasher Jan 20, 2026
339f20a
chore: update danio rerio url and add memory request
adthrasher Feb 2, 2026
df13caf
chore: scale memory with threads
adthrasher Feb 2, 2026
8ca1901
chore: update disk specification and memory requests
adthrasher Feb 2, 2026
a37db77
chore: add missing bam index
adthrasher Feb 2, 2026
5badc77
chore: update danio rerio url
adthrasher Feb 2, 2026
fb1ed43
chore: fix bad merge
adthrasher Feb 2, 2026
b8411d5
feat: add readgroup to array conversion for addreplacerg
adthrasher Feb 2, 2026
f749a6c
chore: bump disk requirements
adthrasher Feb 2, 2026
b2659f4
chore: bump requirements
adthrasher Feb 17, 2026
6bf5936
chore: correct container
adthrasher Feb 17, 2026
c17a874
feat: add samtools calmd implementation
adthrasher Feb 17, 2026
31d32b1
chore: eclipse 8 -> 21
adthrasher Feb 17, 2026
bc6af62
chore: add index files
adthrasher Feb 17, 2026
d53e15c
Merge remote-tracking branch 'refs/remotes/origin/feat/minimap2' into…
adthrasher Feb 17, 2026
fe34740
chore: address lint
adthrasher Mar 3, 2026
3afa3e0
feat: add samtools sort implementation
adthrasher Mar 3, 2026
e0e602d
Merge branch 'main' into feat/minimap2
adthrasher Mar 3, 2026
a9948bd
chore: address lint
adthrasher Mar 3, 2026
81224cf
chore: unify docker image version
adthrasher Mar 3, 2026
455f4d7
chore: GiB -> GB for new tools
adthrasher Mar 3, 2026
f197aef
chore: update outputs
adthrasher Mar 3, 2026
56328f2
chore: update sorting disk requirements
adthrasher Mar 4, 2026
174703f
chore: updates for somatic calling
adthrasher Mar 10, 2026
fd50c7e
feat: add octopus wrapper
adthrasher Mar 10, 2026
34e808e
chore: fixes for clair3
adthrasher Mar 10, 2026
c084df7
chore: update deepvariant to 1.10 plus fixes
adthrasher Mar 10, 2026
c6fdb1a
chore: cleanup FAI
adthrasher Mar 10, 2026
6b6b92e
chore: update sort memory
adthrasher Mar 10, 2026
f7b7fb1
chore: cleanup FAI
adthrasher Mar 10, 2026
664a0d1
chore: add BAM indices
adthrasher Mar 10, 2026
f470afa
chore: add octopus warning
adthrasher Mar 10, 2026
fcafe1e
chore: add FASTA index to manta
adthrasher Mar 10, 2026
b4621c3
chore: localize BAM and index
adthrasher Mar 10, 2026
dd35f36
chore: add index file
adthrasher Mar 11, 2026
ab2496a
chore: fix deepsomatic arguments
adthrasher Mar 11, 2026
5ba4e5a
chore: check
adthrasher Mar 11, 2026
99d645e
Merge branch 'feat/minimap2' of https://github.com/stjudecloud/workfl…
adthrasher Mar 11, 2026
7ab7375
feat: clairS wrapper
adthrasher Mar 12, 2026
cda5a4a
chore: lint and format
adthrasher Mar 12, 2026
e579d69
chore: add region filtering to manta
adthrasher Mar 13, 2026
9d07e09
chore: update tools
adthrasher Mar 17, 2026
810cbe6
chore: add outputs for strelka and manta somatic
adthrasher Mar 17, 2026
a8e2148
feat: mutect2 wrapper
adthrasher Mar 19, 2026
db57b47
chore: add dictionary because of course GATK needs that
adthrasher Mar 19, 2026
707b702
chore: ensure names match GATK's expectations
adthrasher Mar 19, 2026
0bb848a
chore: clean up mutect output
adthrasher Mar 20, 2026
ff82245
chore: localize files for Haplotype Caller
adthrasher Mar 20, 2026
9adf2f5
chore: localize inputs for deepvariant
adthrasher Mar 20, 2026
2efd098
chore: localize inputs for clair3 and strelka
adthrasher Mar 20, 2026
9f62956
chore: lint
adthrasher Mar 20, 2026
0929b67
feat: add mutect2 filtering
adthrasher Mar 23, 2026
211ba8e
feat: add mutect2 filtering
adthrasher Mar 25, 2026
d002e55
chore: clarify workflow name
adthrasher Mar 25, 2026
7ef3492
feat: add germline variant calling best practices workflow
adthrasher Mar 25, 2026
95a075d
chore: localize vcf
adthrasher Mar 25, 2026
5862a97
chore: cp instead of ln since tool resolves symlinks
adthrasher Mar 25, 2026
95d08cd
chore: add vcf index to output
adthrasher Mar 27, 2026
e5b5695
chore: add localization to base recalibrator and revert image version
adthrasher Mar 27, 2026
89882df
chore: redirect /tmp in SortSam
adthrasher Mar 27, 2026
4aeb876
chore: add index files to output
adthrasher Mar 27, 2026
5e29fb6
chore: add undocumented input to FilterMutectCalls and tweak resources
adthrasher Mar 30, 2026
942e51e
chore: set mode to gVCF
adthrasher Mar 30, 2026
ddf2f9d
chore: more updates for GATK
adthrasher Mar 30, 2026
af86744
chore: override /tmp
adthrasher Mar 30, 2026
b8ad722
chore: fix extension for output
adthrasher Mar 30, 2026
8edb6c8
chore: more undocumented dependencies
adthrasher Mar 30, 2026
6b3fc73
chore: add exome mode to manta
adthrasher Mar 31, 2026
be50eb5
Merge branch 'main' into feat/minimap2
adthrasher Apr 17, 2026
b709ccf
chore: fix bad merge
adthrasher Apr 17, 2026
f12b66b
chore: address lints
adthrasher Apr 17, 2026
7c5e9e6
chore: picard lints
adthrasher Apr 17, 2026
ee107bd
test: add bwamem2 index fixture for GRCh38 chrY/chrM
adthrasher Apr 24, 2026
ab4fb5b
test: write tests for bwamem2 align and index tasks
adthrasher Apr 24, 2026
6f610cf
test: add fixture symlinks for bwamem2 tests
adthrasher Apr 24, 2026
ee5657e
test: add minimap2 .mmi index fixture for GRCh38 chrY/chrM
adthrasher Apr 24, 2026
955451c
test: write tests for minimap2 align and index tasks
adthrasher Apr 24, 2026
1e9c395
test: add FASTA-reference and boolean flag tests for minimap2 align
adthrasher Apr 24, 2026
941f101
test: add vg giraffe index fixtures for GRCh38 chrY/chrM
adthrasher Apr 24, 2026
2e414ab
test: write tests for vg giraffe task covering output formats and pre…
adthrasher Apr 24, 2026
91ec9ab
test: split vg presets test — chaining presets require unpaired reads
adthrasher Apr 24, 2026
9c56c03
test: add tests for clair, deepvariant, strelka, and manta
adthrasher Apr 24, 2026
633286f
chore: reorg fixtures to match #263
adthrasher Apr 24, 2026
ba51f9c
chore: add @ prefix for json files
adthrasher Apr 24, 2026
62556c5
chore: disable pytest
adthrasher Apr 24, 2026
8183ac3
chore: remove LineWidth exceptions
adthrasher Apr 30, 2026
dbb89bd
chore: merge main
adthrasher Apr 30, 2026
85e3f23
chore: correct param
adthrasher May 6, 2026
21c4f6d
chore: link inputs
adthrasher May 6, 2026
e671287
Merge branch 'feat/minimap2' of https://github.com/stjudecloud/workfl…
adthrasher May 6, 2026
9b5cffd
chore: fix clair tests
adthrasher May 6, 2026
94b9583
chore: resolve bad merge
adthrasher May 6, 2026
2dd4880
chore: fix strelka tests
adthrasher May 8, 2026
264575f
chore: fix clair test
adthrasher May 8, 2026
313f38c
chore: fix deepsomatic tests
adthrasher May 8, 2026
4c76f80
chore: fix manta tests
adthrasher May 8, 2026
7399793
chore: add exception
adthrasher May 11, 2026
f294f8d
chore: run tests verbosely to get failure information
adthrasher May 11, 2026
0ae6503
chore: bulk output test stderr and stdout for debugging
adthrasher May 11, 2026
eb57f9a
chore: drop verbose, write to stderr
adthrasher May 11, 2026
2a268c3
chore: cat if test fails
adthrasher May 11, 2026
2b5baa3
chore: roll back container in mark_duplicates_spark to address JVM de…
adthrasher May 11, 2026
de11d2c
chore: use bgzipped files
adthrasher May 11, 2026
0222220
chore: drop CPU requirements for GATK4 tasks to 1
adthrasher May 11, 2026
af74388
chore: try JVM argument to test
adthrasher May 11, 2026
a9b5492
ci: install sprocket from binary for speed
adthrasher May 11, 2026
8c4c535
chore: disable Java overriding memory in container
adthrasher May 11, 2026
6c86f5f
ci: install sprocket from binary for speed
adthrasher May 11, 2026
d53c1b8
chore: remove debug logging
adthrasher May 11, 2026
9604f07
chore: move except to ignore lint issue
adthrasher May 11, 2026
f48596d
chore: sprocket format
adthrasher May 11, 2026
7c7a3c2
chore: fix paramter_meta after format
adthrasher May 11, 2026
f214124
chore: mutect2 tests
adthrasher May 12, 2026
14f3e5b
chore: ngsep test
adthrasher May 12, 2026
5a596c1
chore: add AGENTS file for AI tools
adthrasher May 12, 2026
ba20b2c
chore: add metrics tests for picard
adthrasher May 13, 2026
48271df
chore: fix gzipped input handling, add picard tests
adthrasher May 13, 2026
0b3ca21
chore: CHANGELOGs
adthrasher May 13, 2026
6ad7227
feat: add evaluation workflows
adthrasher May 18, 2026
f9f13a0
feat: germline variant calling evaluation workflow
adthrasher May 18, 2026
986d9f1
chore: address lint and format
adthrasher May 18, 2026
9103ac8
chore: rename from reserved keyword
adthrasher May 18, 2026
6c5febe
chore: rename from reserved keyword
adthrasher May 18, 2026
80051a9
chore: fix typo
adthrasher May 18, 2026
803719a
chore: remove keyword
adthrasher May 18, 2026
671ce4e
chore: add missing calmd step for giraffe
adthrasher Jun 22, 2026
2e73bec
Merge branch 'main' into feat/minimap2
adthrasher Jun 22, 2026
fa25a10
chore: switch to enum for clair3 pre-built models
adthrasher Jul 1, 2026
b7567a2
chore: disable minimap2 secondary alignments by default
adthrasher Jul 13, 2026
bdf142f
feat: mako implementation
adthrasher Jul 14, 2026
b88a2a1
chore: update mako task
adthrasher Jul 14, 2026
def58ae
chore: meta update
adthrasher Jul 20, 2026
fc05002
chore: update memory
adthrasher Jul 20, 2026
ea6e75e
chore: format
adthrasher Jul 20, 2026
3bb4448
chore: update sprocket dev test arguments
adthrasher Jul 20, 2026
78038bd
test: update tests to reflect parameter default changes
adthrasher Jul 20, 2026
6fa0f96
chore: add interval split and merge
adthrasher Aug 3, 2026
072220f
chore: rename output file
adthrasher Aug 3, 2026
be72b30
chore: update mako
adthrasher Aug 3, 2026
d9fdd8e
chore: merge
adthrasher Aug 3, 2026
d65b84e
chore: use prior implementation for scattering intervals
adthrasher Aug 3, 2026
a18a5fe
Merge branch 'main' into feat/minimap2
adthrasher Aug 3, 2026
f397e23
Merge branch 'main' into feat/minimap2
adthrasher Sep 17, 2026
fabeb5d
chore: lint fixes
adthrasher Sep 17, 2026
9cbc043
chore: spelling updates
adthrasher Sep 17, 2026
13a79a7
chore: format
adthrasher Sep 17, 2026
eabe351
chore: fix typo
adthrasher Sep 17, 2026
7b66c7a
chore: spelling fixes
adthrasher Sep 17, 2026
a76ade3
chore: fix typo
adthrasher Sep 17, 2026
ae0267f
chore: make index depend on sort order
adthrasher Sep 17, 2026
07b8369
chore: use enum in mako
adthrasher Sep 17, 2026
8be223b
chore: point to main images
adthrasher Sep 17, 2026
0e3b374
chore: remove AGENTS.md
adthrasher Sep 17, 2026
3b00b32
chore: addl improvements
adthrasher Sep 18, 2026
27ac1a0
chore: add MASSEQ to word list
adthrasher Sep 18, 2026
00c04a2
chore: format
adthrasher Sep 18, 2026
b7cd2ab
Merge branch 'main' into feat/minimap2
adthrasher Sep 18, 2026
433566d
chore: restore bwa_mem memory
adthrasher Sep 18, 2026
323b915
chore: format
adthrasher Sep 18, 2026
279bd55
ci: disable snyk checks in favor of global check
adthrasher Sep 18, 2026
5c5fa8c
chore: apply PR feedback
adthrasher Sep 18, 2026
0eb2b01
chore: update read_group data structure
adthrasher Sep 18, 2026
5123b95
chore: use enum for clair3 model
adthrasher Sep 18, 2026
a077d74
chore: lint and format
adthrasher Sep 18, 2026
a25ef84
chore: missing changes
adthrasher Sep 18, 2026
8f3961b
chore: bump clair images and symlink
adthrasher Sep 18, 2026
48b8007
Merge branch 'feat/minimap2' of https://github.com/stjudecloud/workfl…
adthrasher Sep 18, 2026
d00557f
Merge branch 'main' into feat/minimap2
adthrasher Sep 21, 2026
b014c06
chore: bubble None to the top-level
adthrasher Sep 24, 2026
b53df5c
chore: remove slow tags from manta tests
adthrasher Sep 24, 2026
7576ace
chore: fix samtools core calculations
adthrasher Sep 24, 2026
e84c0a7
chore: add modify_memory_gb to bwamem2
adthrasher Sep 24, 2026
40094b6
chore: apply feedback from PR
adthrasher Sep 24, 2026
46458f4
chore: add maxRetries
adthrasher Sep 24, 2026
a94874e
chore: grammar
adthrasher Sep 24, 2026
a0a50bf
chore: apply changes from PR
adthrasher Sep 25, 2026
1bfcec7
chore: apply changes from PR
adthrasher Sep 25, 2026
3b1459e
chore: remove unused NGSEP
adthrasher Sep 25, 2026
43f1e62
chore: apply changes from PR
adthrasher Sep 25, 2026
f9f04ea
chore: remove NGSEP from eval workflow
adthrasher Sep 25, 2026
857e2b2
chore: apply changes from PR
adthrasher Sep 25, 2026
049e525
chore: apply changes from PR
adthrasher Sep 25, 2026
1b8b75a
chore: apply changes from PR
adthrasher Sep 25, 2026
abbce83
chore: apply changes from PR
adthrasher Sep 25, 2026
7c0e337
chore: address CI issues
adthrasher Sep 25, 2026
3059f33
chore: wrap `enum` with `value()`
adthrasher Sep 28, 2026
503c024
chore: disable shellcheck on bad lint line
adthrasher Sep 28, 2026
e97cc82
chore: apply feedback from PR
adthrasher Oct 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,8 @@ bin/check-job-alive !text !filter !merge !diff
*.conf !text !filter !merge !diff
.fa filter=lfs diff=lfs merge=lfs -text
*.fa filter=lfs diff=lfs merge=lfs -text
*.mmi filter=lfs diff=lfs merge=lfs -text
*.gbz filter=lfs diff=lfs merge=lfs -text
*.dist filter=lfs diff=lfs merge=lfs -text
*.min filter=lfs diff=lfs merge=lfs -text
*.zipcodes filter=lfs diff=lfs merge=lfs -text
1 change: 1 addition & 0 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
uses: actions/checkout@v7
with:
path: workflows
- name: Install Sprocket
uses: stjude-rust-labs/setup-sprocket@v1
with:
github-token: ${{ github.token }}
Expand Down
19 changes: 0 additions & 19 deletions .github/workflows/docker-build.yaml
Comment thread
adthrasher marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -70,25 +70,6 @@ jobs:
tags: ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.TOOL }}:local
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.TOOL }}:buildcache
cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.TOOL }}:buildcache,mode=max
- name: Run Snyk to check Docker image for vulnerabilities
# Snyk can be used to break the build when it detects vulnerabilities.
# In this case we want to upload the issues to GitHub Code Scanning
continue-on-error: true
uses: snyk/actions/docker@v0
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
image: ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.TOOL }}:local
args: --file=${{ matrix.image }}/Dockerfile
- name: Clean Snyk SARIF file
continue-on-error: true
run: |
sed -i 's/"security-severity": "null"/"security-severity": "0"/g' snyk.sarif
- name: Upload result to GitHub Code Scanning
continue-on-error: true
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: snyk.sarif
- name: Push image
run: |
docker tag ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.TOOL }}:local ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.TOOL }}:${{ env.IMAGE_TAG }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sprocket-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ jobs:
env:
RUNNER: ${{ matrix.runner }}
run: |
sprocket dev test --exclude-tag slow --exclude-tag high_mem ${{ matrix.file }}
sprocket dev test --exclude-tag slow --exclude-tag high_mem --exclude-tag gpu ${{ matrix.file }}
50 changes: 50 additions & 0 deletions cspell.json
Comment thread
adthrasher marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,23 @@
"htseq",
"minfi",
"Infinium",
"bwamem",
"temurin",
"ngsep",
"NGSEP",
"deepvariant",
"deepsomatic",
"mutect",
"Mutect",
"strelka",
"Strelka",
"clairs",
"hkubal",
"revio",
"lintr",
"Basecaller",
"ssrs",
"SMRTbell",
// tool subcommands & flags
"flagstat",
"markdup",
Expand Down Expand Up @@ -94,6 +111,27 @@
"bklist",
"probelist",
"incompat",
"dont",
"bmax",
"bmaxdivn",
"nodc",
"offrate",
"ftabchars",
"localoffrate",
"localftabchars",
"bitpacked",
"Djava",
"pyflow",
"mpmap",
"rpvg",
"srold",
"calmd",
"vqsr",
"gvcf",
"gvcfs",
"ctgs",
"xeuo",
"kwdof",
// genomics / sequencing terms
"phred",
"mapq",
Expand Down Expand Up @@ -148,6 +186,16 @@
"recal",
"recalibrated",
"recalibrator",
"genotyping",
"FFPE",
"exome",
"snvs",
"gnom",
"gnomad",
"finetuned",
"shortread",
"withzip",
"zipcodes",
"dbsnp",
"gencode",
"genelengths",
Expand All @@ -171,6 +219,7 @@
"Nanopore",
"PACBIO",
"unpatterned",
"MASSEQ",
"mers",
// STAR / Picard / GATK option fragments
"Ftag",
Expand Down Expand Up @@ -260,6 +309,7 @@
"dplyr",
"argparse",
"elif",
"pyproject",
// HPC / infra
"pipefail",
"bjobs",
Expand Down
6 changes: 6 additions & 0 deletions data_structures/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/).

## 2026 September

### Changed

- `read_group.inner_read_group_to_string` can now convert a `ReadGroup` struct to `Array[String]` when `split_on_field == true`[#282](https://github.com/stjudecloud/workflows/pull/282)

## 2026 February

### Changed
Expand Down
45 changes: 25 additions & 20 deletions data_structures/read_group.wdl
Comment thread
a-frantz marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,6 @@
## - `PU`: Platform unit (e.g., flowcell-barcode.lane for Illumina or slide
## for SOLiD). Unique identifier.
## - `SM`: Sample. Use pool name where a pool is being sequenced.
##
## An example input JSON entry for `read_group` might look like this:
## ```json
## {
## "read_group": {
## "ID": "rg1",
## "PI": 150,
## "PL": "ILLUMINA",
## "SM": "Sample",
## "LB": "Sample"
## }
## }
## ```
version 1.1

#@ except: SnakeCase
Expand All @@ -65,8 +52,10 @@ workflow read_group_to_string {
name: "ReadGroup to String"
description: "Validates a `ReadGroup` struct is well-formed and then converts it to a `String`"
category: "Utility"
warning: "If both `format_as_sam_record` and `split_on_field` are `true`, behavior is undefined. This combination may become an error in the future."
outputs: {
validated_read_group: "The validated input `ReadGroup` as a `String`",
validated_read_group: "The validated input `ReadGroup` as a `String`. Undefined if `split_on_field == true`.",
validated_read_group_array: "The validated input `ReadGroup` as an `Array[String]`, one entry per field. Undefined if `split_on_field == false`.",
}
}

Expand All @@ -77,13 +66,15 @@ workflow read_group_to_string {
description: "Format the `ReadGroup` as a SAM record?",
help: "If `true`, the read group string will be prefixed with `@RG` and tab escape sequence (`\t`) delimiters will be used instead of space delimiters.",
}
split_on_field: "Split the ReadGroup into separate array elements, one per field, instead of a single `String`. Behavior is undefined if `format_as_sam_record == true`."
restrictive: "If true, run a stricter validation of field values. Otherwise, check against SAM spec-defined values."
}

input {
ReadGroup read_group
Array[String] required_fields = ["SM"]
Boolean format_as_sam_record = false
Boolean split_on_field = false
Boolean restrictive = true
}

Expand All @@ -95,10 +86,12 @@ workflow read_group_to_string {
call inner_read_group_to_string after validate_read_group { input:
read_group,
format_as_sam_record,
split_on_field,
}

output {
String validated_read_group = inner_read_group_to_string.stringified_read_group
String? validated_read_group = inner_read_group_to_string.stringified_read_group
Array[String]? validated_read_group_array = inner_read_group_to_string.read_group_array
}
}

Expand Down Expand Up @@ -371,9 +364,10 @@ task validate_read_group {
task inner_read_group_to_string {
meta {
description: "Converts a `ReadGroup` struct to a `String` **without any validation**."
warning: "Please use the `read_group_to_string` workflow, which has validation of the `ReadGroup` contents."
warning: "Please use the `read_group_to_string` workflow, which has validation of the `ReadGroup` contents. Additionally, if both `format_as_sam_record` and `split_on_field` are `true`, behavior is undefined. This combination may become an error in the future."
outputs: {
stringified_read_group: "Input `ReadGroup` as a string",
stringified_read_group: "Input `ReadGroup` as a string. Undefined if `split_on_field == true`.",
read_group_array: "Input `ReadGroup` as an `Array[String]`. Undefined if `split_on_field == false`.",
}
}

Expand All @@ -383,14 +377,20 @@ task inner_read_group_to_string {
description: "Format the `ReadGroup` as a SAM record?",
help: "If `true`, the read group string will be prefixed with `@RG` and tab escape sequence (`\t`) delimiters will be used instead of space delimiters.",
}
split_on_field: "Split the ReadGroup into separate lines for each field. Behavior is undefined if `format_as_sam_record == true`."
}

input {
ReadGroup read_group
Boolean format_as_sam_record
Boolean format_as_sam_record = false
Boolean split_on_field = false
}

String delimiter = if format_as_sam_record then "\\t" else " "
String delimiter = if format_as_sam_record
then "\\t"
else if split_on_field
then "\n"
else " "

command <<<
set -euo pipefail
Expand All @@ -417,7 +417,12 @@ task inner_read_group_to_string {
>>>

output {
String stringified_read_group = read_string("out.txt")
String? stringified_read_group = if split_on_field
then None
else read_string("out.txt")
Array[String]? read_group_array = if split_on_field
then read_lines("out.txt")
else None
}

runtime {
Expand Down
87 changes: 87 additions & 0 deletions data_structures/test/read_group.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ read_group_to_string:
validated_read_group:
- Contains: R1
- Contains: sampleFoo
validated_read_group_array:
- Defined: false
- name: id_with_spaces
inputs:
read_group:
Expand Down Expand Up @@ -82,6 +84,23 @@ read_group_to_string:
LB: lib
required_fields:
- []
- name: split_on_field
inputs:
read_group:
- ID: R1
SM: sampleFoo
split_on_field:
- true
assertions:
outputs:
validated_read_group:
- Defined: false
validated_read_group_array:
- Length: 2
- First:
StrEquals: "ID:R1"
- Last:
StrEquals: "SM:sampleFoo"

get_read_groups:
- name: works
Expand All @@ -91,3 +110,71 @@ get_read_groups:
- bams/Aligned.sortedByCoord.chr9_chr22.bam
- bams/test_rnaseq_variant.bam
- bams/test.bam

inner_read_group_to_string:
- name: space_delimited
inputs:
read_group:
- ID: R1
SM: sampleFoo
assertions:
outputs:
stringified_read_group:
- Defined: true
- StrEquals: "ID:R1 SM:sampleFoo"
read_group_array:
- Defined: false
- name: sam_record
inputs:
read_group:
- ID: R1
SM: sampleFoo
format_as_sam_record:
- true
assertions:
outputs:
stringified_read_group:
- Defined: true
- Contains: "@RG"
- Contains: "ID:R1"
- Contains: "SM:sampleFoo"
read_group_array:
- Defined: false
- name: split_on_field
inputs:
read_group:
- ID: R1
SM: sampleFoo
split_on_field:
- true
assertions:
outputs:
stringified_read_group:
- Defined: false
read_group_array:
- Defined: true
- Length: 2
- First:
StrEquals: "ID:R1"
- Last:
StrEquals: "SM:sampleFoo"
- name: sam_record_delimiter_with_split_on_field
inputs:
read_group:
- ID: R1
SM: sampleFoo
format_as_sam_record:
- true
split_on_field:
- true
assertions:
outputs:
stringified_read_group:
- Defined: false
read_group_array:
- Defined: true
# `format_as_sam_record` takes precedence for delimiter selection, so
# the tab-delimited content is still a single array element.
- Length: 1
- First:
Contains: "@RG"
8 changes: 8 additions & 0 deletions docker/bwamem2/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM quay.io/biocontainers/samtools:1.17--h00cdaf9_0 AS samtools
FROM quay.io/biocontainers/bwa-mem2:2.3--he70b90d_0

COPY --from=samtools /usr/local/bin/ /usr/local/bin/
COPY --from=samtools /usr/local/lib/ /usr/local/lib/
COPY --from=samtools /usr/local/libexec/ /usr/local/libexec/

ENTRYPOINT [ "bwa-mem2" ]
5 changes: 5 additions & 0 deletions docker/bwamem2/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "bwamem2",
"version": "2.3",
"revision": "0"
}
8 changes: 8 additions & 0 deletions docker/minimap2/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM quay.io/biocontainers/samtools:1.17--h00cdaf9_0 AS samtools
FROM quay.io/biocontainers/minimap2:2.30--h577a1d6_0

COPY --from=samtools /usr/local/bin/ /usr/local/bin/
COPY --from=samtools /usr/local/lib/ /usr/local/lib/
COPY --from=samtools /usr/local/libexec/ /usr/local/libexec/

ENTRYPOINT [ "minimap2" ]
5 changes: 5 additions & 0 deletions docker/minimap2/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "minimap2",
"version": "2.30",
"revision": "0"
}
Loading
Loading