Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
f9fb924
:necktie: :wrench: Add 'organism' to pipeline config
shnizzedy May 9, 2025
aa17291
:necktie: Restore nhp FNIRT logic
shnizzedy May 9, 2025
d7b2403
:package: Link `libcrypt.so.2` for `csh`
shnizzedy May 11, 2025
81d0b6e
fixup! 🐛 Fix `TypeError: unsupported operand type(s) for -: 'NoneType…
shnizzedy May 12, 2025
6b7056d
:coffin: Remove support for AFNI ECM < v21.1.1
shnizzedy May 13, 2025
e30d68a
:bug: Link inputs for `mask_sbref`
shnizzedy May 18, 2025
17e68b7
fixup! fixup! 🐛 Fix `TypeError: unsupported operand type(s) for -: 'N…
shnizzedy May 19, 2025
354d485
:twisted_rightwards_arrows: Merge branch 'develop' into 'organism'
shnizzedy May 19, 2025
59d6787
:white_check_mark: Stack parametrize
shnizzedy May 20, 2025
c80cc72
:art: Define `__bool__` for `DatetimeWithSafeNone`
shnizzedy May 20, 2025
9ce335e
:recycle: Don't fork motion reference inputs
shnizzedy May 20, 2025
36fed9d
:bug: Fix circular import
shnizzedy May 20, 2025
5b55f9c
:bug: Handle ISO-format datetime strings
shnizzedy May 21, 2025
946bf28
fixup! :recycle: Don't fork motion reference inputs
shnizzedy May 21, 2025
e59868b
:bug: "regressors" → "desc-confounds_timeseries"
shnizzedy May 21, 2025
a08f167
:bug: "regressors" → "desc-confounds_timeseries"
shnizzedy May 21, 2025
2799c29
:twisted_rightwards_arrows: Merge branch 'datetime-none' into 'organism'
shnizzedy May 21, 2025
5054ffa
:art: Combine get_cpac_provenance + check_prov_for_regtool → reg_tool
shnizzedy Feb 5, 2025
53a5de1
:art: Add type-checking to func_motion
shnizzedy May 22, 2025
741b06f
:recycle: Refactor motion connections
shnizzedy May 24, 2025
6141a7b
:bug: Fix QC movement parameters connection
shnizzedy May 27, 2025
4c6accf
:bug: Don't convert non-datetimes to datetime
shnizzedy May 27, 2025
c7ccec9
:bug: Fix dvars_after connection
shnizzedy May 27, 2025
62621e5
:wastebasket: Deprecate "motion_estimates" config option
shnizzedy Jun 4, 2025
f711ef8
:pencil2: Fix schema imports
shnizzedy Jun 4, 2025
c93f393
:arrow_up: Upgrade `voluptuous`@0.15.2
shnizzedy Jun 4, 2025
887b887
:white_check_mark: Test `Deprecated` schema option
shnizzedy Jun 5, 2025
1c7eddc
:bug: Motion after mask
shnizzedy Jun 5, 2025
5f7c37a
:bug: Remove extra inputs
shnizzedy Jun 5, 2025
eaffeb7
:necktie: Resequence motion
shnizzedy Jun 6, 2025
ca554ba
:white_check_mark: Update `test_NodeBlock_option_SSOT`
shnizzedy Jun 6, 2025
8447e31
fixup! :necktie: Resequence motion
shnizzedy Jun 6, 2025
6781aae
fixup! fixup! :necktie: Resequence motion
shnizzedy Jun 9, 2025
f0fe92c
fixup! fixup! fixup! :necktie: Resequence motion
shnizzedy Jun 11, 2025
4ad669f
:test_tube: Add test for default-type bandpass filter
shnizzedy Jun 13, 2025
44f7e0e
:necktie: Skip test with OSF data if no API key
shnizzedy Jun 13, 2025
af9fc25
:twisted_rightwards_arrows: Merge branch 'fix/ideal_bandpass' into 'o…
shnizzedy Jun 13, 2025
71395a1
:white_check_mark: Set wd for test wf
shnizzedy Jun 13, 2025
58c84ee
:truck: Move `test_ants_registration_connector` → `test_registration_…
shnizzedy Jun 13, 2025
3507933
:truck: Move `test_fsl_registration_connector` → `test_registration_c…
shnizzedy Jun 13, 2025
b2529b9
:technologist: Clarify estimate vs. correction node names
shnizzedy Jun 13, 2025
eb6a291
:truck: Consolidate registration connector tests
shnizzedy Jun 13, 2025
e798b43
:construction_worker: Pass `$OSF_DATA` to docker
shnizzedy Jun 13, 2025
07b33ec
:bulb: Update comments re: PR
shnizzedy Jun 13, 2025
0166416
:twisted_rightwards_arrows: Merge branch 'develop' into `organism`
shnizzedy Jun 13, 2025
703642c
:twisted_rightwards_arrows: Merge remote-tracking branch 'origin/deve…
shnizzedy Jun 13, 2025
df16687
:twisted_rightwards_arrows: Merge 'develop' into 'organism'
shnizzedy Jun 14, 2025
29d5e31
:pencil2: Correct method call name
shnizzedy Jun 18, 2025
d887e9d
:twisted_rightwards_arrows: Merge branch 'develop' into 'organism'
shnizzedy Jun 19, 2025
1ca5677
:pencil2: Remove duplicate library link
shnizzedy Jun 19, 2025
2afdf21
:pencil2: Quote typechecking type
shnizzedy Jun 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ commands:
coverage-file: .coverage.docker${VARIANT}
- run:
name: Running pytest in Docker image
command: docker exec --user $(id -u) docker_test /bin/bash /code/dev/circleci_data/test_in_image.sh
command: docker exec -e OSF_DATA --user $(id -u) docker_test /bin/bash /code/dev/circleci_data/test_in_image.sh
set-python-version:
steps:
- restore_cache:
Expand Down
38 changes: 19 additions & 19 deletions .github/Dockerfiles/base-lite.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2023 C-PAC Developers
# Copyright (C) 2023-2025 C-PAC Developers

