Skip to content

fix(star): star_delete_fastq_after_alignment = false keeps the reads (v0.1.19) - #37

Merged
alejandrogzi merged 1 commit into
mainfrom
v0.1.19
Oct 25, 2026
Merged

alejandrogzi merged 1 commit into
mainfrom
v0.1.19

Conversation

@alejandrogzi

Copy link
Copy Markdown
Member

Why

star_delete_fastq_after_alignment = false had no effect. The STAR and ruSTAR subworkflows passed params.star_delete_fastq_after_alignment ?: true, and Groovy's ?: turns false into true, so the second pass always deleted its input reads.

This matters beyond disk. Each read step deletes its input, which is the output of an earlier task. After a failure, -resume finds those outputs gone and reruns everything from trimming on. On HLdesRot15A spleen (9 samples), xORF's BLAST step failed on an orf panic, and the resume reran 19,153 of 19,177 tasks (1 h 37 min). The panic itself is fixed in hillerlab/xorf#30; modules/xorf moves to that release separately.

Changes

  • subworkflows/star_alignment, subworkflows/rustar_alignment: pass params.star_delete_fastq_after_alignment as set. The default stays true in nextflow.config.
  • subworkflows/metassembly: BQTOOLS_DECODE (STAR with CBQ reads) and BQTOOLS_ENCODE_ALIGN (bqtools_encode_before_alignment) deleted deacon's output unconditionally. They now follow the same flag, so with false the reads that reach the aligner are kept in every format.
  • assets/docs/usage.md (4.6): what each step deletes, and the switches -resume needs. Every other deletion already had a working keep switch: deacon_keep_fastp_fastq, beaver_keep_aletsch_gtf, bigtools_keep_bedgraph, wigtools_keep_bigwig and wigtobigwig_keep_wig.
  • nextflow.config: version 0.1.19. Changelog.md: 0.1.19 entry.

With the defaults, the same files are deleted as before.

Testing

  • nextflow config -flat for test, test-sb, test-tm, test-polish, test-rustar and test-bqc-star.
  • -profile test-bqc-star,docker, which covers bqc, STAR and the CBQ decode step. Each run used Nextflow 25.10.4 on a clean export that includes the xorf submodule:
Settings verify.py golden numbers Read files left in work/ Then -resume
Defaults pass only the 2 encoded input .cbq; the bqc, deacon and decode outputs are deleted, as before –
deacon_keep_fastp_fastq = true, star_delete_fastq_after_alignment = false pass all: input, bqc and deacon .cbq, decoded FASTQ pairs 29 cached; 28 rerun from RENAME_GTF on (beaver deleted its GTFs); the 4 coverage tasks skipped
all six keep switches pass all 61 of 61 cached, none rerun

The middle row is why the usage section lists every switch. With bigtools_keep_bedgraph left out, the cached STAR task has lost its bedGraph, and the resumed run skips coverage without an error.

The STAR and ruSTAR subworkflows passed
`params.star_delete_fastq_after_alignment ?: true`, and Groovy's ?: turns
false into true, so the second pass always deleted its input reads. Pass
the value as set.

That flag also decides for the bqtools decode/encode step just before the
aligner (BQTOOLS_DECODE, BQTOOLS_ENCODE_ALIGN), which deleted deacon's
output unconditionally. Each step deletes its input, the output of an
earlier task, so -resume after a failure could not reuse anything from
trimming on: resuming the failed HLdesRot15A spleen run reran 19,153 of
19,177 tasks. Every other such deletion already has a keep switch. With
all of them set (deacon_keep_fastp_fastq, star_delete_fastq_after_alignment
= false, beaver_keep_aletsch_gtf, bigtools_keep_bedgraph,
wigtools_keep_bigwig, wigtobigwig_keep_wig), a resumed test-bqc-star run
reuses all 61 tasks. The defaults still delete.

Bump to 0.1.19; usage (what each step deletes, what -resume needs) and
Changelog.
@alejandrogzi
alejandrogzi merged commit 5c70cd6 into main Oct 25, 2026
2 checks passed
@alejandrogzi
alejandrogzi deleted the v0.1.19 branch October 25, 2026 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant