help > CONN 25b + conn_remotely: default ROI paths resolved client-side, and missing CONN_x.Preproc.qa.folders after fMRIPrep import
12 hours ago | Maron Mantwill
CONN 25b + conn_remotely: default ROI paths resolved client-side, and missing CONN_x.Preproc.qa.folders after fMRIPrep import

Dear Alfonso,


Two issues I ran into while setting up CONN 25b on our institutional HPC cluster, both reproducible and both with simple workarounds — posting in case they're useful.


Setup:
- Server: Linux HPC cluster, Slurm scheduler, MATLAB R2024b
- CONN 25.b + SPM25 installed at /sc-projects/<project>/pipeline/toolboxes/matlab/{conn,spm}
- Clients: Linux workstation with CONN 25.b + SPM25 at ~/matlab_toolboxes/{conn25,spm25}, and a macOS laptop with its own local install
- Connecting via conn remotely start <host>, with SERVERcmd set to the Slurm profile so the server runs on a compute node (this works great)
- Projects created through the GUI using the fMRIPrep import



Issue 1 — default ROI/mask paths are resolved on the client, not the server


When I create a new project through the remote GUI, the default ROIs and masks (atlas.nii, the brain mask, etc.) appear to be resolved from the client's CONN installation, and the resulting absolute paths are stored in the project. The submitted jobs then fail on the compute node, e.g.:


  Error using read_hdr (line 37)
  Error reading header file "/home/<user>/matlab_toolboxes/conn25/rois/atlas.nii". # (this is the client path)
  Error in nifti (line 24)
  Error in conn_fileutils (line 371)
  Error in conn_surf_dimscheck (line 3)
  Error in conn_process (line 1015)
  Error in conn_process (line 55)
  Error in conn_jobmanager (line 936)


That path is the client's install; the server's is /sc-projects/<project>/pipeline/toolboxes/matlab/conn/rois/atlas.nii. It happens for both the atlas and the brain mask.


Workaround I've used:
- Manually re-selecting the affected files in Setup → ROIs so they point at the server's conn/rois folder, then saving the project. Fine for a few entries, but this will revert for every new project.


This presumably only shows up when the client and server installations live at different absolute paths, which may be why it isn't more commonly reported — but on a cluster with a project-space install it's essentially guaranteed.



Issue 2 — Denoising & QC tab errors on a missing CONN_x.Preproc.qa.folders field


After preprocessing, opening the new combined Denoising & Quality Control tab fails immediately:


  Unrecognized field name "folders".
  Error in conn (line 7567)
   if numel(CONN_x.Preproc.qa.folders)<3||isempty(CONN_x.Preproc.qa.folders{3})||~conn_existfile(CONN_x.Preproc.qa.folders{3},2),
  Error in conn_menumanager (line 125)


Inspecting the structure:


  >> fieldnames(CONN_x.Preproc.qa)
  ans =
    3x1 cell array
      {'options1'}
      {'options2'}
      {'options3'}


So the field genuinely doesn't exist. Generating QA plots from the Setup tab populated options1/2/3 but did not create folders, so the error persisted.


The line's own guard anticipates the field being empty or too short, but not absent. Initializing it manually resolved it completely:


  global CONN_x
  CONN_x.Preproc.qa.folders = {'','',''};
  conn save


After that the tab opens normally and everything works as expected.


My guess is that the fMRIPrep import path doesn't initialize this field, while the classic project-creation path does - but I haven't looked at the source, so that's speculation. Happy to test a patch or provide more detail on either issue.


Thanks for all your work on CONN.


Best,
Maron
Charité Berlin