HBClab / NiBetaSeries

Nipype implementation of BetaSeries Correlations (Beta)
https://nibetaseries.readthedocs.io
MIT License
32 stars 28 forks source link

inadequate validation of derivatives directory and files #248

Closed jdkent closed 4 years ago

jdkent commented 4 years ago

Describe the bug I believe either where fmriprep outputs are or the files within the fmriprep directory may not be named as expected and currently I do not return a very useful error indicating whether the fmriprep output directory cannot be found OR whether the specified files within the fmriprep directory can be found.

To Reproduce call:

nibs $BIDS_DIR fmriprep $BIDS_DIR/derivatives/nibs participant --participant-label sub-s061 
- a $ATLAS_DIR/Schaefer2018_1000Parcels_17Networks_order_fmriprep_2.2mm.nii.gz 
-l $ATLAS_DIR/Schaefer2018_1000Parcels_17Networks_order_nibs.tsv 
-t surveyMedley 
--nthreads 48 
--estimator lss -hp 100 --hrf-model spm 
-c std_dvars framewise_displacement trans_x trans_y trans_z rot_x rot_y rot_z a_comp_cor_00 a_comp_cor_01 a_comp_cor_02 a_comp_cor_03 a_comp_cor_04 a_comp_cor_05 
-sm 5

output:

191215-16:33:45,296 nipype.workflow INFO:
Workflow nibetaseries_participant_wf settings: ['check', 'execution', 'logging', 'mo
nitoring']
191215-16:33:45,308 nipype.workflow INFO:
Running in parallel.
Traceback (most recent call last):
  File "/work/01329/poldrack/frontera/software_frontera/anaconda3/envs/py36/lib/python3.6/sit
e-packages/nipype/pipeline/plugins/base.py", line 399, in _generate_dependency_list
    graph, nodelist=self.procs, format='lil')
  File "/work/01329/poldrack/frontera/software_frontera/anaconda3/envs/py36/lib/python3.6/sit
e-packages/networkx/convert_matrix.py", line 775, in to_scipy_sparse_matrix
    raise nx.NetworkXError("Graph has no nodes or edges")
networkx.exception.NetworkXError: Graph has no nodes or edges
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/work/01329/poldrack/frontera/software_frontera/anaconda3/envs/py36/bin/nibs", line 8
, in <module>
    sys.exit(main())
  File "/work/01329/poldrack/frontera/software_frontera/anaconda3/envs/py36/lib/python3.6/sit
e-packages/nibetaseries/cli/run.py", line 248, in main
    nibetaseries_participant_wf.run(**plugin_settings)
  File "/work/01329/poldrack/frontera/software_frontera/anaconda3/envs/py36/lib/python3.6/sit
e-packages/nipype/pipeline/engine/workflows.py", line 599, in run
    runner.run(execgraph, updatehash=updatehash, config=self.config)
  File "/work/01329/poldrack/frontera/software_frontera/anaconda3/envs/py36/lib/python3.6/sit
e-packages/nipype/pipeline/plugins/base.py", line 122, in run
    self._generate_dependency_list(graph)
  File "/work/01329/poldrack/frontera/software_frontera/anaconda3/envs/py36/lib/python3.6/sit
e-packages/nipype/pipeline/plugins/base.py", line 401, in _generate_dependency_list
    self.depidx = nx.to_scipy_sparse_matrix(graph, nodelist=self.procs)
  File "/work/01329/poldrack/frontera/software_frontera/anaconda3/envs/py36/lib/python3.6/sit
e-packages/networkx/convert_matrix.py", line 775, in to_scipy_sparse_matrix
    raise nx.NetworkXError("Graph has no nodes or edges")
networkx.exception.NetworkXError: Graph has no nodes or edges

Expected behavior A successful run

Desktop (please complete the following information): N/A

nibetaseries version 0.4.0

Additional context not related: