FCP-INDI / C-PAC

Configurable Pipeline for the Analysis of Connectomes
https://fcp-indi.github.io/
GNU Lesser General Public License v3.0
64 stars 40 forks source link

🐛 Empty CSF mask with some subjects #2004

Open e-kenneally opened 11 months ago

e-kenneally commented 11 months ago

Describe the bug

Multiple users have reported this error when running the default pipeline, but only on some subjects. It happens regardless if CSF mask erosion is on or off.

ValueError: Number of time points in {subject}/nuisance_regressors_defaultNoGSR_140/_scan_scan_1/CerebrospinalFluid_mean/rest_calc_tshift_resample_volreg_calc_maths_flirt_roistat.1D (0) is inconsistent with length of functional file {subject}/_scan_scan_1/func_normalize_105/rest_calc_tshift_resample_volreg_calc_maths.nii.gz (433)

CSF mask for crashed subject:

Screenshot 2023-10-17 at 10 22 57 AM

CSF mask for normal subject:

Screenshot 2023-10-17 at 10 24 21 AM

To reproduce

No response

Preconfig

Custom pipeline configuration

No response

Run command

No response

Expected behavior

This might be a data-specific issue, in which case there should be a more informative error message. If not, these subjects should run to completion instead of crashing in nuisance regression, and the CSF masks should be populated.

Acceptance criteria

Screenshots

No response

C-PAC version

No response

Container platform

No response

Docker and/or Singularity version(s)

No response

Additional context

No response

e-kenneally commented 11 months ago

It looks like in some cases this is caused by the lateral ventricles mask. I will open a PR to add a more descriptive error message when this happens.