Skip to content

fix(bbs): one BigBed per 10_final class, named <prefix>.<class>.bb (v0.1.18) - #36

Merged
alejandrogzi merged 1 commit into
mainfrom
v0.1.18
Oct 24, 2026
Merged

alejandrogzi merged 1 commit into
mainfrom
v0.1.18

Conversation

@alejandrogzi

@alejandrogzi alejandrogzi commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Why

11_bbs/ did not match 10_final/:

  • Wrong transcripts. BEDTOBIGBED_STRONG_RTS, BEDTOBIGBED_WEAK_RTS and BEDTOBIGBED_ARTIFACTS converted what each filter kept (STRIP_*.out.hq), not what it removed. On HLangAng1 liver, HLangAng1_no_retentions.bb held 212,189 transcripts, while 10_final/strong_rts holds 11,960.
  • Unclear names. Each BigBed took its channel id: HLangAng1_flnc@HLangAng1_flnc.discard.bb held the truncations, HLangAng1.discard.bb the retentions and HLangAng1.bb the fusions.
  • No NMD track. The NMD-positive transcripts (10_final/nmd) had no BigBed.

Changes

  • subworkflows/polish/main.nf: the strong-RT, weak-RT and artifact tracks sort and convert STRIP_*.out.discard. POLISH emits the sorted NMD bed (SORT_BED_NMD.out.sorted) instead of the unsorted ISOTOOLS_NMD.out.nmd; nothing else consumed that emit.
  • main.nf: BEDTOBIGBED_NMD in FULL_RUN, FROM_POLISHING and FROM_ALIGNMENT.
  • nextflow.config: ext.prefix = "${params.prefix ?: meta.id}.<class>" for each BigBed process, and BEDTOBIGBED_NMD published to 11_bbs. Version 0.1.18.
  • README.md (the 11_bbs tree) and Changelog.md (0.1.18).
Class Before After
Polished transcripts <prefix>_flnc.bb <prefix>.flnc.bb
Truncations <prefix>_flnc@<prefix>_flnc.discard.bb <prefix>.truncations.bb
Intron retentions <prefix>.discard.bb <prefix>.retentions.bb
Strong read-throughs <prefix>_no_retentions.bb (kept set) <prefix>.strong_rts.bb
Weak read-throughs <prefix>_no_retentions_no_strong_rts.bb (kept set) <prefix>.weak_rts.bb
Artifacts <prefix>_no_retentions_no_strong_rts_no_weak_rts.bb (kept set) <prefix>.artifacts.bb
NMD none <prefix>.nmd.bb
Fusions <prefix>.bb <prefix>.fusions.bb
Scraps <prefix>.scraps.bb <prefix>.scraps.bb

fusions.free.bed, the fusion-free set, still gets no BigBed. A class with no transcripts still writes no BigBed, as before.

Testing

  • nextflow config -flat for test, test-sb, test-tm, test-polish, test-rustar and test-bqc-star.
  • -profile test-polish,docker --skip_bb_conversion false --xorf_call_orfs false completes and writes test.flnc.bb.
    • The test data has no read-throughs, artifacts, NMD or fusions.
    • The CI profiles set skip_bb_conversion = true, so CI does not build BigBeds.
  • Real data: --from polish on HLangAng1 blood, chromosome SUPER_19 (4,186 metassembly transcripts, xORF on, production parameters).
    • The run completed in 1 h, and 11_bbs/ holds exactly the nine files below.
    • For each BigBed, bigtools bigbedtobed returns exactly the rows of its 10_final BED.
    • The counts equal the production run's on SUPER_19.
BigBed Items 10_final rows Same rows
HLangAng1.flnc.bb 662 662 yes
HLangAng1.truncations.bb 93 93 yes
HLangAng1.retentions.bb 418 418 yes
HLangAng1.strong_rts.bb 241 241 yes
HLangAng1.weak_rts.bb 8 8 yes
HLangAng1.artifacts.bb 245 245 yes
HLangAng1.nmd.bb 102 102 yes
HLangAng1.fusions.bb 139 139 yes
HLangAng1.scraps.bb 912 912 yes

BEDTOBIGBED_STRONG_RTS, _WEAK_RTS and _ARTIFACTS converted what each strip step kept (STRIP_*.out.hq), not what it removed: on HLangAng1 liver, <prefix>_no_retentions.bb held 212,189 transcripts, while 10_final/strong_rts holds 11,960. Sort and convert STRIP_*.out.discard instead.

BigBed names came from channel ids (<prefix>_flnc@<prefix>_flnc.discard.bb for the truncations, <prefix>.discard.bb for the retentions, <prefix>.bb for the fusions). Set ext.prefix per process to <prefix>.{flnc,truncations,retentions,strong_rts,weak_rts,artifacts,nmd,fusions,scraps}.

NMD-positive transcripts had no BigBed. POLISH now emits the sorted NMD bed, and BEDTOBIGBED_NMD converts it in FULL_RUN, FROM_POLISHING and FROM_ALIGNMENT.

Bump to 0.1.18; README 11_bbs tree and Changelog.
@alejandrogzi
alejandrogzi merged commit 5978327 into main Oct 24, 2026
2 checks passed
@alejandrogzi
alejandrogzi deleted the v0.1.18 branch October 24, 2026 13:31
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