Skip to content

Commit a08f167

Browse files
committed
🐛 "regressors" → "desc-confounds_timeseries"
1 parent 946bf28 commit a08f167

File tree

5 files changed

+44
-20
lines changed

5 files changed

+44
-20
lines changed

CPAC/_entrypoints/run.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env python
2-
# Copyright (C) 2018-2024 C-PAC Developers
2+
# Copyright (C) 2018-2025 C-PAC Developers
33

44
# This file is part of C-PAC.
55

@@ -729,16 +729,6 @@ def run_main():
729729
args.fail_fast
730730
)
731731

732-
if c["pipeline_setup"]["output_directory"]["quality_control"][
733-
"generate_xcpqc_files"
734-
]:
735-
c["functional_preproc"]["motion_estimates_and_correction"][
736-
"motion_estimates"
737-
]["calculate_motion_first"] = True
738-
c["functional_preproc"]["motion_estimates_and_correction"][
739-
"motion_estimates"
740-
]["calculate_motion_after"] = True
741-
742732
if args.participant_label:
743733
WFLOGGER.info(
744734
"#### Running C-PAC for %s", ", ".join(args.participant_label)

CPAC/func_preproc/func_motion.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -751,9 +751,7 @@ def motion_correct_mcflirt(wf, cfg, strat_pool, pipe_num):
751751
}
752752

753753

754-
def motion_correct_connections(
755-
wf, cfg, strat_pool, pipe_num, opt
756-
): # -> tuple[Any, dict[str, tuple[Node, str]]]:
754+
def motion_correct_connections(wf, cfg, strat_pool, pipe_num, opt):
757755
"""Check opt for valid option, then connect that option."""
758756
motion_correct_options = valid_options["motion_correction"]
759757
if opt not in motion_correct_options:

CPAC/pipeline/engine.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414

1515
# You should have received a copy of the GNU Lesser General Public
1616
# License along with C-PAC. If not, see <https://www.gnu.org/licenses/>.
17+
"""C-PAC pipeline engine."""
18+
1719
import ast
1820
import copy
1921
import hashlib
@@ -307,7 +309,7 @@ def regressor_dct(self, cfg) -> dict:
307309
"ingress_regressors."
308310
)
309311
_nr = cfg["nuisance_corrections", "2-nuisance_regression"]
310-
if not hasattr(self, "timeseries"):
312+
if not hasattr(self, "desc-confounds_timeseries"):
311313
if _nr["Regressors"]:
312314
self.regressors = {reg["Name"]: reg for reg in _nr["Regressors"]}
313315
else:

CPAC/qc/pipeline.py

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
# Copyright (C) 2018-2025 C-PAC Developers
2+
3+
# This file is part of C-PAC.
4+
5+
# C-PAC is free software: you can redistribute it and/or modify it under
6+
# the terms of the GNU Lesser General Public License as published by the
7+
# Free Software Foundation, either version 3 of the License, or (at your
8+
# option) any later version.
9+
10+
# C-PAC is distributed in the hope that it will be useful, but WITHOUT
11+
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12+
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
13+
# License for more details.
14+
15+
# You should have received a copy of the GNU Lesser General Public
16+
# License along with C-PAC. If not, see <https://www.gnu.org/licenses/>.
17+
"""C-PAC quality control pipeline."""
18+
119
import pkg_resources as p
220

321
from CPAC.pipeline import nipype_pipeline_engine as pe
@@ -156,7 +174,7 @@ def qc_brain_extraction(wf, cfg, strat_pool, pipe_num, opt=None):
156174

157175

158176
@nodeblock(
159-
name="qc_brain_extraction",
177+
name="qc_T1w_standard",
160178
config=["pipeline_setup", "output_directory", "quality_control"],
161179
switch=["generate_quality_control_images"],
162180
inputs=["space-template_desc-preproc_T1w", "T1w-brain-template"],

CPAC/qc/xcp.py

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
# Copyright (C) 2021-2025 C-PAC Developers
2+
3+
# This file is part of C-PAC.
4+
5+
# C-PAC is free software: you can redistribute it and/or modify it under
6+
# the terms of the GNU Lesser General Public License as published by the
7+
# Free Software Foundation, either version 3 of the License, or (at your
8+
# option) any later version.
9+
10+
# C-PAC is distributed in the hope that it will be useful, but WITHOUT
11+
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12+
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
13+
# License for more details.
14+
15+
# You should have received a copy of the GNU Lesser General Public
16+
# License along with C-PAC. If not, see <https://www.gnu.org/licenses/>.
117
"""
218
Generate XCP-stype quality control files.
319
@@ -439,7 +455,7 @@ def get_entity_part(key):
439455
"space-bold_desc-brain_mask",
440456
["T1w-brain-template-mask", "EPI-template-mask"],
441457
["space-template_desc-bold_mask", "space-EPItemplate_desc-bold_mask"],
442-
"regressors",
458+
"desc-confounds_timeseries",
443459
["T1w-brain-template-funcreg", "EPI-brain-template-funcreg"],
444460
[
445461
"desc-movementParametersUnfiltered_motion",
@@ -458,7 +474,7 @@ def qc_xcp(wf, cfg, strat_pool, pipe_num, opt=None):
458474
# pylint: disable=invalid-name, unused-argument
459475
if cfg[
460476
"nuisance_corrections", "2-nuisance_regression", "run"
461-
] and not strat_pool.check_rpool("regressors"):
477+
] and not strat_pool.check_rpool("desc-confounds_timeseries"):
462478
return wf, {}
463479
bids_info = pe.Node(
464480
Function(
@@ -501,8 +517,8 @@ def qc_xcp(wf, cfg, strat_pool, pipe_num, opt=None):
501517
)
502518
qc_file.inputs.desc = "preproc"
503519
qc_file.inputs.regressors = (
504-
strat_pool.node_data("regressors")
505-
.node.name.split("regressors_")[-1][::-1]
520+
strat_pool.node_data("desc-confounds_timeseries")
521+
.node.name.split("desc-confounds_timeseries_")[-1][::-1]
506522
.split("_", 1)[-1][::-1]
507523
)
508524
bold_to_T1w_mask = pe.Node(

0 commit comments

Comments
 (0)