Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
11 changes: 11 additions & 0 deletions data_structures/flag_filter/module.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "flag_filter",
"version": "1.0.0",
"license": "MIT",
"description": "The `flag_filter` WDL module.",
"authors": [
"Ari Frantz <Ari.Frantz@STJUDE.ORG>"
],
"entrypoint": "flag_filter.wdl",
"repository": "https://github.com/stjudecloud/workflows.git"
}
3 changes: 3 additions & 0 deletions docker/mako/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM rust:1.97

RUN cargo install fg-mako@0.1.3
5 changes: 5 additions & 0 deletions docker/mako/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "mako",
"version": "0.1.3",
"revision": "0"
}
File renamed without changes.
31 changes: 31 additions & 0 deletions tools/alignment/module.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"name": "alignment",
"version": "1.0.0",
"license": "MIT",
"authors": [
{
"name": "Ari Frantz",
"email": "Ari.Frantz@STJUDE.ORG"
},
{
"name": "Andrew Thrasher",
"email": "Andrew.Thrasher@STJUDE.ORG"
}
],
"description": "Module for handling SAM/BAM files",
"repository": "https://github.com/stjudecloud/workflows",
"tools": [
{
"name": "bwa",
"version": "0.7.17",
"license": "MIT",
"homepage": "https://github.com/lh3/bwa"
},
{
"name": "star",
"version": "2.7.11b",
"license": "MIT",
"homepage": "https://github.com/alexdobin/STAR"
}
]
}
File renamed without changes.
File renamed without changes.
19 changes: 19 additions & 0 deletions tools/arriba/module.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "arriba",
"version": "1.0.0",
"license": "MIT",
"description": "Module for gene fusion detection in RNA-Seq",
"authors": [
"Andrew Thrasher <Andrew.Thrasher@STJUDE.org>",
"Ari Frantzz <Ari.Frantz@STJUDE.ORG>"
],
"repository": "https://github.com/stjudecloud/workflows.git",
"tools": [
{
"name": "arriba",
"version": "2.4.0",
"license": "MIT",
"homepage": "https://github.com/suhrig/arriba"
}
]
}
File renamed without changes.
20 changes: 20 additions & 0 deletions tools/fq/module.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "fq",
"version": "1.0.0",
"license": "MIT",
"authors": [
"Ari Frantz <Ari.Frantz@STJUDE.ORG>",
"Andrew Thrasher <Andrew.Thrasher@STJUDE.ORG>"
],
"description": "Module for handling FASTQ files",
"repository": "https://github.com/stjudecloud/workflows",
"entrypoint": "fq.wdl",
"tools": [
{
"name": "fq",
"version": "0.12.0",
"license": "MIT",
"homepage": "https://github.com/stjude-rust-labs/fq"
}
]
}
File renamed without changes.
69 changes: 69 additions & 0 deletions tools/mako.wdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
version 1.4

enum SortOrder[String] {
queryname = "queryname",
coordinate = "coordinate",
queryname_natural = "queryname::natural",
template_coordinate = "template-coordinate",
}

