Skip to content

Add C-PAC vs RBC comparison script#169

Draft
nx10 wants to merge 1 commit into
mainfrom
add/comparison-script
Draft

Add C-PAC vs RBC comparison script#169
nx10 wants to merge 1 commit into
mainfrom
add/comparison-script

Conversation

@nx10
Copy link
Copy Markdown
Contributor

@nx10 nx10 commented Mar 16, 2026

Adds scripts/compare_cpac_rbc.py, used to generate the validation report shared in the internal source code release email.

Compares 17 output pairs across anatomical, functional, metrics, and QC categories. Supports a --manifest flag to read pipeline test output paths from .last_run.json directly.

Compares pipeline outputs step-by-step (Dice for masks, spatial
correlation for volumes, per-column correlation for regressors,
element-wise correlation for connectivity matrices). Generates a
markdown report with figures and a terminal summary.

Supports both glob-based file discovery and manifest mode
(--manifest tests/full_pipeline/.last_run.json) for comparing
against raw pipeline test outputs.
@github-actions
Copy link
Copy Markdown

Coverage

Coverage Report
FileStmtsMissCoverMissing
src/rbc
   __init__.py10100% 
   context.py351848%68, 81–84, 115, 127–130, 134, 139–141, 143–144, 157–158
src/rbc/cli
   __init__.py80100% 
   all.py1120100% 
   anatomical.py550100% 
   base.py330100% 
   functional.py670100% 
   longitudinal.py81297%197, 213
   main.py420100% 
   metrics.py750100% 
   qc.py670100% 
   query.py340100% 
src/rbc/core
   __init__.py30100% 
   bids2table.py523140%126, 132–136, 138–152, 154, 156, 158–160, 166–170
   bids.py5050100% 
   common.py25868%62, 69–70, 82, 85–88
   fileops.py27485%69–72
   nifti.py192597%236–237, 244–245, 524
   niwrap.py320100% 
src/rbc/core/anatomical
   __init__.py40100% 
   registration.py14471%45, 137, 152, 167
   segmentation.py24866%61, 71–73, 89, 111, 122, 138
src/rbc/core/functional
   __init__.py130100% 
   coregistration.py7271%44, 55
   despiking.py70100% 
   distortion.py1304069%269–271, 321, 324, 332–335, 341–346, 349, 352–353, 356, 365–369, 375–376, 387–388, 391, 397, 443–444, 447, 455, 461, 470–471, 474, 484, 491
   initialization.py9188%63
   mask_utils.py723156%55, 100, 105, 113, 129, 131, 133, 135–137, 139–142, 168, 170, 172, 174–177, 181–184, 188–192, 196
   masking.py342526%53, 55–56, 58–59, 62–65, 69, 91, 134, 183, 197, 208, 223, 233, 249, 258, 271, 285, 296, 306, 319, 328
   motion.py571868%65, 69, 124–125, 135–138, 159, 169, 171–172, 175, 177–179, 181, 183
   nuisance.py946530%87, 89–94, 96, 98–99, 102, 105–107, 109–111, 113–119, 121–125, 127, 164, 166, 168, 171–172, 174–176, 179–180, 182–183, 185, 188, 191–192, 195–197, 200–203, 207, 213–215, 217, 246, 254, 280, 289, 318, 327, 333
   regressors.py89693%148, 178, 308–311
   resampling.py373116%54–56, 58, 60–61, 65–66, 69–70, 82, 84–85, 121–123, 125, 127, 129–130, 135–137, 141–142, 145–146, 153, 165, 167–168
   timing.py160100% 
src/rbc/core/longitudinal
   __init__.py10100% 
   transform.py100100% 
src/rbc/core/metrics
   __init__.py30100% 
   alff.py92198%270
   reho.py660100% 
   smoothing.py7357%36, 42–43
   standardization.py271159%64, 66–68, 70, 72–75, 77–78
   timeseries.py57198%120
src/rbc/core/qc
   __init__.py60100% 
   dvars.py260100% 
   motion.py310100% 
   registration.py410100% 
   xcp.py410100% 
src/rbc/workflows
   __init__.py100100% 
   anatomical.py371364%68–73, 75, 135–138, 140–141
   functional.py663546%96–97, 105, 110–111, 119, 176, 179, 182, 185, 188, 191–193, 203–204, 214–215, 220, 223, 231, 238, 245, 252, 255–257, 260, 272, 284, 290, 299, 307–308, 312
   metrics.py311067%79, 84, 87–89, 92–94, 98, 100
   qc.py442836%80–81, 84, 87, 90–94, 97–99, 102, 111–113, 117–120, 122–125, 128, 145, 151, 153
src/rbc_resources
   __init__.py300100% 
TOTAL267940185% 

Tests Skipped Failures Errors Time
696 0 💤 0 ❌ 0 🔥 3m 51s ⏱️

@nx10 nx10 marked this pull request as draft March 17, 2026 00:38
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