From c88526aae1396ca26c3fa8308e0cd04ea6dc248c Mon Sep 17 00:00:00 2001 From: Priyanka Date: Sun, 2 Aug 2026 18:32:35 +0530 Subject: [PATCH 1/9] Update Salmon container image to a more current version --- tools/salmon.wdl | 255 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 255 insertions(+) create mode 100644 tools/salmon.wdl diff --git a/tools/salmon.wdl b/tools/salmon.wdl new file mode 100644 index 000000000..48e10175f --- /dev/null +++ b/tools/salmon.wdl @@ -0,0 +1,255 @@ +version 1.1 + +task build_salmon_index { + meta { + description: "Builds a Salmon index from a transcriptome FASTA file, for use in quantification" + outputs: { + salmon_index_tar_gz: "A gzipped TAR file containing the Salmon index files." + } + } + + parameter_meta { + transcripts_fasta: "FASTA format file containing the reference transcriptome to index" + index_name: { + description: "Name for the output index, in compressed archive format. The suffix `.tar.gz` will be added.", + group: "Common", + } + use_all_cores: { + description: "Use all cores? Recommended for cloud environments.", + group: "Resources", + } + ncpu: { + description: "Number of cores to allocate for task", + group: "Resources", + } + modify_disk_size_gb: { + description: "Add to or subtract from dynamic disk space allocation. Default disk size is determined by the size of the inputs. Specified in GB.", + group: "Resources", + } + } + + input { + File transcripts_fasta + String index_name = "salmon_index" + Boolean use_all_cores = false + Int ncpu = 4 + Int modify_disk_size_gb = 0 + } + + String salmon_index_filename = index_name + ".tar.gz" + + Float transcripts_fasta_size = size(transcripts_fasta, "GB") + Int disk_size_gb = ceil(transcripts_fasta_size * 4) + 10 + modify_disk_size_gb + + command <<< + set -euo pipefail + + n_cores=~{ncpu} + if ~{use_all_cores}; then + n_cores=$(nproc) + fi + + salmon index \ + -t "~{transcripts_fasta}" \ + -i "~{index_name}" \ + -p "$n_cores" + + tar -czf "~{salmon_index_filename}" "~{index_name}" + >>> + + output { + File salmon_index_tar_gz = salmon_index_filename + } + + runtime { + cpu: ncpu + memory: "8 GB" + disks: "~{disk_size_gb} GB" + container: "quay.io/biocontainers/salmon:1.9.0--h7e5ed60_0" + maxRetries: 1 + } +} + +task quant { + meta { + description: "Runs Salmon quant in mapping-based mode to quantify transcript-level expression from RNA-Seq reads, using a pre-built Salmon index" + outputs: { + quant_results_tar_gz: "A gzipped TAR file containing the Salmon quantification output directory, including `quant.sf`." + } + } + + parameter_meta { + salmon_index_tar_gz: "A gzipped TAR file containing the Salmon index files. Suitable as the output of the `build_salmon_index` task." + read_one_fastqs_gz: "An array of gzipped FASTQ files containing read one information" + read_two_fastqs_gz: { + description: "An array of gzipped FASTQ files containing read two information. Omit for single-end reads.", + group: "Common", + } + lib_type: { + description: "Salmon library type describing the relative orientation and strandedness of paired reads.", + help: "Use `A` to let Salmon auto-detect the library type — recommended for most users.", + group: "Common", + } + prefix: { + description: "Prefix for the Salmon quantification output. The extension `.tar.gz` will be added.", + group: "Common", + } + num_bootstraps: { + description: "Salmon has the ability to optionally compute bootstrapped abundance estimates.", + help: "This is done by resampling (with replacement) from the counts assigned to the fragment equivalence classes, and then re-running the optimization procedure for each such sample.", + group: "Salmon Options", + } + incompat_prior: { + description: "This parameter governs the a priori probability that a fragment mapping is nonetheless the correct mapping.", + help: "Specifically, this is for a fragment mapping or aligning to the reference in a manner incompatible with the prescribed library type.", + group: "Salmon Options", + } + range_factorization_bins: { + description: "The range-factorization feature allows using a data-driven likelihood factorization.", + help: "This can improve quantification accuracy on certain classes of difficult transcripts.", + group: "Salmon Options", + } + fld_mean: { + description: "Allows the user to set the expected mean fragment length of the sequencing library.", + help: "Since the empirical fragment length distribution cannot be estimated from the mappings of single-end reads, this is only important when running Salmon with single-end reads.", + group: "Salmon Options", + } + fld_sd: { + description: "Allows the user to set the expected standard deviation of the fragment length distribution.", + help: "Since the empirical fragment length distribution cannot be estimated from the mappings of single-end reads, this is only important when running Salmon with single-end reads.", + group: "Salmon Options", + } + seq_bias: { + description: "Passing this flag will enable it to learn and correct for sequence-specific biases in the input data.", + group: "Salmon Options", + } + gc_bias: { + description: "Passing this flag will enable it to learn and correct for fragment-level GC biases in the input data.", + group: "Salmon Options", + } + pos_bias: { + description: "Passing this flag will enable modeling of a position-specific fragment start distribution.", + group: "Salmon Options", + } + use_em: { + description: "Use the \"standard\" EM algorithm to optimize abundance estimates instead of the variational Bayesian EM algorithm.", + group: "Salmon Options", + } + recover_orphans: { + description: "This flag (which should only be used in conjunction with selective alignment), performs orphan \"rescue\" for reads.", + group: "Salmon Options", + } + hard_filter: { + description: "This flag (which should only be used with selective alignment) turns off soft filtering and range-factorized equivalence classes.", + help: "Removes all but the equally highest scoring mappings from the equivalence class label for each fragment.", + group: "Salmon Options", + } + allow_dovetail: { + description: "Dovetailing mappings and alignments are considered discordant and discarded by default.", + help: "If you wish to consider dovetailing mappings as concordant, you can do so by passing this flag.", + group: "Salmon Options", + } + dump_eq: { + description: "If passed, Salmon will write a file in the auxiliary directory, called eq_classes.txt.", + help: "Contains the equivalence classes and corresponding counts that were computed during quasi-mapping.", + group: "Salmon Options", + } + write_unmapped_names: { + description: "Passing this flag will tell Salmon to write out the names of reads (or mates in paired-end reads) that do not map to the transcriptome.", + group: "Salmon Options", + } + use_all_cores: { + description: "Use all cores? Recommended for cloud environments.", + group: "Resources", + } + ncpu: { + description: "Number of cores to allocate for task", + group: "Resources", + } + modify_disk_size_gb: { + description: "Add to or subtract from dynamic disk space allocation. Default disk size is determined by the size of the inputs. Specified in GB.", + group: "Resources", + } + } + + input { + File salmon_index_tar_gz + Array[File] read_one_fastqs_gz + Array[File]? read_two_fastqs_gz + String lib_type = "A" + String prefix = basename(read_one_fastqs_gz[0], ".fastq.gz") + Int num_bootstraps = 0 + Float incompat_prior = 0.0 + Int range_factorization_bins = 4 + Int fld_mean = 250 + Int fld_sd = 25 + Boolean seq_bias = false + Boolean gc_bias = false + Boolean pos_bias = false + Boolean use_em = false + Boolean recover_orphans = false + Boolean hard_filter = false + Boolean allow_dovetail = false + Boolean dump_eq = false + Boolean write_unmapped_names = false + Boolean use_all_cores = false + Int ncpu = 4 + Int modify_disk_size_gb = 0 + } + + Array[File] read_twos = select_first([read_two_fastqs_gz, []]) + + Float read_one_size = size(read_one_fastqs_gz, "GB") + Float read_two_size = size(read_twos, "GB") + Float index_size = size(salmon_index_tar_gz, "GB") + Int disk_size_gb = ceil((read_one_size + read_two_size + index_size) * 3) + 10 + modify_disk_size_gb + + command <<< + set -euo pipefail + + n_cores=~{ncpu} + if ~{use_all_cores}; then + n_cores=$(nproc) + fi + + mkdir salmon_index + tar -xzf "~{salmon_index_tar_gz}" -C salmon_index --strip-components 1 + + salmon quant \ + -i salmon_index \ + -l "~{lib_type}" \ + -1 ~{sep(" ", squote(read_one_fastqs_gz))} \ + ~{if length(read_twos) > 0 then "-2 " + sep(" ", squote(read_twos)) else ""} \ + --validateMappings \ + -p "$n_cores" \ + --numBootstraps ~{num_bootstraps} \ + --incompatPrior ~{incompat_prior} \ + --rangeFactorizationBins ~{range_factorization_bins} \ + "~{if length(read_twos) == 0 then "--fldMean " + fld_mean else ""}" \ + "~{if length(read_twos) == 0 then "--fldSD " + fld_sd else ""}" \ + ~{if seq_bias then "--seqBias" else ""} \ + ~{if gc_bias then "--gcBias" else ""} \ + ~{if pos_bias then "--posBias" else ""} \ + ~{if use_em then "--useEM" else ""} \ + ~{if recover_orphans then "--recoverOrphans" else ""} \ + ~{if hard_filter then "--hardFilter" else ""} \ + ~{if allow_dovetail then "--allowDovetail" else ""} \ + ~{if dump_eq then "--dumpEq" else ""} \ + ~{if write_unmapped_names then "--writeUnmappedNames" else ""} \ + -o "~{prefix}" + + tar -czf "~{prefix}.tar.gz" "~{prefix}" + >>> + + output { + File quant_results_tar_gz = prefix + ".tar.gz" + } + + runtime { + cpu: ncpu + memory: "16 GB" + disks: "~{disk_size_gb} GB" + container: "quay.io/biocontainers/salmon:1.9.0--h7e5ed60_0" + maxRetries: 1 + } +} From eedc21a52626a0d76a4dbdd288a3bc7087d0aab7 Mon Sep 17 00:00:00 2001 From: Priyanka Date: Thu, 13 Aug 2026 05:08:28 +0530 Subject: [PATCH 2/9] Add Sprocket unit tests for Salmon WDL tasks --- test/fixtures/salmon/reads_R1.fastq.gz | 3 +++ test/fixtures/salmon/reads_R2.fastq.gz | 3 +++ test/fixtures/salmon/salmon_index.tar.gz | 3 +++ test/fixtures/salmon/transcripts.fasta | 4 ++++ tools/salmon.yml | 23 +++++++++++++++++++++++ 5 files changed, 36 insertions(+) create mode 100644 test/fixtures/salmon/reads_R1.fastq.gz create mode 100644 test/fixtures/salmon/reads_R2.fastq.gz create mode 100644 test/fixtures/salmon/salmon_index.tar.gz create mode 100644 test/fixtures/salmon/transcripts.fasta create mode 100644 tools/salmon.yml diff --git a/test/fixtures/salmon/reads_R1.fastq.gz b/test/fixtures/salmon/reads_R1.fastq.gz new file mode 100644 index 000000000..e7bfc8460 --- /dev/null +++ b/test/fixtures/salmon/reads_R1.fastq.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7813ecdd43e8e8b9cdc1f64d26dd767a08bf752eba7aa2ea9f3e4ef7450e18c3 +size 101 diff --git a/test/fixtures/salmon/reads_R2.fastq.gz b/test/fixtures/salmon/reads_R2.fastq.gz new file mode 100644 index 000000000..7b4bdbaf6 --- /dev/null +++ b/test/fixtures/salmon/reads_R2.fastq.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8c089938d7eeea8564fd430b3c5acb99a6b01a503ee28dcb7ddf4efe58dce222 +size 101 diff --git a/test/fixtures/salmon/salmon_index.tar.gz b/test/fixtures/salmon/salmon_index.tar.gz new file mode 100644 index 000000000..656ae6e36 --- /dev/null +++ b/test/fixtures/salmon/salmon_index.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bb2d0a63e12ad5125695412ad91a5f7326b9f0ac0a011da0e04cc13f2af246e4 +size 2404 diff --git a/test/fixtures/salmon/transcripts.fasta b/test/fixtures/salmon/transcripts.fasta new file mode 100644 index 000000000..8f5a292b4 --- /dev/null +++ b/test/fixtures/salmon/transcripts.fasta @@ -0,0 +1,4 @@ +>transcript1 +ATGGCGTACGTTAGCATGCATCGATCGTAGCTAGCTAGCATCGATCGTAGCATGCTAGCATGCATCGATCGTAGCATGCTAGC +>transcript2 +GCTAGCATCGATGCATGCTAGCTAGCATGCATCGATCGATCGTAGCTAGCATGCTAGCATCGATCGTAGCATGCATCGATCG diff --git a/tools/salmon.yml b/tools/salmon.yml new file mode 100644 index 000000000..a4bed68c9 --- /dev/null +++ b/tools/salmon.yml @@ -0,0 +1,23 @@ +build_salmon_index: + - name: builds_index_successfully + inputs: + transcripts_fasta: + - salmon/transcripts.fasta + assertions: + outputs: + salmon_index_tar_gz: + - Name: salmon_index.tar.gz + +quant: + - name: quantifies_paired_end_reads + inputs: + salmon_index_tar_gz: + - salmon/salmon_index.tar.gz + read_one_fastqs_gz: + - - salmon/reads_R1.fastq.gz + read_two_fastqs_gz: + - - salmon/reads_R2.fastq.gz + assertions: + outputs: + quant_results_tar_gz: + - Name: reads_R1.tar.gz From d388086d8357e3dbcb8d761f41d3e1d28049ce2c Mon Sep 17 00:00:00 2001 From: Priyanka Date: Mon, 17 Aug 2026 08:48:20 +0530 Subject: [PATCH 3/9] Fix fldMean/fldSD argument quoting and suppress SC2086 false-positive --- tools/salmon.wdl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/salmon.wdl b/tools/salmon.wdl index 48e10175f..b9da6e058 100644 --- a/tools/salmon.wdl +++ b/tools/salmon.wdl @@ -87,7 +87,7 @@ task quant { } lib_type: { description: "Salmon library type describing the relative orientation and strandedness of paired reads.", - help: "Use `A` to let Salmon auto-detect the library type — recommended for most users.", + help: "Use `A` to let Salmon auto-detect the library type — recommended for most users.", group: "Common", } prefix: { @@ -215,6 +215,8 @@ task quant { mkdir salmon_index tar -xzf "~{salmon_index_tar_gz}" -C salmon_index --strip-components 1 + # shellcheck disable=SC2086 + # shellcheck disable=SC2086 salmon quant \ -i salmon_index \ -l "~{lib_type}" \ @@ -225,8 +227,8 @@ task quant { --numBootstraps ~{num_bootstraps} \ --incompatPrior ~{incompat_prior} \ --rangeFactorizationBins ~{range_factorization_bins} \ - "~{if length(read_twos) == 0 then "--fldMean " + fld_mean else ""}" \ - "~{if length(read_twos) == 0 then "--fldSD " + fld_sd else ""}" \ + ~{if length(read_twos) == 0 then "--fldMean " + fld_mean else ""} \ + ~{if length(read_twos) == 0 then "--fldSD " + fld_sd else ""} \ ~{if seq_bias then "--seqBias" else ""} \ ~{if gc_bias then "--gcBias" else ""} \ ~{if pos_bias then "--posBias" else ""} \ From 01cfcb1bf89cf93f70117ac5e62c851fcbc1907e Mon Sep 17 00:00:00 2001 From: Priyanka Date: Mon, 17 Aug 2026 10:23:33 +0530 Subject: [PATCH 4/9] Move test file to tools/test/ and rename to .yaml extension --- tools/{salmon.yml => test/salmon.yaml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename tools/{salmon.yml => test/salmon.yaml} (100%) diff --git a/tools/salmon.yml b/tools/test/salmon.yaml similarity index 100% rename from tools/salmon.yml rename to tools/test/salmon.yaml From cb2894dc6f23195660b0aa1cd1865396e68113c4 Mon Sep 17 00:00:00 2001 From: Priyanka Date: Tue, 18 Aug 2026 17:21:45 +0530 Subject: [PATCH 5/9] Fix single-end quant mode (-r flag), rebuild test fixtures from shared FASTQ data, add SE test --- test/fixtures/salmon/reads_R1.fastq.gz | 3 --- test/fixtures/salmon/reads_R2.fastq.gz | 3 --- test/fixtures/salmon/salmon_index.tar.gz | 4 +-- test/fixtures/salmon/transcripts.fasta | 34 +++++++++++++++++++++--- tools/salmon.wdl | 3 +-- tools/test/salmon.yaml | 16 ++++++++--- 6 files changed, 46 insertions(+), 17 deletions(-) delete mode 100644 test/fixtures/salmon/reads_R1.fastq.gz delete mode 100644 test/fixtures/salmon/reads_R2.fastq.gz diff --git a/test/fixtures/salmon/reads_R1.fastq.gz b/test/fixtures/salmon/reads_R1.fastq.gz deleted file mode 100644 index e7bfc8460..000000000 --- a/test/fixtures/salmon/reads_R1.fastq.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7813ecdd43e8e8b9cdc1f64d26dd767a08bf752eba7aa2ea9f3e4ef7450e18c3 -size 101 diff --git a/test/fixtures/salmon/reads_R2.fastq.gz b/test/fixtures/salmon/reads_R2.fastq.gz deleted file mode 100644 index 7b4bdbaf6..000000000 --- a/test/fixtures/salmon/reads_R2.fastq.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8c089938d7eeea8564fd430b3c5acb99a6b01a503ee28dcb7ddf4efe58dce222 -size 101 diff --git a/test/fixtures/salmon/salmon_index.tar.gz b/test/fixtures/salmon/salmon_index.tar.gz index 656ae6e36..550a76be9 100644 --- a/test/fixtures/salmon/salmon_index.tar.gz +++ b/test/fixtures/salmon/salmon_index.tar.gz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bb2d0a63e12ad5125695412ad91a5f7326b9f0ac0a011da0e04cc13f2af246e4 -size 2404 +oid sha256:26f502afd6e9f02fb7241611e4ee9535cb19d30decdb0d321755564a76d14361 +size 12661 diff --git a/test/fixtures/salmon/transcripts.fasta b/test/fixtures/salmon/transcripts.fasta index 8f5a292b4..26eb8c924 100644 --- a/test/fixtures/salmon/transcripts.fasta +++ b/test/fixtures/salmon/transcripts.fasta @@ -1,4 +1,30 @@ ->transcript1 -ATGGCGTACGTTAGCATGCATCGATCGTAGCTAGCTAGCATCGATCGTAGCATGCTAGCATGCATCGATCGTAGCATGCTAGC ->transcript2 -GCTAGCATCGATGCATGCTAGCTAGCATGCATCGATCGATCGTAGCTAGCATGCTAGCATCGATCGTAGCATGCATCGATCG +>synthetic_transcript_1 +ACCTTTGCCACTGCTGAGACAGCAAGACCAACCTCTTCTCTTGCTCCTCCTCCTCAACATACTCAATATGAAGATGTTGATGATAAAGACCTTTATGATGATCCACTTCTATTTAATGAATAGCAAATATACTTTCTCTTACTTATGATTGGGCAGGGGATCAGTGACTCTAATGCACATATTGTTAGAGGGTCAAACGTACTTGCCAGCAGAATATTGGCCTTATTTTTCTGTGAGGCCAGATGGCTCTTTCCTCCCTCTGAATCTGAATTCATGGGTTTTGTTTTAGAAAATATATCT +>synthetic_transcript_2 +CATTATATTTTGGCAGAAACATAAATCCAGACCATATTATACTACCCCTGACCCCTTCCAAATTTCACATGGCAAAATACAGTTGTTATCTATTTCCAAGAGTCTTTCTAGTGTTAACTCTTTTTGGCATTAATTTAAAAGGTCCACAGTCATGAGGTCAAGAAATCGAGACTATCCTGGCTAACCAACATGGTGAAACCCATCTCTACTAAAAATACAAAAATTAGCTGGGCACAGTGGCACACGTCTGTAGTCCCAGCTACTCAGGAGGCTGAGGCAGAAGAATCGCTTGAACCTGGG +>synthetic_transcript_3 +TGGAATGCAATGGAGTGGAATGGAAAGGAATGGAATGGAATCGAATCACATGGAATTGAGTCGAATCAAATCAAATTGAATCTAATTGAATCGAATGGAAAAAGTGGAATCAAATGGAATCGAATGTAATCAAATCGAATGGATTCGAATTGGAGTGCAGGGGAGTGGAGTGGAGAGTAGTAGAATGGATTGGAGTGGAATGGAGTGGAGTGAAATGGAATGGAATGGAATGAACTGGAATGGAATGGAATGGAATCGAATCACAAGGAACCAAATCAAATCGAATCAAGTGGAAAAAAA +>synthetic_transcript_4 +ACAAATCTTTTTTTTTCTTTCTTTTTTGTATGTAAATTATTTTCCGAAGGAGGTGGGTTGGGAGAAATATATCTTAACTTGGCAAGTTTAAAAGAGAAAGTGGCCATTACTAATGAAAATTATTCTCTAGCATTTTCATGTTTATCTTTAATTCTTCCCTGCATCTCTGAAACAGGGGAGCTTACACTTTCTATTAATCATATATTTTGTATTATTGTTGACACCATGGCTGGAGTTTTCGAAAAGTGGAACTCATCTTCCTAGCAACACAAAAAATAATTCCAGCATGGTGGGTAAGTA +>synthetic_transcript_5 +CTACTCTCCTGCCTCAGCCTCCTGAGTAGGTGGGATTACAAATGTGCACCACCACACTTGGCTAATTTTTGTATTATTAGTAAAGATGGGGTTTCACCATGTTGGCCAGGCTGGTCTTGAACTCCTGATCTCAGGTGATCCACCCACTTCCATCATTCCTTTCAAGAGCTGCTTCTTTTTTTCTAATTTAGCTCAGGAATTTAGAAGTTCCAACATAACGGGGCATCCAGTATTCACCCACACCACTTTTTGCAGGAATCCATATGGAGCCACTACCACCATCCCTGCTCTCCTACTGCA +>synthetic_transcript_6 +ATATGGAACCAAAAAAGAACCTGCATTGCCAAGACAATCCTAAGCAAAAAGAACAAAGCTGGAGGCATCACACTACCTGACTTCAAACTACACTACAAGGCTACAGTAACCAAAACAGCATGGTACTGGTGCCAAAACAGAGATACAGACTTACACCTTATATAAAAATTAATTCAAGATGGATTAAAGACTTAAATGTCAGACCTAAAACCATAAAAACCCTAGAAGAATACCTAGGCAATACCATTCAGGACATAGGCATGGGCAAGGAATTAATAACTAAAACACCAATAGCAATGG +>synthetic_transcript_7 +TTAGACAGCAAAGTGAAATCCCATCTCTACAATAAATAAATAAATAAAATAGGGAGCAAGGTGGCATGTGCCTGTGTTCCCAGCTATATTGGAGGCTGAGGCAGGATGATTGCTTGAGTCCATGAGGCCAAGGCTGCAGTGAGCCATTTTCTAATTTTCAAAGTGGCTGTACCATTATATATCCCCACCAGCAATGCATAAGGTTCACATTTCTCTACATTTTCACTAACATGTGATATTGTCAGTCTTCTTGATTATAGCCACCCTAATGAGTTTTATGTGGTCTCTCGTTGTGTTTTT +>synthetic_transcript_8 +CACATCAGGAAATGAAAACTTCTTATTAATGAGGGATTATGTACAACAATGAAATCCATGACTTACAAACATAGTTGTTCTCAACATAACAATTATGCATTATCTATCAATGACATTAAGTAAAGACTATGTAAAAAAATTTCAAAATCTAGCTACCTGACAGTTTCTGTAAGCAAATATTTGGTAGGTGCCTCACTTCAAAATTATGTTGCCTTAAAAATGTAAGAAGATTTCTTTGTTGTTGTAGCTGGAGACAATTAGGTAACACAAATTGTCACCCTACATAACAGGGAAAATACA +>synthetic_transcript_9 +CAAACCCTAACGCTAATGCACTAACCCTCTTACCCTAACCCTCACCGTCACCTTAACTCTCACCCTAAGCACTAACTCTAACCCTCACCATGAAGTTAAGCCAGAACCTAACCCTACACTAACAACAACCTCTAACTGTAGGCCTATTTCTACCACAACACTGACCTCTAACCCAACCCCAGATCTAACCCTCAATCTAAACTTTTTTCTGCAATTGTAAACCCCTATTCCTAATCCCAAACTTCTATCCCATTCTTAATATTATCATATCACCCTTCAAAGAATTTTAAATATATCATC +>synthetic_transcript_10 +GCTGACAACAAACCTGTCCCAAGACCCCAAGCTTCACCAGGCTATGTGCAGGCCTTGGACCAGAACATCAGCATCACCTTGGGGTGGGGGTTGCAGGGGGGGTCGCCCATCCTCTGGTCACCAGAAATGCAGAATTCTAGATTCATCTGGACTTCACAATAGTGGGGAGGGAGGCGGTAACTGGACTAGAAAAGGGACATATAATTCGAGCGTCAGGATGAACACTATGGCTGAATCCATAGTTTTCTTCCCTTAAACTCTGGAGAAAAGTCATCCAAAAGCTACCACGTTTGAATTTTA +>synthetic_transcript_11 +CTATGAGCAGGAAGGTTAGCTTCATAAAGTAGTCAGAAAGAGCCTCCTTTTCAGTATGTGGGAAAAGAAGCTTGGATTGGAATCAGGGTATTTATTGGGACTGAAGTGATCCCCCATTTGTCTTCTCAGAGAAATGGCACATTGGGATAACAGAGTGGCCCTCCTTACCCTCACTGCACTCAATTGTCTGGGGCTGCTCCACCTGCCGCTGGCCACTTTTTTTGGCCTTCTCTTCCTAGCAGCTCTGATCCTGATCTTTTCCTGGGCTTCTGTGATTACTTCCAGTCCCTGAACTTCTTC +>synthetic_transcript_12 +CCCAAGCATGGGTCCTGAGGGCCACTTCAAGTGCTATGACTTGGACCCCAGCCCAGAAGACCCTTACCCAGAGTCACTGGAACACCAGACAAAAGATCTGGATGCTGCCCCCACTTCTAGGAGGCAGGCGTGGCCCAGCTGCCCTCATCTCTTACCAGTATCTCAGGACATCTGAGGATACCATGGCACGTTTGCCCACAGGTGCAAGTTTTTTGAGGAAGTGGGCAAACTCATTCCCCAGAGGCCTGCACAGAGGCAAGCTCTTCAGGGGGTCCTCAGAGACAAGCCGGAGAGGTCACG +>synthetic_transcript_13 +TGAGCTAAAGGAGCTTGTTCTAACCCATCGCAAGGAAAATAAAAACCTTAAAAAAAGGTTAGATGAATGGCTAACTAGAATAAACAGTGTATAGAATGATCTGATGGAGCTAAAAATCATGGCAGAGAACTTTGTGATGCAAGCACAAGACAATGTGAAAAGGCCAAATATATGTTTGATTGGTGTAACTGAAAGTGATGGAGAGAATGCAACCAACTGGGAAAATACTCTTCAGGATATTATCCAGGAGAATGTCCAACCTAGCAAGGCAGGCCAACTTTCAAATTCAAGATATACAGA +>synthetic_transcript_14 +CTCCCTAGAAATATGTCAGATGTGCAGGTTTGGCCGGTCACGGTGGCTCACACCTGCAATCCTGGCACTTTGGGAGGTCGCGGCGGGCAGATTACTTCAGGTCAGCAGTTTGAGACCTGCCTGGCTAACGTGGTGAAACCCCGTGTGTGCTACTAAAAATACAAAAAATTAGCCGGGCATGGTAGTGGGCGTCTGTAGTCCCAGCTTCTCGGGAGGCTGCCGCAGGAGAATGACGTGAACCCTGGAGGCGGAGCTTGCAGTGAGCCGAGATTGAGCCACTGCACTCCAGCCTGGGCAATA +>synthetic_transcript_15 +AGAGGAATAGCCACACCAACTTCCACAATGGTTGAACTAGTTTACAGTCCCACCAACAGTGTAAAAGTGTTCCTATTTCTCCACATCCTCTCCAGCACCTGTTGTTTCCTGACTTTTTAATGATTGCCATTCTAACTGGTGTGAGATGGTGGATATTAGCCCTTTGTCAGACAAGTAGGTTGCAAAAATGTTCTCCCATTCTATAGGTTGCCTGTTCACTCTGATGGTGGTTTCATTTGCTGAGCAGAAGCTCTTTAGTTTAATCAGATCCCATTTGTCTATTTTGGCTTTTGTTGCCAT diff --git a/tools/salmon.wdl b/tools/salmon.wdl index b9da6e058..1d7e58ce3 100644 --- a/tools/salmon.wdl +++ b/tools/salmon.wdl @@ -220,8 +220,7 @@ task quant { salmon quant \ -i salmon_index \ -l "~{lib_type}" \ - -1 ~{sep(" ", squote(read_one_fastqs_gz))} \ - ~{if length(read_twos) > 0 then "-2 " + sep(" ", squote(read_twos)) else ""} \ + ~{if length(read_twos) > 0 then "-1 " + sep(" ", squote(read_one_fastqs_gz)) + " -2 " + sep(" ", squote(read_twos)) else "-r " + sep(" ", squote(read_one_fastqs_gz))} \ --validateMappings \ -p "$n_cores" \ --numBootstraps ~{num_bootstraps} \ diff --git a/tools/test/salmon.yaml b/tools/test/salmon.yaml index a4bed68c9..34853876b 100644 --- a/tools/test/salmon.yaml +++ b/tools/test/salmon.yaml @@ -14,10 +14,20 @@ quant: salmon_index_tar_gz: - salmon/salmon_index.tar.gz read_one_fastqs_gz: - - - salmon/reads_R1.fastq.gz + - - fastqs/test_R1.fq.gz read_two_fastqs_gz: - - - salmon/reads_R2.fastq.gz + - - fastqs/test_R2.fq.gz assertions: outputs: quant_results_tar_gz: - - Name: reads_R1.tar.gz + - Name: test_R1.fq.gz.tar.gz + - name: quantifies_single_end_reads + inputs: + salmon_index_tar_gz: + - salmon/salmon_index.tar.gz + read_one_fastqs_gz: + - - fastqs/test_R1.fq.gz + assertions: + outputs: + quant_results_tar_gz: + - Name: test_R1.fq.gz.tar.gz \ No newline at end of file From 634d615da9ef948a15426eb6c6f358206a6609a5 Mon Sep 17 00:00:00 2001 From: Priyanka Date: Tue, 18 Aug 2026 17:36:44 +0530 Subject: [PATCH 6/9] Require non-empty array for read_one_fastqs_gz --- tools/salmon.wdl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/salmon.wdl b/tools/salmon.wdl index 1d7e58ce3..5d5cf1d37 100644 --- a/tools/salmon.wdl +++ b/tools/salmon.wdl @@ -174,7 +174,7 @@ task quant { input { File salmon_index_tar_gz - Array[File] read_one_fastqs_gz + Array[File]+ read_one_fastqs_gz Array[File]? read_two_fastqs_gz String lib_type = "A" String prefix = basename(read_one_fastqs_gz[0], ".fastq.gz") From a94ad228c5ffc85c03adfa84017ca26fd26e8019 Mon Sep 17 00:00:00 2001 From: Priyanka Date: Tue, 18 Aug 2026 17:39:54 +0530 Subject: [PATCH 7/9] Expose validateMappings as a Boolean input --- tools/salmon.wdl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/salmon.wdl b/tools/salmon.wdl index 5d5cf1d37..08ab2e8ea 100644 --- a/tools/salmon.wdl +++ b/tools/salmon.wdl @@ -94,6 +94,10 @@ task quant { description: "Prefix for the Salmon quantification output. The extension `.tar.gz` will be added.", group: "Common", } + validate_mappings: { + description: "Validate mappings using an alignment-based verification step.", + group: "Salmon Options", + } num_bootstraps: { description: "Salmon has the ability to optionally compute bootstrapped abundance estimates.", help: "This is done by resampling (with replacement) from the counts assigned to the fragment equivalence classes, and then re-running the optimization procedure for each such sample.", @@ -178,6 +182,7 @@ task quant { Array[File]? read_two_fastqs_gz String lib_type = "A" String prefix = basename(read_one_fastqs_gz[0], ".fastq.gz") + Boolean validate_mappings = true Int num_bootstraps = 0 Float incompat_prior = 0.0 Int range_factorization_bins = 4 @@ -221,7 +226,7 @@ task quant { -i salmon_index \ -l "~{lib_type}" \ ~{if length(read_twos) > 0 then "-1 " + sep(" ", squote(read_one_fastqs_gz)) + " -2 " + sep(" ", squote(read_twos)) else "-r " + sep(" ", squote(read_one_fastqs_gz))} \ - --validateMappings \ + ~{if validate_mappings then "--validateMappings" else ""} \ -p "$n_cores" \ --numBootstraps ~{num_bootstraps} \ --incompatPrior ~{incompat_prior} \ From 4405eb014692205d3b3fbbf375a3670c1f3ecad0 Mon Sep 17 00:00:00 2001 From: Priyanka Date: Tue, 18 Aug 2026 17:46:53 +0530 Subject: [PATCH 8/9] Expose decoy-aware indexing as an optional input on build_salmon_index --- tools/salmon.wdl | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/tools/salmon.wdl b/tools/salmon.wdl index 08ab2e8ea..369b940f0 100644 --- a/tools/salmon.wdl +++ b/tools/salmon.wdl @@ -10,6 +10,11 @@ task build_salmon_index { parameter_meta { transcripts_fasta: "FASTA format file containing the reference transcriptome to index" + decoys_fasta: { + description: "Optional FASTA file containing decoy genome sequences to improve mapping specificity.", + help: "Per Salmon's recommended decoy-aware indexing workflow.", + group: "Common", + } index_name: { description: "Name for the output index, in compressed archive format. The suffix `.tar.gz` will be added.", group: "Common", @@ -30,6 +35,7 @@ task build_salmon_index { input { File transcripts_fasta + File? decoys_fasta String index_name = "salmon_index" Boolean use_all_cores = false Int ncpu = 4 @@ -49,9 +55,16 @@ task build_salmon_index { n_cores=$(nproc) fi + gentrome="~{transcripts_fasta}" + + ~{if defined(decoys_fasta) then "grep \"^>\" " + select_first([decoys_fasta]) + " | cut -d \" \" -f1 | sed \"s/^>//\" > decoys.txt" else ""} + ~{if defined(decoys_fasta) then "cat " + transcripts_fasta + " " + select_first([decoys_fasta]) + " > gentrome.fasta" else ""} + ~{if defined(decoys_fasta) then "gentrome=gentrome.fasta" else ""} + salmon index \ - -t "~{transcripts_fasta}" \ + -t "$gentrome" \ -i "~{index_name}" \ + ~{if defined(decoys_fasta) then "-d decoys.txt" else ""} \ -p "$n_cores" tar -czf "~{salmon_index_filename}" "~{index_name}" From ad33e2620d08f90018c3c6ceeaecdbe42f848b6c Mon Sep 17 00:00:00 2001 From: Priyanka Date: Tue, 18 Aug 2026 17:50:04 +0530 Subject: [PATCH 9/9] Make memory allocation dynamic for both tasks, based on input size --- tools/salmon.wdl | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/tools/salmon.wdl b/tools/salmon.wdl index 369b940f0..c77beaac5 100644 --- a/tools/salmon.wdl +++ b/tools/salmon.wdl @@ -31,6 +31,10 @@ task build_salmon_index { description: "Add to or subtract from dynamic disk space allocation. Default disk size is determined by the size of the inputs. Specified in GB.", group: "Resources", } + modify_memory_gb: { + description: "Add to or subtract from dynamic memory allocation. Default memory is determined by the size of the inputs. Specified in GB.", + group: "Resources", + } } input { @@ -40,6 +44,7 @@ task build_salmon_index { Boolean use_all_cores = false Int ncpu = 4 Int modify_disk_size_gb = 0 + Int modify_memory_gb = 0 } String salmon_index_filename = index_name + ".tar.gz" @@ -76,7 +81,7 @@ task build_salmon_index { runtime { cpu: ncpu - memory: "8 GB" + memory: "~{ceil(transcripts_fasta_size * 4) + 4 + modify_memory_gb} GB" disks: "~{disk_size_gb} GB" container: "quay.io/biocontainers/salmon:1.9.0--h7e5ed60_0" maxRetries: 1 @@ -187,6 +192,10 @@ task quant { description: "Add to or subtract from dynamic disk space allocation. Default disk size is determined by the size of the inputs. Specified in GB.", group: "Resources", } + modify_memory_gb: { + description: "Add to or subtract from dynamic memory allocation. Default memory is determined by the size of the inputs. Specified in GB.", + group: "Resources", + } } input { @@ -213,6 +222,7 @@ task quant { Boolean use_all_cores = false Int ncpu = 4 Int modify_disk_size_gb = 0 + Int modify_memory_gb = 0 } Array[File] read_twos = select_first([read_two_fastqs_gz, []]) @@ -221,6 +231,7 @@ task quant { Float read_two_size = size(read_twos, "GB") Float index_size = size(salmon_index_tar_gz, "GB") Int disk_size_gb = ceil((read_one_size + read_two_size + index_size) * 3) + 10 + modify_disk_size_gb + Int memory_gb = ceil(index_size * 4) + 8 + modify_memory_gb command <<< set -euo pipefail @@ -266,7 +277,7 @@ task quant { runtime { cpu: ncpu - memory: "16 GB" + memory: "~{memory_gb} GB" disks: "~{disk_size_gb} GB" container: "quay.io/biocontainers/salmon:1.9.0--h7e5ed60_0" maxRetries: 1