# This file is part of C-PAC.

Expand All @@ -14,12 +14,12 @@

# You should have received a copy of the GNU Lesser General Public
# License along with C-PAC. If not, see <https://www.gnu.org/licenses/>.
FROM ghcr.io/fcp-indi/c-pac/afni:23.3.09-jammy as AFNI
FROM ghcr.io/fcp-indi/c-pac/ants:2.4.3-jammy as ANTs
FROM ghcr.io/fcp-indi/c-pac/c3d:1.0.0-jammy as c3d
FROM ghcr.io/fcp-indi/c-pac/connectome-workbench:1.5.0.neurodebian-jammy as connectome-workbench
FROM ghcr.io/fcp-indi/c-pac/fsl:6.0.6.5-jammy as FSL
FROM ghcr.io/fcp-indi/c-pac/ica-aroma:0.4.4-beta-jammy as ICA-AROMA
FROM ghcr.io/fcp-indi/c-pac/afni:23.3.09-jammy AS afni
FROM ghcr.io/fcp-indi/c-pac/ants:2.4.3-jammy AS ants
FROM ghcr.io/fcp-indi/c-pac/c3d:1.0.0-jammy AS c3d
FROM ghcr.io/fcp-indi/c-pac/connectome-workbench:1.5.0.neurodebian-jammy AS connectome-workbench
FROM ghcr.io/fcp-indi/c-pac/fsl:6.0.6.5-jammy AS fsl
FROM ghcr.io/fcp-indi/c-pac/ica-aroma:0.4.4-beta-jammy AS ica-aroma