task sort {
meta {
description: "Sorts the input BAM file"
outputs: {
sorted_bam: "The input BAM after it has been sorted according to `sort_order`",
}
}

parameter_meta {
bam: "Input BAM format file to sort"
sort_order: {
description: "Order by which to sort the input BAM",
choices: [
"queryname",
"coordinate",
"queryname::natural",
"template-coordinate",
],
group: "Common",
}
prefix: "Prefix for the sorted BAM file and accessory files. The extension `.bam` will be added."
verify: "Only verify sort order. Does not sort the BAM file."
memory_gb: "RAM to allocate for task, specified in GB"
modify_disk_size_gb: "Add to or subtract from dynamic disk space allocation. Default disk size is determined by the size of the inputs. Specified in GB."
}

input {
File bam
String sort_order = "coordinate"
String prefix = basename(bam, ".bam") + ".sorted"
Boolean verify = false
Int memory_gb = 25
Int modify_disk_size_gb = 0
}

Float bam_size = size(bam, "GB")
Int disk_size_gb = ceil(bam_size * 4) + 10 + modify_disk_size_gb

String outfile_name = prefix + ".bam"

command <<<
set -euo pipefail

mako sort \
-i "~{bam}" \
~{if verify then "--verify" else "-o \"~{outfile_name}\""} \
--order "~{sort_order}"
>>>

output {
File sorted_bam = outfile_name
}

requirements {
memory: "~{memory_gb} GB"
disks: "~{disk_size_gb} GB"
container: "ghcr.io/stjudecloud/mako:0.1.3-0"
maxRetries: 1
}
}
25 changes: 25 additions & 0 deletions tools/samtools/module.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "samtools",
"version": "1.0.0",
"license": "MIT",
"authors": [
"Ari Frantz <Ari.Frantz@STJUDE.ORG>",
"Andrew Thrasher <Andrew.Thrasher@STJUDE.ORG>"
],
"description": "Module for handling SAM/BAM files",
"repository": "https://github.com/stjudecloud/workflows",
"entrypoint": "samtools.wdl",
"tools": [
{
"name": "samtools",
"version": "1.19.2",
"license": "MIT",
"homepage": "https://www.htslib.org/"
}
],
"dependencies": {
"flag_filter": {
"path": "../../data_structures/flag_filter"
}
}
}
5 changes: 3 additions & 2 deletions tools/samtools.wdl → tools/samtools/samtools.wdl
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
## [Homepage](http://samtools.sourceforge.net/)
version 1.1
version 1.4

import "../data_structures/flag_filter.wdl"
#import "../../data_structures/flag_filter.wdl"
import * from flag_filter

