diff --git a/docs/outputs.rst b/docs/outputs.rst index da218755..7af6efc8 100644 --- a/docs/outputs.rst +++ b/docs/outputs.rst @@ -309,7 +309,7 @@ from an anatomical segmentation. The resulting table has ``FrameTimesStart`` and sub-/ pet/ - sub-_[specifiers]_seg-_desc-preproc_timeseries.tsv + sub-_[specifiers]_seg-_desc-preproc_tacs.tsv The ``desc-preproc`` entity indicates that the curves were derived from the preprocessed PET series. @@ -323,7 +323,7 @@ table containing the mean uptake within that region:: sub-/ pet/ - sub-_[specifiers]_seg-_ref-_desc-preproc_timeseries.tsv + sub-_[specifiers]_seg-_ref-_desc-preproc_tacs.tsv The ``ref`` entity captures the reference region identifier provided via the :ref:`CLI options ` ``--ref-mask-name`` and ``--ref-mask-index``. diff --git a/petprep/data/nipreps.json b/petprep/data/nipreps.json index c95fb92b..6de1c82e 100644 --- a/petprep/data/nipreps.json +++ b/petprep/data/nipreps.json @@ -181,13 +181,13 @@ "sub-{subject}[/ses-{session}]/{datatype|perf}/sub-{subject}[_ses-{session}][_task-{task}][_acq-{acquisition}][_ce-{ceagent}][_rec-{reconstruction}][_dir-{direction}][_run-{run}][_space-{space}][_atlas-{atlas}][_cohort-{cohort}][_desc-{desc}]_{suffix}{extension<.json|.tsv>|.tsv}", "sub-{subject}[/ses-{session}]/{datatype|perf}/sub-{subject}[_ses-{session}][_task-{task}][_acq-{acquisition}][_ce-{ceagent}][_rec-{reconstruction}][_dir-{direction}][_run-{run}][_space-{space}][_atlas-{atlas}][_cohort-{cohort}][_desc-{desc}]_{suffix}{extension<.nii|.nii.gz|.json|.tsv>|.tsv}", "sub-{subject}[/ses-{session}]/{datatype|fmap}/sub-{subject}[_ses-{session}][_acq-{acquisition}][_dir-{direction}][_run-{run}][_part-{part}][_space-{space}][_cohort-{cohort}][_res-{resolution}][_fmapid-{fmapid}][_desc-{desc}]_{suffix}{extension<.nii|.nii.gz|.json>|.nii.gz}", - "sub-{subject}[/ses-{session}]/{datatype|pet}/sub-{subject}[_ses-{session}][_acq-{acquisition}][_ce-{ceagent}][_trc-{tracer}][_rec-{reconstruction}][_run-{run}][_space-{space}][_cohort-{cohort}][_res-{resolution}][_desc-{desc}]_{suffix}{extension<.nii|.nii.gz|.json>|.nii.gz}", - "sub-{subject}[/ses-{session}]/{datatype|pet}/sub-{subject}[_ses-{session}][_acq-{acquisition}][_ce-{ceagent}][_trc-{tracer}][_rec-{reconstruction}][_run-{run}][_hemi-{hemi}]_from-{from}_to-{to}_mode-{mode|image}_{suffix|xfm}{extension<.txt|.h5>}", - "sub-{subject}[/ses-{session}]/{datatype|pet}/sub-{subject}[_ses-{session}][_acq-{acquisition}][_ce-{ceagent}][_trc-{tracer}][_rec-{reconstruction}][_run-{run}]_hemi-{hemi}[_space-{space}][_cohort-{cohort}][_den-{density}][_desc-{desc}]_{suffix}{extension<.surf.gii|.shape.gii>}", - "sub-{subject}[/ses-{session}]/{datatype|pet}/sub-{subject}[_ses-{session}][_acq-{acquisition}][_ce-{ceagent}][_trc-{tracer}][_rec-{reconstruction}][_run-{run}][_space-{space}][_cohort-{cohort}][_den-{density}][_desc-{desc}]_{suffix}{extension<.dscalar.nii|.json>}", - "sub-{subject}[/ses-{session}]/{datatype|pet}/sub-{subject}[_ses-{session}][_acq-{acquisition}][_ce-{ceagent}][_trc-{tracer}][_rec-{reconstruction}][_run-{run}][_space-{space}][_cohort-{cohort}][_res-{resolution}]_desc-{desc}_{suffix|mask}{extension<.nii|.nii.gz|.json>|.nii.gz}", - "sub-{subject}[/ses-{session}]/{datatype|pet}/sub-{subject}[_ses-{session}][_acq-{acquisition}][_ce-{ceagent}][_trc-{tracer}][_rec-{reconstruction}][_run-{run}][_space-{space}][_cohort-{cohort}][_res-{resolution}]_label-{label}[_desc-{desc}]_{suffix|probseg}{extension<.nii|.nii.gz|.json>|.nii.gz}", - "sub-{subject}[/ses-{session}]/{datatype|pet}/sub-{subject}[_ses-{session}][_acq-{acquisition}][_ce-{ceagent}][_trc-{tracer}][_rec-{reconstruction}][_dir-{direction}][_run-{run}][_part-{part}][_space-{space}][_atlas-{atlas}][_cohort-{cohort}][_desc-{desc}]_{suffix|timeseries}{extension<.json|.tsv>|.tsv}", + "sub-{subject}[/ses-{session}]/{datatype|pet}/sub-{subject}[_ses-{session}][_acq-{acquisition}][_ce-{ceagent}][_rec-{reconstruction}][_run-{run}][_space-{space}][_cohort-{cohort}][_res-{resolution}][_desc-{desc}]_{suffix}{extension<.nii|.nii.gz|.json>|.nii.gz}", + "sub-{subject}[/ses-{session}]/{datatype|pet}/sub-{subject}[_ses-{session}][_acq-{acquisition}][_ce-{ceagent}][_rec-{reconstruction}][_run-{run}][_hemi-{hemi}]_from-{from}_to-{to}_mode-{mode|image}_{suffix|xfm}{extension<.txt|.h5>}", + "sub-{subject}[/ses-{session}]/{datatype|pet}/sub-{subject}[_ses-{session}][_acq-{acquisition}][_ce-{ceagent}][_rec-{reconstruction}][_run-{run}]_hemi-{hemi}[_space-{space}][_cohort-{cohort}][_den-{density}][_desc-{desc}]_{suffix}{extension<.surf.gii|.shape.gii>}", + "sub-{subject}[/ses-{session}]/{datatype|pet}/sub-{subject}[_ses-{session}][_acq-{acquisition}][_ce-{ceagent}][_rec-{reconstruction}][_run-{run}][_space-{space}][_cohort-{cohort}][_den-{density}][_desc-{desc}]_{suffix}{extension<.dscalar.nii|.json>}", + "sub-{subject}[/ses-{session}]/{datatype|pet}/sub-{subject}[_ses-{session}][_acq-{acquisition}][_ce-{ceagent}][_rec-{reconstruction}][_run-{run}][_space-{space}][_cohort-{cohort}][_res-{resolution}]_desc-{desc}_{suffix|mask}{extension<.nii|.nii.gz|.json>|.nii.gz}", + "sub-{subject}[/ses-{session}]/{datatype|pet}/sub-{subject}[_ses-{session}][_acq-{acquisition}][_ce-{ceagent}][_rec-{reconstruction}][_run-{run}][_space-{space}][_cohort-{cohort}][_res-{resolution}]_label-{label}[_desc-{desc}]_{suffix|probseg}{extension<.nii|.nii.gz|.json>|.nii.gz}", + "sub-{subject}[/ses-{session}]/{datatype|pet}/sub-{subject}[_ses-{session}][_acq-{acquisition}][_ce-{ceagent}][_rec-{reconstruction}][_dir-{direction}][_run-{run}][_part-{part}][_space-{space}][_atlas-{atlas}][_cohort-{cohort}][_desc-{desc}]_{suffix|timeseries}{extension<.json|.tsv>|.tsv}", "sub-{subject}/{datatype}/sub-{subject}[_ses-{session}][_acq-{acquisition}][_ce-{ceagent}][_rec-{reconstruction}][_run-{run}][_space-{space}][_cohort-{cohort}][_desc-{desc}]_{suffix}{extension<.html|.svg>|.svg}", "sub-{subject}/{datatype}/sub-{subject}[_ses-{session}][_acq-{acquisition}][_ce-{ceagent}][_rec-{reconstruction}][_run-{run}][_space-{space}][_cohort-{cohort}][_fmapid-{fmapid}][_desc-{desc}]_{suffix}{extension<.html|.svg>|.svg}", "sub-{subject}/{datatype}/sub-{subject}[_ses-{session}][_acq-{acquisition}][_ce-{ceagent}][_rec-{reconstruction}][_dir-{direction}][_run-{run}][_echo-{echo}][_part-{part}][_space-{space}][_cohort-{cohort}][_desc-{desc}]_{suffix}{extension<.html|.svg>|.svg}", diff --git a/petprep/interfaces/tacs.py b/petprep/interfaces/tacs.py index fac26656..19fb71d3 100644 --- a/petprep/interfaces/tacs.py +++ b/petprep/interfaces/tacs.py @@ -80,7 +80,7 @@ def _run_interface(self, runtime): out_file = fname_presuffix( self.inputs.in_file, - suffix='_timeseries.tsv', + suffix='_tacs.tsv', newpath=runtime.cwd, use_ext=False, ) @@ -138,7 +138,7 @@ def _run_interface(self, runtime): out_file = fname_presuffix( self.inputs.in_file, - suffix='_timeseries.tsv', + suffix='_tacs.tsv', newpath=runtime.cwd, use_ext=False, ) diff --git a/petprep/interfaces/tests/test_tacs.py b/petprep/interfaces/tests/test_tacs.py index 61f97d42..1276627a 100644 --- a/petprep/interfaces/tests/test_tacs.py +++ b/petprep/interfaces/tests/test_tacs.py @@ -164,7 +164,7 @@ def test_tacs_workflow(tmp_path): inputs = pickle.load(f) assert inputs['in_file'] == str(resampled_pet) - assert Path(tmp_path / 'pet_tacs_wf' / 'tac' / 'pet_resampled_timeseries.tsv').exists() + assert Path(tmp_path / 'pet_tacs_wf' / 'tac' / 'pet_resampled_tacs.tsv').exists() def test_ExtractRefTAC(tmp_path): diff --git a/petprep/utils/bids.py b/petprep/utils/bids.py index 440177fc..97bc8cff 100644 --- a/petprep/utils/bids.py +++ b/petprep/utils/bids.py @@ -103,6 +103,7 @@ def write_bidsignore(deriv_dir): '*_pet.pet.gii', '*_mixing.tsv', '*_timeseries.tsv', + '*_tacs.tsv', ) ignore_file = Path(deriv_dir) / '.bidsignore' diff --git a/petprep/workflows/pet/base.py b/petprep/workflows/pet/base.py index 2a1b63a8..e10fc508 100644 --- a/petprep/workflows/pet/base.py +++ b/petprep/workflows/pet/base.py @@ -694,7 +694,7 @@ def init_pet_wf( ds_pet_tacs = pe.Node( DerivativesDataSink( base_directory=petprep_dir, - suffix='timeseries', + suffix='tacs', seg=config.workflow.seg, desc='preproc', allowed_entities=('seg',), @@ -715,7 +715,7 @@ def init_pet_wf( ('outputnode.segmentation', 'inputnode.segmentation'), ('outputnode.dseg_tsv', 'inputnode.dseg_tsv'), ]), - (pet_tacs_wf, ds_pet_tacs, [('outputnode.timeseries', 'in_file')]), + (pet_tacs_wf, ds_pet_tacs, [('outputnode.tacs', 'in_file')]), ]) # fmt:skip if config.workflow.ref_mask_name: @@ -728,7 +728,7 @@ def init_pet_wf( ds_ref_tacs = pe.Node( DerivativesDataSink( base_directory=petprep_dir, - suffix='timeseries', + suffix='tacs', seg=config.workflow.seg, desc='preproc', ref=config.workflow.ref_mask_name, @@ -747,7 +747,7 @@ def init_pet_wf( workflow.connect([ (pet_t1w_src, pet_ref_tacs_wf, [(pet_t1w_field, 'inputnode.pet_anat')]), (pet_fit_wf, pet_ref_tacs_wf, [('outputnode.refmask', 'inputnode.mask_file')]), - (pet_ref_tacs_wf, ds_ref_tacs, [('outputnode.timeseries', 'in_file')]), + (pet_ref_tacs_wf, ds_ref_tacs, [('outputnode.tacs', 'in_file')]), ]) # fmt:skip if nvols > 1: # run these only if 4-D PET diff --git a/petprep/workflows/pet/fit.py b/petprep/workflows/pet/fit.py index 9a1444ac..24366b1c 100644 --- a/petprep/workflows/pet/fit.py +++ b/petprep/workflows/pet/fit.py @@ -468,7 +468,7 @@ def init_pet_fit_wf( ds_ref_tacs = pe.Node( DerivativesDataSink( base_directory=config.execution.petprep_dir, - suffix='timeseries', + suffix='tacs', seg=config.workflow.seg, desc='preproc', ref=config.workflow.ref_mask_name, diff --git a/petprep/workflows/pet/ref_tacs.py b/petprep/workflows/pet/ref_tacs.py index e29d2c7a..a50ab096 100644 --- a/petprep/workflows/pet/ref_tacs.py +++ b/petprep/workflows/pet/ref_tacs.py @@ -27,7 +27,7 @@ def init_pet_ref_tacs_wf(*, name: str = 'pet_ref_tacs_wf') -> pe.Workflow: niu.IdentityInterface(fields=['pet_anat', 'mask_file', 'metadata', 'ref_mask_name']), name='inputnode', ) - outputnode = pe.Node(niu.IdentityInterface(fields=['timeseries']), name='outputnode') + outputnode = pe.Node(niu.IdentityInterface(fields=['tacs']), name='outputnode') resample_pet = pe.Node( Function( @@ -57,7 +57,7 @@ def init_pet_ref_tacs_wf(*, name: str = 'pet_ref_tacs_wf') -> pe.Workflow: ('ref_mask_name', 'ref_mask_name'), ], ), - (tac, outputnode, [('out_file', 'timeseries')]), + (tac, outputnode, [('out_file', 'tacs')]), ] ) diff --git a/petprep/workflows/pet/tacs.py b/petprep/workflows/pet/tacs.py index 39541058..6d1f36a4 100644 --- a/petprep/workflows/pet/tacs.py +++ b/petprep/workflows/pet/tacs.py @@ -30,7 +30,7 @@ def init_pet_tacs_wf(*, name: str = 'pet_tacs_wf') -> pe.Workflow: niu.IdentityInterface(fields=['pet_anat', 'segmentation', 'dseg_tsv', 'metadata']), name='inputnode', ) - outputnode = pe.Node(niu.IdentityInterface(fields=['timeseries']), name='outputnode') + outputnode = pe.Node(niu.IdentityInterface(fields=['tacs']), name='outputnode') # Resample PET to segmentation space resample_pet = pe.Node( @@ -68,7 +68,7 @@ def init_pet_tacs_wf(*, name: str = 'pet_tacs_wf') -> pe.Workflow: ('metadata', 'metadata'), ], ), - (tac, outputnode, [('out_file', 'timeseries')]), + (tac, outputnode, [('out_file', 'tacs')]), ] )