Skip to content

Commit

Permalink
Update things.
Browse files Browse the repository at this point in the history
  • Loading branch information
tsalo committed Oct 15, 2023
1 parent 223ef42 commit c560f30
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 37 deletions.
40 changes: 12 additions & 28 deletions docs/outputs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -165,21 +165,15 @@ Denoised or residual BOLD data
xcp_d/
sub-<label>/[ses-<label>/]
func/
# Nifti
# NIfTI
<source_entities>_space-<label>_desc-denoised_bold.nii.gz
<source_entities>_space-<label>_desc-denoised_bold.json
<source_entities>_space-<label>_desc-denoisedSmoothed_bold.nii.gz
<source_entities>_space-<label>_desc-denoisedSmoothed_bold.json
<source_entities>_space-<label>_desc-interpolated_bold.nii.gz
<source_entities>_space-<label>_desc-interpolated_bold.json
# Cifti
# CIFTI
<source_entities>_space-fsLR_den-91k_desc-denoised_bold.dtseries.nii
<source_entities>_space-fsLR_den-91k_desc-denoised_bold.json
<source_entities>_space-fsLR_den-91k_desc-denoisedSmoothed_bold.dtseries.nii
<source_entities>_space-fsLR_den-91k_desc-denoisedSmoothed_bold.json
<source_entities>_space-fsLR_den-91k_desc-interpolated_bold.dtseries.nii
<source_entities>_space-fsLR_den-91k_desc-interpolated_bold.json
.. important::

Expand Down Expand Up @@ -212,21 +206,21 @@ This includes the atlases used to extract the timeseries.
.. code-block::
xcp_d/
# Nifti
# NIfTI
space-<label>_atlas-<label>_dseg.nii.gz
# Cifti
# CIFTI
space-<label>_atlas-<label>_dseg.dlabel.nii
sub-<label>/[ses-<label>/]
func/
# Nifti
# NIfTI
<source_entities>_space-<label>_atlas-<label>_coverage.tsv
<source_entities>_space-<label>_atlas-<label>_timeseries.tsv
<source_entities>_space-<label>_atlas-<label>_measure-pearsoncorrelation_conmat.tsv
<source_entities>_space-<label>_atlas-<label>_measure-pearsoncorrelation_desc-<INT>volumes_conmat.tsv
# Cifti
# CIFTI
<source_entities>_space-fsLR_atlas-<label>_den-91k_coverage.tsv
<source_entities>_space-fsLR_atlas-<label>_den-91k_coverage.pscalar.nii
<source_entities>_space-fsLR_atlas-<label>_den-91k_timeseries.tsv
Expand Down Expand Up @@ -259,14 +253,14 @@ data.
xcp_d/
sub-<label>/[ses-<label>/]
func/
# Nifti
# NIfTI
<source_entities>_space-<label>_reho.nii.gz
<source_entities>_space-<label>_alff.nii.gz
<source_entities>_space-<label>_desc-smooth_alff.nii.gz
<source_entities>_space-<label>_atlas-<atlas>_alff.tsv
<source_entities>_space-<label>_atlas-<atlas>_reho.tsv
# Cifti
# CIFTI
<source_entities>_space-fsLR_den-91k_reho.dscalar.nii
<source_entities>_space-fsLR_den-91k_alff.dscalar.nii
<source_entities>_space-fsLR_den-91k_desc-smooth_alff.dscalar.nii
Expand All @@ -284,21 +278,15 @@ Other outputs include quality control, framewise displacement, and confounds fil
sub-<label>/[ses-<label>/]
func/
# Nifti
<source_entities>_space-<label>_desc-linc_qc.csv
<source_entities>[_desc-filtered]_motion.tsv
<source_entities>[_desc-filtered]_motion.json
<source_entities>_outliers.tsv
<source_entities>_outliers.json
<source_entities>_design.tsv
# Cifti
# NIfTI
<source_entities>_space-<label>_desc-linc_qc.csv
# CIFTI
<source_entities>_space-fsLR_desc-linc_qc.csv
<source_entities>[_desc-filtered]_motion.tsv
<source_entities>[_desc-filtered]_motion.json
<source_entities>_outliers.tsv
<source_entities>_outliers.json
<source_entities>_design.tsv
``[desc-filtered]_motion.tsv`` is a tab-delimited file with seven columns:
one for each of the six filtered motion parameters, as well as "framewise_displacement".
Expand Down Expand Up @@ -327,10 +315,6 @@ to 1mm FD in 0.01 steps.
xcp_d/
sub-<label>/[ses-<label>/]
func/
# Nifti
<source_entities>_desc-dcan_qc.hdf5
# Cifti
<source_entities>_desc-dcan_qc.hdf5
These files have the following keys:
Expand Down
1 change: 1 addition & 0 deletions xcp_d/workflows/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -799,6 +799,7 @@ def init_subject_wf(
smoothing=smoothing,
cifti=cifti,
dcan_qc=dcan_qc,
fd_thresh=fd_thresh,
mem_gb=1,
omp_nthreads=omp_nthreads,
name=f"concatenate_entity_set_{ent_set}_wf",
Expand Down
19 changes: 11 additions & 8 deletions xcp_d/workflows/concatenation.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@
def init_concatenate_data_wf(
output_dir,
motion_filter_type,
mem_gb,
omp_nthreads,
TR,
head_radius,
params,
smoothing,
cifti,
dcan_qc,
fd_thresh,
mem_gb,
omp_nthreads,
name="concatenate_data_wf",
):
"""Concatenate postprocessed data across runs and directions.
Expand All @@ -42,29 +43,31 @@ def init_concatenate_data_wf(
wf = init_concatenate_data_wf(
output_dir=".",
motion_filter_type=None,
mem_gb=0.1,
omp_nthreads=1,
TR=2,
head_radius=50,
params="none",
smoothing=None,
cifti=False,
dcan_qc=True,
fd_thresh=0.3,
mem_gb=0.1,
omp_nthreads=1,
name="concatenate_data_wf",
)
Parameters
----------
%(output_dir)s
%(motion_filter_type)s
%(mem_gb)s
%(omp_nthreads)s
%(TR)s
%(head_radius)s
%(params)s
%(smoothing)s
%(cifti)s
%(dcan_qc)s
fd_thresh
%(mem_gb)s
%(omp_nthreads)s
%(name)s
Default is "concatenate_data_wf".
Expand Down Expand Up @@ -440,7 +443,7 @@ def init_concatenate_data_wf(
mem_gb=2,
)

if dcan_qc:
if dcan_qc and (fd_thresh > 0):
ds_interpolated_filtered_bold = pe.Node(
DerivativesDataSink(
base_directory=output_dir,
Expand Down Expand Up @@ -480,7 +483,7 @@ def init_concatenate_data_wf(
mem_gb=2,
)

if dcan_qc:
if dcan_qc and (fd_thresh > 0):
ds_interpolated_filtered_bold = pe.Node(
DerivativesDataSink(
base_directory=output_dir,
Expand Down
2 changes: 1 addition & 1 deletion xcp_d/workflows/outputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ def _custom_to_source(out_file):
])
# fmt:on

if dcan_qc:
if dcan_qc and (fd_thresh > 0):
ds_interpolated_denoised_bold = pe.Node(
DerivativesDataSink(
base_directory=output_dir,
Expand Down

0 comments on commit c560f30

Please sign in to comment.