Deterministic tx2gene sample selection in quant_tximport_summarizedexperiment - #1875
Deterministic tx2gene sample selection in quant_tximport_summarizedexperiment#1875pinin4fjords wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
|
Added an empty- Expected failure: the nf-core subworkflow lint check will fail until nf-core/modules#12168 merges, because the local subworkflow copy now carries this guard ahead of the pinned upstream sha. Once #12168 is in, I'll re-sync the |
|
Re-synced to nf-core/modules#12168 (now merged) and bumped the |
…zedexperiment CUSTOM_TX2GENE was fed whichever per-sample quant arrived first, which varies between runs since queue-channel arrival order follows task-completion order. That made tx2gene's input non-deterministic, changing its task hash and breaking -resume for it and everything downstream (TXIMETA_TXIMPORT, the SummarizedExperiment builds). The sample is now chosen by sorting on the staged results name, with a guard for the empty-channel case (toSortedList still emits an empty list, unlike the previous .first() which was a no-op on empty input). Bumps quant_tximport_summarizedexperiment to nf-core/modules#12168, which carries this fix upstream. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
0da4e0a to
3588a45
Compare
|
Closing this, #1885 already bumped |
Description
Bumps the
quant_tximport_summarizedexperimentsubworkflow to pull in nf-core/modules#12166 and nf-core/modules#12168.In
QUANT_TXIMPORT_SUMMARIZEDEXPERIMENT, the quant results fed toCUSTOM_TX2GENEwere selected with.first(). tx2gene only needs a single sample's quant files (it reads them to find which GTF attribute holds the transcript IDs; all samples share a transcriptome), so picking one sample is correct - but.first()picks whichever per-sample quant arrives first, and queue-channel arrival order equals task-completion order, which is non-deterministic across runs.That made
CUSTOM_TX2GENE's input non-deterministic: a different sample'squantdirectory was staged on different runs, the task hash changed, and-resumere-ran tx2gene even when nothing changed. SinceTXIMETA_TXIMPORTand theSummarizedExperimentbuilds depend onCUSTOM_TX2GENE.out.tx2gene, the cache miss cascaded through the subworkflow.The subworkflow now selects the sample deterministically, with a guard for the empty-channel case:
The chosen sample is arbitrary biologically (tx2gene output is identical for any sample sharing the transcriptome), so pipeline outputs and snapshots are unchanged - this only makes the selection reproducible so
-resumeworks. The.filterpreserves the original no-op-on-empty behaviour for runs that invoke the subworkflow with no quant results (e.g. the unused alignment path when only pseudo-alignment runs).Changes
quant_tximport_summarizedexperimentto fix(quant_tximport_summarizedexperiment): guard tx2gene against empty quant_results modules#12168 inmodules.json.main.nfcarries the deterministic, empty-safe selection.PR checklist
nf-core subworkflows lint quant_tximport_summarizedexperimentpasses.tests/kallisto.nf.test --skip_alignment; no pipeline output or snapshot change.🤖 Generated with Claude Code