Closed diramigo closed 3 months ago
Hi,
Same problem here using docker in WSL Ubuntu 20.04
sudo docker run -it --rm -v /mnt/d/Trabajo/Academia/Docencia/Cursos/2023/CursoRedes_2023/Practica/raw20:/data:ro -v /mnt/d/Trabajo/Academia/Docencia/Cursos/2023/CursoRedes_2023/Practica/practica20mriqcout:/out -v /mnt/d/Trabajo/Academia/Docencia/Cursos/2023/CursoRedes_2023/Practica/working:/work nipreps/mriqc:latest --nprocs 2 -m T1w bold --fd_thres 0.5 -w /work /data /out participant --participant_label 020 --verbose-reports
23.1.0
Singularity
Yes
No
Node: mriqc_wf.anatMRIQC.ComputeIQMs.ComputeQI2
Working directory: /work/mriqc_wf/anatMRIQC/ComputeIQMs/_in_file_..data..sub-020..anat..sub-020_T1w.nii.gz/ComputeQI2
Node inputs:
air_msk = <undefined>
in_file = <undefined>
Traceback (most recent call last):
File "/opt/conda/lib/python3.9/site-packages/mriqc/engine/plugin.py", line 60, in run_node
result["result"] = node.run(updatehash=updatehash)
File "/opt/conda/lib/python3.9/site-packages/nipype/pipeline/engine/nodes.py", line 527, in run
result = self._run_interface(execute=True)
File "/opt/conda/lib/python3.9/site-packages/nipype/pipeline/engine/nodes.py", line 645, in _run_interface
return self._run_command(execute)
File "/opt/conda/lib/python3.9/site-packages/nipype/pipeline/engine/nodes.py", line 771, in _run_command
raise NodeExecutionError(msg)
nipype.pipeline.engine.nodes.NodeExecutionError: Exception raised while executing Node ComputeQI2.
Traceback:
Traceback (most recent call last):
File "/opt/conda/lib/python3.9/site-packages/nipype/interfaces/base/core.py", line 397, in run
runtime = self._run_interface(runtime)
File "/opt/conda/lib/python3.9/site-packages/mriqc/interfaces/anatomical.py", line 376, in _run_interface
qi2, out_file = art_qi2(imdata, airdata)
File "/opt/conda/lib/python3.9/site-packages/mriqc/qc/anatomical.py", line 488, in art_qi2
kde_skl = KernelDensity(kernel="gaussian", bandwidth=4.0).fit(modelx[:, np.newaxis])
File "/opt/conda/lib/python3.9/site-packages/sklearn/neighbors/_kde.py", line 189, in fit
X = self._validate_data(X, order="C", dtype=DTYPE)
File "/opt/conda/lib/python3.9/site-packages/sklearn/base.py", line 577, in _validate_data
X = check_array(X, input_name="X", **check_params)
File "/opt/conda/lib/python3.9/site-packages/sklearn/utils/validation.py", line 899, in check_array
_assert_all_finite(
File "/opt/conda/lib/python3.9/site-packages/sklearn/utils/validation.py", line 146, in _assert_all_finite
raise ValueError(msg_err)
ValueError: Input X contains NaN.
KernelDensity does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
For some reason the mask and in file are empty, but I don't see the problem in my code.
You can reproduce the same error if you use sub-20 from this dataset: https://openneuro.org/datasets/ds003346/versions/1.1.2
Thanks,
Eduardo
What happened?
I am running MRIQC on our T1w images, which I previously refaced with afni's reface+ v2.2. While it runs fine on most of them, it raises an error on some images (48/254). There were no issues on our bold and T2w images, which were not anonymized. I then ran MRIQC on the non-refaced T1w of one of the images MRIQC was raising an error, and it ran successfully, so it seems to be an issue with afni_reface output. Any idea on what the problem might be? I loaded the images with nibabel and couldn't find any missing values or something out of the ordinary
What command did you use?
What version of the software are you running?
23.1.0
How are you running this software?
Singularity
Is your data BIDS valid?
Yes
Are you reusing any previously computed results?
No
Please copy and paste any relevant log output.
Additional information / screenshots
No response