FROM ghcr.io/fcp-indi/c-pac/ubuntu:jammy-non-free
LABEL org.opencontainers.image.description="NOT INTENDED FOR USE OTHER THAN AS A STAGE IMAGE IN A MULTI-STAGE BUILD \
Expand Down Expand Up @@ -47,11 +47,11 @@ ENV FSLTCLSH=$FSLDIR/bin/fsltclsh \
PATH=${FSLDIR}/bin:$PATH \
TZ=America/New_York \
USER=c-pac_user
COPY --from=FSL /lib/x86_64-linux-gnu /lib/x86_64-linux-gnu
COPY --from=FSL /usr/lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu
COPY --from=FSL /usr/bin /usr/bin
COPY --from=FSL /usr/local/bin /usr/local/bin
COPY --from=FSL /usr/share/fsl /usr/share/fsl
COPY --from=fsl /lib/x86_64-linux-gnu /lib/x86_64-linux-gnu
COPY --from=fsl /usr/lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu
COPY --from=fsl /usr/bin /usr/bin
COPY --from=fsl /usr/local/bin /usr/local/bin
COPY --from=fsl /usr/share/fsl /usr/share/fsl

# Installing C-PAC dependencies
COPY requirements.txt /opt/requirements.txt
Expand All @@ -67,10 +67,10 @@ ENV C3DPATH /opt/c3d
ENV PATH $C3DPATH/bin:$PATH

# Installing AFNI
COPY --from=AFNI /lib/x86_64-linux-gnu/ld* /lib/x86_64-linux-gnu/
COPY --from=AFNI /lib/x86_64-linux-gnu/lib*so* /lib/x86_64-linux-gnu/
COPY --from=AFNI /lib64/ld* /lib64/
COPY --from=AFNI /opt/afni/ /opt/afni/
COPY --from=afni /lib/x86_64-linux-gnu/ld* /lib/x86_64-linux-gnu/
COPY --from=afni /lib/x86_64-linux-gnu/lib*so* /lib/x86_64-linux-gnu/
COPY --from=afni /lib64/ld* /lib64/
COPY --from=afni /opt/afni/ /opt/afni/
# set up AFNI
ENV PATH=/opt/afni:$PATH

Expand All @@ -79,11 +79,11 @@ ENV LANG="en_US.UTF-8" \
LC_ALL="en_US.UTF-8" \
ANTSPATH=/usr/lib/ants/bin \
PATH=/usr/lib/ants/bin:$PATH
COPY --from=ANTs /usr/lib/ants/ /usr/lib/ants/
COPY --from=ANTs /ants_template/ /ants_template/
COPY --from=ants /usr/lib/ants/ /usr/lib/ants/
COPY --from=ants /ants_template/ /ants_template/

# Installing ICA-AROMA
COPY --from=ICA-AROMA /opt/ICA-AROMA/ /opt/ICA-AROMA/
COPY --from=ica-aroma /opt/ICA-AROMA/ /opt/ICA-AROMA/
ENV PATH=/opt/ICA-AROMA:$PATH

