Tracking issue for the longitudinal pipeline refactor leading up to release.
Supersedes: #201, #153, #190, #200
Closes on land: #254, #282, #297 (Stage 0)
Follow-ups filed: #302 (noit=True spike), #303 (cross-sectional QC viz), #304 (longitudinal QC viz)
Goal
Restructure the longitudinal pipeline into a clean submodule tree (cli/longitudinal/, workflows/longitudinal/, bids/longitudinal/, orchestration/longitudinal/) mirroring cross-sectional, with a rbc longitudinal <stage> CLI (plus rbc long alias) and full test coverage.
Full working plan in internal docs.
Target CLI
rbc longitudinal template INPUT_DIR [...] -o OUTPUT_DIR --fs-license PATH
rbc longitudinal anatomical INPUT_DIR [...] -o OUTPUT_DIR
rbc longitudinal functional INPUT_DIR [...] -o OUTPUT_DIR [--regressor ...]
rbc longitudinal metrics INPUT_DIR [...] -o OUTPUT_DIR [--atlas ... --fwhm ...]
rbc longitudinal qc INPUT_DIR [...] -o OUTPUT_DIR
rbc longitudinal all INPUT_DIR [...] -o OUTPUT_DIR
rbc long is a subparser alias. Cross-sectional CLI unchanged.
Stages (each = one PR)
Testing (per-stage acceptance criteria, not a separate stage)
- Unit —
tests/unit/{bids,cli,orchestration,core}/test_longitudinal_*.py
- Integration (<5 min) —
tests/integration/longitudinal/
- Integration, slow — stage-by-stage vs
rbc longitudinal all parity
- Full pipeline —
tests/full_pipeline/longitudinal/ session-scoped fixture
Fixture
OpenNeuro ds000114 ("Test-Retest Reliability"). One subject, two sessions (ses-test, ses-retest), T1w + task-fingerfootlips BOLD per session. CC0, ~300 MB subset. Fetched via download_fixture.sh (using aws s3 --no-sign-request), cached in CI via actions/cache keyed on the script hash.
Task BOLD (not rest) is acceptable — the pipeline doesn't branch on task label. HNU1 is the rest-state fallback if ever needed. NKI is disqualified (auth required). Non-numeric ses-test/ses-retest labels require an explicit unit test since current code assumes nothing about ses format.
Decisions (resolved)
Non-goals
- Cross-sectional CLI changes
crosssectional/ submodule peer — asymmetry is intentional
- Any third processing tier (group-level etc.)
Tracking issue for the longitudinal pipeline refactor leading up to release.
Supersedes: #201, #153, #190, #200
Closes on land: #254, #282, #297 (Stage 0)
Follow-ups filed: #302 (noit=True spike), #303 (cross-sectional QC viz), #304 (longitudinal QC viz)
Goal
Restructure the longitudinal pipeline into a clean submodule tree (
cli/longitudinal/,workflows/longitudinal/,bids/longitudinal/,orchestration/longitudinal/) mirroring cross-sectional, with arbc longitudinal <stage>CLI (plusrbc longalias) and full test coverage.Full working plan in internal docs.
Target CLI
rbc longis a subparser alias. Cross-sectional CLI unchanged.Stages (each = one PR)
bids/longitudinal.pyandorchestration/longitudinal.py, extractlongitudinal_processfromworkflows/{anatomical,functional}.pyinto*/longitudinal/submodules. No re-export shims (no external importers — verified by grep). Atomic update.rbc longitudinal templatesubcommand replacesscripts/build_robust_template.py(deleted). Usesrbc.core.fsl2itkandrbc.bids. Fixes per-subject volume bug. Renames xfm convention tofrom-<ses>_to-longitudinal_xfm(spike confirmedBids.expect()supports this).noit=Trueported as-is (see Evaluate noit=True in longitudinal robust template generation #302).cli/longitudinal/*.pywithlongalias. Delete--anatomical --functionalflag shape.--fs-license/FS_LICENSEenv plumbing.rbc longitudinal allchains all four stages in-memory. Visualization deferred to Cross-sectional QC visualization pipeline #303/Longitudinal QC visualization pipeline #304.docs/data_dictionary.md, release notes.Testing (per-stage acceptance criteria, not a separate stage)
tests/unit/{bids,cli,orchestration,core}/test_longitudinal_*.pytests/integration/longitudinal/rbc longitudinal allparitytests/full_pipeline/longitudinal/session-scoped fixtureFixture
OpenNeuro ds000114 ("Test-Retest Reliability"). One subject, two sessions (
ses-test,ses-retest), T1w +task-fingerfootlipsBOLD per session. CC0, ~300 MB subset. Fetched viadownload_fixture.sh(usingaws s3 --no-sign-request), cached in CI viaactions/cachekeyed on the script hash.Task BOLD (not rest) is acceptable — the pipeline doesn't branch on task label. HNU1 is the rest-state fallback if ever needed. NKI is disqualified (auth required). Non-numeric
ses-test/ses-retestlabels require an explicit unit test since current code assumes nothing about ses format.Decisions (resolved)
longalias (not boolean flags)Co-authored-bynoit=Trueas-is, follow-up issue for quality spike (Evaluate noit=True in longitudinal robust template generation #302)Non-goals
crosssectional/submodule peer — asymmetry is intentional