diff --git a/docs/changes/newsfragments/320.change b/docs/changes/newsfragments/320.change new file mode 100644 index 000000000..75659ba92 --- /dev/null +++ b/docs/changes/newsfragments/320.change @@ -0,0 +1 @@ +Change all ``probseg_`` types to ``VBM_`` types by `Fede Raimondo`_ diff --git a/docs/changes/newsfragments/320.fix b/docs/changes/newsfragments/320.fix new file mode 100644 index 000000000..3b4291a39 --- /dev/null +++ b/docs/changes/newsfragments/320.fix @@ -0,0 +1 @@ +Add a validation step on the :func:`.run` function to validate the marker collection by `Fede Raimondo`_ \ No newline at end of file diff --git a/junifer/api/functions.py b/junifer/api/functions.py index 32eab948f..3132d1553 100644 --- a/junifer/api/functions.py +++ b/junifer/api/functions.py @@ -165,6 +165,8 @@ def run( preprocessors=built_preprocessors, storage=storage_object, ) + mc.validate(datagrabber_object) + # Fit elements with datagrabber_object: if elements is not None: diff --git a/junifer/configs/juseless/datagrabbers/tests/test_ucla.py b/junifer/configs/juseless/datagrabbers/tests/test_ucla.py index ae9b3c519..5a2bd7a9c 100644 --- a/junifer/configs/juseless/datagrabbers/tests/test_ucla.py +++ b/junifer/configs/juseless/datagrabbers/tests/test_ucla.py @@ -29,9 +29,9 @@ def test_JuselessUCLA() -> None: "BOLD", "BOLD_confounds", "T1w", - "probseg_CSF", - "probseg_GM", - "probseg_WM", + "VBM_CSF", + "VBM_GM", + "VBM_WM", ] for t in types: @@ -45,12 +45,12 @@ def test_JuselessUCLA() -> None: "BOLD", "BOLD_confounds", "T1w", - "probseg_CSF", - "probseg_GM", - "probseg_WM", + "VBM_CSF", + "VBM_GM", + "VBM_WM", ["BOLD", "BOLD_confounds"], - ["T1w", "probseg_CSF"], - ["probseg_GM", "probseg_WM"], + ["T1w", "VBM_CSF"], + ["VBM_GM", "VBM_WM"], ["BOLD", "T1w"], ], ) diff --git a/junifer/configs/juseless/datagrabbers/ucla.py b/junifer/configs/juseless/datagrabbers/ucla.py index 2a4e26fa9..1b5b3fd15 100644 --- a/junifer/configs/juseless/datagrabbers/ucla.py +++ b/junifer/configs/juseless/datagrabbers/ucla.py @@ -23,8 +23,8 @@ class JuselessUCLA(PatternDataGrabber): datadir : str or Path, optional The directory where the dataset is stored. (default "/data/project/psychosis_thalamus/data/fmriprep"). - types: {"BOLD", "BOLD_confounds", "T1w", "probseg_CSF", "probseg_GM", \ - "probseg_WM"} or a list of the options, optional + types: {"BOLD", "BOLD_confounds", "T1w", "VBM_CSF", "VBM_GM", \ + "VBM_WM"} or a list of the options, optional UCLA data types. If None, all available data types are selected. (default None). tasks : {"rest", "bart", "bht", "pamenc", "pamret", \ @@ -91,21 +91,21 @@ class JuselessUCLA(PatternDataGrabber): ), "space": "MNI152NLin2009cAsym", }, - "probseg_CSF": { + "VBM_CSF": { "pattern": ( "sub-{subject}/anat/sub-{subject}_T1w_space-" "MNI152NLin2009cAsym_class-CSF_probtissue.nii.gz" ), "space": "MNI152NLin2009cAsym", }, - "probseg_GM": { + "VBM_GM": { "pattern": ( "sub-{subject}/anat/sub-{subject}_T1w_space-" "MNI152NLin2009cAsym_class-GM_probtissue.nii.gz" ), "space": "MNI152NLin2009cAsym", }, - "probseg_WM": { + "VBM_WM": { "pattern": ( "sub-{subject}/anat/sub-{subject}_T1w_space" "-MNI152NLin2009cAsym_class-WM_probtissue.nii.gz" diff --git a/junifer/datagrabber/aomic/id1000.py b/junifer/datagrabber/aomic/id1000.py index a6f28ac4a..ba6d0cd42 100644 --- a/junifer/datagrabber/aomic/id1000.py +++ b/junifer/datagrabber/aomic/id1000.py @@ -24,8 +24,8 @@ class DataladAOMICID1000(PatternDataladDataGrabber): The directory where the datalad dataset will be cloned. If None, the datalad dataset will be cloned into a temporary directory (default None). - types: {"BOLD", "BOLD_confounds", "T1w", "probseg_CSF", "probseg_GM", \ - "probseg_WM", "DWI"} or a list of the options, optional + types: {"BOLD", "BOLD_confounds", "T1w", "VBM_CSF", "VBM_GM", \ + "VBM_WM", "DWI"} or a list of the options, optional AOMIC data types. If None, all available data types are selected. (default None). native_t1w : bool, optional @@ -84,7 +84,7 @@ class DataladAOMICID1000(PatternDataladDataGrabber): ), "space": "MNI152NLin2009cAsym", }, - "probseg_CSF": { + "VBM_CSF": { "pattern": ( "derivatives/fmriprep/sub-{subject}/anat/" "sub-{subject}_space-MNI152NLin2009cAsym_label-" @@ -92,7 +92,7 @@ class DataladAOMICID1000(PatternDataladDataGrabber): ), "space": "MNI152NLin2009cAsym", }, - "probseg_GM": { + "VBM_GM": { "pattern": ( "derivatives/fmriprep/sub-{subject}/anat/" "sub-{subject}_space-MNI152NLin2009cAsym_label-" @@ -100,7 +100,7 @@ class DataladAOMICID1000(PatternDataladDataGrabber): ), "space": "MNI152NLin2009cAsym", }, - "probseg_WM": { + "VBM_WM": { "pattern": ( "derivatives/fmriprep/sub-{subject}/anat/" "sub-{subject}_space-MNI152NLin2009cAsym_label-" diff --git a/junifer/datagrabber/aomic/piop1.py b/junifer/datagrabber/aomic/piop1.py index b21d5a2ff..1b6ed8281 100644 --- a/junifer/datagrabber/aomic/piop1.py +++ b/junifer/datagrabber/aomic/piop1.py @@ -26,8 +26,8 @@ class DataladAOMICPIOP1(PatternDataladDataGrabber): The directory where the datalad dataset will be cloned. If None, the datalad dataset will be cloned into a temporary directory (default None). - types: {"BOLD", "BOLD_confounds", "T1w", "probseg_CSF", "probseg_GM", \ - "probseg_WM", "DWI"} or a list of the options, optional + types: {"BOLD", "BOLD_confounds", "T1w", "VBM_CSF", "VBM_GM", \ + "VBM_WM", "DWI"} or a list of the options, optional AOMIC data types. If None, all available data types are selected. (default None). tasks : {"restingstate", "anticipation", "emomatching", "faces", \ @@ -119,7 +119,7 @@ class DataladAOMICPIOP1(PatternDataladDataGrabber): ), "space": "MNI152NLin2009cAsym", }, - "probseg_CSF": { + "VBM_CSF": { "pattern": ( "derivatives/fmriprep/sub-{subject}/anat/" "sub-{subject}_space-MNI152NLin2009cAsym_label-" @@ -127,7 +127,7 @@ class DataladAOMICPIOP1(PatternDataladDataGrabber): ), "space": "MNI152NLin2009cAsym", }, - "probseg_GM": { + "VBM_GM": { "pattern": ( "derivatives/fmriprep/sub-{subject}/anat/" "sub-{subject}_space-MNI152NLin2009cAsym_label-" @@ -135,7 +135,7 @@ class DataladAOMICPIOP1(PatternDataladDataGrabber): ), "space": "MNI152NLin2009cAsym", }, - "probseg_WM": { + "VBM_WM": { "pattern": ( "derivatives/fmriprep/sub-{subject}/anat/" "sub-{subject}_space-MNI152NLin2009cAsym_label-" diff --git a/junifer/datagrabber/aomic/piop2.py b/junifer/datagrabber/aomic/piop2.py index eeb5ab235..593b4709c 100644 --- a/junifer/datagrabber/aomic/piop2.py +++ b/junifer/datagrabber/aomic/piop2.py @@ -26,8 +26,8 @@ class DataladAOMICPIOP2(PatternDataladDataGrabber): The directory where the datalad dataset will be cloned. If None, the datalad dataset will be cloned into a temporary directory (default None). - types: {"BOLD", "BOLD_confounds", "T1w", "probseg_CSF", "probseg_GM", \ - "probseg_WM", "DWI"} or a list of the options, optional + types: {"BOLD", "BOLD_confounds", "T1w", "VBM_CSF", "VBM_GM", \ + "VBM_WM", "DWI"} or a list of the options, optional AOMIC data types. If None, all available data types are selected. (default None). tasks : {"restingstate", "stopsignal", "workingmemory"} \ @@ -116,7 +116,7 @@ class DataladAOMICPIOP2(PatternDataladDataGrabber): ), "space": "MNI152NLin2009cAsym", }, - "probseg_CSF": { + "VBM_CSF": { "pattern": ( "derivatives/fmriprep/sub-{subject}/anat/" "sub-{subject}_space-MNI152NLin2009cAsym_label-" @@ -124,7 +124,7 @@ class DataladAOMICPIOP2(PatternDataladDataGrabber): ), "space": "MNI152NLin2009cAsym", }, - "probseg_GM": { + "VBM_GM": { "pattern": ( "derivatives/fmriprep/sub-{subject}/anat/" "sub-{subject}_space-MNI152NLin2009cAsym_label-" @@ -132,7 +132,7 @@ class DataladAOMICPIOP2(PatternDataladDataGrabber): ), "space": "MNI152NLin2009cAsym", }, - "probseg_WM": { + "VBM_WM": { "pattern": ( "derivatives/fmriprep/sub-{subject}/anat/" "sub-{subject}_space-MNI152NLin2009cAsym_label-" diff --git a/junifer/datagrabber/aomic/tests/test_id1000.py b/junifer/datagrabber/aomic/tests/test_id1000.py index 57793f985..115cc2b27 100644 --- a/junifer/datagrabber/aomic/tests/test_id1000.py +++ b/junifer/datagrabber/aomic/tests/test_id1000.py @@ -71,41 +71,41 @@ def test_DataladAOMICID1000() -> None: # asserts T1w_mask assert out["T1w_mask"]["path"].exists() - # asserts type "probseg_CSF" - assert "probseg_CSF" in out + # asserts type "VBM_CSF" + assert "VBM_CSF" in out assert ( - out["probseg_CSF"]["path"].name + out["VBM_CSF"]["path"].name == f"sub-{test_element}_space-MNI152NLin2009cAsym_label-" "CSF_probseg.nii.gz" ) - assert out["probseg_CSF"]["path"].exists() - assert out["probseg_CSF"]["path"].is_file() + assert out["VBM_CSF"]["path"].exists() + assert out["VBM_CSF"]["path"].is_file() - # asserts type "probseg_GM" - assert "probseg_GM" in out + # asserts type "VBM_GM" + assert "VBM_GM" in out assert ( - out["probseg_GM"]["path"].name + out["VBM_GM"]["path"].name == f"sub-{test_element}_space-MNI152NLin2009cAsym_label-" "GM_probseg.nii.gz" ) - assert out["probseg_GM"]["path"].exists() - assert out["probseg_GM"]["path"].is_file() + assert out["VBM_GM"]["path"].exists() + assert out["VBM_GM"]["path"].is_file() - # asserts type "probseg_WM" - assert "probseg_WM" in out + # asserts type "VBM_WM" + assert "VBM_WM" in out assert ( - out["probseg_WM"]["path"].name + out["VBM_WM"]["path"].name == f"sub-{test_element}_space-MNI152NLin2009cAsym_label-" "WM_probseg.nii.gz" ) - assert out["probseg_WM"]["path"].exists() - assert out["probseg_WM"]["path"].is_file() + assert out["VBM_WM"]["path"].exists() + assert out["VBM_WM"]["path"].is_file() # asserts type "DWI" assert "DWI" in out @@ -132,13 +132,13 @@ def test_DataladAOMICID1000() -> None: "BOLD", "BOLD_confounds", "T1w", - "probseg_CSF", - "probseg_GM", - "probseg_WM", + "VBM_CSF", + "VBM_GM", + "VBM_WM", "DWI", ["BOLD", "BOLD_confounds"], - ["T1w", "probseg_CSF"], - ["probseg_GM", "probseg_WM"], + ["T1w", "VBM_CSF"], + ["VBM_GM", "VBM_WM"], ["DWI", "BOLD"], ], ) diff --git a/junifer/datagrabber/aomic/tests/test_piop1.py b/junifer/datagrabber/aomic/tests/test_piop1.py index 90e64593f..2ec980772 100644 --- a/junifer/datagrabber/aomic/tests/test_piop1.py +++ b/junifer/datagrabber/aomic/tests/test_piop1.py @@ -91,41 +91,41 @@ def test_DataladAOMICPIOP1(tasks: Optional[str]) -> None: # asserts T1w_mask assert out["T1w_mask"]["path"].exists() - # asserts type "probseg_CSF" - assert "probseg_CSF" in out + # asserts type "VBM_CSF" + assert "VBM_CSF" in out assert ( - out["probseg_CSF"]["path"].name + out["VBM_CSF"]["path"].name == f"sub-{sub}_space-MNI152NLin2009cAsym_label-" "CSF_probseg.nii.gz" ) - assert out["probseg_CSF"]["path"].exists() - assert out["probseg_CSF"]["path"].is_file() + assert out["VBM_CSF"]["path"].exists() + assert out["VBM_CSF"]["path"].is_file() - # asserts type "probseg_GM" - assert "probseg_GM" in out + # asserts type "VBM_GM" + assert "VBM_GM" in out assert ( - out["probseg_GM"]["path"].name + out["VBM_GM"]["path"].name == f"sub-{sub}_space-MNI152NLin2009cAsym_label-" "GM_probseg.nii.gz" ) - assert out["probseg_GM"]["path"].exists() - assert out["probseg_GM"]["path"].is_file() + assert out["VBM_GM"]["path"].exists() + assert out["VBM_GM"]["path"].is_file() - # asserts type "probseg_WM" - assert "probseg_WM" in out + # asserts type "VBM_WM" + assert "VBM_WM" in out assert ( - out["probseg_WM"]["path"].name + out["VBM_WM"]["path"].name == f"sub-{sub}_space-MNI152NLin2009cAsym_label-" "WM_probseg.nii.gz" ) - assert out["probseg_WM"]["path"].exists() - assert out["probseg_WM"]["path"].is_file() + assert out["VBM_WM"]["path"].exists() + assert out["VBM_WM"]["path"].is_file() # asserts type "DWI" assert "DWI" in out @@ -149,13 +149,13 @@ def test_DataladAOMICPIOP1(tasks: Optional[str]) -> None: "BOLD", "BOLD_confounds", "T1w", - "probseg_CSF", - "probseg_GM", - "probseg_WM", + "VBM_CSF", + "VBM_GM", + "VBM_WM", "DWI", ["BOLD", "BOLD_confounds"], - ["T1w", "probseg_CSF"], - ["probseg_GM", "probseg_WM"], + ["T1w", "VBM_CSF"], + ["VBM_GM", "VBM_WM"], ["DWI", "BOLD"], ], ) diff --git a/junifer/datagrabber/aomic/tests/test_piop2.py b/junifer/datagrabber/aomic/tests/test_piop2.py index b3d74a5b6..252009f15 100644 --- a/junifer/datagrabber/aomic/tests/test_piop2.py +++ b/junifer/datagrabber/aomic/tests/test_piop2.py @@ -85,41 +85,41 @@ def test_DataladAOMICPIOP2(tasks: Optional[str]) -> None: # asserts T1w_mask assert out["T1w_mask"]["path"].exists() - # asserts type "probseg_CSF" - assert "probseg_CSF" in out + # asserts type "VBM_CSF" + assert "VBM_CSF" in out assert ( - out["probseg_CSF"]["path"].name + out["VBM_CSF"]["path"].name == f"sub-{sub}_space-MNI152NLin2009cAsym_label-" "CSF_probseg.nii.gz" ) - assert out["probseg_CSF"]["path"].exists() - assert out["probseg_CSF"]["path"].is_file() + assert out["VBM_CSF"]["path"].exists() + assert out["VBM_CSF"]["path"].is_file() - # asserts type "probseg_GM" - assert "probseg_GM" in out + # asserts type "VBM_GM" + assert "VBM_GM" in out assert ( - out["probseg_GM"]["path"].name + out["VBM_GM"]["path"].name == f"sub-{sub}_space-MNI152NLin2009cAsym_label-" "GM_probseg.nii.gz" ) - assert out["probseg_GM"]["path"].exists() - assert out["probseg_GM"]["path"].is_file() + assert out["VBM_GM"]["path"].exists() + assert out["VBM_GM"]["path"].is_file() - # asserts type "probseg_WM" - assert "probseg_WM" in out + # asserts type "VBM_WM" + assert "VBM_WM" in out assert ( - out["probseg_WM"]["path"].name + out["VBM_WM"]["path"].name == f"sub-{sub}_space-MNI152NLin2009cAsym_label-" "WM_probseg.nii.gz" ) - assert out["probseg_WM"]["path"].exists() - assert out["probseg_WM"]["path"].is_file() + assert out["VBM_WM"]["path"].exists() + assert out["VBM_WM"]["path"].is_file() # asserts type "DWI" assert "DWI" in out @@ -143,13 +143,13 @@ def test_DataladAOMICPIOP2(tasks: Optional[str]) -> None: "BOLD", "BOLD_confounds", "T1w", - "probseg_CSF", - "probseg_GM", - "probseg_WM", + "VBM_CSF", + "VBM_GM", + "VBM_WM", "DWI", ["BOLD", "BOLD_confounds"], - ["T1w", "probseg_CSF"], - ["probseg_GM", "probseg_WM"], + ["T1w", "VBM_CSF"], + ["VBM_GM", "VBM_WM"], ["DWI", "BOLD"], ], ) diff --git a/junifer/datagrabber/dmcc13_benchmark.py b/junifer/datagrabber/dmcc13_benchmark.py index e8d747f8b..f3c5fb69b 100644 --- a/junifer/datagrabber/dmcc13_benchmark.py +++ b/junifer/datagrabber/dmcc13_benchmark.py @@ -25,8 +25,8 @@ class DMCC13Benchmark(PatternDataladDataGrabber): The directory where the datalad dataset will be cloned. If None, the datalad dataset will be cloned into a temporary directory (default None). - types: {"BOLD", "BOLD_confounds", "T1w", "probseg_CSF", "probseg_GM", \ - "probseg_WM"} or a list of the options, optional + types: {"BOLD", "BOLD_confounds", "T1w", "VBM_CSF", "VBM_GM", \ + "VBM_WM"} or a list of the options, optional DMCC data types. If None, all available data types are selected. (default None). sessions: {"wave1bas", "wave1pro", "wave1rea"} or list of the options, \ @@ -181,21 +181,21 @@ class DMCC13Benchmark(PatternDataladDataGrabber): ), "space": "MNI152NLin2009cAsym", }, - "probseg_CSF": { + "VBM_CSF": { "pattern": ( "derivatives/fmriprep-1.3.2/sub-{subject}/anat/" "sub-{subject}_space-MNI152NLin2009cAsym_label-CSF_probseg.nii.gz" ), "space": "MNI152NLin2009cAsym", }, - "probseg_GM": { + "VBM_GM": { "pattern": ( "derivatives/fmriprep-1.3.2/sub-{subject}/anat/" "sub-{subject}_space-MNI152NLin2009cAsym_label-GM_probseg.nii.gz" ), "space": "MNI152NLin2009cAsym", }, - "probseg_WM": { + "VBM_WM": { "pattern": ( "derivatives/fmriprep-1.3.2/sub-{subject}/anat/" "sub-{subject}_space-MNI152NLin2009cAsym_label-WM_probseg.nii.gz" diff --git a/junifer/datagrabber/tests/test_dmcc13_benchmark.py b/junifer/datagrabber/tests/test_dmcc13_benchmark.py index cb7bb3d46..35caa998e 100644 --- a/junifer/datagrabber/tests/test_dmcc13_benchmark.py +++ b/junifer/datagrabber/tests/test_dmcc13_benchmark.py @@ -95,9 +95,9 @@ def test_DMCC13Benchmark( "BOLD", "BOLD_confounds", "BOLD_mask", - "probseg_CSF", - "probseg_GM", - "probseg_WM", + "VBM_CSF", + "VBM_GM", + "VBM_WM", "T1w", "T1w_mask", ] @@ -159,18 +159,18 @@ def test_DMCC13Benchmark( ("BOLD", False), ("T1w", True), ("T1w", False), - ("probseg_CSF", True), - ("probseg_CSF", False), - ("probseg_GM", True), - ("probseg_GM", False), - ("probseg_WM", True), - ("probseg_WM", False), + ("VBM_CSF", True), + ("VBM_CSF", False), + ("VBM_GM", True), + ("VBM_GM", False), + ("VBM_WM", True), + ("VBM_WM", False), (["BOLD", "BOLD_confounds"], True), (["BOLD", "BOLD_confounds"], False), - (["T1w", "probseg_CSF"], True), - (["T1w", "probseg_CSF"], False), - (["probseg_GM", "probseg_WM"], True), - (["probseg_GM", "probseg_WM"], False), + (["T1w", "VBM_CSF"], True), + (["T1w", "VBM_CSF"], False), + (["VBM_GM", "VBM_WM"], True), + (["VBM_GM", "VBM_WM"], False), ], ) def test_DMCC13Benchmark_partial_data_access( diff --git a/junifer/datagrabber/utils.py b/junifer/datagrabber/utils.py index 643be198d..f93564eb4 100644 --- a/junifer/datagrabber/utils.py +++ b/junifer/datagrabber/utils.py @@ -51,15 +51,7 @@ PATTERNS_SCHEMA = { "mandatory": ["pattern", "space"], "optional": [], }, - "probseg_CSF": { - "mandatory": ["pattern", "space"], - "optional": [], - }, - "probseg_GM": { - "mandatory": ["pattern", "space"], - "optional": [], - }, - "probseg_WM": { + "VBM_CSF": { "mandatory": ["pattern", "space"], "optional": [], }, diff --git a/junifer/markers/parcel_aggregation.py b/junifer/markers/parcel_aggregation.py index 62d09050b..a97abfa1d 100644 --- a/junifer/markers/parcel_aggregation.py +++ b/junifer/markers/parcel_aggregation.py @@ -42,8 +42,8 @@ class ParcelAggregation(BaseMarker): The specification of the masks to apply to regions before extracting signals. Check :ref:`Using Masks ` for more details. If None, will not apply any mask (default None). - on : {"T1w", "BOLD", "VBM_GM", "VBM_WM", "fALFF", "GCOR", "LCOR"} \ - or list of the options, optional + on : {"T1w", "T2w", "BOLD", "VBM_GM", "VBM_WM", "VBM_CSF", "fALFF", \ + "GCOR", "LCOR"} or list of the options, optional The data types to apply the marker to. If None, will work on all available data (default None). name : str, optional @@ -102,7 +102,17 @@ class ParcelAggregation(BaseMarker): The list of data types that can be used as input for this marker. """ - return ["T1w", "BOLD", "VBM_GM", "VBM_WM", "fALFF", "GCOR", "LCOR"] + return [ + "T1w", + "T2w", + "BOLD", + "VBM_GM", + "VBM_WM", + "VBM_CSF", + "fALFF", + "GCOR", + "LCOR", + ] def get_output_type(self, input_type: str) -> str: """Get output type. @@ -124,7 +134,14 @@ class ParcelAggregation(BaseMarker): """ - if input_type in ["VBM_GM", "VBM_WM", "fALFF", "GCOR", "LCOR"]: + if input_type in [ + "VBM_GM", + "VBM_WM", + "VBM_CSF", + "fALFF", + "GCOR", + "LCOR", + ]: return "vector" elif input_type == "BOLD": return "timeseries" diff --git a/junifer/markers/sphere_aggregation.py b/junifer/markers/sphere_aggregation.py index e8eec9c73..a1ccc1cb8 100644 --- a/junifer/markers/sphere_aggregation.py +++ b/junifer/markers/sphere_aggregation.py @@ -47,8 +47,8 @@ class SphereAggregation(BaseMarker): The specification of the masks to apply to regions before extracting signals. Check :ref:`Using Masks ` for more details. If None, will not apply any mask (default None). - on : {"T1w", "BOLD", "VBM_GM", "VBM_WM", "fALFF", "GCOR", "LCOR"} or \ - list of the options, optional + on : {"T1w", "T2w", "BOLD", "VBM_GM", "VBM_WM", "VBM_CSF", "fALFF", \ + "GCOR", "LCOR"} or list of the options, optional The data types to apply the marker to. If None, will work on all available data (default None). name : str, optional @@ -109,7 +109,17 @@ class SphereAggregation(BaseMarker): The list of data types that can be used as input for this marker. """ - return ["T1w", "BOLD", "VBM_GM", "VBM_WM", "fALFF", "GCOR", "LCOR"] + return [ + "T1w", + "T2w", + "BOLD", + "VBM_GM", + "VBM_WM", + "VBM_CSF", + "fALFF", + "GCOR", + "LCOR", + ] def get_output_type(self, input_type: str) -> str: """Get output type. @@ -131,7 +141,14 @@ class SphereAggregation(BaseMarker): """ - if input_type in ["VBM_GM", "VBM_WM", "fALFF", "GCOR", "LCOR"]: + if input_type in [ + "VBM_GM", + "VBM_WM", + "VBM_CSF", + "fALFF", + "GCOR", + "LCOR", + ]: return "vector" elif input_type == "BOLD": return "timeseries" diff --git a/junifer/preprocess/warping/space_warper.py b/junifer/preprocess/warping/space_warper.py index 18b9e9cca..cdfccf1d0 100644 --- a/junifer/preprocess/warping/space_warper.py +++ b/junifer/preprocess/warping/space_warper.py @@ -34,8 +34,8 @@ class SpaceWarper(BasePreprocessor): type like ``"T1w"`` or a template space like ``"MNI152NLin2009cAsym"``. Use ``"T1w"`` for native space warping and named templates for template space warping. - on : {"T1w", "BOLD", "VBM_GM", "VBM_WM", "fALFF", "GCOR", "LCOR"} or list \ - of the options + on : {"T1w", "T2w", "BOLD", "VBM_GM", "VBM_WM", "VBM_CSF", "fALFF", \ + "GCOR", "LCOR"} or list of the options The data type to warp. Raises @@ -98,7 +98,17 @@ class SpaceWarper(BasePreprocessor): preprocessor. """ - return ["T1w", "BOLD", "VBM_GM", "VBM_WM", "fALFF", "GCOR", "LCOR"] + return [ + "T1w", + "T2w", + "BOLD", + "VBM_GM", + "VBM_WM", + "VBM_CSF", + "fALFF", + "GCOR", + "LCOR", + ] def get_output_type(self, input_type: str) -> str: """Get output type.