# link libraries & clean up
Expand Down
2 changes: 1 addition & 1 deletion .github/Dockerfiles/base-standard.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ COPY dev/docker_data/license.txt $FREESURFER_HOME/license.txt
RUN apt-get autoremove -y \
&& apt-get autoclean -y \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /root/.cache/* \
&& ln -s /usr/lib/x86_64-linux-gnu/libcrypt.so.1 /usr/lib/x86_64-linux-gnu/libcrypt.so.2 \
&& find / -type f -print0 | sort -t/ -k2 | xargs -0 rdfind -makehardlinks true \
&& rm -rf results.txt \
&& cp -l /lib/x86_64-linux-gnu/libcrypt.so.1.1.0 /lib/x86_64-linux-gnu/libcrypt.so.2 \
&& ldconfig \
&& chmod 777 / /home/c-pac_user \
&& chmod 777 $(ls / | grep -v sys | grep -v proc)
Expand Down
16 changes: 16 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
# Copyright (C) 2024 - 2025 C-PAC Developers

# This file is part of C-PAC.

# C-PAC is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.

# C-PAC is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
# License for more details.

# You should have received a copy of the GNU Lesser General Public
# License along with C-PAC. If not, see <https://www.gnu.org/licenses/>.
version: 2
registries:
ghcr:
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `censor_file_path` from `offending_timepoints_connector` in the `build_nuisance_regressor` node.
- Switch `sink_native_transforms` under `registration_workflows` to output all `.mat` files in ANTs and FSL Transforms.
- `deoblique` field in pipeline config with `warp` and `refit` options to apply `3dWarp` or `3drefit` during data initialization.
- `organism` configuration option.

### Changed

Expand Down Expand Up @@ -69,6 +70,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- A bug in the `freesurfer_abcd_preproc` nodeblock where the `Template` image was incorrectly used as `reference` during the `inverse_warp` step. Replacing it with the subject-specific `T1w` image resolved the issue of the `desc-restoreBrain_T1w` being chipped off.
- A bug in `ideal_bandpass` where the frequency mask was incorrectly applied, which caused filter to fail in certain cases.

### Upgraded dependencies

- `voluptuous` 0.13.1 → 0.15.2

### Removed

- Variant image recipes.
Expand All @@ -83,6 +88,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Inputs `[desc-motion_bold, bold]` from `coregistration_prep_vol` nodeblock.
- `input` field from `coregistration` in blank and default config.
- `reg_with_skull` swtich from `func_input_prep` in blank and default config.
- Support for AFNI 3dECM < v21.1.1.
- `calculate_motion_before` and `calculate_motion_after` configuration options.

#### Removed CI dependency

Expand Down
12 changes: 1 addition & 11 deletions CPAC/_entrypoints/run.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env python
# Copyright (C) 2018-2024 C-PAC Developers
# Copyright (C) 2018-2025 C-PAC Developers

# This file is part of C-PAC.

Expand Down Expand Up @@ -729,16 +729,6 @@ def run_main():
args.fail_fast
)

if c["pipeline_setup"]["output_directory"]["quality_control"][
"generate_xcpqc_files"
]:
c["functional_preproc"]["motion_estimates_and_correction"][
"motion_estimates"
]["calculate_motion_first"] = True
c["functional_preproc"]["motion_estimates_and_correction"][
"motion_estimates"
]["calculate_motion_after"] = True

if args.participant_label:
WFLOGGER.info(
"#### Running C-PAC for %s", ", ".join(args.participant_label)
Expand Down
8 changes: 2 additions & 6 deletions CPAC/alff/alff.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright (C) 2012-2024 C-PAC Developers
# Copyright (C) 2012-2025 C-PAC Developers

# This file is part of C-PAC.

Expand All @@ -25,7 +25,6 @@
from CPAC.pipeline.nodeblock import nodeblock
from CPAC.registration.registration import apply_transform
from CPAC.utils.interfaces import Function
from CPAC.utils.utils import check_prov_for_regtool


def create_alff(wf_name="alff_workflow"):
Expand Down Expand Up @@ -320,10 +319,7 @@
def alff_falff_space_template(wf, cfg, strat_pool, pipe_num, opt=None):
outputs = {}
if strat_pool.check_rpool("desc-denoisedNofilt_bold"):
xfm_prov = strat_pool.get_cpac_provenance(
"from-bold_to-template_mode-image_xfm"
)
reg_tool = check_prov_for_regtool(xfm_prov)
reg_tool = strat_pool.reg_tool("from-bold_to-template_mode-image_xfm")

Check warning on line 322 in CPAC/alff/alff.py

View check run for this annotation

Codecov / codecov/patch

CPAC/alff/alff.py#L322

Added line #L322 was not covered by tests

num_cpus = cfg.pipeline_setup["system_config"]["max_cores_per_participant"]

Expand Down
10 changes: 5 additions & 5 deletions CPAC/func_preproc/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2012-2023 C-PAC Developers
# Copyright (C) 2012-2025 C-PAC Developers

# This file is part of C-PAC.

Expand All @@ -19,20 +19,20 @@
from .func_motion import (
calc_motion_stats,
func_motion_correct,
func_motion_correct_only,
func_motion_estimates,
get_motion_ref,
get_motion_refs,
motion_estimate_filter,
stack_motion_blocks,
)
from .func_preproc import get_idx, slice_timing_wf

__all__ = [
"calc_motion_stats",
"func_motion_correct",
"func_motion_correct_only",
"func_motion_estimates",
"get_idx",
"get_motion_ref",
"get_motion_refs",
"motion_estimate_filter",
"slice_timing_wf",
"stack_motion_blocks",
]
Loading