task quickcheck {
meta {
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions workflows/chipseq/chipseq-standard.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import "../../tools/deeptools.wdl"
import "../../tools/fastp.wdl" as fp
import "../../tools/md5sum.wdl"
import "../../tools/picard.wdl"
import "../../tools/samtools.wdl"
import "../../tools/samtools/samtools.wdl"
import "../../tools/util.wdl"
import "../general/bam-to-fastqs.wdl" as b2fq
import "../general/bam-to-fastqs/bam-to-fastqs.wdl" as b2fq
import "https://raw.githubusercontent.com/stjude/seaseq/2.3/workflows/workflows/mapping.wdl"
as seaseq_map
import "https://raw.githubusercontent.com/stjude/seaseq/3.0/workflows/tasks/samtools.wdl"
Expand Down
8 changes: 4 additions & 4 deletions workflows/dnaseq/dnaseq-core.wdl
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
## **WARNING:** this workflow is experimental! Use at your own risk!
version 1.1
version 1.4

import "../../tools/bwa.wdl"
import "../../tools/alignment/bwa.wdl"
import "../../tools/fastp.wdl" as fp
import "../../tools/picard.wdl"
import "../../tools/samtools.wdl"
import {index} from samtools
import "../../tools/util.wdl"
import "../general/samtools-merge.wdl" as samtools_merge_wf

Expand Down Expand Up @@ -138,7 +138,7 @@ workflow dnaseq_core_experimental {
use_all_cores,
}

call samtools.index { input:
call index { input:
bam = merge.merged_bam,
}

Expand Down
8 changes: 4 additions & 4 deletions workflows/dnaseq/dnaseq-standard-fastq.wdl
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
## **WARNING:** this workflow is experimental! Use at your own risk!
version 1.1
version 1.4

import "../../data_structures/read_group.wdl"
import "../../tools/fq.wdl"
import {fqlint, subsample} from fq
import "./dnaseq-core.wdl" as dnaseq_core_wf
import "./dnaseq-standard.wdl" as dnaseq_standard

Expand Down Expand Up @@ -77,7 +77,7 @@ workflow dnaseq_standard_fastq_experimental {

if (validate_input) {
scatter (reads in zip(read_one_fastqs_gz, read_two_fastqs_gz)) {
call fq.fqlint after read_group_to_string { input:
call fqlint after read_group_to_string { input:
read_one_fastq = reads.left,
read_two_fastq = reads.right,
}
Expand All @@ -87,7 +87,7 @@ workflow dnaseq_standard_fastq_experimental {
if (subsample_n_reads > 0) {
Int reads_per_pair = ceil(subsample_n_reads / length(read_one_fastqs_gz))
scatter (reads in zip(read_one_fastqs_gz, read_two_fastqs_gz)) {
call fq.subsample after fqlint { input:
call subsample after fqlint { input:
read_one_fastq = reads.left,
read_two_fastq = reads.right,
record_count = reads_per_pair,
Expand Down
8 changes: 4 additions & 4 deletions workflows/dnaseq/dnaseq-standard.wdl
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
## **WARNING:** this workflow is experimental! Use at your own risk!
version 1.1
version 1.4

import "../../data_structures/read_group.wdl"
import "../../tools/picard.wdl"
import "../../tools/samtools.wdl"
import "../general/bam-to-fastqs.wdl" as bam_to_fastqs_wf
import {subsample} from samtools
import "../general/bam-to-fastqs/bam-to-fastqs.wdl" as bam_to_fastqs_wf
import "./dnaseq-core.wdl" as dnaseq_core_wf

workflow dnaseq_standard_experimental {
Expand Down Expand Up @@ -64,7 +64,7 @@ workflow dnaseq_standard_experimental {
}

if (subsample_n_reads > 0) {
call samtools.subsample after validate_input_bam { input:
call subsample after validate_input_bam { input:
bam,
desired_reads = subsample_n_reads,
use_all_cores,
Expand Down
22 changes: 22 additions & 0 deletions workflows/dnaseq/module.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "dnaseq",
"version": "1.0.0",
"license": "MIT",
"authors": [
"Ari Frantz <Ari.Frantz@STJUDE.ORG>",
"Andrew Thrasher <Andrew.Thrasher@STJUDE.ORG>"
],
"description": "DNAseq analysis workflow",
"repository": "https://github.com/stjudecloud/workflows",
"dependencies": {
"samtools": {
"path": "../../tools/samtools"
},
"fq": {
"path": "../../tools/fq"
}
},
"exclude": [
"dnaseq-core.wdl"
]
}
2 changes: 1 addition & 1 deletion workflows/general/alignment-post.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version 1.1

import "../../tools/md5sum.wdl"
import "../../tools/picard.wdl"
import "../../tools/samtools.wdl"
import "../../tools/samtools/samtools.wdl"
import "https://raw.githubusercontent.com/stjude/XenoCP/4.0.0-alpha/wdl/workflows/xenocp.wdl"
as xenocp_wf

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version 1.1
version 1.4

import "../../tools/fq.wdl"
import "../../tools/samtools.wdl"
import "../../../tools/fq/fq.wdl"
import "../../../tools/samtools/samtools.wdl"

workflow bam_to_fastqs {
meta {
Expand Down
30 changes: 30 additions & 0 deletions workflows/general/bam-to-fastqs/module.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"name": "bam-to-fastqs",
"version": "1.0.0",
"license": "MIT",
"authors": [
{
"name": "Ari Frantz",
"email": "Ari.Frantz@STJUDE.ORG"
},
{
"name": "Andrew Thrasher",
"email": "Andrew.Thrasher@STJUDE.ORG"
}
],
"description": "Convert BAM files to FASTQ(s) with Samtools",
"repository": "https://github.com/stjudecloud/workflows",
"entrypoint": "bam-to-fastqs.wdl",
"dependencies": {
"fq": {
"git": "https://github.com/stjudecloud/workflows",
"branch": "main",
"path": "tools/fq"
},
"samtools": {
"git": "https://github.com/stjudecloud/workflows",
"branch": "main",
"path": "tools/samtools"
}
}
}
4 changes: 2 additions & 2 deletions workflows/general/samtools-merge.wdl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## **WARNING:** this workflow is experimental! Use at your own risk!
version 1.1
version 1.4

import "../../tools/samtools.wdl"
import "../../tools/samtools/samtools.wdl"

workflow samtools_merge {
meta {
Expand Down
2 changes: 1 addition & 1 deletion workflows/qc/markdups-post.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ version 1.1

import "../../tools/mosdepth.wdl"
import "../../tools/picard.wdl"
import "../../tools/samtools.wdl"
import "../../tools/samtools/samtools.wdl"

workflow markdups_post {
meta {
Expand Down
Loading
Loading