-
Notifications
You must be signed in to change notification settings - Fork 299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RF: Upgrade nitransforms and remove workarounds #3378
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3378 +/- ##
==========================================
+ Coverage 71.70% 72.06% +0.35%
==========================================
Files 57 57
Lines 4259 4231 -28
Branches 640 456 -184
==========================================
- Hits 3054 3049 -5
+ Misses 1090 1067 -23
Partials 115 115 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Co-authored-by: Chris Markiewicz <[email protected]>
We need a recent fix for loading older ANTs transforms to make init_alt_bold_std_trans_wf work See nipreps/fmriprep#3378
* Halfpipe recipe with requirements from requirements.in * Explicitly mention a variant configuration file to add via -m flag * Wrong spacing in runtime requirements of halfpipe * Use mamba name for line_profiler * Check what are the actually installed packages and where are they * Check available mamba environments * Refactor stages of Dockerfile, simplify install process, explain rationale of stages * Parametrize Dockerfile * Define fmriprep version before FROM statements * Ensure ARG is available in 1st stage * Pin datalad to a specific version because of incompatibility with sqlite * First mamba update installs libsqlite, which conflicts with sqlite * Dockerfile fix * Check sqlite version on final stage * Traits was getting built with python 3.10 * Pin svgutils in niworkflows recipe * Add dependency of ICA_AROMA.py and niflow * Delete legacy Shell script and .txt files * Remove extra loop * Add recipes for new fmriprep * Attempt build with fmriprep 24.0.1 * Set original fmriprep version * Remove unnecessary sqlite checks * Remove all recipes for 24.0.1 build * Recipes for fmriprep version 24.0.1 * Add channel to build command since meta.yaml doesnt support custom channels * Backport check_pes * Downgrade fsl-fugue * conda-verify version was pushing python 3.12 * Pin libzlib in rmath recipe because default conflicts with fsl-flameo * Start fixing AFNI * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix missing attribute error on macOS * Fix exiting on recipe build error * Add afni recipe * Recipe for fmripost_aroma, include fsl-melodic in halfpipe requirements * Make output of afni build less verbose to not obscure output of other builds * Add 3dBlurToFWHM command from afni * Fixed test_resolve * Solve missing argument for _get_wf_name() * Fix IndexError and several connection errors * Begin setting up test_fsldir * Re-try setting FSLDIR in Dockerfile * Adapt logic for new staged build * Fix nireports * Correct syntax * Sdcflows needs migas so we need to copy it in the Dockerfile * Add channel to fmriprep RUN command so it can find FSL packages * Remove from recipe to fix No repodata found for channel problem * Add global FSL channel * Add symlink to /fslversion file * Pin libzilb in conda_config, adapt halfpipe recipe to new location, correct mypy crashes * Pin halfpipe to python 3.11 * Add nipype patch to correct location of fslversion file * Install stage also needs access to FSL channel * Pin libzlib in conda install command as well * Downgrade mamba * echo version into fslversion file * Link and echo into Docker * Show number sections must be larger than 0 error * Take out breakpoint * Change regular expression to match new single subject workflow name in fmriprep 24 * Add logger warnings before connections are made to facilitate debugging * Solve KeySelect issue, improved logging for debugging, fixed assertion searching for non-existent workflow * Add logging for anat_fit * Fix first missing inputs error * Fixed missing input fixed_image, now missing the moving_image * Solved missing moving_image and fixed_image in alt_bold_std_trans_wf.bold_volumetric_resample_trans_wf.gen_ref * Change select_std.inputs.key * Solved missing moving_image and problem in fmriprep_adapter * Try accessing normalized T1w through datasinks * Try accessing through anat_reports, not datasink * Try accessing results from template_iterator_wf * Connect explicitly with anat_fit_wf.anat_reports_wf.t1w_std and anat_fit_wf.anat_reports_wf.mask_std * Connect through connect_attr instead of connect method * Revert datasink connection * forgot to add one part of hierarchy * Small changes * Comment out select_std node of anat reports * Flatten Merge node output to solve trait error * Hard-code tmp_path for test_feature_extraction to re-use outputs across test runs during manual debugging. We should revert this before merging * Flatten list of transforms * Bump fmriprep to recent master We need a recent fix for loading older ANTs transforms to make init_alt_bold_std_trans_wf work See nipreps/fmriprep#3378 * Smriprep needs to be updated because we updated fmriprep more * Nitransforms needs to be updated as well because new fmriprep requires it * We need to update the search string with new fmriprep version during configuration of Factory * Fmripost_aroma also needs to be updated to use new nitransforms * New ValueError: MNI152NLin2009cAsym_res-2 is not in list * Add code snippet idea * Add another template for debugging * Find right connections up to std_dseg, a substitute for spatial_reference remains to be found * Enable two output spaces to see what happens * Create _connect_inputs method in FmriprepAdapterFactory so fmriprep_adapter_wf can have access to things outside of post_processing_Wf * Fix Node calc_median_vals, 'in_file' trait of a PlotRegistrationInputSpec, and others * Solve in_file problem of fmriprep_adapter_wf * clean up * Fix docker build * Fix recipe for fmripost-aroma * Fixed aroma_rpt node by squeezing new mask, and fed right confound files to aroma wf * Add afni 3dTstat * Add fsl-feat5 to halfpipe recipe * Add afni 3dReHo * Add afni 3dReHo to dependencies * Add fsl film_gls * Add afni 3dcalc * Substitute 3dcalc by our own nib interace since 3dcalc was acting up * Include nib import in compute_falff * add new TestSettings with scrubbing, change aCompCor to c_comp_cor so we get the same confounds after fmriprep change * Change number of fmriprep version to reflect the one we are actually using * Set argument as 24.1.0 because 24.2.0 is still in development * Match version number in recipe folder * Version of fmripost_aroma was hardcoded in dockerfile * correct all hardcoded paths. change ci/cd so only test consistency is ran * Add comments and fix typing issues * Fix disable tqdm in child processes * Fix find paths * Add all relevant .json sidecars * Found typo in simpleScrubbingGSR * show logs for one of the dataset that breaks * Fix for datasets that include sessions in the subworkflow names * Fix test_smoothing * Remove old recipes * Remove debug statements and leftover comments * Refactor falff to be safe against division by zero * Fix find_paths * Fix fsldir for new env location * Simplify dockerfile * Remove uneeded recipes * Fix field maps wip * Bump fmriprep * Fix traits error * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.9.4 → v0.9.6](astral-sh/ruff-pre-commit@v0.9.4...v0.9.6) - [github.com/pre-commit/mirrors-mypy: v1.14.1 → v1.15.0](pre-commit/mirrors-mypy@v1.14.1...v1.15.0) * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.9.6 → v0.9.7](astral-sh/ruff-pre-commit@v0.9.6...v0.9.7) * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.9.7 → v0.9.9](astral-sh/ruff-pre-commit@v0.9.7...v0.9.9) * Fix missing space for text input with suggestions * Fix typing * Remove exponential backoff * Prepare release 1.2.3 * Fix falff import reduce in function * Rephrase ui field map types * Fix falff use absolute path * Add test for falff --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Lea Waller <[email protected]>
25.0.0 (March 25, 2025) New feature release in the 25.0.x series. This release substantially improves support for pre-computed derivatives. Previous releases would miss some derivatives and rerun the computations. Note that derivatives from previous versions will be accepted, so it should not be necessary to recompute derivatives from previous versions. The recommended command line is:: fmriprep BIDS_DIR OUT_DIR participant --derivatives fmriprep=PRECOMP_DIR Note that multiple derivatives can be specified, for example:: fmriprep BIDS_DIR OUT_DIR participant \ anat=PRECOMPUTED_ANATOMICAL_DIR \ func=PRECOMPUTED_FUNCTIONAL_DIR When the same file is found in multiple derivatives, the last one found takes precedence. Additionally, `--force-*` flags have been consolidated into a single `--force` flag that can take multiple, space-separated arguments. Structural processing changes ----------------------------- We now output white, pial and midthickness fsLR meshes on the subject surface. Look for `sub-<subject>_hemi-<L|R>_space-fsLR_*_<surf>.surf.gii` files. Brain extraction has been modified slightly to more closely match the `antsBrainExtraction.sh` workflow distributed by ANTs. The impact should be minimal, but in rare cases this fixes a crash. Fieldmap processing changes --------------------------- SyN-SDC fieldmap filtering is now single-level, following the improvements for gradient-echo fieldmaps in 24.1. Jacobian-weighting during fieldmap unwarping is now on by default *only* for PEPolar fieldmaps. To enable for other fieldmap types, use `--force fieldmap-jacobian`. All merged pull requests ------------------------ * FIX: Detect and apply precomputed fieldmaps (#3439) * FIX: Calculate bold mask and dummy scans in transform-only runs (#3428) * FIX: Use consistent skull-stripping pre- and post- SDC (#3415) * FIX: Use removeprefix instead of lstrip or ternary operator (#3409) * FIX: Listify sessions when generating reports (#3408) * FIX: Ensure fieldmap is resampled correctly in report (#3387) * FIX: Stop excluding FS minc_modify_header used during fallback registration (#3372) * FIX: Repair and test query for precalculated baseline/boldref files (#3370) * FIX: Repair search for precomputed transforms (#3369) * ENH: Enable Jacobians only for PEPOLAR by default, allow forcing (#3443) * ENH: Create `--force` flag that accepts a list, replacing individual `--force-*` flags (#3442) * ENH: Output fsLR meshes on subject surfaces (#3411) * ENH: Flexibilize "sophisticated" pepolar to allow monomodal execution (#3393) * ENH: Update FSL packages for reported bug fixes (#3374) * RF: Calculate RMSD from motion transforms (#3427) * RF: Reconstruct motion confounds from minimal derivatives (#3424) * RF: Replace deprecated pkgutil.find_loader (#3384) * RF: Upgrade nitransforms and remove workarounds (#3378) * DOC: Fix xfm extension in the outputs docs (#3435) * DOC: Mention fMRIPost-AROMA in parser documentation (#3356) * MNT: Remove CLI flags with expired deprecation periods (#3445) * MNT: Update pinned environment (#3440) * MNT: Bump pins, update RTD config (#3425) * MNT: Declare linux/amd64 platform during Docker build (#3422) * MNT: Bump astral-sh/setup-uv from 4 to 5 (#3417) * MNT: Test support for Python 3.13 (#3416) * MNT: Install Workbench CLI via conda (#3410) * MNT: Update minimum dependencies, test with tox-uv (#3412) * MNT: Install c3d through conda (#3382) * CI: Fetch tags and 200 commits to support describe (#3381) * CI: Build docker images in GHA, store cache inline and push to GHCR (#3380)
I've manually verified that
load_ants_h5()
can be replaced withnitransforms.manip.load()
and that this does the right thing, and that usingnitransforms.apply(xfm, moving, target)
does indeed get me basically the same thing as ANTs.