poldracklab / tacc-openneuro

0 stars 1 forks source link

ds002684-mriqc: "ValueError: The number of observations cannot be determined on an empty distance matrix." #39

Open jbwexler opened 1 year ago

jbwexler commented 1 year ago

For 2/4 subjects:

Node: mriqc_wf.funcMRIQC.ReportsWorkflow.BigPlot Working directory: /scratch1/03201/jbwexler/work_dir/mriqc/ds002684_sub-02/mriqc_wf/funcMRIQC/Report sWorkflow/_infile..scratch1..03201..jbwexler..openneuro_derivatives..derivatives..mriqc..ds002684- mriqc..sourcedata..raw..sub-02..ses-GE..func..sub-02_ses-GE_task-prf_run-04_bold.nii/BigPlot

Node inputs:

drop_trs = 0 dvars = fd = fd_thres = 0.2 in_func = in_segm = in_spikes_bg = outliers = tr = None

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 524, in run result = self._run_interface(execute=True) File "/opt/conda/lib/python3.9/site-packages/nipype/pipeline/engine/nodes.py", line 642, in _run_interface return self._run_command(execute) File "/opt/conda/lib/python3.9/site-packages/nipype/pipeline/engine/nodes.py", line 750, in _run_command raise NodeExecutionError( nipype.pipeline.engine.nodes.NodeExecutionError: Exception raised while executing Node BigPlot.

Traceback (most recent call last): File "/opt/conda/lib/python3.9/site-packages/nipype/interfaces/base/core.py", line 398, in run runtime = self._run_interface(runtime) File "/opt/conda/lib/python3.9/site-packages/niworkflows/interfaces/plotting.py", line 99, in _run_interface fig = fMRIPlot( File "/opt/conda/lib/python3.9/site-packages/niworkflows/viz/plots.py", line 129, in plot plot_carpet( File "/opt/conda/lib/python3.9/site-packages/niworkflows/viz/plots.py", line 236, in plotcarpet children, , nleaves, , distances = ward_tree(roi_data, return_distance=True) File "/opt/conda/lib/python3.9/site-packages/sklearn/cluster/_agglomerative.py", line 270, in ward_tree out = hierarchy.ward(X) File "/opt/conda/lib/python3.9/site-packages/scipy/cluster/hierarchy.py", line 834, in ward return linkage(y, method='ward', metric='euclidean') File "/opt/conda/lib/python3.9/site-packages/scipy/cluster/hierarchy.py", line 1068, in linkage n = int(distance.num_obs_y(y)) File "/opt/conda/lib/python3.9/site-packages/scipy/spatial/distance.py", line 2573, in num_obs_y raise ValueError("The number of observations cannot be determined on " ValueError: The number of observations cannot be determined on an empty distance matrix.

jbwexler commented 1 year ago

Also for 2/4 subjects in ds003427.

jbwexler commented 1 year ago

And for 3/7 subjects in ds002295. I inspected sub-05_ses-prf_task-prf_acq-10_run-01_bold.nii and noticed that the fov didn't span the entire brain. Maybe this is the problem.

effigies commented 1 year ago

Should be resolved in https://github.com/nipreps/niworkflows/pull/783, so the next MRIQC release that includes niworkflows 1.7.4 or higher should be fixed.

effigies commented 1 year ago

Looks like that was included in 23.0.0rc1.

jbwexler commented 1 year ago

Do you think I should use 23.0.0rc1 or wait until the next official release?

effigies commented 1 year ago

I would assume that will be coming shortly, so I'd hold off for the moment.