Pyafq pipeline error in QSIPrep

Hi everyone,

I am using qsiprep to preprocess and reconstruct dwi data. pyafq is selected as the reconstruction workflow. It can be preprocessed smoothly, but there is an error in the reconstruction.Is there something that I can do to fix this? Any help would be greatly appreciated.

Many thanks

Command:

qsiprep-docker /home/liziyun/test/Nifti /home/liziyun/test/out1 \
--output_resolution 2 --fs-license-file /home/liziyun/test/license.txt \
--unringing-method mrdegibbs --recon_spec pyafq -w /home/liziyun/test/tt

Version:
0.16.1

log

Node: qsirecon_wf.sub-01_pyAFQ_full.sub_01_ses_001_run_001_space_T1w_desc_preproc_recon_wf.pyAFQ_full.run_afq
Working directory: /scratch/qsirecon_wf/sub-01_pyAFQ_full/sub_01_ses_001_run_001_space_T1w_desc_preproc_recon_wf/pyAFQ_full/run_afq

Node inputs:

bval_file = <undefined>
bvec_file = <undefined>
dwi_file = <undefined>
itk_file = <undefined>
kwargs = {'directions': 'prob', 'max_angle': 30.0, 'sphere': None, 'seed_mask': None, 'seed_threshold': 0, 'n_seeds': 1, 'random_seeds': False, 'rng_seed': None, 'stop_mask': None, 'stop_threshold': 0, 'step_size': 0.5, 'min_length': 10, 'max_length': 1000, 'odf_model': 'CSD', 'tracker': 'local', 'nb_points': False, 'nb_streamlines': False, 'seg_algo': 'AFQ', 'reg_algo': None, 'clip_edges': False, 'parallel_segmentation': {'n_jobs': -1, 'engine': 'joblib', 'backend': 'loky'}, 'progressive': True, 'greater_than': 50, 'rm_small_clusters': 50, 'model_clust_thr': 1.25, 'reduction_thr': 25, 'refine': False, 'pruning_thr': 12, 'b0_threshold': 50, 'prob_threshold': 0, 'roi_dist_tie_break': False, 'dist_to_waypoint': None, 'rng': None, 'return_idx': False, 'presegment_bundle_dict': None, 'presegment_kwargs': {}, 'filter_by_endpoints': True, 'dist_to_atlas': 4, 'save_intermediates': None, 'n_points': 100, 'clean_rounds': 5, 'distance_threshold': 5, 'length_threshold': 4, 'min_sl': 20, 'stat': 'mean', 'min_bval': None, 'max_bval': None, 'filter_b': True, 'robust_tensor_fitting': False, 'csd_response': None, 'csd_sh_order': None, 'csd_lambda_': 1, 'csd_tau': 0.1, 'gtol': 0.01, 'brain_mask_definition': None, 'bundle_info': None, 'reg_template_spec': 'mni_T1', 'mapping_definition': None, 'reg_subject_spec': 'power_map', 'profile_weights': 'gauss', 'scalars': ['dti_fa', 'dti_md'], 'import_tract': None, 'sbv_lims_bundles': [None, None], 'volume_opacity_bundles': 0.3, 'n_points_bundles': 40, 'sbv_lims_indiv': [None, None], 'volume_opacity_indiv': 0.3, 'n_points_indiv': 40, 'viz_backend_spec': 'plotly_no_gif', 'virtual_frame_buffer': False, 'omp_nthreads': 7}
mask_file = <undefined>
tck_file = <undefined>

Traceback (most recent call last):
  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/pipeline/plugins/multiproc.py", line 67, in run_node
    result["result"] = node.run(updatehash=updatehash)
  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/pipeline/engine/nodes.py", line 527, in run
    result = self._run_interface(execute=True)
  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/pipeline/engine/nodes.py", line 645, in _run_interface
    return self._run_command(execute)
  File "/usr/local/miniconda/lib/python3.8/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 run_afq.

Traceback:
	Traceback (most recent call last):
	  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/interfaces/base/core.py", line 398, in run
	    runtime = self._run_interface(runtime)
	  File "/usr/local/miniconda/lib/python3.8/site-packages/qsiprep/interfaces/pyafq.py", line 59, in _run_interface
	    tck_file = fname_presuffix(self.inputs.tck_file,
	  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/utils/filemanip.py", line 140, in fname_presuffix
	    pth, fname, ext = split_filename(fname)
	  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/utils/filemanip.py", line 92, in split_filename
	    pth = op.dirname(fname)
	  File "/usr/local/miniconda/lib/python3.8/posixpath.py", line 152, in dirname
	    p = os.fspath(p)
	TypeError: expected str, bytes or os.PathLike object, not _Undefined

Hi @Ziyun-li, could you open an issue on github? I’m not sure if the relevant experts are on Neurostars