From 32f4ed1a43a1ff880c1969ac912db4d46e131c73 Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Tue, 10 Oct 2023 14:02:28 -0400 Subject: [PATCH 01/60] Track sources for some outputs. --- xcp_d/interfaces/bids.py | 78 +++++++++++++++++ xcp_d/tests/test_interfaces_bids.py | 27 ++++++ xcp_d/utils/bids.py | 12 +++ xcp_d/utils/utils.py | 8 ++ xcp_d/workflows/base.py | 1 + xcp_d/workflows/bold.py | 17 ++-- xcp_d/workflows/cifti.py | 21 +++-- xcp_d/workflows/concatenation.py | 131 +++++++++++++++++++++++++++- xcp_d/workflows/outputs.py | 53 ++++++++++- 9 files changed, 330 insertions(+), 18 deletions(-) create mode 100644 xcp_d/tests/test_interfaces_bids.py diff --git a/xcp_d/interfaces/bids.py b/xcp_d/interfaces/bids.py index 95b5ae7ef..7e0ff2559 100644 --- a/xcp_d/interfaces/bids.py +++ b/xcp_d/interfaces/bids.py @@ -4,9 +4,19 @@ from bids.layout import Config from nipype import logging +from nipype.interfaces.base import ( + isdefined, + BaseInterfaceInputSpec, + DynamicTraitedSpec, + TraitedSpec, + traits, +) from niworkflows.interfaces.bids import DerivativesDataSink as BaseDerivativesDataSink +from nipype.interfaces.io import add_traits, IOBase from pkg_resources import resource_filename as pkgrf +from xcp_d.utils.utils import _listify + # NOTE: Modified for xcpd's purposes xcp_d_spec = loads(Path(pkgrf("xcp_d", "data/xcp_d_bids_config.json")).read_text()) bids_config = Config.load("bids") @@ -33,3 +43,71 @@ class DerivativesDataSink(BaseDerivativesDataSink): _config_entities = config_entities _config_entities_dict = merged_entities _file_patterns = xcp_d_spec["default_path_patterns"] + + +class _InferBIDSURIsInputSpec(DynamicTraitedSpec, BaseInterfaceInputSpec): + dataset_path = traits.Str(desc="Base directory of dataset.") + dataset_name = traits.Str(desc="Dataset name for BIDS URI.") + + +class _InferBIDSURIsOutputSpec(TraitedSpec): + bids_uris = traits.List(desc="Merged output") + + +def _ravel(in_val): + if not isinstance(in_val, list): + return in_val + + flat_list = [] + for val in in_val: + raveled_val = _ravel(val) + if isinstance(raveled_val, list): + flat_list.extend(raveled_val) + else: + flat_list.append(raveled_val) + + return flat_list + + +class InferBIDSURIs(IOBase): + """Basic interface class to merge inputs into a single list and infer BIDS URIs.""" + + input_spec = _InferBIDSURIsInputSpec + output_spec = _InferBIDSURIsOutputSpec + + def __init__(self, numinputs=0, **inputs): + super().__init__(**inputs) + self._numinputs = numinputs + if numinputs >= 1: + input_names = [f"in{i + 1}" for i in range(numinputs)] + else: + input_names = [] + + add_traits(self.inputs, input_names) + + def _getval(self, idx): + return getattr(self.inputs, f"in{idx + 1}") + + def _list_outputs(self): + outputs = self._outputs().get() + + if self._numinputs < 1: + return outputs + else: + values = [ + self._getval(idx) for idx in range(self._numinputs) if isdefined(self._getval(idx)) + ] + + # Ensure all inputs are lists + lists = [_listify(val) for val in values] + # Flatten list of lists + raw_paths = [item for sublist in lists for item in sublist] + + # Now convert the strings to BIDS URIs + bids_uris = [ + f"bids:{self.inputs.dataset_name}:{str(Path(p).relative_to(self.inputs.dataset_path))}" + for p in raw_paths + ] + + outputs["bids_uris"] = bids_uris + return outputs diff --git a/xcp_d/tests/test_interfaces_bids.py b/xcp_d/tests/test_interfaces_bids.py new file mode 100644 index 000000000..c30628702 --- /dev/null +++ b/xcp_d/tests/test_interfaces_bids.py @@ -0,0 +1,27 @@ +"""Tests for framewise displacement calculation.""" +from xcp_d.interfaces import bids + + +def test_infer_bids_uris(): + """Test InferBIDSURIs.""" + in_files_1 = [ + "/path/to/dset/sub-01/ses-01/func/sub-01_ses-01_task-rest_run-01_bold.nii.gz", + "/path/to/dset/sub-01/ses-01/func/sub-01_ses-01_task-rest_run-02_bold.nii.gz", + ] + in_files_2 = "/path/to/dset/sub-01/ses-01/func/sub-01_ses-01_task-nback_run-01_bold.nii.gz" + + dataset_name = "ds000001" + dataset_path = "/path/to/dset" + infer_bids_uris = bids.InferBIDSURIs( + numinputs=2, + dataset_name=dataset_name, + dataset_path=dataset_path, + ) + infer_bids_uris.inputs.in1 = in_files_1 + infer_bids_uris.inputs.in2 = in_files_2 + out = infer_bids_uris.run() + assert out.outputs.bids_uris == [ + f"bids:{dataset_name}:sub-01/ses-01/func/sub-01_ses-01_task-rest_run-01_bold.nii.gz", + f"bids:{dataset_name}:sub-01/ses-01/func/sub-01_ses-01_task-rest_run-02_bold.nii.gz", + f"bids:{dataset_name}:sub-01/ses-01/func/sub-01_ses-01_task-nback_run-01_bold.nii.gz", + ] diff --git a/xcp_d/utils/bids.py b/xcp_d/utils/bids.py index 1321ab536..2f80b5fb1 100644 --- a/xcp_d/utils/bids.py +++ b/xcp_d/utils/bids.py @@ -697,6 +697,18 @@ def write_dataset_description(fmri_dir, xcpd_dir): dset_desc["GeneratedBy"] = generated_by dset_desc["HowToAcknowledge"] = "Include the generated boilerplate in the methods section." + # Add DatasetLinks + if "DatasetLinks" not in dset_desc.keys(): + dset_desc["DatasetLinks"] = {} + + if "preprocessed" in dset_desc["DatasetLinks"].keys(): + LOGGER.warning("'preprocessed' is already a dataset link. Overwriting.") + dset_desc["DatasetLinks"]["preprocessed"] = fmri_dir + + if "xcp_d" in dset_desc["DatasetLinks"].keys(): + LOGGER.warning("'xcp_d' is already a dataset link. Overwriting.") + dset_desc["DatasetLinks"]["xcp_d"] = xcpd_dir + xcpd_dset_description = os.path.join(xcpd_dir, "dataset_description.json") if os.path.isfile(xcpd_dset_description): with open(xcpd_dset_description, "r") as fo: diff --git a/xcp_d/utils/utils.py b/xcp_d/utils/utils.py index 06397ab3c..d2dd82dc2 100644 --- a/xcp_d/utils/utils.py +++ b/xcp_d/utils/utils.py @@ -499,3 +499,11 @@ def list_to_str(lst): return " and ".join(lst_str) else: return f"{', '.join(lst_str[:-1])}, and {lst_str[-1]}" + + +def _listify(obj): + """Wrap all non-list or tuple objects in a list. + + This provides a simple way to accept flexible arguments. + """ + return obj if isinstance(obj, (list, tuple, type(None), np.ndarray)) else [obj] diff --git a/xcp_d/workflows/base.py b/xcp_d/workflows/base.py index 7620c3c94..a1370660e 100644 --- a/xcp_d/workflows/base.py +++ b/xcp_d/workflows/base.py @@ -715,6 +715,7 @@ def init_subject_wf( postprocess_bold_wf = init_postprocess_bold_wf( bold_file=bold_file, + fmri_dir=fmri_dir, bandpass_filter=bandpass_filter, high_pass=high_pass, low_pass=low_pass, diff --git a/xcp_d/workflows/bold.py b/xcp_d/workflows/bold.py index 2d824ccd6..48a6ecde8 100644 --- a/xcp_d/workflows/bold.py +++ b/xcp_d/workflows/bold.py @@ -30,6 +30,7 @@ @fill_doc def init_postprocess_nifti_wf( bold_file, + fmri_dir, bandpass_filter, high_pass, low_pass, @@ -96,6 +97,7 @@ def init_postprocess_nifti_wf( wf = init_postprocess_nifti_wf( bold_file=bold_file, + fmri_dir=fmri_dir, bandpass_filter=True, high_pass=0.01, low_pass=0.08, @@ -340,8 +342,6 @@ def init_postprocess_nifti_wf( ]), (downcast_data, prepare_confounds_wf, [("bold_file", "inputnode.preprocessed_bold")]), (prepare_confounds_wf, outputnode, [ - ("outputnode.filtered_motion", "filtered_motion"), - ("outputnode.temporal_mask", "temporal_mask"), ("outputnode.fmriprep_confounds_file", "fmriprep_confounds_file"), ("outputnode.preprocessed_bold", "preprocessed_bold"), ]), @@ -370,9 +370,6 @@ def init_postprocess_nifti_wf( ]), (denoise_bold_wf, outputnode, [ ("outputnode.uncensored_denoised_bold", "uncensored_denoised_bold"), - ("outputnode.interpolated_filtered_bold", "interpolated_filtered_bold"), - ("outputnode.censored_denoised_bold", "censored_denoised_bold"), - ("outputnode.smoothed_denoised_bold", "smoothed_denoised_bold"), ]), ]) # fmt:on @@ -429,7 +426,6 @@ def init_postprocess_nifti_wf( (denoise_bold_wf, connectivity_wf, [ ("outputnode.censored_denoised_bold", "inputnode.denoised_bold"), ]), - (connectivity_wf, outputnode, [("outputnode.timeseries", "timeseries")]), ]) # fmt:on @@ -515,6 +511,7 @@ def init_postprocess_nifti_wf( postproc_derivatives_wf = init_postproc_derivatives_wf( smoothing=smoothing, name_source=bold_file, + fmri_dir=fmri_dir, bandpass_filter=bandpass_filter, params=params, exact_scans=exact_scans, @@ -553,6 +550,14 @@ def init_postprocess_nifti_wf( ("outputnode.correlations_exact", "inputnode.correlations_exact"), ("outputnode.parcellated_reho", "inputnode.parcellated_reho"), ]), + (postproc_derivatives_wf, outputnode, [ + ("outputnode.filtered_motion", "filtered_motion"), + ("outputnode.temporal_mask", "temporal_mask"), + ("outputnode.interpolated_filtered_bold", "interpolated_filtered_bold"), + ("outputnode.censored_denoised_bold", "censored_denoised_bold"), + ("outputnode.smoothed_denoised_bold", "smoothed_denoised_bold"), + ("outputnode.timeseries", "timeseries"), + ]), ]) # fmt:on diff --git a/xcp_d/workflows/cifti.py b/xcp_d/workflows/cifti.py index 942908cbd..fd897ff9a 100644 --- a/xcp_d/workflows/cifti.py +++ b/xcp_d/workflows/cifti.py @@ -30,6 +30,7 @@ @fill_doc def init_postprocess_cifti_wf( bold_file, + fmri_dir, bandpass_filter, high_pass, low_pass, @@ -94,6 +95,7 @@ def init_postprocess_cifti_wf( wf = init_postprocess_cifti_wf( bold_file=bold_file, + fmri_dir=fmri_dir, bandpass_filter=True, high_pass=0.01, low_pass=0.08, @@ -318,8 +320,6 @@ def init_postprocess_cifti_wf( ("bold_file", "inputnode.preprocessed_bold"), ]), (prepare_confounds_wf, outputnode, [ - ("outputnode.filtered_motion", "filtered_motion"), - ("outputnode.temporal_mask", "temporal_mask"), ("outputnode.fmriprep_confounds_file", "fmriprep_confounds_file"), ("outputnode.preprocessed_bold", "preprocessed_bold"), ]), @@ -347,9 +347,6 @@ def init_postprocess_cifti_wf( ]), (denoise_bold_wf, outputnode, [ ("outputnode.uncensored_denoised_bold", "uncensored_denoised_bold"), - ("outputnode.interpolated_filtered_bold", "interpolated_filtered_bold"), - ("outputnode.censored_denoised_bold", "censored_denoised_bold"), - ("outputnode.smoothed_denoised_bold", "smoothed_denoised_bold"), ]), ]) # fmt:on @@ -407,10 +404,6 @@ def init_postprocess_cifti_wf( (denoise_bold_wf, connectivity_wf, [ ("outputnode.censored_denoised_bold", "inputnode.denoised_bold"), ]), - (connectivity_wf, outputnode, [ - ("outputnode.timeseries", "timeseries"), - ("outputnode.timeseries_ciftis", "timeseries_ciftis"), - ]), ]) # fmt:on @@ -487,6 +480,7 @@ def init_postprocess_cifti_wf( postproc_derivatives_wf = init_postproc_derivatives_wf( smoothing=smoothing, name_source=bold_file, + fmri_dir=fmri_dir, bandpass_filter=bandpass_filter, params=params, exact_scans=exact_scans, @@ -529,6 +523,15 @@ def init_postprocess_cifti_wf( ("outputnode.correlations_exact", "inputnode.correlations_exact"), ("outputnode.parcellated_reho", "inputnode.parcellated_reho"), ]), + (postproc_derivatives_wf, outputnode, [ + ("outputnode.filtered_motion", "filtered_motion"), + ("outputnode.temporal_mask", "temporal_mask"), + ("outputnode.interpolated_filtered_bold", "interpolated_filtered_bold"), + ("outputnode.censored_denoised_bold", "censored_denoised_bold"), + ("outputnode.smoothed_denoised_bold", "smoothed_denoised_bold"), + ("outputnode.timeseries", "timeseries"), + ("outputnode.timeseries_ciftis", "timeseries_ciftis"), + ]), ]) if bandpass_filter: diff --git a/xcp_d/workflows/concatenation.py b/xcp_d/workflows/concatenation.py index 29b4755c2..c6f265d0b 100644 --- a/xcp_d/workflows/concatenation.py +++ b/xcp_d/workflows/concatenation.py @@ -3,7 +3,7 @@ from nipype.pipeline import engine as pe from niworkflows.engine.workflows import LiterateWorkflow as Workflow -from xcp_d.interfaces.bids import DerivativesDataSink +from xcp_d.interfaces.bids import DerivativesDataSink, InferBIDSURIs from xcp_d.interfaces.concatenation import ( CleanNameSource, ConcatenateInputs, @@ -243,6 +243,23 @@ def init_concatenate_data_wf( ]) # fmt:on + filtered_motion_sources = pe.Node( + InferBIDSURIs( + numinputs=1, + dataset_name="xcp_d", + dataset_path=output_dir, + ), + name="filtered_motion_sources", + run_without_submitting=True, + mem_gb=1, + ) + # fmt:off + workflow.connect([ + (concatenate_inputs, filtered_motion_sources, [("filtered_motion", "in1")]), + (filtered_motion_sources, ds_filtered_motion, [("bids_uris", "Sources")]), + ]) + # fmt:on + ds_temporal_mask = pe.Node( DerivativesDataSink( base_directory=output_dir, @@ -262,6 +279,23 @@ def init_concatenate_data_wf( ]) # fmt:on + temporal_mask_sources = pe.Node( + InferBIDSURIs( + numinputs=1, + dataset_name="xcp_d", + dataset_path=output_dir, + ), + name="temporal_mask_sources", + run_without_submitting=True, + mem_gb=1, + ) + # fmt:off + workflow.connect([ + (concatenate_inputs, temporal_mask_sources, [("temporal_mask", "in1")]), + (temporal_mask_sources, ds_temporal_mask, [("bids_uris", "Sources")]), + ]) + # fmt:on + ds_timeseries = pe.MapNode( DerivativesDataSink( base_directory=output_dir, @@ -283,6 +317,24 @@ def init_concatenate_data_wf( ]) # fmt:on + timeseries_sources = pe.MapNode( + InferBIDSURIs( + numinputs=1, + dataset_name="xcp_d", + dataset_path=output_dir, + ), + name="timeseries_sources", + run_without_submitting=True, + mem_gb=1, + iterfield=["in1"], + ) + # fmt:off + workflow.connect([ + (concatenate_inputs, timeseries_sources, [("timeseries", "in1")]), + (timeseries_sources, ds_timeseries, [("bids_uris", "Sources")]), + ]) + # fmt:on + if cifti: ds_censored_filtered_bold = pe.Node( DerivativesDataSink( @@ -320,6 +372,24 @@ def init_concatenate_data_wf( ]) # fmt:on + timeseries_ciftis_sources = pe.MapNode( + InferBIDSURIs( + numinputs=1, + dataset_name="xcp_d", + dataset_path=output_dir, + ), + name="timeseries_ciftis_sources", + run_without_submitting=True, + mem_gb=1, + iterfield=["in1"], + ) + # fmt:off + workflow.connect([ + (concatenate_inputs, timeseries_ciftis_sources, [("timeseries_ciftis", "in1")]), + (timeseries_ciftis_sources, ds_timeseries_cifti_files, [("bids_uris", "Sources")]), + ]) + # fmt:on + if smoothing: ds_smoothed_denoised_bold = pe.Node( DerivativesDataSink( @@ -393,6 +463,23 @@ def init_concatenate_data_wf( ]) # fmt:on + censored_filtered_bold_sources = pe.Node( + InferBIDSURIs( + numinputs=1, + dataset_name="xcp_d", + dataset_path=output_dir, + ), + name="censored_filtered_bold_sources", + run_without_submitting=True, + mem_gb=1, + ) + # fmt:off + workflow.connect([ + (concatenate_inputs, censored_filtered_bold_sources, [("censored_denoised_bold", "in1")]), + (censored_filtered_bold_sources, ds_censored_filtered_bold, [("bids_uris", "Sources")]), + ]) + # fmt:on + if smoothing: # fmt:off workflow.connect([ @@ -403,7 +490,49 @@ def init_concatenate_data_wf( ]) # fmt:on + smoothed_denoised_bold_sources = pe.Node( + InferBIDSURIs( + numinputs=1, + dataset_name="xcp_d", + dataset_path=output_dir, + ), + name="smoothed_denoised_bold_sources", + run_without_submitting=True, + mem_gb=1, + ) + # fmt:off + workflow.connect([ + (concatenate_inputs, smoothed_denoised_bold_sources, [ + ("smoothed_denoised_bold", "in1"), + ]), + (smoothed_denoised_bold_sources, ds_smoothed_denoised_bold, [ + ("bids_uris", "Sources"), + ]), + ]) + # fmt:on + if dcan_qc: + interpolated_filtered_bold_sources = pe.Node( + InferBIDSURIs( + numinputs=1, + dataset_name="xcp_d", + dataset_path=output_dir, + ), + name="interpolated_filtered_bold_sources", + run_without_submitting=True, + mem_gb=1, + ) + # fmt:off + workflow.connect([ + (concatenate_inputs, interpolated_filtered_bold_sources, [ + ("interpolated_filtered_bold", "in1"), + ]), + (interpolated_filtered_bold_sources, ds_interpolated_filtered_bold, [ + ("bids_uris", "Sources"), + ]), + ]) + # fmt:on + # fmt:off workflow.connect([ (clean_name_source, ds_interpolated_filtered_bold, [("name_source", "source_file")]), diff --git a/xcp_d/workflows/outputs.py b/xcp_d/workflows/outputs.py index d307f3b65..e59dea70f 100644 --- a/xcp_d/workflows/outputs.py +++ b/xcp_d/workflows/outputs.py @@ -5,7 +5,7 @@ from nipype.pipeline import engine as pe from niworkflows.engine.workflows import LiterateWorkflow as Workflow -from xcp_d.interfaces.bids import DerivativesDataSink +from xcp_d.interfaces.bids import DerivativesDataSink, InferBIDSURIs from xcp_d.interfaces.utils import FilterUndefined from xcp_d.utils.bids import get_entity from xcp_d.utils.doc import fill_doc @@ -124,6 +124,7 @@ def init_copy_inputs_to_outputs_wf(output_dir, name="copy_inputs_to_outputs_wf") @fill_doc def init_postproc_derivatives_wf( name_source, + fmri_dir, bandpass_filter, low_pass, high_pass, @@ -149,6 +150,7 @@ def init_postproc_derivatives_wf( wf = init_postproc_derivatives_wf( name_source="/path/to/file.nii.gz", + fmri_dir="/path/to", bandpass_filter=True, low_pass=0.1, high_pass=0.008, @@ -168,6 +170,8 @@ def init_postproc_derivatives_wf( ---------- name_source : :obj:`str` bold or cifti files + fmri_dir : :obj:`str` + Path to the preprocessing derivatives. low_pass : float low pass filter high_pass : float @@ -249,6 +253,21 @@ def init_postproc_derivatives_wf( name="inputnode", ) + outputnode = pe.Node( + niu.IdentityInterface( + fields=[ + "filtered_motion", + "temporal_mask", + "interpolated_filtered_bold", + "censored_denoised_bold", + "smoothed_denoised_bold", + "timeseries", + "timeseries_ciftis", + ], + ), + name="outputnode", + ) + # Create dictionary of basic information cleaned_data_dictionary = { "RepetitionTime": TR, @@ -290,6 +309,7 @@ def init_postproc_derivatives_wf( ("temporal_mask_metadata", "meta_dict"), ("temporal_mask", "in_file"), ]), + (ds_temporal_mask, outputnode, [("out_file", "temporal_mask")]), ]) # fmt:on @@ -313,6 +333,7 @@ def init_postproc_derivatives_wf( ("motion_metadata", "meta_dict"), ("filtered_motion", "in_file"), ]), + (ds_filtered_motion, outputnode, [("out_file", "filtered_motion")]), ]) # fmt:on @@ -435,6 +456,7 @@ def init_postproc_derivatives_wf( ("timeseries", "in_file"), ("atlas_names", "atlas"), ]), + (ds_timeseries, outputnode, [("out_file", "timeseries")]), (inputnode, ds_correlations, [ ("correlations", "in_file"), ("atlas_names", "atlas"), @@ -692,6 +714,7 @@ def init_postproc_derivatives_wf( ("timeseries_ciftis", "in_file"), ("atlas_names", "atlas"), ]), + (ds_timeseries_cifti_files, outputnode, [("out_file", "timeseries_ciftis")]), (inputnode, ds_correlation_cifti_files, [ ("correlation_ciftis", "in_file"), ("atlas_names", "atlas"), @@ -773,17 +796,38 @@ def init_postproc_derivatives_wf( # fmt:off workflow.connect([ (inputnode, ds_denoised_bold, [("censored_denoised_bold", "in_file")]), + (ds_denoised_bold, outputnode, [("out_file", "censored_denoised_bold")]), (inputnode, ds_qc_file, [("qc_file", "in_file")]), (inputnode, ds_reho, [("reho", "in_file")]), ]) # fmt:on + denoised_bold_sources = pe.Node( + InferBIDSURIs( + numinputs=1, + dataset_name="preprocessed", + dataset_path=fmri_dir, + ), + name="denoised_bold_sources", + run_without_submitting=True, + mem_gb=1, + ) + # fmt:off + workflow.connect([ + (inputnode, denoised_bold_sources, [("censored_denoised_bold", "in1")]), + (denoised_bold_sources, ds_denoised_bold, [("bids_uris", "Sources")]), + ]) + # fmt:on + if dcan_qc: # fmt:off workflow.connect([ (inputnode, ds_interpolated_denoised_bold, [ ("interpolated_filtered_bold", "in_file"), ]), + (ds_interpolated_denoised_bold, outputnode, [ + ("out_file", "interpolated_filtered_bold"), + ]), ]) # fmt:on @@ -791,7 +835,12 @@ def init_postproc_derivatives_wf( workflow.connect([(inputnode, ds_alff, [("alff", "in_file")])]) if smoothing: - workflow.connect([(inputnode, ds_smoothed_bold, [("smoothed_denoised_bold", "in_file")])]) + # fmt:off + workflow.connect([ + (inputnode, ds_smoothed_bold, [("smoothed_denoised_bold", "in_file")]), + (ds_smoothed_bold, outputnode, [("out_file", "smoothed_denoised_bold")]), + ]) + # fmt:on if bandpass_filter and (fd_thresh <= 0): workflow.connect([(inputnode, ds_smoothed_alff, [("smoothed_alff", "in_file")])]) From e64c4c1b883b4728163011ac1888263c08b17cc0 Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Tue, 10 Oct 2023 14:07:57 -0400 Subject: [PATCH 02/60] Update bids.py --- xcp_d/interfaces/bids.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xcp_d/interfaces/bids.py b/xcp_d/interfaces/bids.py index 7e0ff2559..dd4f38d02 100644 --- a/xcp_d/interfaces/bids.py +++ b/xcp_d/interfaces/bids.py @@ -5,14 +5,14 @@ from bids.layout import Config from nipype import logging from nipype.interfaces.base import ( - isdefined, BaseInterfaceInputSpec, DynamicTraitedSpec, TraitedSpec, + isdefined, traits, ) +from nipype.interfaces.io import IOBase, add_traits from niworkflows.interfaces.bids import DerivativesDataSink as BaseDerivativesDataSink -from nipype.interfaces.io import add_traits, IOBase from pkg_resources import resource_filename as pkgrf from xcp_d.utils.utils import _listify From a64cddb3ef08348e79194df336ed79325ee7fb74 Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Tue, 10 Oct 2023 14:24:18 -0400 Subject: [PATCH 03/60] Fix maybe? --- xcp_d/workflows/outputs.py | 47 +++++++++++++++++++++++--------------- 1 file changed, 28 insertions(+), 19 deletions(-) diff --git a/xcp_d/workflows/outputs.py b/xcp_d/workflows/outputs.py index e59dea70f..8b8f15176 100644 --- a/xcp_d/workflows/outputs.py +++ b/xcp_d/workflows/outputs.py @@ -290,6 +290,18 @@ def init_postproc_derivatives_wf( # Determine cohort (if there is one) in the original data cohort = get_entity(name_source, "cohort") + preprocessed_bold_sources = pe.Node( + InferBIDSURIs( + numinputs=1, + dataset_name="preprocessed", + dataset_path=fmri_dir, + in1=name_source, + ), + name="preprocessed_bold_sources", + run_without_submitting=True, + mem_gb=1, + ) + ds_temporal_mask = pe.Node( DerivativesDataSink( base_directory=output_dir, @@ -796,26 +808,11 @@ def init_postproc_derivatives_wf( # fmt:off workflow.connect([ (inputnode, ds_denoised_bold, [("censored_denoised_bold", "in_file")]), + (preprocessed_bold_sources, ds_denoised_bold, [("bids_uris", "Sources")]), (ds_denoised_bold, outputnode, [("out_file", "censored_denoised_bold")]), (inputnode, ds_qc_file, [("qc_file", "in_file")]), (inputnode, ds_reho, [("reho", "in_file")]), - ]) - # fmt:on - - denoised_bold_sources = pe.Node( - InferBIDSURIs( - numinputs=1, - dataset_name="preprocessed", - dataset_path=fmri_dir, - ), - name="denoised_bold_sources", - run_without_submitting=True, - mem_gb=1, - ) - # fmt:off - workflow.connect([ - (inputnode, denoised_bold_sources, [("censored_denoised_bold", "in1")]), - (denoised_bold_sources, ds_denoised_bold, [("bids_uris", "Sources")]), + (preprocessed_bold_sources, ds_reho, [("bids_uris", "Sources")]), ]) # fmt:on @@ -825,6 +822,7 @@ def init_postproc_derivatives_wf( (inputnode, ds_interpolated_denoised_bold, [ ("interpolated_filtered_bold", "in_file"), ]), + (preprocessed_bold_sources, ds_interpolated_denoised_bold, [("bids_uris", "Sources")]), (ds_interpolated_denoised_bold, outputnode, [ ("out_file", "interpolated_filtered_bold"), ]), @@ -832,17 +830,28 @@ def init_postproc_derivatives_wf( # fmt:on if bandpass_filter and (fd_thresh <= 0): - workflow.connect([(inputnode, ds_alff, [("alff", "in_file")])]) + # fmt:off + workflow.connect([ + (inputnode, ds_alff, [("alff", "in_file")]), + (preprocessed_bold_sources, ds_alff, [("bids_uris", "Sources")]), + ]) + # fmt:on if smoothing: # fmt:off workflow.connect([ (inputnode, ds_smoothed_bold, [("smoothed_denoised_bold", "in_file")]), + (preprocessed_bold_sources, ds_smoothed_bold, [("bids_uris", "Sources")]), (ds_smoothed_bold, outputnode, [("out_file", "smoothed_denoised_bold")]), ]) # fmt:on if bandpass_filter and (fd_thresh <= 0): - workflow.connect([(inputnode, ds_smoothed_alff, [("smoothed_alff", "in_file")])]) + # fmt:off + workflow.connect([ + (inputnode, ds_smoothed_alff, [("smoothed_alff", "in_file")]), + (preprocessed_bold_sources, ds_smoothed_alff, [("bids_uris", "Sources")]), + ]) + # fmt:on return workflow From 7edfd1311610a0dbf3b733366038c5fd38f3b79d Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Tue, 10 Oct 2023 14:45:27 -0400 Subject: [PATCH 04/60] Well that's silly. --- xcp_d/interfaces/bids.py | 8 ++++++++ xcp_d/utils/bids.py | 6 ++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/xcp_d/interfaces/bids.py b/xcp_d/interfaces/bids.py index dd4f38d02..9dbf9627d 100644 --- a/xcp_d/interfaces/bids.py +++ b/xcp_d/interfaces/bids.py @@ -108,6 +108,14 @@ def _list_outputs(self): f"bids:{self.inputs.dataset_name}:{str(Path(p).relative_to(self.inputs.dataset_path))}" for p in raw_paths ] + if not bids_uris: + raise ValueError( + "Something's missing:\n" + f"\tdataset_name: {self.inputs.dataset_name}\n" + f"\tdataset_path: {self.inputs.dataset_path}\n" + f"\tvalues: {values}\n" + f"\traw_paths: {raw_paths}" + ) outputs["bids_uris"] = bids_uris return outputs diff --git a/xcp_d/utils/bids.py b/xcp_d/utils/bids.py index 2f80b5fb1..0cc102be2 100644 --- a/xcp_d/utils/bids.py +++ b/xcp_d/utils/bids.py @@ -703,11 +703,13 @@ def write_dataset_description(fmri_dir, xcpd_dir): if "preprocessed" in dset_desc["DatasetLinks"].keys(): LOGGER.warning("'preprocessed' is already a dataset link. Overwriting.") - dset_desc["DatasetLinks"]["preprocessed"] = fmri_dir + + dset_desc["DatasetLinks"]["preprocessed"] = fmri_dir if "xcp_d" in dset_desc["DatasetLinks"].keys(): LOGGER.warning("'xcp_d' is already a dataset link. Overwriting.") - dset_desc["DatasetLinks"]["xcp_d"] = xcpd_dir + + dset_desc["DatasetLinks"]["xcp_d"] = xcpd_dir xcpd_dset_description = os.path.join(xcpd_dir, "dataset_description.json") if os.path.isfile(xcpd_dset_description): From a54afa9de49812e598d9a1ce064409e85be4527a Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Tue, 10 Oct 2023 14:56:59 -0400 Subject: [PATCH 05/60] Try that. --- xcp_d/workflows/outputs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xcp_d/workflows/outputs.py b/xcp_d/workflows/outputs.py index 8b8f15176..25643e35b 100644 --- a/xcp_d/workflows/outputs.py +++ b/xcp_d/workflows/outputs.py @@ -295,12 +295,12 @@ def init_postproc_derivatives_wf( numinputs=1, dataset_name="preprocessed", dataset_path=fmri_dir, - in1=name_source, ), name="preprocessed_bold_sources", run_without_submitting=True, mem_gb=1, ) + preprocessed_bold_sources.inputs.in1 = name_source ds_temporal_mask = pe.Node( DerivativesDataSink( From e6395c3ab6632a0aa7366252d402b03b5c97e38e Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Tue, 10 Oct 2023 15:39:35 -0400 Subject: [PATCH 06/60] Try patching connection. --- .../data/test_ds001419_cifti_outputs.txt | 2 ++ xcp_d/tests/data/test_pnc_cifti_outputs.txt | 1 + .../data/test_pnc_cifti_t2wonly_outputs.txt | 1 + xcp_d/workflows/bold.py | 5 ++++- xcp_d/workflows/cifti.py | 5 ++++- xcp_d/workflows/outputs.py | 20 +++++++++++++++++++ 6 files changed, 32 insertions(+), 2 deletions(-) diff --git a/xcp_d/tests/data/test_ds001419_cifti_outputs.txt b/xcp_d/tests/data/test_ds001419_cifti_outputs.txt index e4bd18a37..db183d6f1 100644 --- a/xcp_d/tests/data/test_ds001419_cifti_outputs.txt +++ b/xcp_d/tests/data/test_ds001419_cifti_outputs.txt @@ -165,6 +165,7 @@ xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_den-91k_desc-interpolate xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_den-91k_desc-interpolated_bold.json xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_den-91k_desc-linc_qc.csv xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_den-91k_reho.dscalar.nii +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_den-91k_reho.json xcp_d/sub-01/func/sub-01_task-imagery_run-02_desc-dcan_qc.hdf5 xcp_d/sub-01/func/sub-01_task-imagery_run-02_desc-filtered_motion.json xcp_d/sub-01/func/sub-01_task-imagery_run-02_desc-filtered_motion.tsv @@ -277,6 +278,7 @@ xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_den-91k_desc-interpolate xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_den-91k_desc-interpolated_bold.json xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_den-91k_desc-linc_qc.csv xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_den-91k_reho.dscalar.nii +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_den-91k_reho.json xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_atlas-4S1052Parcels_den-91k_timeseries.ptseries.nii xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_atlas-4S1052Parcels_timeseries.tsv xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_atlas-4S152Parcels_den-91k_timeseries.ptseries.nii diff --git a/xcp_d/tests/data/test_pnc_cifti_outputs.txt b/xcp_d/tests/data/test_pnc_cifti_outputs.txt index 769cb840f..2da4093f5 100644 --- a/xcp_d/tests/data/test_pnc_cifti_outputs.txt +++ b/xcp_d/tests/data/test_pnc_cifti_outputs.txt @@ -212,4 +212,5 @@ xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleb xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_den-91k_desc-interpolated_bold.json xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_den-91k_desc-linc_qc.csv xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_den-91k_reho.dscalar.nii +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_den-91k_reho.json xcp_d/sub-1648798153_ses-PNC1_executive_summary.html diff --git a/xcp_d/tests/data/test_pnc_cifti_t2wonly_outputs.txt b/xcp_d/tests/data/test_pnc_cifti_t2wonly_outputs.txt index 83095ec24..0d2c6cdcc 100644 --- a/xcp_d/tests/data/test_pnc_cifti_t2wonly_outputs.txt +++ b/xcp_d/tests/data/test_pnc_cifti_t2wonly_outputs.txt @@ -211,4 +211,5 @@ xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_den-91k_desc-interpolated_bold.json xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_den-91k_desc-linc_qc.csv xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_den-91k_reho.dscalar.nii +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_den-91k_reho.json xcp_d/sub-1648798153_ses-PNC1_executive_summary.html diff --git a/xcp_d/workflows/bold.py b/xcp_d/workflows/bold.py index 48a6ecde8..3d080175f 100644 --- a/xcp_d/workflows/bold.py +++ b/xcp_d/workflows/bold.py @@ -528,7 +528,10 @@ def init_postprocess_nifti_wf( # fmt:off workflow.connect([ - (inputnode, postproc_derivatives_wf, [("atlas_names", "inputnode.atlas_names")]), + (inputnode, postproc_derivatives_wf, [ + ("fmriprep_confounds_file", "inputnode.fmriprep_confounds_file"), + ("atlas_names", "inputnode.atlas_names"), + ]), (prepare_confounds_wf, postproc_derivatives_wf, [ ("outputnode.confounds_file", "inputnode.confounds_file"), ("outputnode.filtered_motion", "inputnode.filtered_motion"), diff --git a/xcp_d/workflows/cifti.py b/xcp_d/workflows/cifti.py index fd897ff9a..5c8661b0f 100644 --- a/xcp_d/workflows/cifti.py +++ b/xcp_d/workflows/cifti.py @@ -497,7 +497,10 @@ def init_postprocess_cifti_wf( # fmt:off workflow.connect([ - (inputnode, postproc_derivatives_wf, [("atlas_names", "inputnode.atlas_names")]), + (inputnode, postproc_derivatives_wf, [ + ("fmriprep_confounds_file", "fmriprep_confounds_file"), + ("atlas_names", "inputnode.atlas_names"), + ]), (denoise_bold_wf, postproc_derivatives_wf, [ ("outputnode.interpolated_filtered_bold", "inputnode.interpolated_filtered_bold"), ("outputnode.censored_denoised_bold", "inputnode.censored_denoised_bold"), diff --git a/xcp_d/workflows/outputs.py b/xcp_d/workflows/outputs.py index 25643e35b..a106d214d 100644 --- a/xcp_d/workflows/outputs.py +++ b/xcp_d/workflows/outputs.py @@ -302,6 +302,18 @@ def init_postproc_derivatives_wf( ) preprocessed_bold_sources.inputs.in1 = name_source + preprocessed_confounds_sources = pe.Node( + InferBIDSURIs( + numinputs=1, + dataset_name="preprocessed", + dataset_path=fmri_dir, + ), + name="preprocessed_confounds_sources", + run_without_submitting=True, + mem_gb=1, + ) + preprocessed_confounds_sources.inputs.in1 = name_source + ds_temporal_mask = pe.Node( DerivativesDataSink( base_directory=output_dir, @@ -828,6 +840,14 @@ def init_postproc_derivatives_wf( ]), ]) # fmt:on + else: + # fmt:off + workflow.connect([ + (inputnode, outputnode, [ + ("interpolated_filtered_bold", "interpolated_filtered_bold"), + ]), + ]) + # fmt:on if bandpass_filter and (fd_thresh <= 0): # fmt:off From b96b9c4db9575b64043192a7066c3c5cc060a7d3 Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Tue, 10 Oct 2023 15:51:44 -0400 Subject: [PATCH 07/60] Whoops. --- xcp_d/workflows/cifti.py | 2 +- xcp_d/workflows/outputs.py | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/xcp_d/workflows/cifti.py b/xcp_d/workflows/cifti.py index 5c8661b0f..51af290ce 100644 --- a/xcp_d/workflows/cifti.py +++ b/xcp_d/workflows/cifti.py @@ -498,7 +498,7 @@ def init_postprocess_cifti_wf( # fmt:off workflow.connect([ (inputnode, postproc_derivatives_wf, [ - ("fmriprep_confounds_file", "fmriprep_confounds_file"), + ("fmriprep_confounds_file", "inputnode.fmriprep_confounds_file"), ("atlas_names", "inputnode.atlas_names"), ]), (denoise_bold_wf, postproc_derivatives_wf, [ diff --git a/xcp_d/workflows/outputs.py b/xcp_d/workflows/outputs.py index a106d214d..984ff3db4 100644 --- a/xcp_d/workflows/outputs.py +++ b/xcp_d/workflows/outputs.py @@ -223,6 +223,9 @@ def init_postproc_derivatives_wf( inputnode = pe.Node( niu.IdentityInterface( fields=[ + # preprocessing files to use as sources + "fmriprep_confounds_file", + # postprocessed outputs "atlas_names", "confounds_file", "coverage", @@ -312,7 +315,7 @@ def init_postproc_derivatives_wf( run_without_submitting=True, mem_gb=1, ) - preprocessed_confounds_sources.inputs.in1 = name_source + workflow.connect([inputnode, preprocessed_confounds_sources, "fmriprep_confounds_file", "in1"]) ds_temporal_mask = pe.Node( DerivativesDataSink( @@ -333,6 +336,7 @@ def init_postproc_derivatives_wf( ("temporal_mask_metadata", "meta_dict"), ("temporal_mask", "in_file"), ]), + (preprocessed_confounds_sources, ds_temporal_mask, [("bids_uris", "Sources")]), (ds_temporal_mask, outputnode, [("out_file", "temporal_mask")]), ]) # fmt:on @@ -357,6 +361,7 @@ def init_postproc_derivatives_wf( ("motion_metadata", "meta_dict"), ("filtered_motion", "in_file"), ]), + (preprocessed_confounds_sources, ds_filtered_motion, [("bids_uris", "Sources")]), (ds_filtered_motion, outputnode, [("out_file", "filtered_motion")]), ]) # fmt:on @@ -374,7 +379,12 @@ def init_postproc_derivatives_wf( name="ds_confounds", run_without_submitting=False, ) - workflow.connect([(inputnode, ds_confounds, [("confounds_file", "in_file")])]) + # fmt:off + workflow.connect([ + (inputnode, ds_confounds, [("confounds_file", "in_file")]), + (preprocessed_confounds_sources, ds_confounds, [("bids_uris", "Sources")]), + ]) + # fmt:on ds_coverage_files = pe.MapNode( DerivativesDataSink( From b391c0b9307800d9e9bb8344fa54b7137bc2d0bc Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Tue, 10 Oct 2023 16:07:18 -0400 Subject: [PATCH 08/60] ugh --- xcp_d/workflows/outputs.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xcp_d/workflows/outputs.py b/xcp_d/workflows/outputs.py index 984ff3db4..b479589b6 100644 --- a/xcp_d/workflows/outputs.py +++ b/xcp_d/workflows/outputs.py @@ -315,7 +315,11 @@ def init_postproc_derivatives_wf( run_without_submitting=True, mem_gb=1, ) - workflow.connect([inputnode, preprocessed_confounds_sources, "fmriprep_confounds_file", "in1"]) + # fmt:off + workflow.connect([ + (inputnode, preprocessed_confounds_sources, [("fmriprep_confounds_file", "in1")]), + ]) + # fmt:on ds_temporal_mask = pe.Node( DerivativesDataSink( From 719f5eaeb20e78d13d75d70f81530d40697802b2 Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Tue, 10 Oct 2023 16:28:05 -0400 Subject: [PATCH 09/60] Update outputs. --- xcp_d/tests/data/test_ds001419_cifti_outputs.txt | 2 ++ xcp_d/tests/data/test_ds001419_nifti_outputs.txt | 3 +++ xcp_d/tests/data/test_fmriprep_without_freesurfer_outputs.txt | 2 ++ xcp_d/tests/data/test_nibabies_outputs.txt | 1 + xcp_d/tests/data/test_pnc_cifti_outputs.txt | 1 + xcp_d/tests/data/test_pnc_nifti_outputs.txt | 2 ++ 6 files changed, 11 insertions(+) diff --git a/xcp_d/tests/data/test_ds001419_cifti_outputs.txt b/xcp_d/tests/data/test_ds001419_cifti_outputs.txt index db183d6f1..95dd5618f 100644 --- a/xcp_d/tests/data/test_ds001419_cifti_outputs.txt +++ b/xcp_d/tests/data/test_ds001419_cifti_outputs.txt @@ -57,6 +57,7 @@ xcp_d/sub-01/func/sub-01_task-imagery_run-01_desc-dcan_qc.hdf5 xcp_d/sub-01/func/sub-01_task-imagery_run-01_desc-filtered_motion.json xcp_d/sub-01/func/sub-01_task-imagery_run-01_desc-filtered_motion.tsv xcp_d/sub-01/func/sub-01_task-imagery_run-01_design.tsv +xcp_d/sub-01/func/sub-01_task-imagery_run-01_design.json xcp_d/sub-01/func/sub-01_task-imagery_run-01_outliers.json xcp_d/sub-01/func/sub-01_task-imagery_run-01_outliers.tsv xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-4S1052Parcels_coverage.tsv @@ -170,6 +171,7 @@ xcp_d/sub-01/func/sub-01_task-imagery_run-02_desc-dcan_qc.hdf5 xcp_d/sub-01/func/sub-01_task-imagery_run-02_desc-filtered_motion.json xcp_d/sub-01/func/sub-01_task-imagery_run-02_desc-filtered_motion.tsv xcp_d/sub-01/func/sub-01_task-imagery_run-02_design.tsv +xcp_d/sub-01/func/sub-01_task-imagery_run-02_design.json xcp_d/sub-01/func/sub-01_task-imagery_run-02_outliers.json xcp_d/sub-01/func/sub-01_task-imagery_run-02_outliers.tsv xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-4S1052Parcels_coverage.tsv diff --git a/xcp_d/tests/data/test_ds001419_nifti_outputs.txt b/xcp_d/tests/data/test_ds001419_nifti_outputs.txt index d320b2e11..2f78e96bc 100644 --- a/xcp_d/tests/data/test_ds001419_nifti_outputs.txt +++ b/xcp_d/tests/data/test_ds001419_nifti_outputs.txt @@ -55,6 +55,7 @@ xcp_d/sub-01/func/sub-01_task-imagery_outliers.tsv xcp_d/sub-01/func/sub-01_task-imagery_run-01_desc-filtered_motion.json xcp_d/sub-01/func/sub-01_task-imagery_run-01_desc-filtered_motion.tsv xcp_d/sub-01/func/sub-01_task-imagery_run-01_desc-preproc_design.tsv +xcp_d/sub-01/func/sub-01_task-imagery_run-01_desc-preproc_design.json xcp_d/sub-01/func/sub-01_task-imagery_run-01_outliers.json xcp_d/sub-01/func/sub-01_task-imagery_run-01_outliers.tsv xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-4S1052Parcels_coverage.tsv @@ -151,6 +152,7 @@ xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_res-2_reh xcp_d/sub-01/func/sub-01_task-imagery_run-02_desc-filtered_motion.json xcp_d/sub-01/func/sub-01_task-imagery_run-02_desc-filtered_motion.tsv xcp_d/sub-01/func/sub-01_task-imagery_run-02_desc-preproc_design.tsv +xcp_d/sub-01/func/sub-01_task-imagery_run-02_desc-preproc_design.json xcp_d/sub-01/func/sub-01_task-imagery_run-02_outliers.json xcp_d/sub-01/func/sub-01_task-imagery_run-02_outliers.tsv xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-4S1052Parcels_coverage.tsv @@ -265,6 +267,7 @@ xcp_d/sub-01/func/sub-01_task-imagery_space-MNI152NLin2009cAsym_res-2_desc-denoi xcp_d/sub-01/func/sub-01_task-rest_desc-filtered_motion.json xcp_d/sub-01/func/sub-01_task-rest_desc-filtered_motion.tsv xcp_d/sub-01/func/sub-01_task-rest_desc-preproc_design.tsv +xcp_d/sub-01/func/sub-01_task-rest_desc-preproc_design.json xcp_d/sub-01/func/sub-01_task-rest_outliers.json xcp_d/sub-01/func/sub-01_task-rest_outliers.tsv xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-4S1052Parcels_coverage.tsv diff --git a/xcp_d/tests/data/test_fmriprep_without_freesurfer_outputs.txt b/xcp_d/tests/data/test_fmriprep_without_freesurfer_outputs.txt index 096b1ca0d..a608fa821 100644 --- a/xcp_d/tests/data/test_fmriprep_without_freesurfer_outputs.txt +++ b/xcp_d/tests/data/test_fmriprep_without_freesurfer_outputs.txt @@ -55,6 +55,7 @@ xcp_d/sub-01/anat/sub-01_space-MNI152NLin2009cAsym_dseg.nii.gz xcp_d/sub-01/func xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_desc-dcan_qc.hdf5 xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_desc-preproc_design.tsv +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_desc-preproc_design.json xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_motion.json xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_motion.tsv xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_outliers.json @@ -126,6 +127,7 @@ xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_r xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_reho.nii.gz xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_desc-dcan_qc.hdf5 xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_desc-preproc_design.tsv +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_desc-preproc_design.json xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_motion.json xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_motion.tsv xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_outliers.json diff --git a/xcp_d/tests/data/test_nibabies_outputs.txt b/xcp_d/tests/data/test_nibabies_outputs.txt index 9d7091e9e..5e1ecb352 100644 --- a/xcp_d/tests/data/test_nibabies_outputs.txt +++ b/xcp_d/tests/data/test_nibabies_outputs.txt @@ -53,6 +53,7 @@ xcp_d/sub-01/ses-1mo/anat/sub-01_ses-1mo_run-001_space-MNIInfant_cohort-1_dseg.n xcp_d/sub-01/ses-1mo/func xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_desc-dcan_qc.hdf5 xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_desc-preproc_design.tsv +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_desc-preproc_design.json xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_motion.json xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_motion.tsv xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_outliers.json diff --git a/xcp_d/tests/data/test_pnc_cifti_outputs.txt b/xcp_d/tests/data/test_pnc_cifti_outputs.txt index 2da4093f5..a0aa19861 100644 --- a/xcp_d/tests/data/test_pnc_cifti_outputs.txt +++ b/xcp_d/tests/data/test_pnc_cifti_outputs.txt @@ -104,6 +104,7 @@ xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleb xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_desc-filtered_motion.json xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_desc-filtered_motion.tsv xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_design.tsv +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_design.json xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_outliers.json xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_outliers.tsv xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S1052Parcels_coverage.tsv diff --git a/xcp_d/tests/data/test_pnc_nifti_outputs.txt b/xcp_d/tests/data/test_pnc_nifti_outputs.txt index f11536ea1..1deb436ec 100644 --- a/xcp_d/tests/data/test_pnc_nifti_outputs.txt +++ b/xcp_d/tests/data/test_pnc_nifti_outputs.txt @@ -54,6 +54,7 @@ xcp_d/sub-1648798153/ses-PNC1/func xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_desc-filtered_motion.json xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_desc-filtered_motion.tsv xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_desc-preproc_design.tsv +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_desc-preproc_design.json xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_outliers.json xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_outliers.tsv xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-4S1052Parcels_coverage.tsv @@ -150,6 +151,7 @@ xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space- xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_desc-filtered_motion.json xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_desc-filtered_motion.tsv xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_desc-preproc_design.tsv +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_desc-preproc_design.json xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_outliers.json xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_outliers.tsv xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-4S1052Parcels_coverage.tsv From b8df3029234d0e153d67dde8244ca039e218be99 Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Tue, 10 Oct 2023 18:18:49 -0400 Subject: [PATCH 10/60] Update bids.py --- xcp_d/utils/bids.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xcp_d/utils/bids.py b/xcp_d/utils/bids.py index 0cc102be2..ca20ca241 100644 --- a/xcp_d/utils/bids.py +++ b/xcp_d/utils/bids.py @@ -704,12 +704,12 @@ def write_dataset_description(fmri_dir, xcpd_dir): if "preprocessed" in dset_desc["DatasetLinks"].keys(): LOGGER.warning("'preprocessed' is already a dataset link. Overwriting.") - dset_desc["DatasetLinks"]["preprocessed"] = fmri_dir + dset_desc["DatasetLinks"]["preprocessed"] = str(fmri_dir) if "xcp_d" in dset_desc["DatasetLinks"].keys(): LOGGER.warning("'xcp_d' is already a dataset link. Overwriting.") - dset_desc["DatasetLinks"]["xcp_d"] = xcpd_dir + dset_desc["DatasetLinks"]["xcp_d"] = str(xcpd_dir) xcpd_dset_description = os.path.join(xcpd_dir, "dataset_description.json") if os.path.isfile(xcpd_dset_description): From e60a6565ae9b578e443f64c2d7cfbb8e2fd6ebf0 Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Tue, 10 Oct 2023 18:21:46 -0400 Subject: [PATCH 11/60] Update concatenation.py --- xcp_d/workflows/concatenation.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/xcp_d/workflows/concatenation.py b/xcp_d/workflows/concatenation.py index c6f265d0b..b9e2c229f 100644 --- a/xcp_d/workflows/concatenation.py +++ b/xcp_d/workflows/concatenation.py @@ -255,7 +255,7 @@ def init_concatenate_data_wf( ) # fmt:off workflow.connect([ - (concatenate_inputs, filtered_motion_sources, [("filtered_motion", "in1")]), + (filter_out_failed_runs, filtered_motion_sources, [("filtered_motion", "in1")]), (filtered_motion_sources, ds_filtered_motion, [("bids_uris", "Sources")]), ]) # fmt:on @@ -291,7 +291,7 @@ def init_concatenate_data_wf( ) # fmt:off workflow.connect([ - (concatenate_inputs, temporal_mask_sources, [("temporal_mask", "in1")]), + (filter_out_failed_runs, temporal_mask_sources, [("temporal_mask", "in1")]), (temporal_mask_sources, ds_temporal_mask, [("bids_uris", "Sources")]), ]) # fmt:on @@ -330,7 +330,7 @@ def init_concatenate_data_wf( ) # fmt:off workflow.connect([ - (concatenate_inputs, timeseries_sources, [("timeseries", "in1")]), + (filter_out_failed_runs, timeseries_sources, [("timeseries", "in1")]), (timeseries_sources, ds_timeseries, [("bids_uris", "Sources")]), ]) # fmt:on @@ -385,7 +385,7 @@ def init_concatenate_data_wf( ) # fmt:off workflow.connect([ - (concatenate_inputs, timeseries_ciftis_sources, [("timeseries_ciftis", "in1")]), + (filter_out_failed_runs, timeseries_ciftis_sources, [("timeseries_ciftis", "in1")]), (timeseries_ciftis_sources, ds_timeseries_cifti_files, [("bids_uris", "Sources")]), ]) # fmt:on @@ -475,7 +475,9 @@ def init_concatenate_data_wf( ) # fmt:off workflow.connect([ - (concatenate_inputs, censored_filtered_bold_sources, [("censored_denoised_bold", "in1")]), + (filter_out_failed_runs, censored_filtered_bold_sources, [ + ("censored_denoised_bold", "in1"), + ]), (censored_filtered_bold_sources, ds_censored_filtered_bold, [("bids_uris", "Sources")]), ]) # fmt:on @@ -502,7 +504,7 @@ def init_concatenate_data_wf( ) # fmt:off workflow.connect([ - (concatenate_inputs, smoothed_denoised_bold_sources, [ + (filter_out_failed_runs, smoothed_denoised_bold_sources, [ ("smoothed_denoised_bold", "in1"), ]), (smoothed_denoised_bold_sources, ds_smoothed_denoised_bold, [ @@ -536,7 +538,7 @@ def init_concatenate_data_wf( # fmt:off workflow.connect([ (clean_name_source, ds_interpolated_filtered_bold, [("name_source", "source_file")]), - (concatenate_inputs, ds_interpolated_filtered_bold, [ + (filter_out_failed_runs, ds_interpolated_filtered_bold, [ ("interpolated_filtered_bold", "in_file"), ]), ]) From 7880f8a4b2eb3fb2a520c11fe58699ab478a854a Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Tue, 10 Oct 2023 21:17:48 -0400 Subject: [PATCH 12/60] Update concatenation.py --- xcp_d/workflows/concatenation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xcp_d/workflows/concatenation.py b/xcp_d/workflows/concatenation.py index 2f44ce9e5..87937516f 100644 --- a/xcp_d/workflows/concatenation.py +++ b/xcp_d/workflows/concatenation.py @@ -526,7 +526,7 @@ def init_concatenate_data_wf( ) # fmt:off workflow.connect([ - (concatenate_inputs, interpolated_filtered_bold_sources, [ + (filter_out_failed_runs, interpolated_filtered_bold_sources, [ ("interpolated_filtered_bold", "in1"), ]), (interpolated_filtered_bold_sources, ds_interpolated_filtered_bold, [ From 9d4287ea1339a668e67edc352c38580660adf422 Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Tue, 10 Oct 2023 22:03:54 -0400 Subject: [PATCH 13/60] Update concatenation.py --- xcp_d/workflows/concatenation.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/xcp_d/workflows/concatenation.py b/xcp_d/workflows/concatenation.py index 87937516f..5e837f68e 100644 --- a/xcp_d/workflows/concatenation.py +++ b/xcp_d/workflows/concatenation.py @@ -514,6 +514,15 @@ def init_concatenate_data_wf( # fmt:on if dcan_qc: + # fmt:off + workflow.connect([ + (clean_name_source, ds_interpolated_filtered_bold, [("name_source", "source_file")]), + (concatenate_inputs, ds_interpolated_filtered_bold, [ + ("interpolated_filtered_bold", "in_file"), + ]), + ]) + # fmt:on + interpolated_filtered_bold_sources = pe.Node( InferBIDSURIs( numinputs=1, @@ -535,13 +544,4 @@ def init_concatenate_data_wf( ]) # fmt:on - # fmt:off - workflow.connect([ - (clean_name_source, ds_interpolated_filtered_bold, [("name_source", "source_file")]), - (filter_out_failed_runs, ds_interpolated_filtered_bold, [ - ("interpolated_filtered_bold", "in_file"), - ]), - ]) - # fmt:on - return workflow From 6adc88d557482d74e48d1eb5e7071d36135bcc3f Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Wed, 11 Oct 2023 09:05:48 -0400 Subject: [PATCH 14/60] Update expected outputs. --- .../data/test_ds001419_cifti_outputs.txt | 76 +++++++++++++------ .../data/test_ds001419_nifti_outputs.txt | 66 ++++++++++------ ...st_fmriprep_without_freesurfer_outputs.txt | 26 +++---- xcp_d/tests/data/test_nibabies_outputs.txt | 18 ++--- xcp_d/tests/data/test_pnc_cifti_outputs.txt | 22 +++--- .../data/test_pnc_cifti_t2wonly_outputs.txt | 20 ++--- xcp_d/tests/data/test_pnc_nifti_outputs.txt | 34 ++++----- xcp_d/workflows/concatenation.py | 16 ++-- 8 files changed, 164 insertions(+), 114 deletions(-) diff --git a/xcp_d/tests/data/test_ds001419_cifti_outputs.txt b/xcp_d/tests/data/test_ds001419_cifti_outputs.txt index 95dd5618f..f484fc59f 100644 --- a/xcp_d/tests/data/test_ds001419_cifti_outputs.txt +++ b/xcp_d/tests/data/test_ds001419_cifti_outputs.txt @@ -22,10 +22,10 @@ xcp_d/atlas-Glasser_dseg.json xcp_d/atlas-Glasser_dseg.tsv xcp_d/atlas-Gordon_dseg.json xcp_d/atlas-Gordon_dseg.tsv -xcp_d/atlas-Tian_dseg.json -xcp_d/atlas-Tian_dseg.tsv xcp_d/atlas-HCP_dseg.json xcp_d/atlas-HCP_dseg.tsv +xcp_d/atlas-Tian_dseg.json +xcp_d/atlas-Tian_dseg.tsv xcp_d/dataset_description.json xcp_d/desc-linc_qc.json xcp_d/logs @@ -42,8 +42,8 @@ xcp_d/space-fsLR_atlas-4S852Parcels_den-91k_dseg.dlabel.nii xcp_d/space-fsLR_atlas-4S952Parcels_den-91k_dseg.dlabel.nii xcp_d/space-fsLR_atlas-Glasser_den-91k_dseg.dlabel.nii xcp_d/space-fsLR_atlas-Gordon_den-91k_dseg.dlabel.nii -xcp_d/space-fsLR_atlas-Tian_den-91k_dseg.dlabel.nii xcp_d/space-fsLR_atlas-HCP_den-91k_dseg.dlabel.nii +xcp_d/space-fsLR_atlas-Tian_den-91k_dseg.dlabel.nii xcp_d/sub-01 xcp_d/sub-01.html xcp_d/sub-01/anat @@ -51,13 +51,15 @@ xcp_d/sub-01/anat/sub-01_space-MNI152NLin2009cAsym_desc-preproc_T1w.nii.gz xcp_d/sub-01/anat/sub-01_space-MNI152NLin2009cAsym_dseg.nii.gz xcp_d/sub-01/func xcp_d/sub-01/func/sub-01_task-imagery_desc-dcan_qc.hdf5 +xcp_d/sub-01/func/sub-01_task-imagery_desc-filtered_motion.json xcp_d/sub-01/func/sub-01_task-imagery_desc-filtered_motion.tsv +xcp_d/sub-01/func/sub-01_task-imagery_outliers.json xcp_d/sub-01/func/sub-01_task-imagery_outliers.tsv xcp_d/sub-01/func/sub-01_task-imagery_run-01_desc-dcan_qc.hdf5 xcp_d/sub-01/func/sub-01_task-imagery_run-01_desc-filtered_motion.json xcp_d/sub-01/func/sub-01_task-imagery_run-01_desc-filtered_motion.tsv -xcp_d/sub-01/func/sub-01_task-imagery_run-01_design.tsv xcp_d/sub-01/func/sub-01_task-imagery_run-01_design.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_design.tsv xcp_d/sub-01/func/sub-01_task-imagery_run-01_outliers.json xcp_d/sub-01/func/sub-01_task-imagery_run-01_outliers.tsv xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-4S1052Parcels_coverage.tsv @@ -144,13 +146,6 @@ xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-Gordon_den-91k_tim xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-Gordon_measure-pearsoncorrelation_conmat.tsv xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-Gordon_reho.tsv xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-Gordon_timeseries.tsv -xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-Tian_coverage.tsv -xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-Tian_den-91k_coverage.pscalar.nii -xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-Tian_den-91k_measure-pearsoncorrelation_conmat.pconn.nii -xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-Tian_den-91k_timeseries.ptseries.nii -xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-Tian_measure-pearsoncorrelation_conmat.tsv -xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-Tian_reho.tsv -xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-Tian_timeseries.tsv xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-HCP_coverage.tsv xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-HCP_den-91k_coverage.pscalar.nii xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-HCP_den-91k_measure-pearsoncorrelation_conmat.pconn.nii @@ -158,6 +153,13 @@ xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-HCP_den-91k_timese xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-HCP_measure-pearsoncorrelation_conmat.tsv xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-HCP_reho.tsv xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-HCP_timeseries.tsv +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-Tian_coverage.tsv +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-Tian_den-91k_coverage.pscalar.nii +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-Tian_den-91k_measure-pearsoncorrelation_conmat.pconn.nii +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-Tian_den-91k_timeseries.ptseries.nii +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-Tian_measure-pearsoncorrelation_conmat.tsv +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-Tian_reho.tsv +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-Tian_timeseries.tsv xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_den-91k_desc-denoisedSmoothed_bold.dtseries.nii xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_den-91k_desc-denoisedSmoothed_bold.json xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_den-91k_desc-denoised_bold.dtseries.nii @@ -170,8 +172,8 @@ xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_den-91k_reho.json xcp_d/sub-01/func/sub-01_task-imagery_run-02_desc-dcan_qc.hdf5 xcp_d/sub-01/func/sub-01_task-imagery_run-02_desc-filtered_motion.json xcp_d/sub-01/func/sub-01_task-imagery_run-02_desc-filtered_motion.tsv -xcp_d/sub-01/func/sub-01_task-imagery_run-02_design.tsv xcp_d/sub-01/func/sub-01_task-imagery_run-02_design.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_design.tsv xcp_d/sub-01/func/sub-01_task-imagery_run-02_outliers.json xcp_d/sub-01/func/sub-01_task-imagery_run-02_outliers.tsv xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-4S1052Parcels_coverage.tsv @@ -258,13 +260,6 @@ xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-Gordon_den-91k_tim xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-Gordon_measure-pearsoncorrelation_conmat.tsv xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-Gordon_reho.tsv xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-Gordon_timeseries.tsv -xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-Tian_coverage.tsv -xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-Tian_den-91k_coverage.pscalar.nii -xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-Tian_den-91k_measure-pearsoncorrelation_conmat.pconn.nii -xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-Tian_den-91k_timeseries.ptseries.nii -xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-Tian_measure-pearsoncorrelation_conmat.tsv -xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-Tian_reho.tsv -xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-Tian_timeseries.tsv xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-HCP_coverage.tsv xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-HCP_den-91k_coverage.pscalar.nii xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-HCP_den-91k_measure-pearsoncorrelation_conmat.pconn.nii @@ -272,6 +267,13 @@ xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-HCP_den-91k_timese xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-HCP_measure-pearsoncorrelation_conmat.tsv xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-HCP_reho.tsv xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-HCP_timeseries.tsv +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-Tian_coverage.tsv +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-Tian_den-91k_coverage.pscalar.nii +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-Tian_den-91k_measure-pearsoncorrelation_conmat.pconn.nii +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-Tian_den-91k_timeseries.ptseries.nii +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-Tian_measure-pearsoncorrelation_conmat.tsv +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-Tian_reho.tsv +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-Tian_timeseries.tsv xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_den-91k_desc-denoisedSmoothed_bold.dtseries.nii xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_den-91k_desc-denoisedSmoothed_bold.json xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_den-91k_desc-denoised_bold.dtseries.nii @@ -281,35 +283,65 @@ xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_den-91k_desc-interpolate xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_den-91k_desc-linc_qc.csv xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_den-91k_reho.dscalar.nii xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_den-91k_reho.json +xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_atlas-4S1052Parcels_den-91k_timeseries.json xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_atlas-4S1052Parcels_den-91k_timeseries.ptseries.nii +xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_atlas-4S1052Parcels_timeseries.json xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_atlas-4S1052Parcels_timeseries.tsv +xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_atlas-4S152Parcels_den-91k_timeseries.json xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_atlas-4S152Parcels_den-91k_timeseries.ptseries.nii +xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_atlas-4S152Parcels_timeseries.json xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_atlas-4S152Parcels_timeseries.tsv +xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_atlas-4S252Parcels_den-91k_timeseries.json xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_atlas-4S252Parcels_den-91k_timeseries.ptseries.nii +xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_atlas-4S252Parcels_timeseries.json xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_atlas-4S252Parcels_timeseries.tsv +xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_atlas-4S352Parcels_den-91k_timeseries.json xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_atlas-4S352Parcels_den-91k_timeseries.ptseries.nii +xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_atlas-4S352Parcels_timeseries.json xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_atlas-4S352Parcels_timeseries.tsv +xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_atlas-4S452Parcels_den-91k_timeseries.json xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_atlas-4S452Parcels_den-91k_timeseries.ptseries.nii +xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_atlas-4S452Parcels_timeseries.json xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_atlas-4S452Parcels_timeseries.tsv +xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_atlas-4S552Parcels_den-91k_timeseries.json xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_atlas-4S552Parcels_den-91k_timeseries.ptseries.nii +xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_atlas-4S552Parcels_timeseries.json xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_atlas-4S552Parcels_timeseries.tsv +xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_atlas-4S652Parcels_den-91k_timeseries.json xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_atlas-4S652Parcels_den-91k_timeseries.ptseries.nii +xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_atlas-4S652Parcels_timeseries.json xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_atlas-4S652Parcels_timeseries.tsv +xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_atlas-4S752Parcels_den-91k_timeseries.json xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_atlas-4S752Parcels_den-91k_timeseries.ptseries.nii +xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_atlas-4S752Parcels_timeseries.json xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_atlas-4S752Parcels_timeseries.tsv +xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_atlas-4S852Parcels_den-91k_timeseries.json xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_atlas-4S852Parcels_den-91k_timeseries.ptseries.nii +xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_atlas-4S852Parcels_timeseries.json xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_atlas-4S852Parcels_timeseries.tsv +xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_atlas-4S952Parcels_den-91k_timeseries.json xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_atlas-4S952Parcels_den-91k_timeseries.ptseries.nii +xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_atlas-4S952Parcels_timeseries.json xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_atlas-4S952Parcels_timeseries.tsv +xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_atlas-Glasser_den-91k_timeseries.json xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_atlas-Glasser_den-91k_timeseries.ptseries.nii +xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_atlas-Glasser_timeseries.json xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_atlas-Glasser_timeseries.tsv +xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_atlas-Gordon_den-91k_timeseries.json xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_atlas-Gordon_den-91k_timeseries.ptseries.nii +xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_atlas-Gordon_timeseries.json xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_atlas-Gordon_timeseries.tsv -xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_atlas-Tian_den-91k_timeseries.ptseries.nii -xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_atlas-Tian_timeseries.tsv +xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_atlas-HCP_den-91k_timeseries.json xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_atlas-HCP_den-91k_timeseries.ptseries.nii +xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_atlas-HCP_timeseries.json xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_atlas-HCP_timeseries.tsv +xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_atlas-Tian_den-91k_timeseries.json +xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_atlas-Tian_den-91k_timeseries.ptseries.nii +xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_atlas-Tian_timeseries.json +xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_atlas-Tian_timeseries.tsv xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_den-91k_desc-denoisedSmoothed_bold.dtseries.nii +xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_den-91k_desc-denoisedSmoothed_bold.json xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_den-91k_desc-denoised_bold.dtseries.nii +xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_den-91k_desc-denoised_bold.json xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_den-91k_desc-interpolated_bold.dtseries.nii -xcp_d/sub-01_executive_summary.html +xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_den-91k_desc-interpolated_bold.jsonxcp_d/sub-01_executive_summary.html diff --git a/xcp_d/tests/data/test_ds001419_nifti_outputs.txt b/xcp_d/tests/data/test_ds001419_nifti_outputs.txt index 2f78e96bc..0b2503777 100644 --- a/xcp_d/tests/data/test_ds001419_nifti_outputs.txt +++ b/xcp_d/tests/data/test_ds001419_nifti_outputs.txt @@ -22,10 +22,10 @@ xcp_d/atlas-Glasser_dseg.json xcp_d/atlas-Glasser_dseg.tsv xcp_d/atlas-Gordon_dseg.json xcp_d/atlas-Gordon_dseg.tsv -xcp_d/atlas-Tian_dseg.json -xcp_d/atlas-Tian_dseg.tsv xcp_d/atlas-HCP_dseg.json xcp_d/atlas-HCP_dseg.tsv +xcp_d/atlas-Tian_dseg.json +xcp_d/atlas-Tian_dseg.tsv xcp_d/dataset_description.json xcp_d/desc-linc_qc.json xcp_d/logs @@ -42,20 +42,22 @@ xcp_d/space-MNI152NLin2009cAsym_atlas-4S852Parcels_res-2_dseg.nii.gz xcp_d/space-MNI152NLin2009cAsym_atlas-4S952Parcels_res-2_dseg.nii.gz xcp_d/space-MNI152NLin2009cAsym_atlas-Glasser_res-2_dseg.nii.gz xcp_d/space-MNI152NLin2009cAsym_atlas-Gordon_res-2_dseg.nii.gz -xcp_d/space-MNI152NLin2009cAsym_atlas-Tian_res-2_dseg.nii.gz xcp_d/space-MNI152NLin2009cAsym_atlas-HCP_res-2_dseg.nii.gz +xcp_d/space-MNI152NLin2009cAsym_atlas-Tian_res-2_dseg.nii.gz xcp_d/sub-01 xcp_d/sub-01.html xcp_d/sub-01/anat xcp_d/sub-01/anat/sub-01_space-MNI152NLin2009cAsym_desc-preproc_T1w.nii.gz xcp_d/sub-01/anat/sub-01_space-MNI152NLin2009cAsym_dseg.nii.gz xcp_d/sub-01/func +xcp_d/sub-01/func/sub-01_task-imagery_desc-filtered_motion.json xcp_d/sub-01/func/sub-01_task-imagery_desc-filtered_motion.tsv +xcp_d/sub-01/func/sub-01_task-imagery_outliers.json xcp_d/sub-01/func/sub-01_task-imagery_outliers.tsv xcp_d/sub-01/func/sub-01_task-imagery_run-01_desc-filtered_motion.json xcp_d/sub-01/func/sub-01_task-imagery_run-01_desc-filtered_motion.tsv -xcp_d/sub-01/func/sub-01_task-imagery_run-01_desc-preproc_design.tsv xcp_d/sub-01/func/sub-01_task-imagery_run-01_desc-preproc_design.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_desc-preproc_design.tsv xcp_d/sub-01/func/sub-01_task-imagery_run-01_outliers.json xcp_d/sub-01/func/sub-01_task-imagery_run-01_outliers.tsv xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-4S1052Parcels_coverage.tsv @@ -130,18 +132,18 @@ xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-Gor xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-Gordon_measure-pearsoncorrelation_desc-33volumes_conmat.tsv xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-Gordon_reho.tsv xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-Gordon_timeseries.tsv -xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-Tian_coverage.tsv -xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-Tian_measure-pearsoncorrelation_conmat.tsv -xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-Tian_measure-pearsoncorrelation_desc-26volumes_conmat.tsv -xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-Tian_measure-pearsoncorrelation_desc-33volumes_conmat.tsv -xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-Tian_reho.tsv -xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-Tian_timeseries.tsv xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-HCP_coverage.tsv xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-HCP_measure-pearsoncorrelation_conmat.tsv xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-HCP_measure-pearsoncorrelation_desc-26volumes_conmat.tsv xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-HCP_measure-pearsoncorrelation_desc-33volumes_conmat.tsv xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-HCP_reho.tsv xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-HCP_timeseries.tsv +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-Tian_coverage.tsv +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-Tian_measure-pearsoncorrelation_conmat.tsv +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-Tian_measure-pearsoncorrelation_desc-26volumes_conmat.tsv +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-Tian_measure-pearsoncorrelation_desc-33volumes_conmat.tsv +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-Tian_reho.tsv +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-Tian_timeseries.tsv xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_desc-linc_qc.csv xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_res-2_desc-denoisedSmoothed_bold.json xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_res-2_desc-denoisedSmoothed_bold.nii.gz @@ -151,8 +153,8 @@ xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_res-2_reh xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_res-2_reho.nii.gz xcp_d/sub-01/func/sub-01_task-imagery_run-02_desc-filtered_motion.json xcp_d/sub-01/func/sub-01_task-imagery_run-02_desc-filtered_motion.tsv -xcp_d/sub-01/func/sub-01_task-imagery_run-02_desc-preproc_design.tsv xcp_d/sub-01/func/sub-01_task-imagery_run-02_desc-preproc_design.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_desc-preproc_design.tsv xcp_d/sub-01/func/sub-01_task-imagery_run-02_outliers.json xcp_d/sub-01/func/sub-01_task-imagery_run-02_outliers.tsv xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-4S1052Parcels_coverage.tsv @@ -227,18 +229,18 @@ xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-Gor xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-Gordon_measure-pearsoncorrelation_desc-33volumes_conmat.tsv xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-Gordon_reho.tsv xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-Gordon_timeseries.tsv -xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-Tian_coverage.tsv -xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-Tian_measure-pearsoncorrelation_conmat.tsv -xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-Tian_measure-pearsoncorrelation_desc-26volumes_conmat.tsv -xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-Tian_measure-pearsoncorrelation_desc-33volumes_conmat.tsv -xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-Tian_reho.tsv -xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-Tian_timeseries.tsv xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-HCP_coverage.tsv xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-HCP_measure-pearsoncorrelation_conmat.tsv xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-HCP_measure-pearsoncorrelation_desc-26volumes_conmat.tsv xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-HCP_measure-pearsoncorrelation_desc-33volumes_conmat.tsv xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-HCP_reho.tsv xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-HCP_timeseries.tsv +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-Tian_coverage.tsv +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-Tian_measure-pearsoncorrelation_conmat.tsv +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-Tian_measure-pearsoncorrelation_desc-26volumes_conmat.tsv +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-Tian_measure-pearsoncorrelation_desc-33volumes_conmat.tsv +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-Tian_reho.tsv +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-Tian_timeseries.tsv xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_desc-linc_qc.csv xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_res-2_desc-denoisedSmoothed_bold.json xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_res-2_desc-denoisedSmoothed_bold.nii.gz @@ -246,28 +248,42 @@ xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_res-2_des xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_res-2_desc-denoised_bold.nii.gz xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_res-2_reho.json xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_res-2_reho.nii.gz +xcp_d/sub-01/func/sub-01_task-imagery_space-MNI152NLin2009cAsym_atlas-4S1052Parcels_timeseries.json xcp_d/sub-01/func/sub-01_task-imagery_space-MNI152NLin2009cAsym_atlas-4S1052Parcels_timeseries.tsv +xcp_d/sub-01/func/sub-01_task-imagery_space-MNI152NLin2009cAsym_atlas-4S152Parcels_timeseries.json xcp_d/sub-01/func/sub-01_task-imagery_space-MNI152NLin2009cAsym_atlas-4S152Parcels_timeseries.tsv +xcp_d/sub-01/func/sub-01_task-imagery_space-MNI152NLin2009cAsym_atlas-4S252Parcels_timeseries.json xcp_d/sub-01/func/sub-01_task-imagery_space-MNI152NLin2009cAsym_atlas-4S252Parcels_timeseries.tsv +xcp_d/sub-01/func/sub-01_task-imagery_space-MNI152NLin2009cAsym_atlas-4S352Parcels_timeseries.json xcp_d/sub-01/func/sub-01_task-imagery_space-MNI152NLin2009cAsym_atlas-4S352Parcels_timeseries.tsv +xcp_d/sub-01/func/sub-01_task-imagery_space-MNI152NLin2009cAsym_atlas-4S452Parcels_timeseries.json xcp_d/sub-01/func/sub-01_task-imagery_space-MNI152NLin2009cAsym_atlas-4S452Parcels_timeseries.tsv +xcp_d/sub-01/func/sub-01_task-imagery_space-MNI152NLin2009cAsym_atlas-4S552Parcels_timeseries.json xcp_d/sub-01/func/sub-01_task-imagery_space-MNI152NLin2009cAsym_atlas-4S552Parcels_timeseries.tsv +xcp_d/sub-01/func/sub-01_task-imagery_space-MNI152NLin2009cAsym_atlas-4S652Parcels_timeseries.json xcp_d/sub-01/func/sub-01_task-imagery_space-MNI152NLin2009cAsym_atlas-4S652Parcels_timeseries.tsv +xcp_d/sub-01/func/sub-01_task-imagery_space-MNI152NLin2009cAsym_atlas-4S752Parcels_timeseries.json xcp_d/sub-01/func/sub-01_task-imagery_space-MNI152NLin2009cAsym_atlas-4S752Parcels_timeseries.tsv +xcp_d/sub-01/func/sub-01_task-imagery_space-MNI152NLin2009cAsym_atlas-4S852Parcels_timeseries.json xcp_d/sub-01/func/sub-01_task-imagery_space-MNI152NLin2009cAsym_atlas-4S852Parcels_timeseries.tsv +xcp_d/sub-01/func/sub-01_task-imagery_space-MNI152NLin2009cAsym_atlas-4S952Parcels_timeseries.json xcp_d/sub-01/func/sub-01_task-imagery_space-MNI152NLin2009cAsym_atlas-4S952Parcels_timeseries.tsv +xcp_d/sub-01/func/sub-01_task-imagery_space-MNI152NLin2009cAsym_atlas-Glasser_timeseries.json xcp_d/sub-01/func/sub-01_task-imagery_space-MNI152NLin2009cAsym_atlas-Glasser_timeseries.tsv +xcp_d/sub-01/func/sub-01_task-imagery_space-MNI152NLin2009cAsym_atlas-Gordon_timeseries.json xcp_d/sub-01/func/sub-01_task-imagery_space-MNI152NLin2009cAsym_atlas-Gordon_timeseries.tsv -xcp_d/sub-01/func/sub-01_task-imagery_space-MNI152NLin2009cAsym_atlas-Tian_timeseries.tsv +xcp_d/sub-01/func/sub-01_task-imagery_space-MNI152NLin2009cAsym_atlas-HCP_timeseries.json xcp_d/sub-01/func/sub-01_task-imagery_space-MNI152NLin2009cAsym_atlas-HCP_timeseries.tsv +xcp_d/sub-01/func/sub-01_task-imagery_space-MNI152NLin2009cAsym_atlas-Tian_timeseries.json +xcp_d/sub-01/func/sub-01_task-imagery_space-MNI152NLin2009cAsym_atlas-Tian_timeseries.tsv xcp_d/sub-01/func/sub-01_task-imagery_space-MNI152NLin2009cAsym_res-2_desc-denoisedSmoothed_bold.json xcp_d/sub-01/func/sub-01_task-imagery_space-MNI152NLin2009cAsym_res-2_desc-denoisedSmoothed_bold.nii.gz xcp_d/sub-01/func/sub-01_task-imagery_space-MNI152NLin2009cAsym_res-2_desc-denoised_bold.json xcp_d/sub-01/func/sub-01_task-imagery_space-MNI152NLin2009cAsym_res-2_desc-denoised_bold.nii.gz xcp_d/sub-01/func/sub-01_task-rest_desc-filtered_motion.json xcp_d/sub-01/func/sub-01_task-rest_desc-filtered_motion.tsv -xcp_d/sub-01/func/sub-01_task-rest_desc-preproc_design.tsv xcp_d/sub-01/func/sub-01_task-rest_desc-preproc_design.json +xcp_d/sub-01/func/sub-01_task-rest_desc-preproc_design.tsv xcp_d/sub-01/func/sub-01_task-rest_outliers.json xcp_d/sub-01/func/sub-01_task-rest_outliers.tsv xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-4S1052Parcels_coverage.tsv @@ -342,18 +358,18 @@ xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-Gordon_measur xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-Gordon_measure-pearsoncorrelation_desc-33volumes_conmat.tsv xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-Gordon_reho.tsv xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-Gordon_timeseries.tsv -xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-Tian_coverage.tsv -xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-Tian_measure-pearsoncorrelation_conmat.tsv -xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-Tian_measure-pearsoncorrelation_desc-26volumes_conmat.tsv -xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-Tian_measure-pearsoncorrelation_desc-33volumes_conmat.tsv -xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-Tian_reho.tsv -xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-Tian_timeseries.tsv xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-HCP_coverage.tsv xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-HCP_measure-pearsoncorrelation_conmat.tsv xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-HCP_measure-pearsoncorrelation_desc-26volumes_conmat.tsv xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-HCP_measure-pearsoncorrelation_desc-33volumes_conmat.tsv xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-HCP_reho.tsv xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-HCP_timeseries.tsv +xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-Tian_coverage.tsv +xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-Tian_measure-pearsoncorrelation_conmat.tsv +xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-Tian_measure-pearsoncorrelation_desc-26volumes_conmat.tsv +xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-Tian_measure-pearsoncorrelation_desc-33volumes_conmat.tsv +xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-Tian_reho.tsv +xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-Tian_timeseries.tsv xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_desc-linc_qc.csv xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_res-2_desc-denoisedSmoothed_bold.json xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_res-2_desc-denoisedSmoothed_bold.nii.gz diff --git a/xcp_d/tests/data/test_fmriprep_without_freesurfer_outputs.txt b/xcp_d/tests/data/test_fmriprep_without_freesurfer_outputs.txt index a608fa821..cf124bb75 100644 --- a/xcp_d/tests/data/test_fmriprep_without_freesurfer_outputs.txt +++ b/xcp_d/tests/data/test_fmriprep_without_freesurfer_outputs.txt @@ -22,10 +22,10 @@ xcp_d/atlas-Glasser_dseg.json xcp_d/atlas-Glasser_dseg.tsv xcp_d/atlas-Gordon_dseg.json xcp_d/atlas-Gordon_dseg.tsv -xcp_d/atlas-Tian_dseg.json -xcp_d/atlas-Tian_dseg.tsv xcp_d/atlas-HCP_dseg.json xcp_d/atlas-HCP_dseg.tsv +xcp_d/atlas-Tian_dseg.json +xcp_d/atlas-Tian_dseg.tsv xcp_d/dataset_description.json xcp_d/desc-linc_qc.json xcp_d/logs @@ -45,8 +45,8 @@ xcp_d/space-MNI152NLin2009cAsym_atlas-4S852Parcels_dseg.nii.gz xcp_d/space-MNI152NLin2009cAsym_atlas-4S952Parcels_dseg.nii.gz xcp_d/space-MNI152NLin2009cAsym_atlas-Glasser_dseg.nii.gz xcp_d/space-MNI152NLin2009cAsym_atlas-Gordon_dseg.nii.gz -xcp_d/space-MNI152NLin2009cAsym_atlas-Tian_dseg.nii.gz xcp_d/space-MNI152NLin2009cAsym_atlas-HCP_dseg.nii.gz +xcp_d/space-MNI152NLin2009cAsym_atlas-Tian_dseg.nii.gz xcp_d/sub-01 xcp_d/sub-01.html xcp_d/sub-01/anat @@ -54,8 +54,8 @@ xcp_d/sub-01/anat/sub-01_space-MNI152NLin2009cAsym_desc-preproc_T1w.nii.gz xcp_d/sub-01/anat/sub-01_space-MNI152NLin2009cAsym_dseg.nii.gz xcp_d/sub-01/func xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_desc-dcan_qc.hdf5 -xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_desc-preproc_design.tsv xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_desc-preproc_design.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_desc-preproc_design.tsv xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_motion.json xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_motion.tsv xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_outliers.json @@ -108,14 +108,14 @@ xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_a xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-Gordon_measure-pearsoncorrelation_conmat.tsv xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-Gordon_reho.tsv xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-Gordon_timeseries.tsv -xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-Tian_coverage.tsv -xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-Tian_measure-pearsoncorrelation_conmat.tsv -xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-Tian_reho.tsv -xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-Tian_timeseries.tsv xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-HCP_coverage.tsv xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-HCP_measure-pearsoncorrelation_conmat.tsv xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-HCP_reho.tsv xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-HCP_timeseries.tsv +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-Tian_coverage.tsv +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-Tian_measure-pearsoncorrelation_conmat.tsv +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-Tian_reho.tsv +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-Tian_timeseries.tsv xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_desc-denoisedSmoothed_bold.json xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_desc-denoisedSmoothed_bold.nii.gz xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_desc-denoised_bold.json @@ -126,8 +126,8 @@ xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_d xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_reho.json xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_reho.nii.gz xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_desc-dcan_qc.hdf5 -xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_desc-preproc_design.tsv xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_desc-preproc_design.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_desc-preproc_design.tsv xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_motion.json xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_motion.tsv xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_outliers.json @@ -180,14 +180,14 @@ xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_a xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-Gordon_measure-pearsoncorrelation_conmat.tsv xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-Gordon_reho.tsv xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-Gordon_timeseries.tsv -xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-Tian_coverage.tsv -xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-Tian_measure-pearsoncorrelation_conmat.tsv -xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-Tian_reho.tsv -xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-Tian_timeseries.tsv xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-HCP_coverage.tsv xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-HCP_measure-pearsoncorrelation_conmat.tsv xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-HCP_reho.tsv xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-HCP_timeseries.tsv +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-Tian_coverage.tsv +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-Tian_measure-pearsoncorrelation_conmat.tsv +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-Tian_reho.tsv +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-Tian_timeseries.tsv xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_desc-denoisedSmoothed_bold.json xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_desc-denoisedSmoothed_bold.nii.gz xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_desc-denoised_bold.json diff --git a/xcp_d/tests/data/test_nibabies_outputs.txt b/xcp_d/tests/data/test_nibabies_outputs.txt index 5e1ecb352..01ac6efca 100644 --- a/xcp_d/tests/data/test_nibabies_outputs.txt +++ b/xcp_d/tests/data/test_nibabies_outputs.txt @@ -22,10 +22,10 @@ xcp_d/atlas-Glasser_dseg.json xcp_d/atlas-Glasser_dseg.tsv xcp_d/atlas-Gordon_dseg.json xcp_d/atlas-Gordon_dseg.tsv -xcp_d/atlas-Tian_dseg.json -xcp_d/atlas-Tian_dseg.tsv xcp_d/atlas-HCP_dseg.json xcp_d/atlas-HCP_dseg.tsv +xcp_d/atlas-Tian_dseg.json +xcp_d/atlas-Tian_dseg.tsv xcp_d/dataset_description.json xcp_d/desc-linc_qc.json xcp_d/logs @@ -42,8 +42,8 @@ xcp_d/space-MNIInfant_atlas-4S852Parcels_cohort-1_dseg.nii.gz xcp_d/space-MNIInfant_atlas-4S952Parcels_cohort-1_dseg.nii.gz xcp_d/space-MNIInfant_atlas-Glasser_cohort-1_dseg.nii.gz xcp_d/space-MNIInfant_atlas-Gordon_cohort-1_dseg.nii.gz -xcp_d/space-MNIInfant_atlas-Tian_cohort-1_dseg.nii.gz xcp_d/space-MNIInfant_atlas-HCP_cohort-1_dseg.nii.gz +xcp_d/space-MNIInfant_atlas-Tian_cohort-1_dseg.nii.gz xcp_d/sub-01 xcp_d/sub-01.html xcp_d/sub-01/ses-1mo @@ -52,8 +52,8 @@ xcp_d/sub-01/ses-1mo/anat/sub-01_ses-1mo_run-001_space-MNIInfant_cohort-1_desc-p xcp_d/sub-01/ses-1mo/anat/sub-01_ses-1mo_run-001_space-MNIInfant_cohort-1_dseg.nii.gz xcp_d/sub-01/ses-1mo/func xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_desc-dcan_qc.hdf5 -xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_desc-preproc_design.tsv xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_desc-preproc_design.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_desc-preproc_design.tsv xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_motion.json xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_motion.tsv xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_outliers.json @@ -118,16 +118,16 @@ xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfan xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-Gordon_cohort-1_measure-pearsoncorrelation_conmat.tsv xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-Gordon_cohort-1_reho.tsv xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-Gordon_cohort-1_timeseries.tsv -xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-Tian_cohort-1_alff.tsv -xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-Tian_cohort-1_coverage.tsv -xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-Tian_cohort-1_measure-pearsoncorrelation_conmat.tsv -xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-Tian_cohort-1_reho.tsv -xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-Tian_cohort-1_timeseries.tsv xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-HCP_cohort-1_alff.tsv xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-HCP_cohort-1_coverage.tsv xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-HCP_cohort-1_measure-pearsoncorrelation_conmat.tsv xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-HCP_cohort-1_reho.tsv xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-HCP_cohort-1_timeseries.tsv +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-Tian_cohort-1_alff.tsv +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-Tian_cohort-1_coverage.tsv +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-Tian_cohort-1_measure-pearsoncorrelation_conmat.tsv +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-Tian_cohort-1_reho.tsv +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-Tian_cohort-1_timeseries.tsv xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_cohort-1_alff.json xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_cohort-1_alff.nii.gz xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_cohort-1_desc-denoised_bold.json diff --git a/xcp_d/tests/data/test_pnc_cifti_outputs.txt b/xcp_d/tests/data/test_pnc_cifti_outputs.txt index a0aa19861..0efc25595 100644 --- a/xcp_d/tests/data/test_pnc_cifti_outputs.txt +++ b/xcp_d/tests/data/test_pnc_cifti_outputs.txt @@ -22,10 +22,10 @@ xcp_d/atlas-Glasser_dseg.json xcp_d/atlas-Glasser_dseg.tsv xcp_d/atlas-Gordon_dseg.json xcp_d/atlas-Gordon_dseg.tsv -xcp_d/atlas-Tian_dseg.json -xcp_d/atlas-Tian_dseg.tsv xcp_d/atlas-HCP_dseg.json xcp_d/atlas-HCP_dseg.tsv +xcp_d/atlas-Tian_dseg.json +xcp_d/atlas-Tian_dseg.tsv xcp_d/dataset_description.json xcp_d/desc-linc_qc.json xcp_d/logs @@ -42,8 +42,8 @@ xcp_d/space-fsLR_atlas-4S852Parcels_den-91k_dseg.dlabel.nii xcp_d/space-fsLR_atlas-4S952Parcels_den-91k_dseg.dlabel.nii xcp_d/space-fsLR_atlas-Glasser_den-91k_dseg.dlabel.nii xcp_d/space-fsLR_atlas-Gordon_den-91k_dseg.dlabel.nii -xcp_d/space-fsLR_atlas-Tian_den-91k_dseg.dlabel.nii xcp_d/space-fsLR_atlas-HCP_den-91k_dseg.dlabel.nii +xcp_d/space-fsLR_atlas-Tian_den-91k_dseg.dlabel.nii xcp_d/sub-1648798153 xcp_d/sub-1648798153.html xcp_d/sub-1648798153/ses-PNC1 @@ -103,8 +103,8 @@ xcp_d/sub-1648798153/ses-PNC1/func xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_desc-dcan_qc.hdf5 xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_desc-filtered_motion.json xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_desc-filtered_motion.tsv -xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_design.tsv xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_design.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_design.tsv xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_outliers.json xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_outliers.tsv xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S1052Parcels_coverage.tsv @@ -191,13 +191,6 @@ xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleb xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-Gordon_measure-pearsoncorrelation_conmat.tsv xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-Gordon_reho.tsv xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-Gordon_timeseries.tsv -xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-Tian_coverage.tsv -xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-Tian_den-91k_coverage.pscalar.nii -xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-Tian_den-91k_measure-pearsoncorrelation_conmat.pconn.nii -xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-Tian_den-91k_timeseries.ptseries.nii -xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-Tian_measure-pearsoncorrelation_conmat.tsv -xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-Tian_reho.tsv -xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-Tian_timeseries.tsv xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-HCP_coverage.tsv xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-HCP_den-91k_coverage.pscalar.nii xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-HCP_den-91k_measure-pearsoncorrelation_conmat.pconn.nii @@ -205,6 +198,13 @@ xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleb xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-HCP_measure-pearsoncorrelation_conmat.tsv xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-HCP_reho.tsv xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-HCP_timeseries.tsv +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-Tian_coverage.tsv +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-Tian_den-91k_coverage.pscalar.nii +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-Tian_den-91k_measure-pearsoncorrelation_conmat.pconn.nii +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-Tian_den-91k_timeseries.ptseries.nii +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-Tian_measure-pearsoncorrelation_conmat.tsv +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-Tian_reho.tsv +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-Tian_timeseries.tsv xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_den-91k_desc-denoisedSmoothed_bold.dtseries.nii xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_den-91k_desc-denoisedSmoothed_bold.json xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_den-91k_desc-denoised_bold.dtseries.nii diff --git a/xcp_d/tests/data/test_pnc_cifti_t2wonly_outputs.txt b/xcp_d/tests/data/test_pnc_cifti_t2wonly_outputs.txt index 0d2c6cdcc..7d41a8ef8 100644 --- a/xcp_d/tests/data/test_pnc_cifti_t2wonly_outputs.txt +++ b/xcp_d/tests/data/test_pnc_cifti_t2wonly_outputs.txt @@ -22,10 +22,10 @@ xcp_d/atlas-Glasser_dseg.json xcp_d/atlas-Glasser_dseg.tsv xcp_d/atlas-Gordon_dseg.json xcp_d/atlas-Gordon_dseg.tsv -xcp_d/atlas-Tian_dseg.json -xcp_d/atlas-Tian_dseg.tsv xcp_d/atlas-HCP_dseg.json xcp_d/atlas-HCP_dseg.tsv +xcp_d/atlas-Tian_dseg.json +xcp_d/atlas-Tian_dseg.tsv xcp_d/dataset_description.json xcp_d/desc-linc_qc.json xcp_d/logs @@ -42,8 +42,8 @@ xcp_d/space-fsLR_atlas-4S852Parcels_den-91k_dseg.dlabel.nii xcp_d/space-fsLR_atlas-4S952Parcels_den-91k_dseg.dlabel.nii xcp_d/space-fsLR_atlas-Glasser_den-91k_dseg.dlabel.nii xcp_d/space-fsLR_atlas-Gordon_den-91k_dseg.dlabel.nii -xcp_d/space-fsLR_atlas-Tian_den-91k_dseg.dlabel.nii xcp_d/space-fsLR_atlas-HCP_den-91k_dseg.dlabel.nii +xcp_d/space-fsLR_atlas-Tian_den-91k_dseg.dlabel.nii xcp_d/sub-1648798153 xcp_d/sub-1648798153.html xcp_d/sub-1648798153/ses-PNC1 @@ -189,13 +189,6 @@ xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-Gordon_measure-pearsoncorrelation_conmat.tsv xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-Gordon_reho.tsv xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-Gordon_timeseries.tsv -xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-Tian_coverage.tsv -xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-Tian_den-91k_coverage.pscalar.nii -xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-Tian_den-91k_measure-pearsoncorrelation_conmat.pconn.nii -xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-Tian_den-91k_timeseries.ptseries.nii -xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-Tian_measure-pearsoncorrelation_conmat.tsv -xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-Tian_reho.tsv -xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-Tian_timeseries.tsv xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-HCP_coverage.tsv xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-HCP_den-91k_coverage.pscalar.nii xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-HCP_den-91k_measure-pearsoncorrelation_conmat.pconn.nii @@ -203,6 +196,13 @@ xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-HCP_measure-pearsoncorrelation_conmat.tsv xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-HCP_reho.tsv xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-HCP_timeseries.tsv +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-Tian_coverage.tsv +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-Tian_den-91k_coverage.pscalar.nii +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-Tian_den-91k_measure-pearsoncorrelation_conmat.pconn.nii +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-Tian_den-91k_timeseries.ptseries.nii +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-Tian_measure-pearsoncorrelation_conmat.tsv +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-Tian_reho.tsv +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-Tian_timeseries.tsv xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_den-91k_desc-denoisedSmoothed_bold.dtseries.nii xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_den-91k_desc-denoisedSmoothed_bold.json xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_den-91k_desc-denoised_bold.dtseries.nii diff --git a/xcp_d/tests/data/test_pnc_nifti_outputs.txt b/xcp_d/tests/data/test_pnc_nifti_outputs.txt index 1deb436ec..83f54c9bd 100644 --- a/xcp_d/tests/data/test_pnc_nifti_outputs.txt +++ b/xcp_d/tests/data/test_pnc_nifti_outputs.txt @@ -22,10 +22,10 @@ xcp_d/atlas-Glasser_dseg.json xcp_d/atlas-Glasser_dseg.tsv xcp_d/atlas-Gordon_dseg.json xcp_d/atlas-Gordon_dseg.tsv -xcp_d/atlas-Tian_dseg.json -xcp_d/atlas-Tian_dseg.tsv xcp_d/atlas-HCP_dseg.json xcp_d/atlas-HCP_dseg.tsv +xcp_d/atlas-Tian_dseg.json +xcp_d/atlas-Tian_dseg.tsv xcp_d/dataset_description.json xcp_d/desc-linc_qc.json xcp_d/logs @@ -42,8 +42,8 @@ xcp_d/space-MNI152NLin6Asym_atlas-4S852Parcels_res-2_dseg.nii.gz xcp_d/space-MNI152NLin6Asym_atlas-4S952Parcels_res-2_dseg.nii.gz xcp_d/space-MNI152NLin6Asym_atlas-Glasser_res-2_dseg.nii.gz xcp_d/space-MNI152NLin6Asym_atlas-Gordon_res-2_dseg.nii.gz -xcp_d/space-MNI152NLin6Asym_atlas-Tian_res-2_dseg.nii.gz xcp_d/space-MNI152NLin6Asym_atlas-HCP_res-2_dseg.nii.gz +xcp_d/space-MNI152NLin6Asym_atlas-Tian_res-2_dseg.nii.gz xcp_d/sub-1648798153 xcp_d/sub-1648798153.html xcp_d/sub-1648798153/ses-PNC1 @@ -53,8 +53,8 @@ xcp_d/sub-1648798153/ses-PNC1/anat/sub-1648798153_ses-PNC1_acq-refaced_space-MNI xcp_d/sub-1648798153/ses-PNC1/func xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_desc-filtered_motion.json xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_desc-filtered_motion.tsv -xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_desc-preproc_design.tsv xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_desc-preproc_design.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_desc-preproc_design.tsv xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_outliers.json xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_outliers.tsv xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-4S1052Parcels_coverage.tsv @@ -129,18 +129,18 @@ xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space- xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-Gordon_measure-pearsoncorrelation_desc-33volumes_conmat.tsv xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-Gordon_reho.tsv xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-Gordon_timeseries.tsv -xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-Tian_coverage.tsv -xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-Tian_measure-pearsoncorrelation_conmat.tsv -xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-Tian_measure-pearsoncorrelation_desc-26volumes_conmat.tsv -xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-Tian_measure-pearsoncorrelation_desc-33volumes_conmat.tsv -xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-Tian_reho.tsv -xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-Tian_timeseries.tsv xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-HCP_coverage.tsv xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-HCP_measure-pearsoncorrelation_conmat.tsv xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-HCP_measure-pearsoncorrelation_desc-26volumes_conmat.tsv xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-HCP_measure-pearsoncorrelation_desc-33volumes_conmat.tsv xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-HCP_reho.tsv xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-HCP_timeseries.tsv +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-Tian_coverage.tsv +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-Tian_measure-pearsoncorrelation_conmat.tsv +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-Tian_measure-pearsoncorrelation_desc-26volumes_conmat.tsv +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-Tian_measure-pearsoncorrelation_desc-33volumes_conmat.tsv +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-Tian_reho.tsv +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-Tian_timeseries.tsv xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_desc-linc_qc.csv xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_res-2_desc-denoisedSmoothed_bold.json xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_res-2_desc-denoisedSmoothed_bold.nii.gz @@ -150,8 +150,8 @@ xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space- xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_res-2_reho.nii.gz xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_desc-filtered_motion.json xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_desc-filtered_motion.tsv -xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_desc-preproc_design.tsv xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_desc-preproc_design.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_desc-preproc_design.tsv xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_outliers.json xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_outliers.tsv xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-4S1052Parcels_coverage.tsv @@ -226,18 +226,18 @@ xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleb xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-Gordon_measure-pearsoncorrelation_desc-33volumes_conmat.tsv xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-Gordon_reho.tsv xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-Gordon_timeseries.tsv -xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-Tian_coverage.tsv -xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-Tian_measure-pearsoncorrelation_conmat.tsv -xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-Tian_measure-pearsoncorrelation_desc-26volumes_conmat.tsv -xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-Tian_measure-pearsoncorrelation_desc-33volumes_conmat.tsv -xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-Tian_reho.tsv -xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-Tian_timeseries.tsv xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-HCP_coverage.tsv xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-HCP_measure-pearsoncorrelation_conmat.tsv xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-HCP_measure-pearsoncorrelation_desc-26volumes_conmat.tsv xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-HCP_measure-pearsoncorrelation_desc-33volumes_conmat.tsv xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-HCP_reho.tsv xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-HCP_timeseries.tsv +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-Tian_coverage.tsv +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-Tian_measure-pearsoncorrelation_conmat.tsv +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-Tian_measure-pearsoncorrelation_desc-26volumes_conmat.tsv +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-Tian_measure-pearsoncorrelation_desc-33volumes_conmat.tsv +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-Tian_reho.tsv +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-Tian_timeseries.tsv xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_desc-linc_qc.csv xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_res-2_desc-denoisedSmoothed_bold.json xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_res-2_desc-denoisedSmoothed_bold.nii.gz diff --git a/xcp_d/workflows/concatenation.py b/xcp_d/workflows/concatenation.py index 5e837f68e..d0937d57f 100644 --- a/xcp_d/workflows/concatenation.py +++ b/xcp_d/workflows/concatenation.py @@ -1,4 +1,6 @@ """Workflows for concatenating postprocessed data.""" +import os + from nipype.interfaces import utility as niu from nipype.pipeline import engine as pe from niworkflows.engine.workflows import LiterateWorkflow as Workflow @@ -247,7 +249,7 @@ def init_concatenate_data_wf( InferBIDSURIs( numinputs=1, dataset_name="xcp_d", - dataset_path=output_dir, + dataset_path=os.path.join(output_dir, "xcp_d"), ), name="filtered_motion_sources", run_without_submitting=True, @@ -283,7 +285,7 @@ def init_concatenate_data_wf( InferBIDSURIs( numinputs=1, dataset_name="xcp_d", - dataset_path=output_dir, + dataset_path=os.path.join(output_dir, "xcp_d"), ), name="temporal_mask_sources", run_without_submitting=True, @@ -321,7 +323,7 @@ def init_concatenate_data_wf( InferBIDSURIs( numinputs=1, dataset_name="xcp_d", - dataset_path=output_dir, + dataset_path=os.path.join(output_dir, "xcp_d"), ), name="timeseries_sources", run_without_submitting=True, @@ -376,7 +378,7 @@ def init_concatenate_data_wf( InferBIDSURIs( numinputs=1, dataset_name="xcp_d", - dataset_path=output_dir, + dataset_path=os.path.join(output_dir, "xcp_d"), ), name="timeseries_ciftis_sources", run_without_submitting=True, @@ -467,7 +469,7 @@ def init_concatenate_data_wf( InferBIDSURIs( numinputs=1, dataset_name="xcp_d", - dataset_path=output_dir, + dataset_path=os.path.join(output_dir, "xcp_d"), ), name="censored_filtered_bold_sources", run_without_submitting=True, @@ -496,7 +498,7 @@ def init_concatenate_data_wf( InferBIDSURIs( numinputs=1, dataset_name="xcp_d", - dataset_path=output_dir, + dataset_path=os.path.join(output_dir, "xcp_d"), ), name="smoothed_denoised_bold_sources", run_without_submitting=True, @@ -527,7 +529,7 @@ def init_concatenate_data_wf( InferBIDSURIs( numinputs=1, dataset_name="xcp_d", - dataset_path=output_dir, + dataset_path=os.path.join(output_dir, "xcp_d"), ), name="interpolated_filtered_bold_sources", run_without_submitting=True, From 36128c205fa385f993eb4bfb2c2bedc04a1d7fad Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Wed, 11 Oct 2023 09:59:56 -0400 Subject: [PATCH 15/60] Fix outputs. --- xcp_d/tests/data/test_ds001419_cifti_outputs.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xcp_d/tests/data/test_ds001419_cifti_outputs.txt b/xcp_d/tests/data/test_ds001419_cifti_outputs.txt index f484fc59f..5852b9cf6 100644 --- a/xcp_d/tests/data/test_ds001419_cifti_outputs.txt +++ b/xcp_d/tests/data/test_ds001419_cifti_outputs.txt @@ -344,4 +344,5 @@ xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_den-91k_desc-denoisedSmoothed_b xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_den-91k_desc-denoised_bold.dtseries.nii xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_den-91k_desc-denoised_bold.json xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_den-91k_desc-interpolated_bold.dtseries.nii -xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_den-91k_desc-interpolated_bold.jsonxcp_d/sub-01_executive_summary.html +xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_den-91k_desc-interpolated_bold.json +xcp_d/sub-01_executive_summary.html From dd4f805d65d4fc6f6e994857be0cb232e7fceb0b Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Wed, 11 Oct 2023 10:41:18 -0400 Subject: [PATCH 16/60] More work. --- xcp_d/workflows/bold.py | 1 + xcp_d/workflows/cifti.py | 1 + xcp_d/workflows/concatenation.py | 137 +++++++++++++------------------ xcp_d/workflows/outputs.py | 80 ++++++++++++++---- 4 files changed, 123 insertions(+), 96 deletions(-) diff --git a/xcp_d/workflows/bold.py b/xcp_d/workflows/bold.py index 3d080175f..55aa84256 100644 --- a/xcp_d/workflows/bold.py +++ b/xcp_d/workflows/bold.py @@ -531,6 +531,7 @@ def init_postprocess_nifti_wf( (inputnode, postproc_derivatives_wf, [ ("fmriprep_confounds_file", "inputnode.fmriprep_confounds_file"), ("atlas_names", "inputnode.atlas_names"), + ("atlas_files", "inputnode.atlas_files"), ]), (prepare_confounds_wf, postproc_derivatives_wf, [ ("outputnode.confounds_file", "inputnode.confounds_file"), diff --git a/xcp_d/workflows/cifti.py b/xcp_d/workflows/cifti.py index 51af290ce..e9c64b861 100644 --- a/xcp_d/workflows/cifti.py +++ b/xcp_d/workflows/cifti.py @@ -500,6 +500,7 @@ def init_postprocess_cifti_wf( (inputnode, postproc_derivatives_wf, [ ("fmriprep_confounds_file", "inputnode.fmriprep_confounds_file"), ("atlas_names", "inputnode.atlas_names"), + ("atlas_files", "inputnode.atlas_files"), ]), (denoise_bold_wf, postproc_derivatives_wf, [ ("outputnode.interpolated_filtered_bold", "inputnode.interpolated_filtered_bold"), diff --git a/xcp_d/workflows/concatenation.py b/xcp_d/workflows/concatenation.py index d0937d57f..71ce0438f 100644 --- a/xcp_d/workflows/concatenation.py +++ b/xcp_d/workflows/concatenation.py @@ -133,19 +133,16 @@ def init_concatenate_data_wf( CleanNameSource(), name="clean_name_source", ) - - # fmt:off workflow.connect([(inputnode, clean_name_source, [("name_source", "name_source")])]) - # fmt:on - filter_out_failed_runs = pe.Node( + filter_runs = pe.Node( FilterOutFailedRuns(), - name="filter_out_failed_runs", + name="filter_runs", ) # fmt:off workflow.connect([ - (inputnode, filter_out_failed_runs, [ + (inputnode, filter_runs, [ ("preprocessed_bold", "preprocessed_bold"), ("fmriprep_confounds_file", "fmriprep_confounds_file"), ("filtered_motion", "filtered_motion"), @@ -170,7 +167,7 @@ def init_concatenate_data_wf( # fmt:off workflow.connect([ - (filter_out_failed_runs, concatenate_inputs, [ + (filter_runs, concatenate_inputs, [ ("preprocessed_bold", "preprocessed_bold"), ("fmriprep_confounds_file", "fmriprep_confounds_file"), ("filtered_motion", "filtered_motion"), @@ -206,7 +203,7 @@ def init_concatenate_data_wf( ("anat_brainmask", "inputnode.anat_brainmask"), ]), (clean_name_source, qc_report_wf, [("name_source", "inputnode.name_source")]), - (filter_out_failed_runs, qc_report_wf, [ + (filter_runs, qc_report_wf, [ # nifti-only inputs (("bold_mask", _select_first), "inputnode.bold_mask"), (("boldref", _select_first), "inputnode.boldref"), @@ -225,6 +222,18 @@ def init_concatenate_data_wf( ]) # fmt:on + filtered_motion_src = pe.Node( + InferBIDSURIs( + numinputs=1, + dataset_name="xcp_d", + dataset_path=os.path.join(output_dir, "xcp_d"), + ), + name="filtered_motion_src", + run_without_submitting=True, + mem_gb=1, + ) + workflow.connect([(filter_runs, filtered_motion_src, [("filtered_motion", "in1")])]) + ds_filtered_motion = pe.Node( DerivativesDataSink( base_directory=output_dir, @@ -242,25 +251,21 @@ def init_concatenate_data_wf( workflow.connect([ (clean_name_source, ds_filtered_motion, [("name_source", "source_file")]), (concatenate_inputs, ds_filtered_motion, [("filtered_motion", "in_file")]), + (filtered_motion_src, ds_filtered_motion, [("bids_uris", "Sources")]), ]) # fmt:on - filtered_motion_sources = pe.Node( + temporal_mask_src = pe.Node( InferBIDSURIs( numinputs=1, dataset_name="xcp_d", dataset_path=os.path.join(output_dir, "xcp_d"), ), - name="filtered_motion_sources", + name="temporal_mask_src", run_without_submitting=True, mem_gb=1, ) - # fmt:off - workflow.connect([ - (filter_out_failed_runs, filtered_motion_sources, [("filtered_motion", "in1")]), - (filtered_motion_sources, ds_filtered_motion, [("bids_uris", "Sources")]), - ]) - # fmt:on + workflow.connect([(filter_runs, temporal_mask_src, [("temporal_mask", "in1")])]) ds_temporal_mask = pe.Node( DerivativesDataSink( @@ -278,25 +283,22 @@ def init_concatenate_data_wf( workflow.connect([ (clean_name_source, ds_temporal_mask, [("name_source", "source_file")]), (concatenate_inputs, ds_temporal_mask, [("temporal_mask", "in_file")]), + (temporal_mask_src, ds_temporal_mask, [("bids_uris", "Sources")]), ]) # fmt:on - temporal_mask_sources = pe.Node( + timeseries_src = pe.MapNode( InferBIDSURIs( numinputs=1, dataset_name="xcp_d", dataset_path=os.path.join(output_dir, "xcp_d"), ), - name="temporal_mask_sources", + name="timeseries_src", run_without_submitting=True, mem_gb=1, + iterfield=["in1"], ) - # fmt:off - workflow.connect([ - (filter_out_failed_runs, temporal_mask_sources, [("temporal_mask", "in1")]), - (temporal_mask_sources, ds_temporal_mask, [("bids_uris", "Sources")]), - ]) - # fmt:on + workflow.connect([(filter_runs, timeseries_src, [("timeseries", "in1")])]) ds_timeseries = pe.MapNode( DerivativesDataSink( @@ -316,24 +318,24 @@ def init_concatenate_data_wf( (inputnode, ds_timeseries, [("atlas_names", "atlas")]), (clean_name_source, ds_timeseries, [("name_source", "source_file")]), (concatenate_inputs, ds_timeseries, [("timeseries", "in_file")]), + (timeseries_src, ds_timeseries, [("bids_uris", "Sources")]), ]) # fmt:on - timeseries_sources = pe.MapNode( + censored_filtered_bold_src = pe.Node( InferBIDSURIs( numinputs=1, dataset_name="xcp_d", dataset_path=os.path.join(output_dir, "xcp_d"), ), - name="timeseries_sources", + name="censored_filtered_bold_src", run_without_submitting=True, mem_gb=1, - iterfield=["in1"], ) + # fmt:off workflow.connect([ - (filter_out_failed_runs, timeseries_sources, [("timeseries", "in1")]), - (timeseries_sources, ds_timeseries, [("bids_uris", "Sources")]), + (filter_runs, censored_filtered_bold_src, [("censored_denoised_bold", "in1")]), ]) # fmt:on @@ -351,6 +353,19 @@ def init_concatenate_data_wf( mem_gb=2, ) + timeseries_ciftis_src = pe.MapNode( + InferBIDSURIs( + numinputs=1, + dataset_name="xcp_d", + dataset_path=os.path.join(output_dir, "xcp_d"), + ), + name="timeseries_ciftis_src", + run_without_submitting=True, + mem_gb=1, + iterfield=["in1"], + ) + workflow.connect([(filter_runs, timeseries_ciftis_src, [("timeseries_ciftis", "in1")])]) + ds_timeseries_cifti_files = pe.MapNode( DerivativesDataSink( base_directory=output_dir, @@ -371,24 +386,7 @@ def init_concatenate_data_wf( (clean_name_source, ds_timeseries_cifti_files, [("name_source", "source_file")]), (inputnode, ds_timeseries_cifti_files, [("atlas_names", "atlas")]), (concatenate_inputs, ds_timeseries_cifti_files, [("timeseries_ciftis", "in_file")]), - ]) - # fmt:on - - timeseries_ciftis_sources = pe.MapNode( - InferBIDSURIs( - numinputs=1, - dataset_name="xcp_d", - dataset_path=os.path.join(output_dir, "xcp_d"), - ), - name="timeseries_ciftis_sources", - run_without_submitting=True, - mem_gb=1, - iterfield=["in1"], - ) - # fmt:off - workflow.connect([ - (filter_out_failed_runs, timeseries_ciftis_sources, [("timeseries_ciftis", "in1")]), - (timeseries_ciftis_sources, ds_timeseries_cifti_files, [("bids_uris", "Sources")]), + (timeseries_ciftis_src, ds_timeseries_cifti_files, [("bids_uris", "Sources")]), ]) # fmt:on @@ -432,6 +430,7 @@ def init_concatenate_data_wf( run_without_submitting=True, mem_gb=2, ) + if smoothing: ds_smoothed_denoised_bold = pe.Node( DerivativesDataSink( @@ -462,25 +461,7 @@ def init_concatenate_data_wf( workflow.connect([ (clean_name_source, ds_censored_filtered_bold, [("name_source", "source_file")]), (concatenate_inputs, ds_censored_filtered_bold, [("censored_denoised_bold", "in_file")]), - ]) - # fmt:on - - censored_filtered_bold_sources = pe.Node( - InferBIDSURIs( - numinputs=1, - dataset_name="xcp_d", - dataset_path=os.path.join(output_dir, "xcp_d"), - ), - name="censored_filtered_bold_sources", - run_without_submitting=True, - mem_gb=1, - ) - # fmt:off - workflow.connect([ - (filter_out_failed_runs, censored_filtered_bold_sources, [ - ("censored_denoised_bold", "in1"), - ]), - (censored_filtered_bold_sources, ds_censored_filtered_bold, [("bids_uris", "Sources")]), + (censored_filtered_bold_src, ds_censored_filtered_bold, [("bids_uris", "Sources")]), ]) # fmt:on @@ -494,24 +475,21 @@ def init_concatenate_data_wf( ]) # fmt:on - smoothed_denoised_bold_sources = pe.Node( + smoothed_denoised_bold_src = pe.Node( InferBIDSURIs( numinputs=1, dataset_name="xcp_d", dataset_path=os.path.join(output_dir, "xcp_d"), ), - name="smoothed_denoised_bold_sources", + name="smoothed_denoised_bold_src", run_without_submitting=True, mem_gb=1, ) + # fmt:off workflow.connect([ - (filter_out_failed_runs, smoothed_denoised_bold_sources, [ - ("smoothed_denoised_bold", "in1"), - ]), - (smoothed_denoised_bold_sources, ds_smoothed_denoised_bold, [ - ("bids_uris", "Sources"), - ]), + (filter_runs, smoothed_denoised_bold_src, [("smoothed_denoised_bold", "in1")]), + (smoothed_denoised_bold_src, ds_smoothed_denoised_bold, [("bids_uris", "Sources")]), ]) # fmt:on @@ -525,22 +503,21 @@ def init_concatenate_data_wf( ]) # fmt:on - interpolated_filtered_bold_sources = pe.Node( + interpolated_filtered_bold_src = pe.Node( InferBIDSURIs( numinputs=1, dataset_name="xcp_d", dataset_path=os.path.join(output_dir, "xcp_d"), ), - name="interpolated_filtered_bold_sources", + name="interpolated_filtered_bold_src", run_without_submitting=True, mem_gb=1, ) + # fmt:off workflow.connect([ - (filter_out_failed_runs, interpolated_filtered_bold_sources, [ - ("interpolated_filtered_bold", "in1"), - ]), - (interpolated_filtered_bold_sources, ds_interpolated_filtered_bold, [ + (filter_runs, interpolated_filtered_bold_src, [("interpolated_filtered_bold", "in1")]), + (interpolated_filtered_bold_src, ds_interpolated_filtered_bold, [ ("bids_uris", "Sources"), ]), ]) diff --git a/xcp_d/workflows/outputs.py b/xcp_d/workflows/outputs.py index b479589b6..dce7a206a 100644 --- a/xcp_d/workflows/outputs.py +++ b/xcp_d/workflows/outputs.py @@ -1,6 +1,8 @@ # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """Workflows for collecting and saving xcp_d outputs.""" +import os + from nipype.interfaces import utility as niu from nipype.pipeline import engine as pe from niworkflows.engine.workflows import LiterateWorkflow as Workflow @@ -193,6 +195,7 @@ def init_postproc_derivatives_wf( ------ %(atlas_names)s Used for indexing ``timeseries`` and ``correlations``. + %(atlas_files)s %(timeseries)s %(correlations)s %(coverage)s @@ -227,6 +230,7 @@ def init_postproc_derivatives_wf( "fmriprep_confounds_file", # postprocessed outputs "atlas_names", + "atlas_files", # for Sources "confounds_file", "coverage", "timeseries", @@ -256,6 +260,8 @@ def init_postproc_derivatives_wf( name="inputnode", ) + # Outputs that may be used by the concatenation workflow, in which case we want the actual + # output filenames for the Sources metadata field. outputnode = pe.Node( niu.IdentityInterface( fields=[ @@ -293,33 +299,70 @@ def init_postproc_derivatives_wf( # Determine cohort (if there is one) in the original data cohort = get_entity(name_source, "cohort") - preprocessed_bold_sources = pe.Node( + preproc_bold_src = pe.Node( InferBIDSURIs( numinputs=1, dataset_name="preprocessed", dataset_path=fmri_dir, ), - name="preprocessed_bold_sources", + name="preproc_bold_src", run_without_submitting=True, mem_gb=1, ) - preprocessed_bold_sources.inputs.in1 = name_source + preproc_bold_src.inputs.in1 = name_source - preprocessed_confounds_sources = pe.Node( + preproc_confounds_src = pe.Node( InferBIDSURIs( numinputs=1, dataset_name="preprocessed", dataset_path=fmri_dir, ), - name="preprocessed_confounds_sources", + name="preproc_confounds_src", + run_without_submitting=True, + mem_gb=1, + ) + workflow.connect([(inputnode, preproc_confounds_src, [("fmriprep_confounds_file", "in1")])]) + + atlas_src = pe.MapNode( + InferBIDSURIs( + numinputs=1, + dataset_name="xcp_d", + dataset_path=os.path.join(output_dir, "xcp_d"), + ), + name="atlas_src", + run_without_submitting=True, + mem_gb=1, + iterfield=["in1"], + ) + workflow.connect([(inputnode, atlas_src, [("atlas_files", "in1")])]) + + merge_dense_src = pe.Node( + niu.Merge(numinputs=2), + name="merge_dense_src", run_without_submitting=True, mem_gb=1, ) # fmt:off workflow.connect([ - (inputnode, preprocessed_confounds_sources, [("fmriprep_confounds_file", "in1")]), + (preproc_bold_src, merge_dense_src, [("bids_uris", "in1")]), + (preproc_confounds_src, merge_dense_src, [("bids_uris", "in2")]), ]) - # fmt:on + # fmt:off + + merge_parcellated_src = pe.MapNode( + niu.Merge(numinputs=3), + name="merge_parcellated_src", + run_without_submitting=True, + mem_gb=1, + iterfield=["in3"], + ) + # fmt:off + workflow.connect([ + (preproc_bold_src, merge_parcellated_src, [("bids_uris", "in1")]), + (preproc_confounds_src, merge_parcellated_src, [("bids_uris", "in2")]), + (atlas_src, merge_parcellated_src, [("bids_uris", "in3")]), + ]) + # fmt:off ds_temporal_mask = pe.Node( DerivativesDataSink( @@ -340,7 +383,7 @@ def init_postproc_derivatives_wf( ("temporal_mask_metadata", "meta_dict"), ("temporal_mask", "in_file"), ]), - (preprocessed_confounds_sources, ds_temporal_mask, [("bids_uris", "Sources")]), + (preproc_confounds_src, ds_temporal_mask, [("bids_uris", "Sources")]), (ds_temporal_mask, outputnode, [("out_file", "temporal_mask")]), ]) # fmt:on @@ -365,7 +408,7 @@ def init_postproc_derivatives_wf( ("motion_metadata", "meta_dict"), ("filtered_motion", "in_file"), ]), - (preprocessed_confounds_sources, ds_filtered_motion, [("bids_uris", "Sources")]), + (preproc_confounds_src, ds_filtered_motion, [("bids_uris", "Sources")]), (ds_filtered_motion, outputnode, [("out_file", "filtered_motion")]), ]) # fmt:on @@ -386,7 +429,7 @@ def init_postproc_derivatives_wf( # fmt:off workflow.connect([ (inputnode, ds_confounds, [("confounds_file", "in_file")]), - (preprocessed_confounds_sources, ds_confounds, [("bids_uris", "Sources")]), + (preproc_confounds_src, ds_confounds, [("bids_uris", "Sources")]), ]) # fmt:on @@ -490,19 +533,23 @@ def init_postproc_derivatives_wf( ("coverage", "in_file"), ("atlas_names", "atlas"), ]), + (merge_parcellated_src, ds_coverage_files, [("out", "Sources")]), (inputnode, ds_timeseries, [ ("timeseries", "in_file"), ("atlas_names", "atlas"), ]), + (merge_parcellated_src, ds_timeseries, [("out", "Sources")]), (ds_timeseries, outputnode, [("out_file", "timeseries")]), (inputnode, ds_correlations, [ ("correlations", "in_file"), ("atlas_names", "atlas"), ]), + (merge_parcellated_src, ds_correlations, [("out", "Sources")]), (inputnode, ds_parcellated_reho, [ ("parcellated_reho", "in_file"), ("atlas_names", "atlas"), ]), + (merge_parcellated_src, ds_parcellated_reho, [("out", "Sources")]), ]) # fmt:on @@ -528,6 +575,7 @@ def init_postproc_derivatives_wf( ("parcellated_alff", "in_file"), ("atlas_names", "atlas"), ]), + (merge_parcellated_src, ds_parcellated_alff, [("out", "Sources")]), ]) # fmt:on @@ -834,11 +882,11 @@ def init_postproc_derivatives_wf( # fmt:off workflow.connect([ (inputnode, ds_denoised_bold, [("censored_denoised_bold", "in_file")]), - (preprocessed_bold_sources, ds_denoised_bold, [("bids_uris", "Sources")]), + (merge_dense_src, ds_denoised_bold, [("out", "Sources")]), (ds_denoised_bold, outputnode, [("out_file", "censored_denoised_bold")]), (inputnode, ds_qc_file, [("qc_file", "in_file")]), (inputnode, ds_reho, [("reho", "in_file")]), - (preprocessed_bold_sources, ds_reho, [("bids_uris", "Sources")]), + (merge_dense_src, ds_reho, [("out", "Sources")]), ]) # fmt:on @@ -848,7 +896,7 @@ def init_postproc_derivatives_wf( (inputnode, ds_interpolated_denoised_bold, [ ("interpolated_filtered_bold", "in_file"), ]), - (preprocessed_bold_sources, ds_interpolated_denoised_bold, [("bids_uris", "Sources")]), + (merge_dense_src, ds_interpolated_denoised_bold, [("out", "Sources")]), (ds_interpolated_denoised_bold, outputnode, [ ("out_file", "interpolated_filtered_bold"), ]), @@ -867,7 +915,7 @@ def init_postproc_derivatives_wf( # fmt:off workflow.connect([ (inputnode, ds_alff, [("alff", "in_file")]), - (preprocessed_bold_sources, ds_alff, [("bids_uris", "Sources")]), + (merge_dense_src, ds_alff, [("out", "Sources")]), ]) # fmt:on @@ -875,7 +923,7 @@ def init_postproc_derivatives_wf( # fmt:off workflow.connect([ (inputnode, ds_smoothed_bold, [("smoothed_denoised_bold", "in_file")]), - (preprocessed_bold_sources, ds_smoothed_bold, [("bids_uris", "Sources")]), + (merge_dense_src, ds_smoothed_bold, [("out", "Sources")]), (ds_smoothed_bold, outputnode, [("out_file", "smoothed_denoised_bold")]), ]) # fmt:on @@ -884,7 +932,7 @@ def init_postproc_derivatives_wf( # fmt:off workflow.connect([ (inputnode, ds_smoothed_alff, [("smoothed_alff", "in_file")]), - (preprocessed_bold_sources, ds_smoothed_alff, [("bids_uris", "Sources")]), + (merge_dense_src, ds_smoothed_alff, [("out", "Sources")]), ]) # fmt:on From 717564c3cf755218f7585c829396f428f2eb9fb7 Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Wed, 11 Oct 2023 10:46:45 -0400 Subject: [PATCH 17/60] Whoops! --- xcp_d/workflows/outputs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xcp_d/workflows/outputs.py b/xcp_d/workflows/outputs.py index dce7a206a..f0a4f0971 100644 --- a/xcp_d/workflows/outputs.py +++ b/xcp_d/workflows/outputs.py @@ -195,7 +195,7 @@ def init_postproc_derivatives_wf( ------ %(atlas_names)s Used for indexing ``timeseries`` and ``correlations``. - %(atlas_files)s + atlas_files %(timeseries)s %(correlations)s %(coverage)s From f6c367e788d877ebf5bb8d19199cbd2971000f10 Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Wed, 11 Oct 2023 11:02:55 -0400 Subject: [PATCH 18/60] Connect the datasink. --- xcp_d/workflows/connectivity.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/xcp_d/workflows/connectivity.py b/xcp_d/workflows/connectivity.py index 8d2f602a8..27b2b3ed9 100644 --- a/xcp_d/workflows/connectivity.py +++ b/xcp_d/workflows/connectivity.py @@ -104,13 +104,7 @@ def init_load_atlases_wf( name="atlas_file_grabber", iterfield=["atlas_name"], ) - - # fmt:off - workflow.connect([ - (atlas_name_grabber, atlas_file_grabber, [("atlas_names", "atlas_name")]), - (atlas_file_grabber, outputnode, [("atlas_labels_file", "atlas_labels_files")]), - ]) - # fmt:on + workflow.connect([(atlas_name_grabber, atlas_file_grabber, [("atlas_names", "atlas_name")])]) atlas_buffer = pe.Node(niu.IdentityInterface(fields=["atlas_file"]), name="atlas_buffer") @@ -158,7 +152,6 @@ def init_load_atlases_wf( (get_transforms_to_bold_space, warp_atlases_to_bold_space, [ ("transformfile", "transforms"), ]), - (warp_atlases_to_bold_space, outputnode, [("output_image", "atlas_files")]), (warp_atlases_to_bold_space, atlas_buffer, [("output_image", "atlas_file")]), ]) # fmt:on @@ -175,7 +168,6 @@ def init_load_atlases_wf( workflow.connect([ (inputnode, resample_atlas_to_data, [("bold_file", "template_cifti")]), (atlas_file_grabber, resample_atlas_to_data, [("atlas_file", "label")]), - (resample_atlas_to_data, outputnode, [("cifti_out", "atlas_files")]), ]) # fmt:on @@ -235,6 +227,7 @@ def init_load_atlases_wf( (inputnode, ds_atlas, [("name_source", "source_file")]), (atlas_name_grabber, ds_atlas, [("atlas_names", "atlas")]), (atlas_buffer, ds_atlas, [("atlas_file", "in_file")]), + (ds_atlas, outputnode, [("out_file", "atlas_files")]), ]) # fmt:on @@ -268,6 +261,7 @@ def init_load_atlases_wf( (inputnode, ds_atlas_labels_file, [("name_source", "source_file")]), (atlas_name_grabber, ds_atlas_labels_file, [("atlas_names", "atlas")]), (atlas_file_grabber, ds_atlas_labels_file, [("atlas_labels_file", "in_file")]), + (ds_atlas_labels_file, outputnode, [("out_file", "atlas_labels_files")]), ]) # fmt:on From caa9b1503bbc273c00a0205405b15b47d4db74a6 Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Wed, 11 Oct 2023 13:53:13 -0400 Subject: [PATCH 19/60] Update outputs. --- .../data/test_ds001419_cifti_outputs.txt | 112 ++++++++++++ .../data/test_ds001419_nifti_outputs.txt | 168 ++++++++++++++++++ ...st_fmriprep_without_freesurfer_outputs.txt | 112 ++++++++++++ xcp_d/tests/data/test_nibabies_outputs.txt | 70 ++++++++ xcp_d/tests/data/test_pnc_cifti_outputs.txt | 56 ++++++ .../data/test_pnc_cifti_t2wonly_outputs.txt | 56 ++++++ xcp_d/tests/data/test_pnc_nifti_outputs.txt | 112 ++++++++++++ 7 files changed, 686 insertions(+) diff --git a/xcp_d/tests/data/test_ds001419_cifti_outputs.txt b/xcp_d/tests/data/test_ds001419_cifti_outputs.txt index 5852b9cf6..4ccf5d049 100644 --- a/xcp_d/tests/data/test_ds001419_cifti_outputs.txt +++ b/xcp_d/tests/data/test_ds001419_cifti_outputs.txt @@ -346,3 +346,115 @@ xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_den-91k_desc-denoised_bold.json xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_den-91k_desc-interpolated_bold.dtseries.nii xcp_d/sub-01/func/sub-01_task-imagery_space-fsLR_den-91k_desc-interpolated_bold.json xcp_d/sub-01_executive_summary.html +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-4S1052Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-4S1052Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-4S1052Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-4S1052Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-4S152Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-4S152Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-4S152Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-4S152Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-4S252Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-4S252Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-4S252Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-4S252Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-4S352Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-4S352Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-4S352Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-4S352Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-4S452Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-4S452Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-4S452Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-4S452Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-4S552Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-4S552Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-4S552Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-4S552Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-4S652Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-4S652Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-4S652Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-4S652Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-4S752Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-4S752Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-4S752Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-4S752Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-4S852Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-4S852Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-4S852Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-4S852Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-4S952Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-4S952Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-4S952Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-4S952Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-Glasser_coverage.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-Glasser_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-Glasser_reho.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-Glasser_timeseries.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-Gordon_coverage.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-Gordon_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-Gordon_reho.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-Gordon_timeseries.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-HCP_coverage.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-HCP_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-HCP_reho.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-HCP_timeseries.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-Tian_coverage.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-Tian_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-Tian_reho.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-fsLR_atlas-Tian_timeseries.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-4S1052Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-4S1052Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-4S1052Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-4S1052Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-4S152Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-4S152Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-4S152Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-4S152Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-4S252Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-4S252Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-4S252Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-4S252Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-4S352Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-4S352Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-4S352Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-4S352Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-4S452Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-4S452Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-4S452Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-4S452Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-4S552Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-4S552Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-4S552Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-4S552Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-4S652Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-4S652Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-4S652Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-4S652Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-4S752Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-4S752Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-4S752Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-4S752Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-4S852Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-4S852Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-4S852Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-4S852Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-4S952Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-4S952Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-4S952Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-4S952Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-Glasser_coverage.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-Glasser_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-Glasser_reho.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-Glasser_timeseries.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-Gordon_coverage.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-Gordon_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-Gordon_reho.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-Gordon_timeseries.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-HCP_coverage.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-HCP_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-HCP_reho.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-HCP_timeseries.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-Tian_coverage.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-Tian_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-Tian_reho.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-fsLR_atlas-Tian_timeseries.json diff --git a/xcp_d/tests/data/test_ds001419_nifti_outputs.txt b/xcp_d/tests/data/test_ds001419_nifti_outputs.txt index 0b2503777..66633a93b 100644 --- a/xcp_d/tests/data/test_ds001419_nifti_outputs.txt +++ b/xcp_d/tests/data/test_ds001419_nifti_outputs.txt @@ -378,3 +378,171 @@ xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_res-2_desc-denoised xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_res-2_reho.json xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_res-2_reho.nii.gz xcp_d/sub-01_executive_summary.html +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-4S1052Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-4S1052Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-4S1052Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-4S1052Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-4S152Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-4S152Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-4S152Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-4S152Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-4S252Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-4S252Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-4S252Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-4S252Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-4S352Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-4S352Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-4S352Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-4S352Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-4S452Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-4S452Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-4S452Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-4S452Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-4S552Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-4S552Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-4S552Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-4S552Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-4S652Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-4S652Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-4S652Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-4S652Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-4S752Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-4S752Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-4S752Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-4S752Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-4S852Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-4S852Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-4S852Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-4S852Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-4S952Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-4S952Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-4S952Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-4S952Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-Glasser_coverage.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-Glasser_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-Glasser_reho.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-Glasser_timeseries.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-Gordon_coverage.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-Gordon_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-Gordon_reho.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-Gordon_timeseries.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-HCP_coverage.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-HCP_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-HCP_reho.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-HCP_timeseries.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-Tian_coverage.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-Tian_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-Tian_reho.json +xcp_d/sub-01/func/sub-01_task-imagery_run-01_space-MNI152NLin2009cAsym_atlas-Tian_timeseries.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-4S1052Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-4S1052Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-4S1052Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-4S1052Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-4S152Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-4S152Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-4S152Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-4S152Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-4S252Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-4S252Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-4S252Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-4S252Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-4S352Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-4S352Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-4S352Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-4S352Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-4S452Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-4S452Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-4S452Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-4S452Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-4S552Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-4S552Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-4S552Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-4S552Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-4S652Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-4S652Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-4S652Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-4S652Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-4S752Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-4S752Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-4S752Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-4S752Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-4S852Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-4S852Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-4S852Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-4S852Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-4S952Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-4S952Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-4S952Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-4S952Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-Glasser_coverage.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-Glasser_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-Glasser_reho.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-Glasser_timeseries.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-Gordon_coverage.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-Gordon_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-Gordon_reho.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-Gordon_timeseries.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-HCP_coverage.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-HCP_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-HCP_reho.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-HCP_timeseries.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-Tian_coverage.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-Tian_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-Tian_reho.json +xcp_d/sub-01/func/sub-01_task-imagery_run-02_space-MNI152NLin2009cAsym_atlas-Tian_timeseries.json +xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-4S1052Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-4S1052Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-4S1052Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-4S1052Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-4S152Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-4S152Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-4S152Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-4S152Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-4S252Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-4S252Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-4S252Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-4S252Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-4S352Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-4S352Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-4S352Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-4S352Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-4S452Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-4S452Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-4S452Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-4S452Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-4S552Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-4S552Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-4S552Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-4S552Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-4S652Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-4S652Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-4S652Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-4S652Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-4S752Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-4S752Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-4S752Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-4S752Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-4S852Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-4S852Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-4S852Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-4S852Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-4S952Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-4S952Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-4S952Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-4S952Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-Glasser_coverage.json +xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-Glasser_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-Glasser_reho.json +xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-Glasser_timeseries.json +xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-Gordon_coverage.json +xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-Gordon_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-Gordon_reho.json +xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-Gordon_timeseries.json +xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-HCP_coverage.json +xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-HCP_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-HCP_reho.json +xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-HCP_timeseries.json +xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-Tian_coverage.json +xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-Tian_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-Tian_reho.json +xcp_d/sub-01/func/sub-01_task-rest_space-MNI152NLin2009cAsym_atlas-Tian_timeseries.json diff --git a/xcp_d/tests/data/test_fmriprep_without_freesurfer_outputs.txt b/xcp_d/tests/data/test_fmriprep_without_freesurfer_outputs.txt index cf124bb75..720c81247 100644 --- a/xcp_d/tests/data/test_fmriprep_without_freesurfer_outputs.txt +++ b/xcp_d/tests/data/test_fmriprep_without_freesurfer_outputs.txt @@ -198,3 +198,115 @@ xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_d xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_reho.json xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_reho.nii.gz xcp_d/sub-01_executive_summary.html +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-4S1052Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-4S1052Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-4S1052Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-4S1052Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-4S152Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-4S152Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-4S152Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-4S152Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-4S252Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-4S252Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-4S252Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-4S252Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-4S352Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-4S352Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-4S352Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-4S352Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-4S452Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-4S452Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-4S452Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-4S452Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-4S552Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-4S552Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-4S552Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-4S552Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-4S652Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-4S652Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-4S652Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-4S652Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-4S752Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-4S752Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-4S752Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-4S752Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-4S852Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-4S852Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-4S852Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-4S852Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-4S952Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-4S952Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-4S952Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-4S952Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-Glasser_coverage.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-Glasser_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-Glasser_reho.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-Glasser_timeseries.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-Gordon_coverage.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-Gordon_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-Gordon_reho.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-Gordon_timeseries.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-HCP_coverage.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-HCP_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-HCP_reho.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-HCP_timeseries.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-Tian_coverage.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-Tian_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-Tian_reho.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_atlas-Tian_timeseries.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-4S1052Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-4S1052Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-4S1052Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-4S1052Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-4S152Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-4S152Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-4S152Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-4S152Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-4S252Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-4S252Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-4S252Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-4S252Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-4S352Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-4S352Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-4S352Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-4S352Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-4S452Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-4S452Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-4S452Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-4S452Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-4S552Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-4S552Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-4S552Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-4S552Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-4S652Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-4S652Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-4S652Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-4S652Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-4S752Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-4S752Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-4S752Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-4S752Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-4S852Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-4S852Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-4S852Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-4S852Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-4S952Parcels_coverage.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-4S952Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-4S952Parcels_reho.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-4S952Parcels_timeseries.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-Glasser_coverage.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-Glasser_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-Glasser_reho.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-Glasser_timeseries.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-Gordon_coverage.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-Gordon_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-Gordon_reho.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-Gordon_timeseries.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-HCP_coverage.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-HCP_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-HCP_reho.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-HCP_timeseries.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-Tian_coverage.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-Tian_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-Tian_reho.json +xcp_d/sub-01/func/sub-01_task-mixedgamblestask_run-2_space-MNI152NLin2009cAsym_atlas-Tian_timeseries.json diff --git a/xcp_d/tests/data/test_nibabies_outputs.txt b/xcp_d/tests/data/test_nibabies_outputs.txt index 01ac6efca..8172f653e 100644 --- a/xcp_d/tests/data/test_nibabies_outputs.txt +++ b/xcp_d/tests/data/test_nibabies_outputs.txt @@ -138,3 +138,73 @@ xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfan xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_cohort-1_reho.json xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_cohort-1_reho.nii.gz xcp_d/sub-01_ses-1mo_executive_summary.html +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-4S1052Parcels_cohort-1_alff.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-4S1052Parcels_cohort-1_coverage.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-4S1052Parcels_cohort-1_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-4S1052Parcels_cohort-1_reho.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-4S1052Parcels_cohort-1_timeseries.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-4S152Parcels_cohort-1_alff.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-4S152Parcels_cohort-1_coverage.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-4S152Parcels_cohort-1_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-4S152Parcels_cohort-1_reho.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-4S152Parcels_cohort-1_timeseries.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-4S252Parcels_cohort-1_alff.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-4S252Parcels_cohort-1_coverage.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-4S252Parcels_cohort-1_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-4S252Parcels_cohort-1_reho.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-4S252Parcels_cohort-1_timeseries.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-4S352Parcels_cohort-1_alff.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-4S352Parcels_cohort-1_coverage.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-4S352Parcels_cohort-1_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-4S352Parcels_cohort-1_reho.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-4S352Parcels_cohort-1_timeseries.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-4S452Parcels_cohort-1_alff.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-4S452Parcels_cohort-1_coverage.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-4S452Parcels_cohort-1_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-4S452Parcels_cohort-1_reho.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-4S452Parcels_cohort-1_timeseries.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-4S552Parcels_cohort-1_alff.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-4S552Parcels_cohort-1_coverage.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-4S552Parcels_cohort-1_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-4S552Parcels_cohort-1_reho.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-4S552Parcels_cohort-1_timeseries.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-4S652Parcels_cohort-1_alff.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-4S652Parcels_cohort-1_coverage.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-4S652Parcels_cohort-1_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-4S652Parcels_cohort-1_reho.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-4S652Parcels_cohort-1_timeseries.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-4S752Parcels_cohort-1_alff.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-4S752Parcels_cohort-1_coverage.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-4S752Parcels_cohort-1_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-4S752Parcels_cohort-1_reho.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-4S752Parcels_cohort-1_timeseries.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-4S852Parcels_cohort-1_alff.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-4S852Parcels_cohort-1_coverage.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-4S852Parcels_cohort-1_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-4S852Parcels_cohort-1_reho.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-4S852Parcels_cohort-1_timeseries.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-4S952Parcels_cohort-1_alff.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-4S952Parcels_cohort-1_coverage.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-4S952Parcels_cohort-1_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-4S952Parcels_cohort-1_reho.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-4S952Parcels_cohort-1_timeseries.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-Glasser_cohort-1_alff.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-Glasser_cohort-1_coverage.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-Glasser_cohort-1_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-Glasser_cohort-1_reho.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-Glasser_cohort-1_timeseries.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-Gordon_cohort-1_alff.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-Gordon_cohort-1_coverage.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-Gordon_cohort-1_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-Gordon_cohort-1_reho.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-Gordon_cohort-1_timeseries.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-HCP_cohort-1_alff.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-HCP_cohort-1_coverage.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-HCP_cohort-1_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-HCP_cohort-1_reho.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-HCP_cohort-1_timeseries.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-Tian_cohort-1_alff.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-Tian_cohort-1_coverage.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-Tian_cohort-1_measure-pearsoncorrelation_conmat.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-Tian_cohort-1_reho.json +xcp_d/sub-01/ses-1mo/func/sub-01_ses-1mo_task-rest_acq-PA_run-001_space-MNIInfant_atlas-Tian_cohort-1_timeseries.json diff --git a/xcp_d/tests/data/test_pnc_cifti_outputs.txt b/xcp_d/tests/data/test_pnc_cifti_outputs.txt index 0efc25595..4ba88c8dc 100644 --- a/xcp_d/tests/data/test_pnc_cifti_outputs.txt +++ b/xcp_d/tests/data/test_pnc_cifti_outputs.txt @@ -215,3 +215,59 @@ xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleb xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_den-91k_reho.dscalar.nii xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_den-91k_reho.json xcp_d/sub-1648798153_ses-PNC1_executive_summary.html +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S1052Parcels_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S1052Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S1052Parcels_reho.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S1052Parcels_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S152Parcels_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S152Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S152Parcels_reho.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S152Parcels_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S252Parcels_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S252Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S252Parcels_reho.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S252Parcels_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S352Parcels_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S352Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S352Parcels_reho.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S352Parcels_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S452Parcels_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S452Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S452Parcels_reho.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S452Parcels_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S552Parcels_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S552Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S552Parcels_reho.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S552Parcels_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S652Parcels_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S652Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S652Parcels_reho.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S652Parcels_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S752Parcels_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S752Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S752Parcels_reho.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S752Parcels_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S852Parcels_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S852Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S852Parcels_reho.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S852Parcels_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S952Parcels_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S952Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S952Parcels_reho.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S952Parcels_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-Glasser_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-Glasser_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-Glasser_reho.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-Glasser_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-Gordon_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-Gordon_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-Gordon_reho.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-Gordon_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-HCP_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-HCP_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-HCP_reho.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-HCP_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-Tian_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-Tian_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-Tian_reho.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-Tian_timeseries.json diff --git a/xcp_d/tests/data/test_pnc_cifti_t2wonly_outputs.txt b/xcp_d/tests/data/test_pnc_cifti_t2wonly_outputs.txt index 7d41a8ef8..dacc9dc21 100644 --- a/xcp_d/tests/data/test_pnc_cifti_t2wonly_outputs.txt +++ b/xcp_d/tests/data/test_pnc_cifti_t2wonly_outputs.txt @@ -213,3 +213,59 @@ xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_den-91k_reho.dscalar.nii xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_den-91k_reho.json xcp_d/sub-1648798153_ses-PNC1_executive_summary.html +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S1052Parcels_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S1052Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S1052Parcels_reho.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S1052Parcels_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S152Parcels_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S152Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S152Parcels_reho.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S152Parcels_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S252Parcels_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S252Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S252Parcels_reho.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S252Parcels_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S352Parcels_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S352Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S352Parcels_reho.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S352Parcels_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S452Parcels_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S452Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S452Parcels_reho.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S452Parcels_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S552Parcels_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S552Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S552Parcels_reho.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S552Parcels_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S652Parcels_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S652Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S652Parcels_reho.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S652Parcels_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S752Parcels_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S752Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S752Parcels_reho.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S752Parcels_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S852Parcels_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S852Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S852Parcels_reho.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S852Parcels_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S952Parcels_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S952Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S952Parcels_reho.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S952Parcels_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-Glasser_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-Glasser_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-Glasser_reho.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-Glasser_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-Gordon_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-Gordon_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-Gordon_reho.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-Gordon_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-HCP_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-HCP_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-HCP_reho.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-HCP_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-Tian_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-Tian_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-Tian_reho.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-Tian_timeseries.json diff --git a/xcp_d/tests/data/test_pnc_nifti_outputs.txt b/xcp_d/tests/data/test_pnc_nifti_outputs.txt index 83f54c9bd..afef18562 100644 --- a/xcp_d/tests/data/test_pnc_nifti_outputs.txt +++ b/xcp_d/tests/data/test_pnc_nifti_outputs.txt @@ -246,3 +246,115 @@ xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleb xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_res-2_reho.json xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_res-2_reho.nii.gz xcp_d/sub-1648798153_ses-PNC1_executive_summary.html +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-4S1052Parcels_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-4S1052Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-4S1052Parcels_reho.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-4S1052Parcels_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-4S152Parcels_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-4S152Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-4S152Parcels_reho.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-4S152Parcels_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-4S252Parcels_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-4S252Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-4S252Parcels_reho.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-4S252Parcels_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-4S352Parcels_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-4S352Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-4S352Parcels_reho.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-4S352Parcels_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-4S452Parcels_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-4S452Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-4S452Parcels_reho.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-4S452Parcels_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-4S552Parcels_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-4S552Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-4S552Parcels_reho.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-4S552Parcels_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-4S652Parcels_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-4S652Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-4S652Parcels_reho.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-4S652Parcels_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-4S752Parcels_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-4S752Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-4S752Parcels_reho.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-4S752Parcels_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-4S852Parcels_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-4S852Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-4S852Parcels_reho.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-4S852Parcels_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-4S952Parcels_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-4S952Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-4S952Parcels_reho.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-4S952Parcels_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-Glasser_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-Glasser_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-Glasser_reho.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-Glasser_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-Gordon_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-Gordon_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-Gordon_reho.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-Gordon_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-HCP_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-HCP_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-HCP_reho.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-HCP_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-Tian_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-Tian_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-Tian_reho.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-frac2back_space-MNI152NLin6Asym_atlas-Tian_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-4S1052Parcels_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-4S1052Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-4S1052Parcels_reho.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-4S1052Parcels_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-4S152Parcels_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-4S152Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-4S152Parcels_reho.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-4S152Parcels_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-4S252Parcels_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-4S252Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-4S252Parcels_reho.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-4S252Parcels_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-4S352Parcels_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-4S352Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-4S352Parcels_reho.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-4S352Parcels_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-4S452Parcels_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-4S452Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-4S452Parcels_reho.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-4S452Parcels_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-4S552Parcels_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-4S552Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-4S552Parcels_reho.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-4S552Parcels_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-4S652Parcels_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-4S652Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-4S652Parcels_reho.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-4S652Parcels_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-4S752Parcels_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-4S752Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-4S752Parcels_reho.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-4S752Parcels_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-4S852Parcels_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-4S852Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-4S852Parcels_reho.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-4S852Parcels_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-4S952Parcels_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-4S952Parcels_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-4S952Parcels_reho.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-4S952Parcels_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-Glasser_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-Glasser_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-Glasser_reho.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-Glasser_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-Gordon_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-Gordon_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-Gordon_reho.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-Gordon_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-HCP_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-HCP_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-HCP_reho.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-HCP_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-Tian_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-Tian_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-Tian_reho.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-MNI152NLin6Asym_atlas-Tian_timeseries.json From f94875085f84e21984e37f17aa5612208236e518 Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Wed, 11 Oct 2023 15:33:08 -0400 Subject: [PATCH 20/60] Make Sources an iterfield. --- xcp_d/interfaces/bids.py | 15 --------------- xcp_d/workflows/concatenation.py | 4 ++-- xcp_d/workflows/outputs.py | 14 +++++++------- 3 files changed, 9 insertions(+), 24 deletions(-) diff --git a/xcp_d/interfaces/bids.py b/xcp_d/interfaces/bids.py index 9dbf9627d..45fdd684e 100644 --- a/xcp_d/interfaces/bids.py +++ b/xcp_d/interfaces/bids.py @@ -54,21 +54,6 @@ class _InferBIDSURIsOutputSpec(TraitedSpec): bids_uris = traits.List(desc="Merged output") -def _ravel(in_val): - if not isinstance(in_val, list): - return in_val - - flat_list = [] - for val in in_val: - raveled_val = _ravel(val) - if isinstance(raveled_val, list): - flat_list.extend(raveled_val) - else: - flat_list.append(raveled_val) - - return flat_list - - class InferBIDSURIs(IOBase): """Basic interface class to merge inputs into a single list and infer BIDS URIs.""" diff --git a/xcp_d/workflows/concatenation.py b/xcp_d/workflows/concatenation.py index 71ce0438f..c8542d268 100644 --- a/xcp_d/workflows/concatenation.py +++ b/xcp_d/workflows/concatenation.py @@ -310,7 +310,7 @@ def init_concatenate_data_wf( name="ds_timeseries", run_without_submitting=True, mem_gb=1, - iterfield=["atlas", "in_file"], + iterfield=["atlas", "in_file", "Sources"], ) # fmt:off @@ -378,7 +378,7 @@ def init_concatenate_data_wf( name="ds_timeseries_cifti_files", run_without_submitting=True, mem_gb=1, - iterfield=["atlas", "in_file"], + iterfield=["atlas", "in_file", "Sources"], ) # fmt:off diff --git a/xcp_d/workflows/outputs.py b/xcp_d/workflows/outputs.py index f0a4f0971..ae7ce94eb 100644 --- a/xcp_d/workflows/outputs.py +++ b/xcp_d/workflows/outputs.py @@ -347,7 +347,7 @@ def init_postproc_derivatives_wf( (preproc_bold_src, merge_dense_src, [("bids_uris", "in1")]), (preproc_confounds_src, merge_dense_src, [("bids_uris", "in2")]), ]) - # fmt:off + # fmt:on merge_parcellated_src = pe.MapNode( niu.Merge(numinputs=3), @@ -362,7 +362,7 @@ def init_postproc_derivatives_wf( (preproc_confounds_src, merge_parcellated_src, [("bids_uris", "in2")]), (atlas_src, merge_parcellated_src, [("bids_uris", "in3")]), ]) - # fmt:off + # fmt:on ds_temporal_mask = pe.Node( DerivativesDataSink( @@ -445,7 +445,7 @@ def init_postproc_derivatives_wf( name="ds_coverage_files", run_without_submitting=True, mem_gb=1, - iterfield=["atlas", "in_file"], + iterfield=["atlas", "in_file", "Sources"], ) ds_timeseries = pe.MapNode( DerivativesDataSink( @@ -459,7 +459,7 @@ def init_postproc_derivatives_wf( name="ds_timeseries", run_without_submitting=True, mem_gb=1, - iterfield=["atlas", "in_file"], + iterfield=["atlas", "in_file", "Sources"], ) ds_correlations = pe.MapNode( DerivativesDataSink( @@ -474,7 +474,7 @@ def init_postproc_derivatives_wf( name="ds_correlations", run_without_submitting=True, mem_gb=1, - iterfield=["atlas", "in_file"], + iterfield=["atlas", "in_file", "Sources"], ) for i_exact_scan, exact_scan in enumerate(exact_scans): @@ -524,7 +524,7 @@ def init_postproc_derivatives_wf( name="ds_parcellated_reho", run_without_submitting=True, mem_gb=1, - iterfield=["atlas", "in_file"], + iterfield=["atlas", "in_file", "Sources"], ) # fmt:off @@ -566,7 +566,7 @@ def init_postproc_derivatives_wf( name="ds_parcellated_alff", run_without_submitting=True, mem_gb=1, - iterfield=["atlas", "in_file"], + iterfield=["atlas", "in_file", "Sources"], ) # fmt:off From 8f7d67f84797c5db19316591e06ff31718988952 Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Wed, 11 Oct 2023 16:13:07 -0400 Subject: [PATCH 21/60] Update outputs.py --- xcp_d/workflows/outputs.py | 106 +++++++++++++++++++++++++++++++------ 1 file changed, 91 insertions(+), 15 deletions(-) diff --git a/xcp_d/workflows/outputs.py b/xcp_d/workflows/outputs.py index ae7ce94eb..55e84df4d 100644 --- a/xcp_d/workflows/outputs.py +++ b/xcp_d/workflows/outputs.py @@ -126,10 +126,12 @@ def init_copy_inputs_to_outputs_wf(output_dir, name="copy_inputs_to_outputs_wf") @fill_doc def init_postproc_derivatives_wf( name_source, + source_metadata, fmri_dir, bandpass_filter, low_pass, high_pass, + bpf_order, fd_thresh, motion_filter_type, smoothing, @@ -152,10 +154,12 @@ def init_postproc_derivatives_wf( wf = init_postproc_derivatives_wf( name_source="/path/to/file.nii.gz", + source_metadata={}, fmri_dir="/path/to", bandpass_filter=True, low_pass=0.1, high_pass=0.008, + bpf_order=2, fd_thresh=0.3, motion_filter_type=None, smoothing=6, @@ -172,12 +176,14 @@ def init_postproc_derivatives_wf( ---------- name_source : :obj:`str` bold or cifti files + source_metadata : :obj:`dict` fmri_dir : :obj:`str` Path to the preprocessing derivatives. low_pass : float low pass filter high_pass : float high pass filter + bpf_order %(fd_thresh)s %(motion_filter_type)s %(smoothing)s @@ -281,20 +287,27 @@ def init_postproc_derivatives_wf( cleaned_data_dictionary = { "RepetitionTime": TR, "nuisance parameters": params, + **source_metadata, } + software_filters = None if bandpass_filter: + software_filters = {} if low_pass > 0 and high_pass > 0: - key = "Freq Band" - val = [high_pass, low_pass] + software_filters["Bandpass filter"] = { + "Low-pass cutoff (Hz)": low_pass, + "High-pass cutoff (Hz)": high_pass, + "Filter order": bpf_order, + } elif high_pass > 0: - key = "High-pass Cutoff" - val = high_pass + software_filters["High-pass filter"] = { + "cutoff (Hz)": high_pass, + "Filter order": bpf_order, + } elif low_pass > 0: - key = "Low-pass Cutoff" - val = low_pass - cleaned_data_dictionary[key] = val - - smoothed_data_dictionary = {"FWHM": smoothing} # Separate dictionary for smoothing + software_filters["Low-pass filter"] = { + "cutoff (Hz)": low_pass, + "Filter order": bpf_order, + } # Determine cohort (if there is one) in the original data cohort = get_entity(name_source, "cohort") @@ -371,6 +384,8 @@ def init_postproc_derivatives_wf( suffix="outliers", extension=".tsv", source_file=name_source, + # Metadata + Sources=None, ), name="ds_temporal_mask", run_without_submitting=True, @@ -396,6 +411,8 @@ def init_postproc_derivatives_wf( desc="filtered" if motion_filter_type else None, suffix="motion", extension=".tsv", + # Metadata + Sources=None, ), name="ds_filtered_motion", run_without_submitting=True, @@ -422,6 +439,8 @@ def init_postproc_derivatives_wf( datatype="func", suffix="design", extension=".tsv", + # Metadata + Sources=None, ), name="ds_confounds", run_without_submitting=False, @@ -441,6 +460,8 @@ def init_postproc_derivatives_wf( cohort=cohort, suffix="coverage", extension=".tsv", + # Metadata + Sources=None, ), name="ds_coverage_files", run_without_submitting=True, @@ -455,6 +476,8 @@ def init_postproc_derivatives_wf( cohort=cohort, suffix="timeseries", extension=".tsv", + # Metadata + Sources=None, ), name="ds_timeseries", run_without_submitting=True, @@ -470,6 +493,8 @@ def init_postproc_derivatives_wf( measure="pearsoncorrelation", suffix="conmat", extension=".tsv", + # Metadata + Sources=None, ), name="ds_correlations", run_without_submitting=True, @@ -499,6 +524,8 @@ def init_postproc_derivatives_wf( desc=f"{exact_scan}volumes", suffix="conmat", extension=".tsv", + # Metadata + Sources=None, ), name=f"ds_correlations_exact_{i_exact_scan}", run_without_submitting=True, @@ -520,6 +547,8 @@ def init_postproc_derivatives_wf( cohort=cohort, suffix="reho", extension=".tsv", + # Metadata + Sources=None, ), name="ds_parcellated_reho", run_without_submitting=True, @@ -562,6 +591,8 @@ def init_postproc_derivatives_wf( cohort=cohort, suffix="alff", extension=".tsv", + # Metadata + Sources=None, ), name="ds_parcellated_alff", run_without_submitting=True, @@ -590,6 +621,9 @@ def init_postproc_derivatives_wf( desc="denoised", extension=".nii.gz", compression=True, + # Metadata + SoftwareFilters=software_filters, + Sources=None, ), name="ds_denoised_bold", run_without_submitting=True, @@ -605,6 +639,9 @@ def init_postproc_derivatives_wf( desc="interpolated", extension=".nii.gz", compression=True, + # Metadata + SoftwareFilters=software_filters, + Sources=None, ), name="ds_interpolated_denoised_bold", run_without_submitting=True, @@ -620,6 +657,8 @@ def init_postproc_derivatives_wf( desc="linc", suffix="qc", extension=".csv", + # Metadata + Sources=None, ), name="ds_qc_file", run_without_submitting=True, @@ -635,6 +674,9 @@ def init_postproc_derivatives_wf( suffix="reho", extension=".nii.gz", compression=True, + # Metadata + SoftwareFilters=software_filters, + Sources=None, ), name="ds_reho", run_without_submitting=True, @@ -651,6 +693,9 @@ def init_postproc_derivatives_wf( suffix="alff", extension=".nii.gz", compression=True, + # Metadata + SoftwareFilters=software_filters, + Sources=None, ), name="ds_alff", run_without_submitting=True, @@ -662,12 +707,15 @@ def init_postproc_derivatives_wf( ds_smoothed_bold = pe.Node( DerivativesDataSink( base_directory=output_dir, - meta_dict=smoothed_data_dictionary, source_file=name_source, cohort=cohort, desc="denoisedSmoothed", extension=".nii.gz", compression=True, + # Metadata + SoftwareFilters=software_filters, + FWHM=smoothing, + Sources=None, ), name="ds_smoothed_bold", run_without_submitting=True, @@ -678,13 +726,16 @@ def init_postproc_derivatives_wf( ds_smoothed_alff = pe.Node( DerivativesDataSink( base_directory=output_dir, - meta_dict=smoothed_data_dictionary, source_file=name_source, cohort=cohort, desc="smooth", suffix="alff", extension=".nii.gz", compression=True, + # Metadata + SoftwareFilters=software_filters, + FWHM=smoothing, + Sources=None, ), name="ds_smoothed_alff", run_without_submitting=True, @@ -703,6 +754,9 @@ def init_postproc_derivatives_wf( desc="denoised", den="91k", extension=".dtseries.nii", + # Metadata + SoftwareFilters=software_filters, + Sources=None, ), name="ds_denoised_bold", run_without_submitting=True, @@ -719,6 +773,8 @@ def init_postproc_derivatives_wf( desc="interpolated", den="91k", extension=".dtseries.nii", + # Metadata + Sources=None, ), name="ds_interpolated_denoised_bold", run_without_submitting=True, @@ -735,6 +791,8 @@ def init_postproc_derivatives_wf( desc="linc", suffix="qc", extension=".csv", + # Metadata + Sources=None, ), name="ds_qc_file", run_without_submitting=True, @@ -750,6 +808,8 @@ def init_postproc_derivatives_wf( cohort=cohort, suffix="coverage", extension=".pscalar.nii", + # Metadata + Sources=None, ), name="ds_coverage_cifti_files", run_without_submitting=True, @@ -766,6 +826,8 @@ def init_postproc_derivatives_wf( den="91k", suffix="timeseries", extension=".ptseries.nii", + # Metadata + Sources=None, ), name="ds_timeseries_cifti_files", run_without_submitting=True, @@ -783,6 +845,8 @@ def init_postproc_derivatives_wf( measure="pearsoncorrelation", suffix="conmat", extension=".pconn.nii", + # Metadata + Sources=None, ), name="ds_correlation_cifti_files", run_without_submitting=True, @@ -818,6 +882,9 @@ def init_postproc_derivatives_wf( den="91k", suffix="reho", extension=".dscalar.nii", + # Metadata + SoftwareFilters=software_filters, + Sources=None, ), name="ds_reho", run_without_submitting=True, @@ -835,18 +902,20 @@ def init_postproc_derivatives_wf( den="91k", suffix="alff", extension=".dscalar.nii", + # Metadata + SoftwareFilters=software_filters, + Sources=None, ), name="ds_alff", run_without_submitting=True, mem_gb=1, ) - if smoothing: # If smoothed - # Write out detivatives via DerivativesDataSink + if smoothing: + # Write out derivatives via DerivativesDataSink ds_smoothed_bold = pe.Node( DerivativesDataSink( base_directory=output_dir, - meta_dict=smoothed_data_dictionary, source_file=name_source, dismiss_entities=["den"], cohort=cohort, @@ -854,6 +923,10 @@ def init_postproc_derivatives_wf( desc="denoisedSmoothed", extension=".dtseries.nii", check_hdr=False, + # Metadata + SoftwareFilters=software_filters, + FWHM=smoothing, + Sources=None, ), name="ds_smoothed_bold", run_without_submitting=True, @@ -864,7 +937,6 @@ def init_postproc_derivatives_wf( ds_smoothed_alff = pe.Node( DerivativesDataSink( base_directory=output_dir, - meta_dict=smoothed_data_dictionary, source_file=name_source, dismiss_entities=["den"], cohort=cohort, @@ -873,6 +945,10 @@ def init_postproc_derivatives_wf( suffix="alff", extension=".dscalar.nii", check_hdr=False, + # Metadata + SoftwareFilters=software_filters, + FWHM=smoothing, + Sources=None, ), name="ds_smoothed_alff", run_without_submitting=True, From 9e923aaca17c593cbf52c44aa9aab44d9581b1c7 Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Wed, 11 Oct 2023 16:29:20 -0400 Subject: [PATCH 22/60] Update. --- xcp_d/workflows/bold.py | 12 +++++++----- xcp_d/workflows/cifti.py | 12 +++++++----- xcp_d/workflows/outputs.py | 2 ++ 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/xcp_d/workflows/bold.py b/xcp_d/workflows/bold.py index 55aa84256..0e6758d32 100644 --- a/xcp_d/workflows/bold.py +++ b/xcp_d/workflows/bold.py @@ -509,19 +509,21 @@ def init_postprocess_nifti_wf( # fmt:on postproc_derivatives_wf = init_postproc_derivatives_wf( - smoothing=smoothing, name_source=bold_file, + source_metadata=run_data["bold_metadata"], fmri_dir=fmri_dir, bandpass_filter=bandpass_filter, + low_pass=low_pass, + high_pass=high_pass, + bpf_order=bpf_order, + fd_thresh=fd_thresh, + motion_filter_type=motion_filter_type, + smoothing=smoothing, params=params, exact_scans=exact_scans, cifti=False, dcan_qc=dcan_qc, output_dir=output_dir, - low_pass=low_pass, - high_pass=high_pass, - fd_thresh=fd_thresh, - motion_filter_type=motion_filter_type, TR=TR, name="postproc_derivatives_wf", ) diff --git a/xcp_d/workflows/cifti.py b/xcp_d/workflows/cifti.py index e9c64b861..52a70428f 100644 --- a/xcp_d/workflows/cifti.py +++ b/xcp_d/workflows/cifti.py @@ -478,19 +478,21 @@ def init_postprocess_cifti_wf( # fmt:on postproc_derivatives_wf = init_postproc_derivatives_wf( - smoothing=smoothing, name_source=bold_file, + source_metadata=run_data["bold_metadata"], fmri_dir=fmri_dir, bandpass_filter=bandpass_filter, + low_pass=low_pass, + high_pass=high_pass, + bpf_order=bpf_order, + fd_thresh=fd_thresh, + motion_filter_type=motion_filter_type, + smoothing=smoothing, params=params, exact_scans=exact_scans, cifti=True, dcan_qc=dcan_qc, output_dir=output_dir, - low_pass=low_pass, - high_pass=high_pass, - fd_thresh=fd_thresh, - motion_filter_type=motion_filter_type, TR=TR, name="postproc_derivatives_wf", ) diff --git a/xcp_d/workflows/outputs.py b/xcp_d/workflows/outputs.py index 55e84df4d..354a66ab2 100644 --- a/xcp_d/workflows/outputs.py +++ b/xcp_d/workflows/outputs.py @@ -676,6 +676,7 @@ def init_postproc_derivatives_wf( compression=True, # Metadata SoftwareFilters=software_filters, + Neighborhood="vertices", Sources=None, ), name="ds_reho", @@ -884,6 +885,7 @@ def init_postproc_derivatives_wf( extension=".dscalar.nii", # Metadata SoftwareFilters=software_filters, + Neighborhood="vertices", Sources=None, ), name="ds_reho", From 41750ba2481c57e9978db1487a1f76cc045e87a0 Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Wed, 11 Oct 2023 16:51:44 -0400 Subject: [PATCH 23/60] Add "Sources". --- xcp_d/data/xcp_d_bids_config.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xcp_d/data/xcp_d_bids_config.json b/xcp_d/data/xcp_d_bids_config.json index 20b247c4a..a5cf2e2dc 100755 --- a/xcp_d/data/xcp_d_bids_config.json +++ b/xcp_d/data/xcp_d_bids_config.json @@ -13,6 +13,10 @@ { "name": "measure", "pattern": "(?:^|_)measure-([a-zA-Z0-9]+)" + }, + { + "name": "Sources", + "pattern": "" } ], "default_path_patterns": [ From ad93edf9d0d3f6735f014a177aaf53f8c50f3206 Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Wed, 11 Oct 2023 19:03:14 -0400 Subject: [PATCH 24/60] update --- xcp_d/data/xcp_d_bids_config.json | 2 +- xcp_d/workflows/outputs.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/xcp_d/data/xcp_d_bids_config.json b/xcp_d/data/xcp_d_bids_config.json index a5cf2e2dc..b16fa7937 100755 --- a/xcp_d/data/xcp_d_bids_config.json +++ b/xcp_d/data/xcp_d_bids_config.json @@ -16,7 +16,7 @@ }, { "name": "Sources", - "pattern": "" + "pattern": "ignore-(this)" } ], "default_path_patterns": [ diff --git a/xcp_d/workflows/outputs.py b/xcp_d/workflows/outputs.py index 354a66ab2..e1b9aa785 100644 --- a/xcp_d/workflows/outputs.py +++ b/xcp_d/workflows/outputs.py @@ -462,6 +462,7 @@ def init_postproc_derivatives_wf( extension=".tsv", # Metadata Sources=None, + DummyMetadata="TEST", ), name="ds_coverage_files", run_without_submitting=True, From 544a0938ffaa4cace948f94454527e1e68e32eaa Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Fri, 13 Oct 2023 16:02:48 -0400 Subject: [PATCH 25/60] Give this a try. --- xcp_d/data/xcp_d_bids_config.json | 4 -- xcp_d/workflows/outputs.py | 95 +++++++++++++------------------ 2 files changed, 38 insertions(+), 61 deletions(-) diff --git a/xcp_d/data/xcp_d_bids_config.json b/xcp_d/data/xcp_d_bids_config.json index b16fa7937..20b247c4a 100755 --- a/xcp_d/data/xcp_d_bids_config.json +++ b/xcp_d/data/xcp_d_bids_config.json @@ -13,10 +13,6 @@ { "name": "measure", "pattern": "(?:^|_)measure-([a-zA-Z0-9]+)" - }, - { - "name": "Sources", - "pattern": "ignore-(this)" } ], "default_path_patterns": [ diff --git a/xcp_d/workflows/outputs.py b/xcp_d/workflows/outputs.py index e1b9aa785..daa192fd8 100644 --- a/xcp_d/workflows/outputs.py +++ b/xcp_d/workflows/outputs.py @@ -377,6 +377,22 @@ def init_postproc_derivatives_wf( ]) # fmt:on + def _make_dictionary(**kwargs): + return dict(kwargs) + + make_dict = pe.MapNode( + niu.Function( + function=_make_dictionary, + input_names=["Sources"], + output_names=["metadata"], + ), + run_without_submitting=True, + mem_gb=1, + name="make_dict", + iterfields=["Sources"], + ) + workflow.connect([(merge_parcellated_src, make_dict, [("out", "Sources")])]) + ds_temporal_mask = pe.Node( DerivativesDataSink( base_directory=output_dir, @@ -384,8 +400,6 @@ def init_postproc_derivatives_wf( suffix="outliers", extension=".tsv", source_file=name_source, - # Metadata - Sources=None, ), name="ds_temporal_mask", run_without_submitting=True, @@ -411,8 +425,6 @@ def init_postproc_derivatives_wf( desc="filtered" if motion_filter_type else None, suffix="motion", extension=".tsv", - # Metadata - Sources=None, ), name="ds_filtered_motion", run_without_submitting=True, @@ -439,8 +451,6 @@ def init_postproc_derivatives_wf( datatype="func", suffix="design", extension=".tsv", - # Metadata - Sources=None, ), name="ds_confounds", run_without_submitting=False, @@ -460,14 +470,11 @@ def init_postproc_derivatives_wf( cohort=cohort, suffix="coverage", extension=".tsv", - # Metadata - Sources=None, - DummyMetadata="TEST", ), name="ds_coverage_files", run_without_submitting=True, mem_gb=1, - iterfield=["atlas", "in_file", "Sources"], + iterfield=["atlas", "in_file", "meta_dict"], ) ds_timeseries = pe.MapNode( DerivativesDataSink( @@ -477,13 +484,11 @@ def init_postproc_derivatives_wf( cohort=cohort, suffix="timeseries", extension=".tsv", - # Metadata - Sources=None, ), name="ds_timeseries", run_without_submitting=True, mem_gb=1, - iterfield=["atlas", "in_file", "Sources"], + iterfield=["atlas", "in_file", "meta_dict"], ) ds_correlations = pe.MapNode( DerivativesDataSink( @@ -494,13 +499,11 @@ def init_postproc_derivatives_wf( measure="pearsoncorrelation", suffix="conmat", extension=".tsv", - # Metadata - Sources=None, ), name="ds_correlations", run_without_submitting=True, mem_gb=1, - iterfield=["atlas", "in_file", "Sources"], + iterfield=["atlas", "in_file", "meta_dict"], ) for i_exact_scan, exact_scan in enumerate(exact_scans): @@ -525,8 +528,6 @@ def init_postproc_derivatives_wf( desc=f"{exact_scan}volumes", suffix="conmat", extension=".tsv", - # Metadata - Sources=None, ), name=f"ds_correlations_exact_{i_exact_scan}", run_without_submitting=True, @@ -549,12 +550,13 @@ def init_postproc_derivatives_wf( suffix="reho", extension=".tsv", # Metadata - Sources=None, + SoftwareFilters=software_filters, + Neighborhood="vertices", ), name="ds_parcellated_reho", run_without_submitting=True, mem_gb=1, - iterfield=["atlas", "in_file", "Sources"], + iterfield=["atlas", "in_file", "meta_dict"], ) # fmt:off @@ -563,23 +565,23 @@ def init_postproc_derivatives_wf( ("coverage", "in_file"), ("atlas_names", "atlas"), ]), - (merge_parcellated_src, ds_coverage_files, [("out", "Sources")]), + (make_dict, ds_coverage_files, [("metadata", "meta_dict")]), (inputnode, ds_timeseries, [ ("timeseries", "in_file"), ("atlas_names", "atlas"), ]), - (merge_parcellated_src, ds_timeseries, [("out", "Sources")]), + (make_dict, ds_timeseries, [("metadata", "meta_dict")]), (ds_timeseries, outputnode, [("out_file", "timeseries")]), (inputnode, ds_correlations, [ ("correlations", "in_file"), ("atlas_names", "atlas"), ]), - (merge_parcellated_src, ds_correlations, [("out", "Sources")]), + (make_dict, ds_correlations, [("metadata", "meta_dict")]), (inputnode, ds_parcellated_reho, [ ("parcellated_reho", "in_file"), ("atlas_names", "atlas"), ]), - (merge_parcellated_src, ds_parcellated_reho, [("out", "Sources")]), + (make_dict, ds_parcellated_reho, [("metadata", "meta_dict")]), ]) # fmt:on @@ -592,13 +594,11 @@ def init_postproc_derivatives_wf( cohort=cohort, suffix="alff", extension=".tsv", - # Metadata - Sources=None, ), name="ds_parcellated_alff", run_without_submitting=True, mem_gb=1, - iterfield=["atlas", "in_file", "Sources"], + iterfield=["atlas", "in_file", "meta_dict"], ) # fmt:off @@ -607,7 +607,7 @@ def init_postproc_derivatives_wf( ("parcellated_alff", "in_file"), ("atlas_names", "atlas"), ]), - (merge_parcellated_src, ds_parcellated_alff, [("out", "Sources")]), + (make_dict, ds_parcellated_alff, [("metadata", "meta_dict")]), ]) # fmt:on @@ -616,15 +616,14 @@ def init_postproc_derivatives_wf( ds_denoised_bold = pe.Node( DerivativesDataSink( base_directory=output_dir, - meta_dict=cleaned_data_dictionary, source_file=name_source, cohort=cohort, desc="denoised", extension=".nii.gz", compression=True, # Metadata + meta_dict=cleaned_data_dictionary, SoftwareFilters=software_filters, - Sources=None, ), name="ds_denoised_bold", run_without_submitting=True, @@ -635,14 +634,13 @@ def init_postproc_derivatives_wf( ds_interpolated_denoised_bold = pe.Node( DerivativesDataSink( base_directory=output_dir, - meta_dict=cleaned_data_dictionary, source_file=name_source, desc="interpolated", extension=".nii.gz", compression=True, # Metadata + meta_dict=cleaned_data_dictionary, SoftwareFilters=software_filters, - Sources=None, ), name="ds_interpolated_denoised_bold", run_without_submitting=True, @@ -658,8 +656,6 @@ def init_postproc_derivatives_wf( desc="linc", suffix="qc", extension=".csv", - # Metadata - Sources=None, ), name="ds_qc_file", run_without_submitting=True, @@ -678,7 +674,6 @@ def init_postproc_derivatives_wf( # Metadata SoftwareFilters=software_filters, Neighborhood="vertices", - Sources=None, ), name="ds_reho", run_without_submitting=True, @@ -697,7 +692,6 @@ def init_postproc_derivatives_wf( compression=True, # Metadata SoftwareFilters=software_filters, - Sources=None, ), name="ds_alff", run_without_submitting=True, @@ -717,7 +711,6 @@ def init_postproc_derivatives_wf( # Metadata SoftwareFilters=software_filters, FWHM=smoothing, - Sources=None, ), name="ds_smoothed_bold", run_without_submitting=True, @@ -737,7 +730,6 @@ def init_postproc_derivatives_wf( # Metadata SoftwareFilters=software_filters, FWHM=smoothing, - Sources=None, ), name="ds_smoothed_alff", run_without_submitting=True, @@ -749,7 +741,6 @@ def init_postproc_derivatives_wf( ds_denoised_bold = pe.Node( DerivativesDataSink( base_directory=output_dir, - meta_dict=cleaned_data_dictionary, source_file=name_source, dismiss_entities=["den"], cohort=cohort, @@ -757,8 +748,8 @@ def init_postproc_derivatives_wf( den="91k", extension=".dtseries.nii", # Metadata + meta_dict=cleaned_data_dictionary, SoftwareFilters=software_filters, - Sources=None, ), name="ds_denoised_bold", run_without_submitting=True, @@ -769,14 +760,13 @@ def init_postproc_derivatives_wf( ds_interpolated_denoised_bold = pe.Node( DerivativesDataSink( base_directory=output_dir, - meta_dict=cleaned_data_dictionary, source_file=name_source, dismiss_entities=["den"], desc="interpolated", den="91k", extension=".dtseries.nii", # Metadata - Sources=None, + meta_dict=cleaned_data_dictionary, ), name="ds_interpolated_denoised_bold", run_without_submitting=True, @@ -793,8 +783,6 @@ def init_postproc_derivatives_wf( desc="linc", suffix="qc", extension=".csv", - # Metadata - Sources=None, ), name="ds_qc_file", run_without_submitting=True, @@ -810,13 +798,11 @@ def init_postproc_derivatives_wf( cohort=cohort, suffix="coverage", extension=".pscalar.nii", - # Metadata - Sources=None, ), name="ds_coverage_cifti_files", run_without_submitting=True, mem_gb=1, - iterfield=["atlas", "in_file"], + iterfield=["atlas", "in_file", "meta_dict"], ) ds_timeseries_cifti_files = pe.MapNode( DerivativesDataSink( @@ -828,13 +814,11 @@ def init_postproc_derivatives_wf( den="91k", suffix="timeseries", extension=".ptseries.nii", - # Metadata - Sources=None, ), name="ds_timeseries_cifti_files", run_without_submitting=True, mem_gb=1, - iterfield=["atlas", "in_file"], + iterfield=["atlas", "in_file", "meta_dict"], ) ds_correlation_cifti_files = pe.MapNode( DerivativesDataSink( @@ -847,13 +831,11 @@ def init_postproc_derivatives_wf( measure="pearsoncorrelation", suffix="conmat", extension=".pconn.nii", - # Metadata - Sources=None, ), name="ds_correlation_cifti_files", run_without_submitting=True, mem_gb=1, - iterfield=["atlas", "in_file"], + iterfield=["atlas", "in_file", "meta_dict"], ) # fmt:off @@ -862,15 +844,18 @@ def init_postproc_derivatives_wf( ("coverage_ciftis", "in_file"), ("atlas_names", "atlas"), ]), + (make_dict, ds_coverage_cifti_files, [("metadata", "meta_dict")]), (inputnode, ds_timeseries_cifti_files, [ ("timeseries_ciftis", "in_file"), ("atlas_names", "atlas"), ]), + (make_dict, ds_timeseries_cifti_files, [("metadata", "meta_dict")]), (ds_timeseries_cifti_files, outputnode, [("out_file", "timeseries_ciftis")]), (inputnode, ds_correlation_cifti_files, [ ("correlation_ciftis", "in_file"), ("atlas_names", "atlas"), ]), + (make_dict, ds_correlation_cifti_files, [("metadata", "meta_dict")]), ]) # fmt:on @@ -887,7 +872,6 @@ def init_postproc_derivatives_wf( # Metadata SoftwareFilters=software_filters, Neighborhood="vertices", - Sources=None, ), name="ds_reho", run_without_submitting=True, @@ -907,7 +891,6 @@ def init_postproc_derivatives_wf( extension=".dscalar.nii", # Metadata SoftwareFilters=software_filters, - Sources=None, ), name="ds_alff", run_without_submitting=True, @@ -929,7 +912,6 @@ def init_postproc_derivatives_wf( # Metadata SoftwareFilters=software_filters, FWHM=smoothing, - Sources=None, ), name="ds_smoothed_bold", run_without_submitting=True, @@ -951,7 +933,6 @@ def init_postproc_derivatives_wf( # Metadata SoftwareFilters=software_filters, FWHM=smoothing, - Sources=None, ), name="ds_smoothed_alff", run_without_submitting=True, From 6905ac98a055fdefd2869e89b9cc4a3dfe93afb6 Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Fri, 13 Oct 2023 16:17:32 -0400 Subject: [PATCH 26/60] Whoops --- xcp_d/workflows/outputs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xcp_d/workflows/outputs.py b/xcp_d/workflows/outputs.py index daa192fd8..f864d8f9e 100644 --- a/xcp_d/workflows/outputs.py +++ b/xcp_d/workflows/outputs.py @@ -389,7 +389,7 @@ def _make_dictionary(**kwargs): run_without_submitting=True, mem_gb=1, name="make_dict", - iterfields=["Sources"], + iterfield=["Sources"], ) workflow.connect([(merge_parcellated_src, make_dict, [("out", "Sources")])]) From 8642bfb431c1ca8e52b5601f64e89e578122eb50 Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Fri, 13 Oct 2023 17:17:46 -0400 Subject: [PATCH 27/60] Try that! --- xcp_d/utils/utils.py | 7 ++++++ xcp_d/workflows/concatenation.py | 40 ++++++++++++++++++++++++++++---- xcp_d/workflows/outputs.py | 4 +--- 3 files changed, 43 insertions(+), 8 deletions(-) diff --git a/xcp_d/utils/utils.py b/xcp_d/utils/utils.py index a08a43ae1..f7a536133 100644 --- a/xcp_d/utils/utils.py +++ b/xcp_d/utils/utils.py @@ -537,3 +537,10 @@ def _listify(obj): This provides a simple way to accept flexible arguments. """ return obj if isinstance(obj, (list, tuple, type(None), np.ndarray)) else [obj] + + +def _make_dictionary(metadata=None, **kwargs): + if metadata: + return metadata.update(kwargs) + else: + return dict(kwargs) diff --git a/xcp_d/workflows/concatenation.py b/xcp_d/workflows/concatenation.py index c8542d268..1d6157b8b 100644 --- a/xcp_d/workflows/concatenation.py +++ b/xcp_d/workflows/concatenation.py @@ -12,7 +12,7 @@ FilterOutFailedRuns, ) from xcp_d.utils.doc import fill_doc -from xcp_d.utils.utils import _select_first +from xcp_d.utils.utils import _make_dictionary, _select_first from xcp_d.workflows.plotting import init_qc_report_wf @@ -300,6 +300,19 @@ def init_concatenate_data_wf( ) workflow.connect([(filter_runs, timeseries_src, [("timeseries", "in1")])]) + make_timeseries_dict = pe.MapNode( + niu.Function( + function=_make_dictionary, + input_names=["Sources"], + output_names=["metadata"], + ), + run_without_submitting=True, + mem_gb=1, + name="make_timeseries_dict", + iterfield=["Sources"], + ) + workflow.connect([(timeseries_src, make_timeseries_dict, [("bids_uris", "Sources")])]) + ds_timeseries = pe.MapNode( DerivativesDataSink( base_directory=output_dir, @@ -310,7 +323,7 @@ def init_concatenate_data_wf( name="ds_timeseries", run_without_submitting=True, mem_gb=1, - iterfield=["atlas", "in_file", "Sources"], + iterfield=["atlas", "in_file", "meta_dict"], ) # fmt:off @@ -318,7 +331,7 @@ def init_concatenate_data_wf( (inputnode, ds_timeseries, [("atlas_names", "atlas")]), (clean_name_source, ds_timeseries, [("name_source", "source_file")]), (concatenate_inputs, ds_timeseries, [("timeseries", "in_file")]), - (timeseries_src, ds_timeseries, [("bids_uris", "Sources")]), + (make_timeseries_dict, ds_timeseries, [("metadata", "meta_dict")]), ]) # fmt:on @@ -366,6 +379,23 @@ def init_concatenate_data_wf( ) workflow.connect([(filter_runs, timeseries_ciftis_src, [("timeseries_ciftis", "in1")])]) + make_timeseries_ciftis_dict = pe.MapNode( + niu.Function( + function=_make_dictionary, + input_names=["Sources"], + output_names=["metadata"], + ), + run_without_submitting=True, + mem_gb=1, + name="make_timeseries_ciftis_dict", + iterfield=["Sources"], + ) + # fmt:off + workflow.connect([ + (timeseries_src, make_timeseries_ciftis_dict, [("bids_uris", "Sources")]), + ]) + # fmt:on + ds_timeseries_cifti_files = pe.MapNode( DerivativesDataSink( base_directory=output_dir, @@ -378,7 +408,7 @@ def init_concatenate_data_wf( name="ds_timeseries_cifti_files", run_without_submitting=True, mem_gb=1, - iterfield=["atlas", "in_file", "Sources"], + iterfield=["atlas", "in_file", "meta_dict"], ) # fmt:off @@ -386,7 +416,7 @@ def init_concatenate_data_wf( (clean_name_source, ds_timeseries_cifti_files, [("name_source", "source_file")]), (inputnode, ds_timeseries_cifti_files, [("atlas_names", "atlas")]), (concatenate_inputs, ds_timeseries_cifti_files, [("timeseries_ciftis", "in_file")]), - (timeseries_ciftis_src, ds_timeseries_cifti_files, [("bids_uris", "Sources")]), + (make_timeseries_ciftis_dict, ds_timeseries_cifti_files, [("metadata", "meta_dict")]), ]) # fmt:on diff --git a/xcp_d/workflows/outputs.py b/xcp_d/workflows/outputs.py index f864d8f9e..0cbd817fe 100644 --- a/xcp_d/workflows/outputs.py +++ b/xcp_d/workflows/outputs.py @@ -11,6 +11,7 @@ from xcp_d.interfaces.utils import FilterUndefined from xcp_d.utils.bids import get_entity from xcp_d.utils.doc import fill_doc +from xcp_d.utils.utils import _make_dictionary @fill_doc @@ -377,9 +378,6 @@ def init_postproc_derivatives_wf( ]) # fmt:on - def _make_dictionary(**kwargs): - return dict(kwargs) - make_dict = pe.MapNode( niu.Function( function=_make_dictionary, From dcaef9153de63274bbed47cbb32bf68c77b39332 Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Fri, 13 Oct 2023 17:19:27 -0400 Subject: [PATCH 28/60] Update expected outputs. --- xcp_d/tests/data/test_pnc_cifti_outputs.txt | 42 +++++++++++++++++++ .../data/test_pnc_cifti_t2wonly_outputs.txt | 42 +++++++++++++++++++ 2 files changed, 84 insertions(+) diff --git a/xcp_d/tests/data/test_pnc_cifti_outputs.txt b/xcp_d/tests/data/test_pnc_cifti_outputs.txt index 4ba88c8dc..20bbb47dd 100644 --- a/xcp_d/tests/data/test_pnc_cifti_outputs.txt +++ b/xcp_d/tests/data/test_pnc_cifti_outputs.txt @@ -271,3 +271,45 @@ xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleb xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-Tian_measure-pearsoncorrelation_conmat.json xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-Tian_reho.json xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-Tian_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S1052Parcels_den-91k_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S1052Parcels_den-91k_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S1052Parcels_den-91k_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S152Parcels_den-91k_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S152Parcels_den-91k_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S152Parcels_den-91k_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S252Parcels_den-91k_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S252Parcels_den-91k_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S252Parcels_den-91k_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S352Parcels_den-91k_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S352Parcels_den-91k_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S352Parcels_den-91k_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S452Parcels_den-91k_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S452Parcels_den-91k_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S452Parcels_den-91k_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S552Parcels_den-91k_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S552Parcels_den-91k_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S552Parcels_den-91k_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S652Parcels_den-91k_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S652Parcels_den-91k_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S652Parcels_den-91k_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S752Parcels_den-91k_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S752Parcels_den-91k_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S752Parcels_den-91k_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S852Parcels_den-91k_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S852Parcels_den-91k_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S852Parcels_den-91k_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S952Parcels_den-91k_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S952Parcels_den-91k_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-4S952Parcels_den-91k_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-Glasser_den-91k_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-Glasser_den-91k_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-Glasser_den-91k_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-Gordon_den-91k_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-Gordon_den-91k_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-Gordon_den-91k_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-HCP_den-91k_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-HCP_den-91k_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-HCP_den-91k_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-Tian_den-91k_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-Tian_den-91k_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-rest_acq-singleband_space-fsLR_atlas-Tian_den-91k_timeseries.json diff --git a/xcp_d/tests/data/test_pnc_cifti_t2wonly_outputs.txt b/xcp_d/tests/data/test_pnc_cifti_t2wonly_outputs.txt index dacc9dc21..da02ecefb 100644 --- a/xcp_d/tests/data/test_pnc_cifti_t2wonly_outputs.txt +++ b/xcp_d/tests/data/test_pnc_cifti_t2wonly_outputs.txt @@ -269,3 +269,45 @@ xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-Tian_measure-pearsoncorrelation_conmat.json xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-Tian_reho.json xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-Tian_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S1052Parcels_den-91k_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S1052Parcels_den-91k_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S1052Parcels_den-91k_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S152Parcels_den-91k_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S152Parcels_den-91k_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S152Parcels_den-91k_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S252Parcels_den-91k_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S252Parcels_den-91k_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S252Parcels_den-91k_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S352Parcels_den-91k_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S352Parcels_den-91k_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S352Parcels_den-91k_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S452Parcels_den-91k_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S452Parcels_den-91k_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S452Parcels_den-91k_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S552Parcels_den-91k_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S552Parcels_den-91k_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S552Parcels_den-91k_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S652Parcels_den-91k_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S652Parcels_den-91k_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S652Parcels_den-91k_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S752Parcels_den-91k_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S752Parcels_den-91k_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S752Parcels_den-91k_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S852Parcels_den-91k_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S852Parcels_den-91k_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S852Parcels_den-91k_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S952Parcels_den-91k_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S952Parcels_den-91k_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-4S952Parcels_den-91k_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-Glasser_den-91k_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-Glasser_den-91k_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-Glasser_den-91k_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-Gordon_den-91k_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-Gordon_den-91k_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-Gordon_den-91k_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-HCP_den-91k_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-HCP_den-91k_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-HCP_den-91k_timeseries.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-Tian_den-91k_coverage.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-Tian_den-91k_measure-pearsoncorrelation_conmat.json +xcp_d/sub-1648798153/ses-PNC1/func/sub-1648798153_ses-PNC1_task-idemo_space-fsLR_atlas-Tian_den-91k_timeseries.json From 6712e0eacf880e2929af81c6a3a20a327fce86dc Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Fri, 13 Oct 2023 17:39:55 -0400 Subject: [PATCH 29/60] Fill in TODO list. --- xcp_d/workflows/outputs.py | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/xcp_d/workflows/outputs.py b/xcp_d/workflows/outputs.py index 0cbd817fe..1607999dc 100644 --- a/xcp_d/workflows/outputs.py +++ b/xcp_d/workflows/outputs.py @@ -391,6 +391,7 @@ def init_postproc_derivatives_wf( ) workflow.connect([(merge_parcellated_src, make_dict, [("out", "Sources")])]) + # TODO: Use filtered motion file as Sources. ds_temporal_mask = pe.Node( DerivativesDataSink( base_directory=output_dir, @@ -460,6 +461,7 @@ def init_postproc_derivatives_wf( ]) # fmt:on + # TODO: Add brain mask to Sources (for NIfTIs). ds_coverage_files = pe.MapNode( DerivativesDataSink( base_directory=output_dir, @@ -474,6 +476,7 @@ def init_postproc_derivatives_wf( mem_gb=1, iterfield=["atlas", "in_file", "meta_dict"], ) + # TODO: Use postprocessed BOLD as Source. And maybe coverage file? ds_timeseries = pe.MapNode( DerivativesDataSink( base_directory=output_dir, @@ -488,6 +491,7 @@ def init_postproc_derivatives_wf( mem_gb=1, iterfield=["atlas", "in_file", "meta_dict"], ) + # TODO: Use timeseries file as Source. ds_correlations = pe.MapNode( DerivativesDataSink( base_directory=output_dir, @@ -539,6 +543,7 @@ def init_postproc_derivatives_wf( ]) # fmt:on + # TODO: Use ReHo as Source ds_parcellated_reho = pe.MapNode( DerivativesDataSink( base_directory=output_dir, @@ -584,6 +589,7 @@ def init_postproc_derivatives_wf( # fmt:on if bandpass_filter and (fd_thresh <= 0): + # TODO: Use ALFF as Source ds_parcellated_alff = pe.MapNode( DerivativesDataSink( base_directory=output_dir, @@ -609,7 +615,7 @@ def init_postproc_derivatives_wf( ]) # fmt:on - # Write out detivatives via DerivativesDataSink + # Write out derivatives via DerivativesDataSink if not cifti: # if Nifti ds_denoised_bold = pe.Node( DerivativesDataSink( @@ -629,6 +635,7 @@ def init_postproc_derivatives_wf( ) if dcan_qc: + # TODO: Use denoised BOLD as Source ds_interpolated_denoised_bold = pe.Node( DerivativesDataSink( base_directory=output_dir, @@ -660,6 +667,7 @@ def init_postproc_derivatives_wf( mem_gb=1, ) + # TODO: Use denoised BOLD as Source ds_reho = pe.Node( DerivativesDataSink( base_directory=output_dir, @@ -679,6 +687,7 @@ def init_postproc_derivatives_wf( ) if bandpass_filter and (fd_thresh <= 0): + # TODO: Use denoised BOLD as Source ds_alff = pe.Node( DerivativesDataSink( base_directory=output_dir, @@ -697,7 +706,8 @@ def init_postproc_derivatives_wf( ) if smoothing: # if smoothed - # Write out detivatives via DerivativesDataSink + # Write out derivatives via DerivativesDataSink + # TODO: Use denoised BOLD as Source ds_smoothed_bold = pe.Node( DerivativesDataSink( base_directory=output_dir, @@ -716,6 +726,7 @@ def init_postproc_derivatives_wf( ) if bandpass_filter and (fd_thresh <= 0): + # TODO: Use ALFF as Source ds_smoothed_alff = pe.Node( DerivativesDataSink( base_directory=output_dir, @@ -755,6 +766,7 @@ def init_postproc_derivatives_wf( ) if dcan_qc: + # TODO: Use denoised BOLD as Source ds_interpolated_denoised_bold = pe.Node( DerivativesDataSink( base_directory=output_dir, @@ -787,6 +799,7 @@ def init_postproc_derivatives_wf( mem_gb=1, ) + # TODO: Use denoised BOLD as Source ds_coverage_cifti_files = pe.MapNode( DerivativesDataSink( base_directory=output_dir, @@ -802,6 +815,7 @@ def init_postproc_derivatives_wf( mem_gb=1, iterfield=["atlas", "in_file", "meta_dict"], ) + # TODO: Use denoised BOLD as Source. And maybe coverage file? ds_timeseries_cifti_files = pe.MapNode( DerivativesDataSink( base_directory=output_dir, @@ -818,6 +832,7 @@ def init_postproc_derivatives_wf( mem_gb=1, iterfield=["atlas", "in_file", "meta_dict"], ) + # TODO: Use timeseries file as Source ds_correlation_cifti_files = pe.MapNode( DerivativesDataSink( base_directory=output_dir, @@ -857,6 +872,7 @@ def init_postproc_derivatives_wf( ]) # fmt:on + # TODO: Use denoised BOLD as Source ds_reho = pe.Node( DerivativesDataSink( base_directory=output_dir, @@ -877,6 +893,7 @@ def init_postproc_derivatives_wf( ) if bandpass_filter and (fd_thresh <= 0): + # TODO: Use denoised BOLD as Source ds_alff = pe.Node( DerivativesDataSink( base_directory=output_dir, @@ -897,6 +914,7 @@ def init_postproc_derivatives_wf( if smoothing: # Write out derivatives via DerivativesDataSink + # TODO: Use denoised BOLD as Source ds_smoothed_bold = pe.Node( DerivativesDataSink( base_directory=output_dir, @@ -917,6 +935,7 @@ def init_postproc_derivatives_wf( ) if bandpass_filter and (fd_thresh <= 0): + # TODO: Use ALFF as Source ds_smoothed_alff = pe.Node( DerivativesDataSink( base_directory=output_dir, From e80cce5a2beff8ebce89bb0fb289f088c693f90a Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Sat, 14 Oct 2023 09:16:14 -0400 Subject: [PATCH 30/60] Reorder datasinks. --- xcp_d/workflows/outputs.py | 346 ++++++++++++++++++------------------- 1 file changed, 173 insertions(+), 173 deletions(-) diff --git a/xcp_d/workflows/outputs.py b/xcp_d/workflows/outputs.py index 1607999dc..e12de9ef3 100644 --- a/xcp_d/workflows/outputs.py +++ b/xcp_d/workflows/outputs.py @@ -391,31 +391,6 @@ def init_postproc_derivatives_wf( ) workflow.connect([(merge_parcellated_src, make_dict, [("out", "Sources")])]) - # TODO: Use filtered motion file as Sources. - ds_temporal_mask = pe.Node( - DerivativesDataSink( - base_directory=output_dir, - dismiss_entities=["atlas", "den", "res", "space", "cohort", "desc"], - suffix="outliers", - extension=".tsv", - source_file=name_source, - ), - name="ds_temporal_mask", - run_without_submitting=True, - mem_gb=1, - ) - - # fmt:off - workflow.connect([ - (inputnode, ds_temporal_mask, [ - ("temporal_mask_metadata", "meta_dict"), - ("temporal_mask", "in_file"), - ]), - (preproc_confounds_src, ds_temporal_mask, [("bids_uris", "Sources")]), - (ds_temporal_mask, outputnode, [("out_file", "temporal_mask")]), - ]) - # fmt:on - ds_filtered_motion = pe.Node( DerivativesDataSink( base_directory=output_dir, @@ -441,177 +416,48 @@ def init_postproc_derivatives_wf( ]) # fmt:on - if params != "none": - ds_confounds = pe.Node( - DerivativesDataSink( - base_directory=output_dir, - source_file=name_source, - dismiss_entities=["space", "cohort", "den", "res"], - datatype="func", - suffix="design", - extension=".tsv", - ), - name="ds_confounds", - run_without_submitting=False, - ) - # fmt:off - workflow.connect([ - (inputnode, ds_confounds, [("confounds_file", "in_file")]), - (preproc_confounds_src, ds_confounds, [("bids_uris", "Sources")]), - ]) - # fmt:on - - # TODO: Add brain mask to Sources (for NIfTIs). - ds_coverage_files = pe.MapNode( - DerivativesDataSink( - base_directory=output_dir, - source_file=name_source, - dismiss_entities=["desc"], - cohort=cohort, - suffix="coverage", - extension=".tsv", - ), - name="ds_coverage_files", - run_without_submitting=True, - mem_gb=1, - iterfield=["atlas", "in_file", "meta_dict"], - ) - # TODO: Use postprocessed BOLD as Source. And maybe coverage file? - ds_timeseries = pe.MapNode( + # TODO: Use filtered motion file as Sources. + ds_temporal_mask = pe.Node( DerivativesDataSink( base_directory=output_dir, - source_file=name_source, - dismiss_entities=["desc"], - cohort=cohort, - suffix="timeseries", + dismiss_entities=["atlas", "den", "res", "space", "cohort", "desc"], + suffix="outliers", extension=".tsv", - ), - name="ds_timeseries", - run_without_submitting=True, - mem_gb=1, - iterfield=["atlas", "in_file", "meta_dict"], - ) - # TODO: Use timeseries file as Source. - ds_correlations = pe.MapNode( - DerivativesDataSink( - base_directory=output_dir, source_file=name_source, - dismiss_entities=["desc"], - cohort=cohort, - measure="pearsoncorrelation", - suffix="conmat", - extension=".tsv", ), - name="ds_correlations", - run_without_submitting=True, - mem_gb=1, - iterfield=["atlas", "in_file", "meta_dict"], - ) - - for i_exact_scan, exact_scan in enumerate(exact_scans): - select_exact_scan_files = pe.MapNode( - niu.Select(index=i_exact_scan), - name=f"select_exact_scan_files_{i_exact_scan}", - iterfield=["inlist"], - ) - # fmt:off - workflow.connect([ - (inputnode, select_exact_scan_files, [("correlations_exact", "inlist")]), - ]) - # fmt:on - - ds_correlations_exact = pe.MapNode( - DerivativesDataSink( - base_directory=output_dir, - source_file=name_source, - dismiss_entities=["desc"], - cohort=cohort, - measure="pearsoncorrelation", - desc=f"{exact_scan}volumes", - suffix="conmat", - extension=".tsv", - ), - name=f"ds_correlations_exact_{i_exact_scan}", - run_without_submitting=True, - mem_gb=1, - iterfield=["atlas", "in_file"], - ) - # fmt:off - workflow.connect([ - (inputnode, ds_correlations_exact, [("atlas_names", "atlas")]), - (select_exact_scan_files, ds_correlations_exact, [("out", "in_file")]), - ]) - # fmt:on - - # TODO: Use ReHo as Source - ds_parcellated_reho = pe.MapNode( - DerivativesDataSink( - base_directory=output_dir, - source_file=name_source, - dismiss_entities=["desc"], - cohort=cohort, - suffix="reho", - extension=".tsv", - # Metadata - SoftwareFilters=software_filters, - Neighborhood="vertices", - ), - name="ds_parcellated_reho", + name="ds_temporal_mask", run_without_submitting=True, mem_gb=1, - iterfield=["atlas", "in_file", "meta_dict"], ) # fmt:off workflow.connect([ - (inputnode, ds_coverage_files, [ - ("coverage", "in_file"), - ("atlas_names", "atlas"), - ]), - (make_dict, ds_coverage_files, [("metadata", "meta_dict")]), - (inputnode, ds_timeseries, [ - ("timeseries", "in_file"), - ("atlas_names", "atlas"), - ]), - (make_dict, ds_timeseries, [("metadata", "meta_dict")]), - (ds_timeseries, outputnode, [("out_file", "timeseries")]), - (inputnode, ds_correlations, [ - ("correlations", "in_file"), - ("atlas_names", "atlas"), - ]), - (make_dict, ds_correlations, [("metadata", "meta_dict")]), - (inputnode, ds_parcellated_reho, [ - ("parcellated_reho", "in_file"), - ("atlas_names", "atlas"), + (inputnode, ds_temporal_mask, [ + ("temporal_mask_metadata", "meta_dict"), + ("temporal_mask", "in_file"), ]), - (make_dict, ds_parcellated_reho, [("metadata", "meta_dict")]), + (preproc_confounds_src, ds_temporal_mask, [("bids_uris", "Sources")]), + (ds_temporal_mask, outputnode, [("out_file", "temporal_mask")]), ]) # fmt:on - if bandpass_filter and (fd_thresh <= 0): - # TODO: Use ALFF as Source - ds_parcellated_alff = pe.MapNode( + if params != "none": + ds_confounds = pe.Node( DerivativesDataSink( base_directory=output_dir, source_file=name_source, - dismiss_entities=["desc"], - cohort=cohort, - suffix="alff", + dismiss_entities=["space", "cohort", "den", "res"], + datatype="func", + suffix="design", extension=".tsv", ), - name="ds_parcellated_alff", - run_without_submitting=True, - mem_gb=1, - iterfield=["atlas", "in_file", "meta_dict"], + name="ds_confounds", + run_without_submitting=False, ) - # fmt:off workflow.connect([ - (inputnode, ds_parcellated_alff, [ - ("parcellated_alff", "in_file"), - ("atlas_names", "atlas"), - ]), - (make_dict, ds_parcellated_alff, [("metadata", "meta_dict")]), + (inputnode, ds_confounds, [("confounds_file", "in_file")]), + (preproc_confounds_src, ds_confounds, [("bids_uris", "Sources")]), ]) # fmt:on @@ -1013,4 +859,158 @@ def init_postproc_derivatives_wf( ]) # fmt:on + # TODO: Add brain mask to Sources (for NIfTIs). + ds_coverage_files = pe.MapNode( + DerivativesDataSink( + base_directory=output_dir, + source_file=name_source, + dismiss_entities=["desc"], + cohort=cohort, + suffix="coverage", + extension=".tsv", + ), + name="ds_coverage_files", + run_without_submitting=True, + mem_gb=1, + iterfield=["atlas", "in_file", "meta_dict"], + ) + # TODO: Use postprocessed BOLD as Source. And maybe coverage file? + ds_timeseries = pe.MapNode( + DerivativesDataSink( + base_directory=output_dir, + source_file=name_source, + dismiss_entities=["desc"], + cohort=cohort, + suffix="timeseries", + extension=".tsv", + ), + name="ds_timeseries", + run_without_submitting=True, + mem_gb=1, + iterfield=["atlas", "in_file", "meta_dict"], + ) + # TODO: Use timeseries file as Source. + ds_correlations = pe.MapNode( + DerivativesDataSink( + base_directory=output_dir, + source_file=name_source, + dismiss_entities=["desc"], + cohort=cohort, + measure="pearsoncorrelation", + suffix="conmat", + extension=".tsv", + ), + name="ds_correlations", + run_without_submitting=True, + mem_gb=1, + iterfield=["atlas", "in_file", "meta_dict"], + ) + + for i_exact_scan, exact_scan in enumerate(exact_scans): + select_exact_scan_files = pe.MapNode( + niu.Select(index=i_exact_scan), + name=f"select_exact_scan_files_{i_exact_scan}", + iterfield=["inlist"], + ) + # fmt:off + workflow.connect([ + (inputnode, select_exact_scan_files, [("correlations_exact", "inlist")]), + ]) + # fmt:on + + ds_correlations_exact = pe.MapNode( + DerivativesDataSink( + base_directory=output_dir, + source_file=name_source, + dismiss_entities=["desc"], + cohort=cohort, + measure="pearsoncorrelation", + desc=f"{exact_scan}volumes", + suffix="conmat", + extension=".tsv", + ), + name=f"ds_correlations_exact_{i_exact_scan}", + run_without_submitting=True, + mem_gb=1, + iterfield=["atlas", "in_file"], + ) + # fmt:off + workflow.connect([ + (inputnode, ds_correlations_exact, [("atlas_names", "atlas")]), + (select_exact_scan_files, ds_correlations_exact, [("out", "in_file")]), + ]) + # fmt:on + + # TODO: Use ReHo as Source + ds_parcellated_reho = pe.MapNode( + DerivativesDataSink( + base_directory=output_dir, + source_file=name_source, + dismiss_entities=["desc"], + cohort=cohort, + suffix="reho", + extension=".tsv", + # Metadata + SoftwareFilters=software_filters, + Neighborhood="vertices", + ), + name="ds_parcellated_reho", + run_without_submitting=True, + mem_gb=1, + iterfield=["atlas", "in_file", "meta_dict"], + ) + + # fmt:off + workflow.connect([ + (inputnode, ds_coverage_files, [ + ("coverage", "in_file"), + ("atlas_names", "atlas"), + ]), + (make_dict, ds_coverage_files, [("metadata", "meta_dict")]), + (inputnode, ds_timeseries, [ + ("timeseries", "in_file"), + ("atlas_names", "atlas"), + ]), + (make_dict, ds_timeseries, [("metadata", "meta_dict")]), + (ds_timeseries, outputnode, [("out_file", "timeseries")]), + (inputnode, ds_correlations, [ + ("correlations", "in_file"), + ("atlas_names", "atlas"), + ]), + (make_dict, ds_correlations, [("metadata", "meta_dict")]), + (inputnode, ds_parcellated_reho, [ + ("parcellated_reho", "in_file"), + ("atlas_names", "atlas"), + ]), + (make_dict, ds_parcellated_reho, [("metadata", "meta_dict")]), + ]) + # fmt:on + + if bandpass_filter and (fd_thresh <= 0): + # TODO: Use ALFF as Source + ds_parcellated_alff = pe.MapNode( + DerivativesDataSink( + base_directory=output_dir, + source_file=name_source, + dismiss_entities=["desc"], + cohort=cohort, + suffix="alff", + extension=".tsv", + ), + name="ds_parcellated_alff", + run_without_submitting=True, + mem_gb=1, + iterfield=["atlas", "in_file", "meta_dict"], + ) + + # fmt:off + workflow.connect([ + (inputnode, ds_parcellated_alff, [ + ("parcellated_alff", "in_file"), + ("atlas_names", "atlas"), + ]), + (make_dict, ds_parcellated_alff, [("metadata", "meta_dict")]), + ]) + # fmt:on + return workflow From 30463f50f58b3ab2b802a9c4ff1ddb6e0a75e347 Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Sat, 14 Oct 2023 09:39:57 -0400 Subject: [PATCH 31/60] Simplify outputs workflow. --- xcp_d/utils/utils.py | 6 + xcp_d/workflows/outputs.py | 334 ++++++++++++------------------------- 2 files changed, 110 insertions(+), 230 deletions(-) diff --git a/xcp_d/utils/utils.py b/xcp_d/utils/utils.py index f7a536133..f02cfbda2 100644 --- a/xcp_d/utils/utils.py +++ b/xcp_d/utils/utils.py @@ -2,6 +2,7 @@ # -*- coding: utf-8 -*- """Miscellaneous utility functions for xcp_d.""" import warnings +from pathlib import Path import nibabel as nb import numpy as np @@ -544,3 +545,8 @@ def _make_dictionary(metadata=None, **kwargs): return metadata.update(kwargs) else: return dict(kwargs) + + +def _out_file_to_source(in_file, dataset_name, dataset_path): + bids_uri = [f"bids:{dataset_name}:{str(Path(in_file).relative_to(dataset_path))}"] + return bids_uri diff --git a/xcp_d/workflows/outputs.py b/xcp_d/workflows/outputs.py index e12de9ef3..421ad42f8 100644 --- a/xcp_d/workflows/outputs.py +++ b/xcp_d/workflows/outputs.py @@ -11,7 +11,7 @@ from xcp_d.interfaces.utils import FilterUndefined from xcp_d.utils.bids import get_entity from xcp_d.utils.doc import fill_doc -from xcp_d.utils.utils import _make_dictionary +from xcp_d.utils.utils import _make_dictionary, _out_file_to_source @fill_doc @@ -416,7 +416,6 @@ def init_postproc_derivatives_wf( ]) # fmt:on - # TODO: Use filtered motion file as Sources. ds_temporal_mask = pe.Node( DerivativesDataSink( base_directory=output_dir, @@ -436,7 +435,12 @@ def init_postproc_derivatives_wf( ("temporal_mask_metadata", "meta_dict"), ("temporal_mask", "in_file"), ]), - (preproc_confounds_src, ds_temporal_mask, [("bids_uris", "Sources")]), + (ds_filtered_motion, ds_temporal_mask, [ + ( + ("out_file", _out_file_to_source, "xcp_d", os.path.join(output_dir, "xcp_d")), + "Sources", + ), + ]), (ds_temporal_mask, outputnode, [("out_file", "temporal_mask")]), ]) # fmt:on @@ -462,189 +466,59 @@ def init_postproc_derivatives_wf( # fmt:on # Write out derivatives via DerivativesDataSink - if not cifti: # if Nifti - ds_denoised_bold = pe.Node( - DerivativesDataSink( - base_directory=output_dir, - source_file=name_source, - cohort=cohort, - desc="denoised", - extension=".nii.gz", - compression=True, - # Metadata - meta_dict=cleaned_data_dictionary, - SoftwareFilters=software_filters, - ), - name="ds_denoised_bold", - run_without_submitting=True, - mem_gb=2, - ) - - if dcan_qc: - # TODO: Use denoised BOLD as Source - ds_interpolated_denoised_bold = pe.Node( - DerivativesDataSink( - base_directory=output_dir, - source_file=name_source, - desc="interpolated", - extension=".nii.gz", - compression=True, - # Metadata - meta_dict=cleaned_data_dictionary, - SoftwareFilters=software_filters, - ), - name="ds_interpolated_denoised_bold", - run_without_submitting=True, - mem_gb=2, - ) - - ds_qc_file = pe.Node( - DerivativesDataSink( - base_directory=output_dir, - source_file=name_source, - dismiss_entities=["desc"], - cohort=cohort, - desc="linc", - suffix="qc", - extension=".csv", - ), - name="ds_qc_file", - run_without_submitting=True, - mem_gb=1, - ) + ds_denoised_bold = pe.Node( + DerivativesDataSink( + base_directory=output_dir, + source_file=name_source, + dismiss_entities=["den"], + cohort=cohort, + desc="denoised", + den="91k" if cifti else None, + extension=".dtseries.nii" if cifti else ".nii.gz", + # Metadata + meta_dict=cleaned_data_dictionary, + SoftwareFilters=software_filters, + ), + name="ds_denoised_bold", + run_without_submitting=True, + mem_gb=2, + ) + if dcan_qc: # TODO: Use denoised BOLD as Source - ds_reho = pe.Node( - DerivativesDataSink( - base_directory=output_dir, - source_file=name_source, - dismiss_entities=["desc"], - cohort=cohort, - suffix="reho", - extension=".nii.gz", - compression=True, - # Metadata - SoftwareFilters=software_filters, - Neighborhood="vertices", - ), - name="ds_reho", - run_without_submitting=True, - mem_gb=1, - ) - - if bandpass_filter and (fd_thresh <= 0): - # TODO: Use denoised BOLD as Source - ds_alff = pe.Node( - DerivativesDataSink( - base_directory=output_dir, - source_file=name_source, - dismiss_entities=["desc"], - cohort=cohort, - suffix="alff", - extension=".nii.gz", - compression=True, - # Metadata - SoftwareFilters=software_filters, - ), - name="ds_alff", - run_without_submitting=True, - mem_gb=1, - ) - - if smoothing: # if smoothed - # Write out derivatives via DerivativesDataSink - # TODO: Use denoised BOLD as Source - ds_smoothed_bold = pe.Node( - DerivativesDataSink( - base_directory=output_dir, - source_file=name_source, - cohort=cohort, - desc="denoisedSmoothed", - extension=".nii.gz", - compression=True, - # Metadata - SoftwareFilters=software_filters, - FWHM=smoothing, - ), - name="ds_smoothed_bold", - run_without_submitting=True, - mem_gb=2, - ) - - if bandpass_filter and (fd_thresh <= 0): - # TODO: Use ALFF as Source - ds_smoothed_alff = pe.Node( - DerivativesDataSink( - base_directory=output_dir, - source_file=name_source, - cohort=cohort, - desc="smooth", - suffix="alff", - extension=".nii.gz", - compression=True, - # Metadata - SoftwareFilters=software_filters, - FWHM=smoothing, - ), - name="ds_smoothed_alff", - run_without_submitting=True, - mem_gb=1, - ) - - else: # For cifti files - # Write out derivatives via DerivativesDataSink - ds_denoised_bold = pe.Node( + ds_interpolated_denoised_bold = pe.Node( DerivativesDataSink( base_directory=output_dir, source_file=name_source, dismiss_entities=["den"], - cohort=cohort, - desc="denoised", - den="91k", - extension=".dtseries.nii", + desc="interpolated", + den="91k" if cifti else None, + extension=".dtseries.nii" if cifti else ".nii.gz", # Metadata meta_dict=cleaned_data_dictionary, - SoftwareFilters=software_filters, ), - name="ds_denoised_bold", + name="ds_interpolated_denoised_bold", run_without_submitting=True, mem_gb=2, ) - if dcan_qc: - # TODO: Use denoised BOLD as Source - ds_interpolated_denoised_bold = pe.Node( - DerivativesDataSink( - base_directory=output_dir, - source_file=name_source, - dismiss_entities=["den"], - desc="interpolated", - den="91k", - extension=".dtseries.nii", - # Metadata - meta_dict=cleaned_data_dictionary, - ), - name="ds_interpolated_denoised_bold", - run_without_submitting=True, - mem_gb=2, - ) - - ds_qc_file = pe.Node( - DerivativesDataSink( - base_directory=output_dir, - source_file=name_source, - dismiss_entities=["desc", "den"], - cohort=cohort, - den="91k", - desc="linc", - suffix="qc", - extension=".csv", - ), - name="ds_qc_file", - run_without_submitting=True, - mem_gb=1, - ) + ds_qc_file = pe.Node( + DerivativesDataSink( + base_directory=output_dir, + source_file=name_source, + dismiss_entities=["desc", "den"], + cohort=cohort, + den="91k" if cifti else None, + desc="linc", + suffix="qc", + extension=".csv", + ), + name="ds_qc_file", + run_without_submitting=True, + mem_gb=1, + ) + if cifti: # TODO: Use denoised BOLD as Source ds_coverage_cifti_files = pe.MapNode( DerivativesDataSink( @@ -669,7 +543,7 @@ def init_postproc_derivatives_wf( check_hdr=False, dismiss_entities=["desc", "den"], cohort=cohort, - den="91k", + den="91k" if cifti else None, suffix="timeseries", extension=".ptseries.nii", ), @@ -686,7 +560,7 @@ def init_postproc_derivatives_wf( check_hdr=False, dismiss_entities=["desc", "den"], cohort=cohort, - den="91k", + den="91k" if cifti else None, measure="pearsoncorrelation", suffix="conmat", extension=".pconn.nii", @@ -718,90 +592,90 @@ def init_postproc_derivatives_wf( ]) # fmt:on + # TODO: Use denoised BOLD as Source + ds_reho = pe.Node( + DerivativesDataSink( + base_directory=output_dir, + source_file=name_source, + check_hdr=False, + dismiss_entities=["desc", "den"], + cohort=cohort, + den="91k" if cifti else None, + suffix="reho", + extension=".dscalar.nii" if cifti else ".nii.gz", + # Metadata + SoftwareFilters=software_filters, + Neighborhood="vertices", + ), + name="ds_reho", + run_without_submitting=True, + mem_gb=1, + ) + + if bandpass_filter and (fd_thresh <= 0): # TODO: Use denoised BOLD as Source - ds_reho = pe.Node( + ds_alff = pe.Node( DerivativesDataSink( base_directory=output_dir, source_file=name_source, check_hdr=False, dismiss_entities=["desc", "den"], cohort=cohort, - den="91k", - suffix="reho", - extension=".dscalar.nii", + den="91k" if cifti else None, + suffix="alff", + extension=".dscalar.nii" if cifti else ".nii.gz", # Metadata SoftwareFilters=software_filters, - Neighborhood="vertices", ), - name="ds_reho", + name="ds_alff", run_without_submitting=True, mem_gb=1, ) - if bandpass_filter and (fd_thresh <= 0): - # TODO: Use denoised BOLD as Source - ds_alff = pe.Node( - DerivativesDataSink( - base_directory=output_dir, - source_file=name_source, - check_hdr=False, - dismiss_entities=["desc", "den"], - cohort=cohort, - den="91k", - suffix="alff", - extension=".dscalar.nii", - # Metadata - SoftwareFilters=software_filters, - ), - name="ds_alff", - run_without_submitting=True, - mem_gb=1, - ) + if smoothing: + # Write out derivatives via DerivativesDataSink + # TODO: Use denoised BOLD as Source + ds_smoothed_bold = pe.Node( + DerivativesDataSink( + base_directory=output_dir, + source_file=name_source, + dismiss_entities=["den"], + cohort=cohort, + den="91k" if cifti else None, + desc="denoisedSmoothed", + extension=".dtseries.nii" if cifti else ".nii.gz", + check_hdr=False, + # Metadata + SoftwareFilters=software_filters, + FWHM=smoothing, + ), + name="ds_smoothed_bold", + run_without_submitting=True, + mem_gb=2, + ) - if smoothing: - # Write out derivatives via DerivativesDataSink - # TODO: Use denoised BOLD as Source - ds_smoothed_bold = pe.Node( + if bandpass_filter and (fd_thresh <= 0): + # TODO: Use ALFF as Source + ds_smoothed_alff = pe.Node( DerivativesDataSink( base_directory=output_dir, source_file=name_source, dismiss_entities=["den"], cohort=cohort, - den="91k", - desc="denoisedSmoothed", - extension=".dtseries.nii", + desc="smooth", + den="91k" if cifti else None, + suffix="alff", + extension=".dscalar.nii" if cifti else ".nii.gz", check_hdr=False, # Metadata SoftwareFilters=software_filters, FWHM=smoothing, ), - name="ds_smoothed_bold", + name="ds_smoothed_alff", run_without_submitting=True, - mem_gb=2, + mem_gb=1, ) - if bandpass_filter and (fd_thresh <= 0): - # TODO: Use ALFF as Source - ds_smoothed_alff = pe.Node( - DerivativesDataSink( - base_directory=output_dir, - source_file=name_source, - dismiss_entities=["den"], - cohort=cohort, - desc="smooth", - den="91k", - suffix="alff", - extension=".dscalar.nii", - check_hdr=False, - # Metadata - SoftwareFilters=software_filters, - FWHM=smoothing, - ), - name="ds_smoothed_alff", - run_without_submitting=True, - mem_gb=1, - ) - # fmt:off workflow.connect([ (inputnode, ds_denoised_bold, [("censored_denoised_bold", "in_file")]), From ed154b696f76dd683c7bc4512f142f570eca91e2 Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Sat, 14 Oct 2023 11:22:45 -0400 Subject: [PATCH 32/60] Keep working. --- xcp_d/utils/utils.py | 12 +- xcp_d/workflows/outputs.py | 598 +++++++++++++++++++++---------------- 2 files changed, 356 insertions(+), 254 deletions(-) diff --git a/xcp_d/utils/utils.py b/xcp_d/utils/utils.py index f02cfbda2..1602381fb 100644 --- a/xcp_d/utils/utils.py +++ b/xcp_d/utils/utils.py @@ -542,7 +542,17 @@ def _listify(obj): def _make_dictionary(metadata=None, **kwargs): if metadata: - return metadata.update(kwargs) + for key, value in kwargs.items(): + if key not in metadata.keys(): + metadata[key] = value + elif isinstance(value, list): + # Append the values if they're a list + metadata[key] += value + else: + # Overwrite the old value + metadata[key] = value + + return metadata else: return dict(kwargs) diff --git a/xcp_d/workflows/outputs.py b/xcp_d/workflows/outputs.py index 421ad42f8..8dc06e6b7 100644 --- a/xcp_d/workflows/outputs.py +++ b/xcp_d/workflows/outputs.py @@ -74,7 +74,6 @@ def init_copy_inputs_to_outputs_wf(output_dir, name="copy_inputs_to_outputs_wf") niu.Merge(10), name="collect_files", ) - # fmt:off workflow.connect([ (inputnode, collect_files, [ @@ -98,7 +97,6 @@ def init_copy_inputs_to_outputs_wf(output_dir, name="copy_inputs_to_outputs_wf") FilterUndefined(), name="filter_out_undefined", ) - workflow.connect([(collect_files, filter_out_undefined, [("out", "inlist")])]) ds_copied_outputs = pe.MapNode( @@ -111,7 +109,6 @@ def init_copy_inputs_to_outputs_wf(output_dir, name="copy_inputs_to_outputs_wf") mem_gb=1, iterfield=["in_file", "source_file"], ) - # fmt:off workflow.connect([ (filter_out_undefined, ds_copied_outputs, [ @@ -284,6 +281,12 @@ def init_postproc_derivatives_wf( name="outputnode", ) + def _postproc_to_source(out_file): + return _out_file_to_source(out_file, "xcp_d", os.path.join(output_dir, "xcp_d")) + + def _preproc_to_source(out_file): + return _out_file_to_source(out_file, "preprocessed", fmri_dir) + # Create dictionary of basic information cleaned_data_dictionary = { "RepetitionTime": TR, @@ -313,17 +316,7 @@ def init_postproc_derivatives_wf( # Determine cohort (if there is one) in the original data cohort = get_entity(name_source, "cohort") - preproc_bold_src = pe.Node( - InferBIDSURIs( - numinputs=1, - dataset_name="preprocessed", - dataset_path=fmri_dir, - ), - name="preproc_bold_src", - run_without_submitting=True, - mem_gb=1, - ) - preproc_bold_src.inputs.in1 = name_source + preproc_bold_src = _preproc_to_source(name_source) preproc_confounds_src = pe.Node( InferBIDSURIs( @@ -356,29 +349,10 @@ def init_postproc_derivatives_wf( run_without_submitting=True, mem_gb=1, ) - # fmt:off - workflow.connect([ - (preproc_bold_src, merge_dense_src, [("bids_uris", "in1")]), - (preproc_confounds_src, merge_dense_src, [("bids_uris", "in2")]), - ]) - # fmt:on - - merge_parcellated_src = pe.MapNode( - niu.Merge(numinputs=3), - name="merge_parcellated_src", - run_without_submitting=True, - mem_gb=1, - iterfield=["in3"], - ) - # fmt:off - workflow.connect([ - (preproc_bold_src, merge_parcellated_src, [("bids_uris", "in1")]), - (preproc_confounds_src, merge_parcellated_src, [("bids_uris", "in2")]), - (atlas_src, merge_parcellated_src, [("bids_uris", "in3")]), - ]) - # fmt:on + merge_dense_src.inputs.in1 = preproc_bold_src + workflow.connect([(preproc_confounds_src, merge_dense_src, [("bids_uris", "in2")])]) - make_dict = pe.MapNode( + make_atlas_dict = pe.MapNode( niu.Function( function=_make_dictionary, input_names=["Sources"], @@ -386,10 +360,10 @@ def init_postproc_derivatives_wf( ), run_without_submitting=True, mem_gb=1, - name="make_dict", + name="make_atlas_dict", iterfield=["Sources"], ) - workflow.connect([(merge_parcellated_src, make_dict, [("out", "Sources")])]) + workflow.connect([(atlas_src, make_atlas_dict, [("out", "Sources")])]) ds_filtered_motion = pe.Node( DerivativesDataSink( @@ -404,7 +378,6 @@ def init_postproc_derivatives_wf( run_without_submitting=True, mem_gb=1, ) - # fmt:off workflow.connect([ (inputnode, ds_filtered_motion, [ @@ -423,29 +396,27 @@ def init_postproc_derivatives_wf( suffix="outliers", extension=".tsv", source_file=name_source, + # Metadata + Threshold=fd_thresh, ), name="ds_temporal_mask", run_without_submitting=True, mem_gb=1, ) - # fmt:off workflow.connect([ (inputnode, ds_temporal_mask, [ ("temporal_mask_metadata", "meta_dict"), ("temporal_mask", "in_file"), ]), - (ds_filtered_motion, ds_temporal_mask, [ - ( - ("out_file", _out_file_to_source, "xcp_d", os.path.join(output_dir, "xcp_d")), - "Sources", - ), - ]), + (ds_filtered_motion, ds_temporal_mask, [(("out_file", _postproc_to_source), "Sources")]), (ds_temporal_mask, outputnode, [("out_file", "temporal_mask")]), ]) # fmt:on if params != "none": + # TODO: Add custom confounds file to sources + # TODO: Add temporal mask to sources ds_confounds = pe.Node( DerivativesDataSink( base_directory=output_dir, @@ -466,6 +437,7 @@ def init_postproc_derivatives_wf( # fmt:on # Write out derivatives via DerivativesDataSink + # TODO: Add temporal mask to sources ds_denoised_bold = pe.Node( DerivativesDataSink( base_directory=output_dir, @@ -483,9 +455,15 @@ def init_postproc_derivatives_wf( run_without_submitting=True, mem_gb=2, ) + # fmt:off + workflow.connect([ + (inputnode, ds_denoised_bold, [("censored_denoised_bold", "in_file")]), + (merge_dense_src, ds_denoised_bold, [("out", "Sources")]), + (ds_denoised_bold, outputnode, [("out_file", "censored_denoised_bold")]), + ]) + # fmt:on if dcan_qc: - # TODO: Use denoised BOLD as Source ds_interpolated_denoised_bold = pe.Node( DerivativesDataSink( base_directory=output_dir, @@ -501,6 +479,28 @@ def init_postproc_derivatives_wf( run_without_submitting=True, mem_gb=2, ) + # fmt:off + workflow.connect([ + (inputnode, ds_interpolated_denoised_bold, [ + ("interpolated_filtered_bold", "in_file"), + ]), + (ds_denoised_bold, ds_interpolated_denoised_bold, [ + (("out_file", _postproc_to_source), "Sources"), + ]), + (ds_interpolated_denoised_bold, outputnode, [ + ("out_file", "interpolated_filtered_bold"), + ]), + ]) + # fmt:on + + else: + # fmt:off + workflow.connect([ + (inputnode, outputnode, [ + ("interpolated_filtered_bold", "interpolated_filtered_bold"), + ]), + ]) + # fmt:on ds_qc_file = pe.Node( DerivativesDataSink( @@ -517,124 +517,31 @@ def init_postproc_derivatives_wf( run_without_submitting=True, mem_gb=1, ) + workflow.connect([(inputnode, ds_qc_file, [("qc_file", "in_file")])]) - if cifti: - # TODO: Use denoised BOLD as Source - ds_coverage_cifti_files = pe.MapNode( - DerivativesDataSink( - base_directory=output_dir, - source_file=name_source, - check_hdr=False, - dismiss_entities=["desc"], - cohort=cohort, - suffix="coverage", - extension=".pscalar.nii", - ), - name="ds_coverage_cifti_files", - run_without_submitting=True, - mem_gb=1, - iterfield=["atlas", "in_file", "meta_dict"], - ) - # TODO: Use denoised BOLD as Source. And maybe coverage file? - ds_timeseries_cifti_files = pe.MapNode( - DerivativesDataSink( - base_directory=output_dir, - source_file=name_source, - check_hdr=False, - dismiss_entities=["desc", "den"], - cohort=cohort, - den="91k" if cifti else None, - suffix="timeseries", - extension=".ptseries.nii", - ), - name="ds_timeseries_cifti_files", - run_without_submitting=True, - mem_gb=1, - iterfield=["atlas", "in_file", "meta_dict"], - ) - # TODO: Use timeseries file as Source - ds_correlation_cifti_files = pe.MapNode( - DerivativesDataSink( - base_directory=output_dir, - source_file=name_source, - check_hdr=False, - dismiss_entities=["desc", "den"], - cohort=cohort, - den="91k" if cifti else None, - measure="pearsoncorrelation", - suffix="conmat", - extension=".pconn.nii", - ), - name="ds_correlation_cifti_files", - run_without_submitting=True, - mem_gb=1, - iterfield=["atlas", "in_file", "meta_dict"], - ) - - # fmt:off - workflow.connect([ - (inputnode, ds_coverage_cifti_files, [ - ("coverage_ciftis", "in_file"), - ("atlas_names", "atlas"), - ]), - (make_dict, ds_coverage_cifti_files, [("metadata", "meta_dict")]), - (inputnode, ds_timeseries_cifti_files, [ - ("timeseries_ciftis", "in_file"), - ("atlas_names", "atlas"), - ]), - (make_dict, ds_timeseries_cifti_files, [("metadata", "meta_dict")]), - (ds_timeseries_cifti_files, outputnode, [("out_file", "timeseries_ciftis")]), - (inputnode, ds_correlation_cifti_files, [ - ("correlation_ciftis", "in_file"), - ("atlas_names", "atlas"), - ]), - (make_dict, ds_correlation_cifti_files, [("metadata", "meta_dict")]), - ]) - # fmt:on - - # TODO: Use denoised BOLD as Source - ds_reho = pe.Node( - DerivativesDataSink( - base_directory=output_dir, - source_file=name_source, - check_hdr=False, - dismiss_entities=["desc", "den"], - cohort=cohort, - den="91k" if cifti else None, - suffix="reho", - extension=".dscalar.nii" if cifti else ".nii.gz", - # Metadata - SoftwareFilters=software_filters, - Neighborhood="vertices", + # Convert Sources to a dictionary, to play well with parcellation MapNodes. + add_denoised_to_sources = pe.MapNode( + niu.Function( + function=_make_dictionary, + input_names=["metadata", "Sources"], + output_names=["metadata"], ), - name="ds_reho", run_without_submitting=True, mem_gb=1, + name="add_denoised_to_sources", + iterfield=["metadata"], ) - - if bandpass_filter and (fd_thresh <= 0): - # TODO: Use denoised BOLD as Source - ds_alff = pe.Node( - DerivativesDataSink( - base_directory=output_dir, - source_file=name_source, - check_hdr=False, - dismiss_entities=["desc", "den"], - cohort=cohort, - den="91k" if cifti else None, - suffix="alff", - extension=".dscalar.nii" if cifti else ".nii.gz", - # Metadata - SoftwareFilters=software_filters, - ), - name="ds_alff", - run_without_submitting=True, - mem_gb=1, - ) + # fmt:off + workflow.connect([ + (make_atlas_dict, add_denoised_to_sources, [("metadata", "metadata")]), + (ds_denoised_bold, add_denoised_to_sources, [ + (("out_file", _postproc_to_source), "Sources"), + ]), + ]) + # fmt:on if smoothing: # Write out derivatives via DerivativesDataSink - # TODO: Use denoised BOLD as Source ds_smoothed_bold = pe.Node( DerivativesDataSink( base_directory=output_dir, @@ -653,88 +560,17 @@ def init_postproc_derivatives_wf( run_without_submitting=True, mem_gb=2, ) - - if bandpass_filter and (fd_thresh <= 0): - # TODO: Use ALFF as Source - ds_smoothed_alff = pe.Node( - DerivativesDataSink( - base_directory=output_dir, - source_file=name_source, - dismiss_entities=["den"], - cohort=cohort, - desc="smooth", - den="91k" if cifti else None, - suffix="alff", - extension=".dscalar.nii" if cifti else ".nii.gz", - check_hdr=False, - # Metadata - SoftwareFilters=software_filters, - FWHM=smoothing, - ), - name="ds_smoothed_alff", - run_without_submitting=True, - mem_gb=1, - ) - - # fmt:off - workflow.connect([ - (inputnode, ds_denoised_bold, [("censored_denoised_bold", "in_file")]), - (merge_dense_src, ds_denoised_bold, [("out", "Sources")]), - (ds_denoised_bold, outputnode, [("out_file", "censored_denoised_bold")]), - (inputnode, ds_qc_file, [("qc_file", "in_file")]), - (inputnode, ds_reho, [("reho", "in_file")]), - (merge_dense_src, ds_reho, [("out", "Sources")]), - ]) - # fmt:on - - if dcan_qc: - # fmt:off - workflow.connect([ - (inputnode, ds_interpolated_denoised_bold, [ - ("interpolated_filtered_bold", "in_file"), - ]), - (merge_dense_src, ds_interpolated_denoised_bold, [("out", "Sources")]), - (ds_interpolated_denoised_bold, outputnode, [ - ("out_file", "interpolated_filtered_bold"), - ]), - ]) - # fmt:on - else: - # fmt:off - workflow.connect([ - (inputnode, outputnode, [ - ("interpolated_filtered_bold", "interpolated_filtered_bold"), - ]), - ]) - # fmt:on - - if bandpass_filter and (fd_thresh <= 0): - # fmt:off - workflow.connect([ - (inputnode, ds_alff, [("alff", "in_file")]), - (merge_dense_src, ds_alff, [("out", "Sources")]), - ]) - # fmt:on - - if smoothing: # fmt:off workflow.connect([ (inputnode, ds_smoothed_bold, [("smoothed_denoised_bold", "in_file")]), - (merge_dense_src, ds_smoothed_bold, [("out", "Sources")]), + (ds_denoised_bold, ds_smoothed_bold, [(("out_file", _postproc_to_source), "Sources")]), (ds_smoothed_bold, outputnode, [("out_file", "smoothed_denoised_bold")]), ]) # fmt:on - if bandpass_filter and (fd_thresh <= 0): - # fmt:off - workflow.connect([ - (inputnode, ds_smoothed_alff, [("smoothed_alff", "in_file")]), - (merge_dense_src, ds_smoothed_alff, [("out", "Sources")]), - ]) - # fmt:on - + # Connectivity workflow outputs # TODO: Add brain mask to Sources (for NIfTIs). - ds_coverage_files = pe.MapNode( + ds_coverage = pe.MapNode( DerivativesDataSink( base_directory=output_dir, source_file=name_source, @@ -743,12 +579,41 @@ def init_postproc_derivatives_wf( suffix="coverage", extension=".tsv", ), - name="ds_coverage_files", + name="ds_coverage", run_without_submitting=True, mem_gb=1, iterfield=["atlas", "in_file", "meta_dict"], ) - # TODO: Use postprocessed BOLD as Source. And maybe coverage file? + # fmt:off + workflow.connect([ + (inputnode, ds_coverage, [ + ("coverage", "in_file"), + ("atlas_names", "atlas"), + ]), + (make_atlas_dict, ds_coverage, [("metadata", "meta_dict")]), + ]) + # fmt:on + + add_coverage_to_src = pe.MapNode( + niu.Function( + function=_make_dictionary, + input_names=["metadata", "Sources"], + output_names=["metadata"], + ), + run_without_submitting=True, + mem_gb=1, + name="add_coverage_to_src", + iterfield=["metadata", "Sources"], + ) + # fmt:off + workflow.connect([ + (add_denoised_to_sources, add_coverage_to_src, [("metadata", "metadata")]), + (ds_coverage, add_coverage_to_src, [ + (("out_file", _postproc_to_source), "Sources"), + ]), + ]) + # fmt:on + ds_timeseries = pe.MapNode( DerivativesDataSink( base_directory=output_dir, @@ -763,7 +628,31 @@ def init_postproc_derivatives_wf( mem_gb=1, iterfield=["atlas", "in_file", "meta_dict"], ) + # fmt:off + workflow.connect([ + (inputnode, ds_timeseries, [ + ("timeseries", "in_file"), + ("atlas_names", "atlas"), + ]), + (add_coverage_to_src, ds_timeseries, [("metadata", "meta_dict")]), + (ds_timeseries, outputnode, [("out_file", "timeseries")]), + ]) + # fmt:on + # TODO: Use timeseries file as Source. + make_corrs_meta_dict = pe.MapNode( + niu.Function( + function=_make_dictionary, + input_names=["Sources"], + output_names=["metadata"], + ), + run_without_submitting=True, + mem_gb=1, + name="make_corrs_meta_dict", + iterfield=["Sources"], + ) + workflow.connect([(ds_timeseries, make_corrs_meta_dict, [("out_file", "Sources")])]) + ds_correlations = pe.MapNode( DerivativesDataSink( base_directory=output_dir, @@ -779,6 +668,132 @@ def init_postproc_derivatives_wf( mem_gb=1, iterfield=["atlas", "in_file", "meta_dict"], ) + # fmt:off + workflow.connect([ + (inputnode, ds_correlations, [ + ("correlations", "in_file"), + ("atlas_names", "atlas"), + ]), + (make_corrs_meta_dict, ds_correlations, [("metadata", "meta_dict")]), + ]) + # fmt:on + + if cifti: + ds_coverage_ciftis = pe.MapNode( + DerivativesDataSink( + base_directory=output_dir, + source_file=name_source, + check_hdr=False, + dismiss_entities=["desc"], + cohort=cohort, + suffix="coverage", + extension=".pscalar.nii", + ), + name="ds_coverage_ciftis", + run_without_submitting=True, + mem_gb=1, + iterfield=["atlas", "in_file", "meta_dict"], + ) + # fmt:off + workflow.connect([ + (inputnode, ds_coverage_ciftis, [ + ("coverage_ciftis", "in_file"), + ("atlas_names", "atlas"), + ]), + (add_denoised_to_sources, ds_coverage_ciftis, [("metadata", "meta_dict")]), + ]) + # fmt:on + + add_ccoverage_to_src = pe.MapNode( + niu.Function( + function=_make_dictionary, + input_names=["metadata", "Sources"], + output_names=["metadata"], + ), + run_without_submitting=True, + mem_gb=1, + name="add_ccoverage_to_src", + iterfield=["metadata", "Sources"], + ) + # fmt:off + workflow.connect([ + (add_denoised_to_sources, add_ccoverage_to_src, [("metadata", "metadata")]), + (ds_coverage_ciftis, add_ccoverage_to_src, [ + (("out_file", _postproc_to_source), "Sources"), + ]), + ]) + # fmt:on + + ds_timeseries_ciftis = pe.MapNode( + DerivativesDataSink( + base_directory=output_dir, + source_file=name_source, + check_hdr=False, + dismiss_entities=["desc", "den"], + cohort=cohort, + den="91k" if cifti else None, + suffix="timeseries", + extension=".ptseries.nii", + ), + name="ds_timeseries_ciftis", + run_without_submitting=True, + mem_gb=1, + iterfield=["atlas", "in_file", "meta_dict"], + ) + # fmt:off + workflow.connect([ + (inputnode, ds_timeseries_ciftis, [ + ("timeseries_ciftis", "in_file"), + ("atlas_names", "atlas"), + ]), + (add_ccoverage_to_src, ds_timeseries_ciftis, [("metadata", "meta_dict")]), + (ds_timeseries_ciftis, outputnode, [("out_file", "timeseries_ciftis")]), + ]) + # fmt:on + + make_ccorrs_meta_dict = pe.MapNode( + niu.Function( + function=_make_dictionary, + input_names=["Sources"], + output_names=["metadata"], + ), + run_without_submitting=True, + mem_gb=1, + name="make_ccorrs_meta_dict", + iterfield=["Sources"], + ) + # fmt:off + workflow.connect([ + (ds_timeseries_ciftis, make_ccorrs_meta_dict, [("out_file", "Sources")]), + ]) + # fmt:on + + ds_correlation_ciftis = pe.MapNode( + DerivativesDataSink( + base_directory=output_dir, + source_file=name_source, + check_hdr=False, + dismiss_entities=["desc", "den"], + cohort=cohort, + den="91k" if cifti else None, + measure="pearsoncorrelation", + suffix="conmat", + extension=".pconn.nii", + ), + name="ds_correlation_ciftis", + run_without_submitting=True, + mem_gb=1, + iterfield=["atlas", "in_file", "meta_dict"], + ) + # fmt:off + workflow.connect([ + (inputnode, ds_correlation_ciftis, [ + ("correlation_ciftis", "in_file"), + ("atlas_names", "atlas"), + ]), + (make_ccorrs_meta_dict, ds_correlation_ciftis, [("metadata", "meta_dict")]), + ]) + # fmt:on for i_exact_scan, exact_scan in enumerate(exact_scans): select_exact_scan_files = pe.MapNode( @@ -815,6 +830,32 @@ def init_postproc_derivatives_wf( ]) # fmt:on + # Resting state metric outputs + ds_reho = pe.Node( + DerivativesDataSink( + base_directory=output_dir, + source_file=name_source, + check_hdr=False, + dismiss_entities=["desc", "den"], + cohort=cohort, + den="91k" if cifti else None, + suffix="reho", + extension=".dscalar.nii" if cifti else ".nii.gz", + # Metadata + SoftwareFilters=software_filters, + Neighborhood="vertices", + ), + name="ds_reho", + run_without_submitting=True, + mem_gb=1, + ) + # fmt:off + workflow.connect([ + (inputnode, ds_reho, [("reho", "in_file")]), + (ds_denoised_bold, ds_reho, [(("out_file", _postproc_to_source), "Sources")]), + ]) + # fmt:on + # TODO: Use ReHo as Source ds_parcellated_reho = pe.MapNode( DerivativesDataSink( @@ -833,34 +874,86 @@ def init_postproc_derivatives_wf( mem_gb=1, iterfield=["atlas", "in_file", "meta_dict"], ) - # fmt:off workflow.connect([ - (inputnode, ds_coverage_files, [ - ("coverage", "in_file"), - ("atlas_names", "atlas"), - ]), - (make_dict, ds_coverage_files, [("metadata", "meta_dict")]), - (inputnode, ds_timeseries, [ - ("timeseries", "in_file"), - ("atlas_names", "atlas"), - ]), - (make_dict, ds_timeseries, [("metadata", "meta_dict")]), - (ds_timeseries, outputnode, [("out_file", "timeseries")]), - (inputnode, ds_correlations, [ - ("correlations", "in_file"), - ("atlas_names", "atlas"), - ]), - (make_dict, ds_correlations, [("metadata", "meta_dict")]), (inputnode, ds_parcellated_reho, [ ("parcellated_reho", "in_file"), ("atlas_names", "atlas"), ]), - (make_dict, ds_parcellated_reho, [("metadata", "meta_dict")]), + (make_atlas_dict, ds_parcellated_reho, [("metadata", "meta_dict")]), ]) # fmt:on if bandpass_filter and (fd_thresh <= 0): + ds_alff = pe.Node( + DerivativesDataSink( + base_directory=output_dir, + source_file=name_source, + check_hdr=False, + dismiss_entities=["desc", "den"], + cohort=cohort, + den="91k" if cifti else None, + suffix="alff", + extension=".dscalar.nii" if cifti else ".nii.gz", + # Metadata + SoftwareFilters=software_filters, + ), + name="ds_alff", + run_without_submitting=True, + mem_gb=1, + ) + # fmt:off + workflow.connect([ + (inputnode, ds_alff, [("alff", "in_file")]), + (ds_denoised_bold, ds_alff, [(("out_file", _postproc_to_source), "Sources")]), + ]) + # fmt:on + + if smoothing: + ds_smoothed_alff = pe.Node( + DerivativesDataSink( + base_directory=output_dir, + source_file=name_source, + dismiss_entities=["den"], + cohort=cohort, + desc="smooth", + den="91k" if cifti else None, + suffix="alff", + extension=".dscalar.nii" if cifti else ".nii.gz", + check_hdr=False, + # Metadata + SoftwareFilters=software_filters, + FWHM=smoothing, + ), + name="ds_smoothed_alff", + run_without_submitting=True, + mem_gb=1, + ) + # fmt:off + workflow.connect([ + (inputnode, ds_smoothed_alff, [("smoothed_alff", "in_file")]), + (ds_alff, ds_smoothed_alff, [(("out_file", _postproc_to_source), "Sources")]), + ]) + # fmt:on + + add_alff_to_sources = pe.MapNode( + niu.Function( + function=_make_dictionary, + input_names=["metadata", "Sources"], + output_names=["metadata"], + ), + run_without_submitting=True, + mem_gb=1, + name="add_alff_to_sources", + iterfield=["metadata"], + ) + # fmt:off + workflow.connect([ + (make_atlas_dict, add_alff_to_sources, [("metadata", "metadata")]), + (ds_alff, add_alff_to_sources, [(("out_file", _postproc_to_source), "Sources")]), + ]) + # fmt:on + # TODO: Use ALFF as Source ds_parcellated_alff = pe.MapNode( DerivativesDataSink( @@ -876,14 +969,13 @@ def init_postproc_derivatives_wf( mem_gb=1, iterfield=["atlas", "in_file", "meta_dict"], ) - # fmt:off workflow.connect([ (inputnode, ds_parcellated_alff, [ ("parcellated_alff", "in_file"), ("atlas_names", "atlas"), ]), - (make_dict, ds_parcellated_alff, [("metadata", "meta_dict")]), + (add_alff_to_sources, ds_parcellated_alff, [("metadata", "meta_dict")]), ]) # fmt:on From 66be748862abeef9a820d2ac63ea19f9c4ff123f Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Sat, 14 Oct 2023 11:34:23 -0400 Subject: [PATCH 33/60] Keep working. --- xcp_d/workflows/outputs.py | 46 +++++++++++++++++++++++++------------- 1 file changed, 31 insertions(+), 15 deletions(-) diff --git a/xcp_d/workflows/outputs.py b/xcp_d/workflows/outputs.py index 8dc06e6b7..ac39367fc 100644 --- a/xcp_d/workflows/outputs.py +++ b/xcp_d/workflows/outputs.py @@ -520,7 +520,7 @@ def _preproc_to_source(out_file): workflow.connect([(inputnode, ds_qc_file, [("qc_file", "in_file")])]) # Convert Sources to a dictionary, to play well with parcellation MapNodes. - add_denoised_to_sources = pe.MapNode( + add_denoised_to_src = pe.MapNode( niu.Function( function=_make_dictionary, input_names=["metadata", "Sources"], @@ -528,13 +528,13 @@ def _preproc_to_source(out_file): ), run_without_submitting=True, mem_gb=1, - name="add_denoised_to_sources", + name="add_denoised_to_src", iterfield=["metadata"], ) # fmt:off workflow.connect([ - (make_atlas_dict, add_denoised_to_sources, [("metadata", "metadata")]), - (ds_denoised_bold, add_denoised_to_sources, [ + (make_atlas_dict, add_denoised_to_src, [("metadata", "metadata")]), + (ds_denoised_bold, add_denoised_to_src, [ (("out_file", _postproc_to_source), "Sources"), ]), ]) @@ -607,7 +607,7 @@ def _preproc_to_source(out_file): ) # fmt:off workflow.connect([ - (add_denoised_to_sources, add_coverage_to_src, [("metadata", "metadata")]), + (add_denoised_to_src, add_coverage_to_src, [("metadata", "metadata")]), (ds_coverage, add_coverage_to_src, [ (("out_file", _postproc_to_source), "Sources"), ]), @@ -639,7 +639,6 @@ def _preproc_to_source(out_file): ]) # fmt:on - # TODO: Use timeseries file as Source. make_corrs_meta_dict = pe.MapNode( niu.Function( function=_make_dictionary, @@ -700,7 +699,7 @@ def _preproc_to_source(out_file): ("coverage_ciftis", "in_file"), ("atlas_names", "atlas"), ]), - (add_denoised_to_sources, ds_coverage_ciftis, [("metadata", "meta_dict")]), + (add_denoised_to_src, ds_coverage_ciftis, [("metadata", "meta_dict")]), ]) # fmt:on @@ -717,7 +716,7 @@ def _preproc_to_source(out_file): ) # fmt:off workflow.connect([ - (add_denoised_to_sources, add_ccoverage_to_src, [("metadata", "metadata")]), + (add_denoised_to_src, add_ccoverage_to_src, [("metadata", "metadata")]), (ds_coverage_ciftis, add_ccoverage_to_src, [ (("out_file", _postproc_to_source), "Sources"), ]), @@ -857,6 +856,24 @@ def _preproc_to_source(out_file): # fmt:on # TODO: Use ReHo as Source + add_reho_to_src = pe.MapNode( + niu.Function( + function=_make_dictionary, + input_names=["metadata", "Sources"], + output_names=["metadata"], + ), + run_without_submitting=True, + mem_gb=1, + name="add_reho_to_src", + iterfield=["metadata"], + ) + # fmt:off + workflow.connect([ + (make_atlas_dict, add_reho_to_src, [("metadata", "metadata")]), + (ds_reho, add_reho_to_src, [(("out_file", _postproc_to_source), "Sources")]), + ]) + # fmt:on + ds_parcellated_reho = pe.MapNode( DerivativesDataSink( base_directory=output_dir, @@ -880,7 +897,7 @@ def _preproc_to_source(out_file): ("parcellated_reho", "in_file"), ("atlas_names", "atlas"), ]), - (make_atlas_dict, ds_parcellated_reho, [("metadata", "meta_dict")]), + (add_reho_to_src, ds_parcellated_reho, [("metadata", "meta_dict")]), ]) # fmt:on @@ -936,7 +953,7 @@ def _preproc_to_source(out_file): ]) # fmt:on - add_alff_to_sources = pe.MapNode( + add_alff_to_src = pe.MapNode( niu.Function( function=_make_dictionary, input_names=["metadata", "Sources"], @@ -944,17 +961,16 @@ def _preproc_to_source(out_file): ), run_without_submitting=True, mem_gb=1, - name="add_alff_to_sources", + name="add_alff_to_src", iterfield=["metadata"], ) # fmt:off workflow.connect([ - (make_atlas_dict, add_alff_to_sources, [("metadata", "metadata")]), - (ds_alff, add_alff_to_sources, [(("out_file", _postproc_to_source), "Sources")]), + (make_atlas_dict, add_alff_to_src, [("metadata", "metadata")]), + (ds_alff, add_alff_to_src, [(("out_file", _postproc_to_source), "Sources")]), ]) # fmt:on - # TODO: Use ALFF as Source ds_parcellated_alff = pe.MapNode( DerivativesDataSink( base_directory=output_dir, @@ -975,7 +991,7 @@ def _preproc_to_source(out_file): ("parcellated_alff", "in_file"), ("atlas_names", "atlas"), ]), - (add_alff_to_sources, ds_parcellated_alff, [("metadata", "meta_dict")]), + (add_alff_to_src, ds_parcellated_alff, [("metadata", "meta_dict")]), ]) # fmt:on From 305b990415c4210c09cc84a66d047e9b8f621000 Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Sat, 14 Oct 2023 12:06:47 -0400 Subject: [PATCH 34/60] Update outputs.py --- xcp_d/workflows/outputs.py | 44 +++++++++++++++++++++++++------------- 1 file changed, 29 insertions(+), 15 deletions(-) diff --git a/xcp_d/workflows/outputs.py b/xcp_d/workflows/outputs.py index ac39367fc..96c51e2ff 100644 --- a/xcp_d/workflows/outputs.py +++ b/xcp_d/workflows/outputs.py @@ -11,7 +11,7 @@ from xcp_d.interfaces.utils import FilterUndefined from xcp_d.utils.bids import get_entity from xcp_d.utils.doc import fill_doc -from xcp_d.utils.utils import _make_dictionary, _out_file_to_source +from xcp_d.utils.utils import _make_dictionary @fill_doc @@ -281,10 +281,14 @@ def init_postproc_derivatives_wf( name="outputnode", ) - def _postproc_to_source(out_file): + def _postproc_to_source(out_file, output_dir): + from xcp_d.utils.utils import _out_file_to_source + return _out_file_to_source(out_file, "xcp_d", os.path.join(output_dir, "xcp_d")) - def _preproc_to_source(out_file): + def _preproc_to_source(out_file, fmri_dir): + from xcp_d.utils.utils import _out_file_to_source + return _out_file_to_source(out_file, "preprocessed", fmri_dir) # Create dictionary of basic information @@ -316,7 +320,7 @@ def _preproc_to_source(out_file): # Determine cohort (if there is one) in the original data cohort = get_entity(name_source, "cohort") - preproc_bold_src = _preproc_to_source(name_source) + preproc_bold_src = _preproc_to_source(name_source, fmri_dir) preproc_confounds_src = pe.Node( InferBIDSURIs( @@ -409,7 +413,9 @@ def _preproc_to_source(out_file): ("temporal_mask_metadata", "meta_dict"), ("temporal_mask", "in_file"), ]), - (ds_filtered_motion, ds_temporal_mask, [(("out_file", _postproc_to_source), "Sources")]), + (ds_filtered_motion, ds_temporal_mask, [ + (("out_file", _postproc_to_source, output_dir), "Sources"), + ]), (ds_temporal_mask, outputnode, [("out_file", "temporal_mask")]), ]) # fmt:on @@ -485,7 +491,7 @@ def _preproc_to_source(out_file): ("interpolated_filtered_bold", "in_file"), ]), (ds_denoised_bold, ds_interpolated_denoised_bold, [ - (("out_file", _postproc_to_source), "Sources"), + (("out_file", _postproc_to_source, output_dir), "Sources"), ]), (ds_interpolated_denoised_bold, outputnode, [ ("out_file", "interpolated_filtered_bold"), @@ -535,7 +541,7 @@ def _preproc_to_source(out_file): workflow.connect([ (make_atlas_dict, add_denoised_to_src, [("metadata", "metadata")]), (ds_denoised_bold, add_denoised_to_src, [ - (("out_file", _postproc_to_source), "Sources"), + (("out_file", _postproc_to_source, output_dir), "Sources"), ]), ]) # fmt:on @@ -563,7 +569,9 @@ def _preproc_to_source(out_file): # fmt:off workflow.connect([ (inputnode, ds_smoothed_bold, [("smoothed_denoised_bold", "in_file")]), - (ds_denoised_bold, ds_smoothed_bold, [(("out_file", _postproc_to_source), "Sources")]), + (ds_denoised_bold, ds_smoothed_bold, [ + (("out_file", _postproc_to_source, output_dir), "Sources"), + ]), (ds_smoothed_bold, outputnode, [("out_file", "smoothed_denoised_bold")]), ]) # fmt:on @@ -609,7 +617,7 @@ def _preproc_to_source(out_file): workflow.connect([ (add_denoised_to_src, add_coverage_to_src, [("metadata", "metadata")]), (ds_coverage, add_coverage_to_src, [ - (("out_file", _postproc_to_source), "Sources"), + (("out_file", _postproc_to_source, output_dir), "Sources"), ]), ]) # fmt:on @@ -718,7 +726,7 @@ def _preproc_to_source(out_file): workflow.connect([ (add_denoised_to_src, add_ccoverage_to_src, [("metadata", "metadata")]), (ds_coverage_ciftis, add_ccoverage_to_src, [ - (("out_file", _postproc_to_source), "Sources"), + (("out_file", _postproc_to_source, output_dir), "Sources"), ]), ]) # fmt:on @@ -851,7 +859,7 @@ def _preproc_to_source(out_file): # fmt:off workflow.connect([ (inputnode, ds_reho, [("reho", "in_file")]), - (ds_denoised_bold, ds_reho, [(("out_file", _postproc_to_source), "Sources")]), + (ds_denoised_bold, ds_reho, [(("out_file", _postproc_to_source, output_dir), "Sources")]), ]) # fmt:on @@ -870,7 +878,7 @@ def _preproc_to_source(out_file): # fmt:off workflow.connect([ (make_atlas_dict, add_reho_to_src, [("metadata", "metadata")]), - (ds_reho, add_reho_to_src, [(("out_file", _postproc_to_source), "Sources")]), + (ds_reho, add_reho_to_src, [(("out_file", _postproc_to_source, output_dir), "Sources")]), ]) # fmt:on @@ -922,7 +930,9 @@ def _preproc_to_source(out_file): # fmt:off workflow.connect([ (inputnode, ds_alff, [("alff", "in_file")]), - (ds_denoised_bold, ds_alff, [(("out_file", _postproc_to_source), "Sources")]), + (ds_denoised_bold, ds_alff, [ + (("out_file", _postproc_to_source, output_dir), "Sources"), + ]), ]) # fmt:on @@ -949,7 +959,9 @@ def _preproc_to_source(out_file): # fmt:off workflow.connect([ (inputnode, ds_smoothed_alff, [("smoothed_alff", "in_file")]), - (ds_alff, ds_smoothed_alff, [(("out_file", _postproc_to_source), "Sources")]), + (ds_alff, ds_smoothed_alff, [ + (("out_file", _postproc_to_source, output_dir), "Sources"), + ]), ]) # fmt:on @@ -967,7 +979,9 @@ def _preproc_to_source(out_file): # fmt:off workflow.connect([ (make_atlas_dict, add_alff_to_src, [("metadata", "metadata")]), - (ds_alff, add_alff_to_src, [(("out_file", _postproc_to_source), "Sources")]), + (ds_alff, add_alff_to_src, [ + (("out_file", _postproc_to_source, output_dir), "Sources"), + ]), ]) # fmt:on From 23a5f0998116620b9f26cc834b39917d4e9c619e Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Sat, 14 Oct 2023 12:24:42 -0400 Subject: [PATCH 35/60] Update things. --- xcp_d/utils/bids.py | 8 +++++++- xcp_d/workflows/outputs.py | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/xcp_d/utils/bids.py b/xcp_d/utils/bids.py index 731ca675b..dd97ffbf7 100644 --- a/xcp_d/utils/bids.py +++ b/xcp_d/utils/bids.py @@ -659,7 +659,7 @@ def collect_run_data(layout, bold_file, cifti, primary_anat, target_space): return run_data -def write_dataset_description(fmri_dir, xcpd_dir): +def write_dataset_description(fmri_dir, xcpd_dir, custom_confounds_folder=None): """Write dataset_description.json file for derivatives. Parameters @@ -711,6 +711,12 @@ def write_dataset_description(fmri_dir, xcpd_dir): dset_desc["DatasetLinks"]["xcp_d"] = str(xcpd_dir) + if custom_confounds_folder: + if "custom_confounds" in dset_desc["DatasetLinks"].keys(): + LOGGER.warning("'custom_confounds' is already a dataset link. Overwriting.") + + dset_desc["DatasetLinks"]["custom_confounds"] = str(custom_confounds_folder) + xcpd_dset_description = os.path.join(xcpd_dir, "dataset_description.json") if os.path.isfile(xcpd_dset_description): with open(xcpd_dset_description, "r") as fo: diff --git a/xcp_d/workflows/outputs.py b/xcp_d/workflows/outputs.py index 96c51e2ff..06d66da3f 100644 --- a/xcp_d/workflows/outputs.py +++ b/xcp_d/workflows/outputs.py @@ -282,6 +282,8 @@ def init_postproc_derivatives_wf( ) def _postproc_to_source(out_file, output_dir): + import os + from xcp_d.utils.utils import _out_file_to_source return _out_file_to_source(out_file, "xcp_d", os.path.join(output_dir, "xcp_d")) From 91c7df7248b934ae6cce7a84e3b13a9155be3e06 Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Sat, 14 Oct 2023 12:44:30 -0400 Subject: [PATCH 36/60] Update outputs.py --- xcp_d/workflows/outputs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xcp_d/workflows/outputs.py b/xcp_d/workflows/outputs.py index 06d66da3f..286d09e99 100644 --- a/xcp_d/workflows/outputs.py +++ b/xcp_d/workflows/outputs.py @@ -369,7 +369,7 @@ def _preproc_to_source(out_file, fmri_dir): name="make_atlas_dict", iterfield=["Sources"], ) - workflow.connect([(atlas_src, make_atlas_dict, [("out", "Sources")])]) + workflow.connect([(atlas_src, make_atlas_dict, [("bids_uris", "Sources")])]) ds_filtered_motion = pe.Node( DerivativesDataSink( From 5c87661e58c9dcebfbd0e3bad226f83133731df6 Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Sun, 15 Oct 2023 09:16:16 -0400 Subject: [PATCH 37/60] Allow lists. --- xcp_d/workflows/outputs.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/xcp_d/workflows/outputs.py b/xcp_d/workflows/outputs.py index 286d09e99..1e733b04d 100644 --- a/xcp_d/workflows/outputs.py +++ b/xcp_d/workflows/outputs.py @@ -286,12 +286,21 @@ def _postproc_to_source(out_file, output_dir): from xcp_d.utils.utils import _out_file_to_source - return _out_file_to_source(out_file, "xcp_d", os.path.join(output_dir, "xcp_d")) + if isinstance(out_file, list): + return [ + _out_file_to_source(of, "xcp_d", os.path.join(output_dir, "xcp_d")) + for of in out_file + ] + else: + return _out_file_to_source(out_file, "xcp_d", os.path.join(output_dir, "xcp_d")) def _preproc_to_source(out_file, fmri_dir): from xcp_d.utils.utils import _out_file_to_source - return _out_file_to_source(out_file, "preprocessed", fmri_dir) + if isinstance(out_file, list): + return [_out_file_to_source(of, "preprocessed", fmri_dir) for of in out_file] + else: + return _out_file_to_source(out_file, "preprocessed", fmri_dir) # Create dictionary of basic information cleaned_data_dictionary = { From 53f01cc58e36e509883e445de0ee3a9989e60e17 Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Sun, 15 Oct 2023 11:57:48 -0400 Subject: [PATCH 38/60] Copy the dictionary. --- xcp_d/utils/utils.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/xcp_d/utils/utils.py b/xcp_d/utils/utils.py index 1602381fb..5f7640f03 100644 --- a/xcp_d/utils/utils.py +++ b/xcp_d/utils/utils.py @@ -541,18 +541,21 @@ def _listify(obj): def _make_dictionary(metadata=None, **kwargs): + from copy import deepcopy + if metadata: + out_metadata = deepcopy(metadata) for key, value in kwargs.items(): if key not in metadata.keys(): - metadata[key] = value + out_metadata[key] = value elif isinstance(value, list): # Append the values if they're a list - metadata[key] += value + out_metadata[key] += value else: # Overwrite the old value - metadata[key] = value + out_metadata[key] = value - return metadata + return out_metadata else: return dict(kwargs) From d5f13766c0e94a1f5f735495dac7a7eaca02262c Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Sun, 15 Oct 2023 12:03:03 -0400 Subject: [PATCH 39/60] Transpose list of lists. --- xcp_d/utils/utils.py | 5 +++++ xcp_d/workflows/concatenation.py | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/xcp_d/utils/utils.py b/xcp_d/utils/utils.py index 5f7640f03..42de61d43 100644 --- a/xcp_d/utils/utils.py +++ b/xcp_d/utils/utils.py @@ -563,3 +563,8 @@ def _make_dictionary(metadata=None, **kwargs): def _out_file_to_source(in_file, dataset_name, dataset_path): bids_uri = [f"bids:{dataset_name}:{str(Path(in_file).relative_to(dataset_path))}"] return bids_uri + + +def _transpose_lol(lol): + """Transpose list of lists.""" + return list(map(list, zip(*lol))) diff --git a/xcp_d/workflows/concatenation.py b/xcp_d/workflows/concatenation.py index 1d6157b8b..93c809bce 100644 --- a/xcp_d/workflows/concatenation.py +++ b/xcp_d/workflows/concatenation.py @@ -12,7 +12,7 @@ FilterOutFailedRuns, ) from xcp_d.utils.doc import fill_doc -from xcp_d.utils.utils import _make_dictionary, _select_first +from xcp_d.utils.utils import _make_dictionary, _select_first, _transpose_lol from xcp_d.workflows.plotting import init_qc_report_wf @@ -311,7 +311,11 @@ def init_concatenate_data_wf( name="make_timeseries_dict", iterfield=["Sources"], ) - workflow.connect([(timeseries_src, make_timeseries_dict, [("bids_uris", "Sources")])]) + # fmt:off + workflow.connect([ + (timeseries_src, make_timeseries_dict, [(("bids_uris", _transpose_lol), "Sources")]), + ]) + # fmt:on ds_timeseries = pe.MapNode( DerivativesDataSink( From 2d0d27f475176af01cd7161df7a55234744645e0 Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Sun, 15 Oct 2023 14:00:01 -0400 Subject: [PATCH 40/60] Update concatenation.py --- xcp_d/workflows/concatenation.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xcp_d/workflows/concatenation.py b/xcp_d/workflows/concatenation.py index 93c809bce..74bc3053b 100644 --- a/xcp_d/workflows/concatenation.py +++ b/xcp_d/workflows/concatenation.py @@ -396,7 +396,9 @@ def init_concatenate_data_wf( ) # fmt:off workflow.connect([ - (timeseries_src, make_timeseries_ciftis_dict, [("bids_uris", "Sources")]), + (timeseries_ciftis_src, make_timeseries_ciftis_dict, [ + (("bids_uris", _transpose_lol), "Sources"), + ]), ]) # fmt:on From d3d5e0948ae698183131e066bedeed364614a21b Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Sun, 15 Oct 2023 14:52:12 -0400 Subject: [PATCH 41/60] update --- xcp_d/workflows/bold.py | 2 +- xcp_d/workflows/cifti.py | 2 +- xcp_d/workflows/outputs.py | 86 ++++++++++++++++++++++++-------------- 3 files changed, 57 insertions(+), 33 deletions(-) diff --git a/xcp_d/workflows/bold.py b/xcp_d/workflows/bold.py index 0e6758d32..4b0e1d9d6 100644 --- a/xcp_d/workflows/bold.py +++ b/xcp_d/workflows/bold.py @@ -524,7 +524,7 @@ def init_postprocess_nifti_wf( cifti=False, dcan_qc=dcan_qc, output_dir=output_dir, - TR=TR, + custom_confounds_file=custom_confounds_file, name="postproc_derivatives_wf", ) diff --git a/xcp_d/workflows/cifti.py b/xcp_d/workflows/cifti.py index 52a70428f..d9e557fef 100644 --- a/xcp_d/workflows/cifti.py +++ b/xcp_d/workflows/cifti.py @@ -493,7 +493,7 @@ def init_postprocess_cifti_wf( cifti=True, dcan_qc=dcan_qc, output_dir=output_dir, - TR=TR, + custom_confounds_file=custom_confounds_file, name="postproc_derivatives_wf", ) diff --git a/xcp_d/workflows/outputs.py b/xcp_d/workflows/outputs.py index 1e733b04d..f6bce9060 100644 --- a/xcp_d/workflows/outputs.py +++ b/xcp_d/workflows/outputs.py @@ -138,7 +138,7 @@ def init_postproc_derivatives_wf( cifti, dcan_qc, output_dir, - TR, + custom_confounds_file, name="postproc_derivatives_wf", ): """Write out the xcp_d derivatives in BIDS format. @@ -166,7 +166,7 @@ def init_postproc_derivatives_wf( cifti=False, dcan_qc=True, output_dir=".", - TR=2., + custom_confounds_file=None, name="postproc_derivatives_wf", ) @@ -191,7 +191,8 @@ def init_postproc_derivatives_wf( %(dcan_qc)s output_dir : :obj:`str` output directory - %(TR)s + custom_confounds_file + Only used for Sources metadata. %(name)s Default is "connectivity_wf". @@ -302,9 +303,20 @@ def _preproc_to_source(out_file, fmri_dir): else: return _out_file_to_source(out_file, "preprocessed", fmri_dir) + def _custom_to_source(out_file): + import os + + from xcp_d.utils.utils import _out_file_to_source + + if isinstance(out_file, list): + return [ + _out_file_to_source(of, "custom_confounds", os.path.dirname(of)) for of in out_file + ] + else: + return _out_file_to_source(out_file, "custom_confounds", os.path.dirname(out_file)) + # Create dictionary of basic information cleaned_data_dictionary = { - "RepetitionTime": TR, "nuisance parameters": params, **source_metadata, } @@ -333,18 +345,6 @@ def _preproc_to_source(out_file, fmri_dir): preproc_bold_src = _preproc_to_source(name_source, fmri_dir) - preproc_confounds_src = pe.Node( - InferBIDSURIs( - numinputs=1, - dataset_name="preprocessed", - dataset_path=fmri_dir, - ), - name="preproc_confounds_src", - run_without_submitting=True, - mem_gb=1, - ) - workflow.connect([(inputnode, preproc_confounds_src, [("fmriprep_confounds_file", "in1")])]) - atlas_src = pe.MapNode( InferBIDSURIs( numinputs=1, @@ -358,15 +358,6 @@ def _preproc_to_source(out_file, fmri_dir): ) workflow.connect([(inputnode, atlas_src, [("atlas_files", "in1")])]) - merge_dense_src = pe.Node( - niu.Merge(numinputs=2), - name="merge_dense_src", - run_without_submitting=True, - mem_gb=1, - ) - merge_dense_src.inputs.in1 = preproc_bold_src - workflow.connect([(preproc_confounds_src, merge_dense_src, [("bids_uris", "in2")])]) - make_atlas_dict = pe.MapNode( niu.Function( function=_make_dictionary, @@ -398,8 +389,8 @@ def _preproc_to_source(out_file, fmri_dir): (inputnode, ds_filtered_motion, [ ("motion_metadata", "meta_dict"), ("filtered_motion", "in_file"), + (("fmriprep_confounds_file", _preproc_to_source, fmri_dir), "Sources"), ]), - (preproc_confounds_src, ds_filtered_motion, [("bids_uris", "Sources")]), (ds_filtered_motion, outputnode, [("out_file", "filtered_motion")]), ]) # fmt:on @@ -431,9 +422,28 @@ def _preproc_to_source(out_file, fmri_dir): ]) # fmt:on + confounds_src = pe.Node( + InferBIDSURIs( + numinputs=3 if custom_confounds_file else 2, + dataset_name="preprocessed", + dataset_path=fmri_dir, + ), + name="confounds_src", + run_without_submitting=True, + mem_gb=1, + ) + # fmt:off + workflow.connect([ + (inputnode, confounds_src, [("fmriprep_confounds_file", "in1")]), + (ds_temporal_mask, confounds_src, [ + (("out_file", _postproc_to_source, output_dir), "in2"), + ]), + ]) + # fmt:on + if custom_confounds_file: + confounds_src.inputs.in3 = _custom_to_source(custom_confounds_file) + if params != "none": - # TODO: Add custom confounds file to sources - # TODO: Add temporal mask to sources ds_confounds = pe.Node( DerivativesDataSink( base_directory=output_dir, @@ -449,12 +459,27 @@ def _preproc_to_source(out_file, fmri_dir): # fmt:off workflow.connect([ (inputnode, ds_confounds, [("confounds_file", "in_file")]), - (preproc_confounds_src, ds_confounds, [("bids_uris", "Sources")]), + (confounds_src, ds_confounds, [("bids_uris", "Sources")]), ]) # fmt:on + merge_dense_src = pe.Node( + niu.Merge(numinputs=3), + name="merge_dense_src", + run_without_submitting=True, + mem_gb=1, + ) + merge_dense_src.inputs.in1 = preproc_bold_src + # fmt:off + workflow.connect([ + (ds_confounds, merge_dense_src, [(("out_file", _postproc_to_source, output_dir), "in2")]), + (ds_temporal_mask, merge_dense_src, [ + (("out_file", _postproc_to_source, output_dir), "in3"), + ]), + ]) + # fmt:on + # Write out derivatives via DerivativesDataSink - # TODO: Add temporal mask to sources ds_denoised_bold = pe.Node( DerivativesDataSink( base_directory=output_dir, @@ -874,7 +899,6 @@ def _preproc_to_source(out_file, fmri_dir): ]) # fmt:on - # TODO: Use ReHo as Source add_reho_to_src = pe.MapNode( niu.Function( function=_make_dictionary, From 8ee7fe682880af1a1904dbb72f7f346841e89442 Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Sun, 15 Oct 2023 15:13:36 -0400 Subject: [PATCH 42/60] Update outputs.py --- xcp_d/workflows/outputs.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/xcp_d/workflows/outputs.py b/xcp_d/workflows/outputs.py index f6bce9060..d7c7962ca 100644 --- a/xcp_d/workflows/outputs.py +++ b/xcp_d/workflows/outputs.py @@ -423,11 +423,7 @@ def _custom_to_source(out_file): # fmt:on confounds_src = pe.Node( - InferBIDSURIs( - numinputs=3 if custom_confounds_file else 2, - dataset_name="preprocessed", - dataset_path=fmri_dir, - ), + niu.Merge(numinputs=3 if custom_confounds_file else 2), name="confounds_src", run_without_submitting=True, mem_gb=1, From 223ef42b1f67aa0a121a84e399ccc7ad8130341b Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Sun, 15 Oct 2023 16:14:08 -0400 Subject: [PATCH 43/60] Update outputs.py --- xcp_d/workflows/outputs.py | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/xcp_d/workflows/outputs.py b/xcp_d/workflows/outputs.py index d7c7962ca..e3946b618 100644 --- a/xcp_d/workflows/outputs.py +++ b/xcp_d/workflows/outputs.py @@ -422,24 +422,24 @@ def _custom_to_source(out_file): ]) # fmt:on - confounds_src = pe.Node( - niu.Merge(numinputs=3 if custom_confounds_file else 2), - name="confounds_src", - run_without_submitting=True, - mem_gb=1, - ) - # fmt:off - workflow.connect([ - (inputnode, confounds_src, [("fmriprep_confounds_file", "in1")]), - (ds_temporal_mask, confounds_src, [ - (("out_file", _postproc_to_source, output_dir), "in2"), - ]), - ]) - # fmt:on - if custom_confounds_file: - confounds_src.inputs.in3 = _custom_to_source(custom_confounds_file) - if params != "none": + confounds_src = pe.Node( + niu.Merge(numinputs=3 if custom_confounds_file else 2), + name="confounds_src", + run_without_submitting=True, + mem_gb=1, + ) + # fmt:off + workflow.connect([ + (inputnode, confounds_src, [("fmriprep_confounds_file", "in1")]), + (ds_temporal_mask, confounds_src, [ + (("out_file", _postproc_to_source, output_dir), "in2"), + ]), + ]) + # fmt:on + if custom_confounds_file: + confounds_src.inputs.in3 = _custom_to_source(custom_confounds_file) + ds_confounds = pe.Node( DerivativesDataSink( base_directory=output_dir, @@ -455,7 +455,7 @@ def _custom_to_source(out_file): # fmt:off workflow.connect([ (inputnode, ds_confounds, [("confounds_file", "in_file")]), - (confounds_src, ds_confounds, [("bids_uris", "Sources")]), + (confounds_src, ds_confounds, [("out", "Sources")]), ]) # fmt:on From c560f304ed4eb0139c15526008aba4e557876277 Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Sun, 15 Oct 2023 16:38:01 -0400 Subject: [PATCH 44/60] Update things. --- docs/outputs.rst | 40 ++++++++++---------------------- xcp_d/workflows/base.py | 1 + xcp_d/workflows/concatenation.py | 19 ++++++++------- xcp_d/workflows/outputs.py | 2 +- 4 files changed, 25 insertions(+), 37 deletions(-) diff --git a/docs/outputs.rst b/docs/outputs.rst index fa6b0bb69..7554f3253 100644 --- a/docs/outputs.rst +++ b/docs/outputs.rst @@ -165,21 +165,15 @@ Denoised or residual BOLD data xcp_d/ sub-