[RESOLVED] Parcellate_bold fails to run

Dear QuNex Experts:

I was trying to run parcellate_bold to obtain the functional connectome with the following commands:

qunex_container parcellate_bold \
  --sessionsfolder="${WORK_DIR}/${STUDY_NAME}/sessions" \
  --sessions="${SESSIONS}" \
  --inputfiles="bold1_Atlas.dtseries.nii" \
  --inputpath="/images/functional" \
  --parcellationfile="${HOME}/projects/Pipeline/global/templates/ColeAnticevicNetPartition/CortexSubcortex_ColeAnticevic_NetPartition_wSubcorGSR_parcels_LR_ReorderedByNetworks.dlabel.nii" \
  --mask="" \
  --computepconn="yes" \
  --outname="ColeAnticevicNetPartition" \
  --outpath="/images/functional" \
  --inputdatatype="dtseries" \
  --overwrite="yes" \
  --container="${QUNEX_CONTAINER}"

However, the following errors occurred:

NOTE: Weights file not used.
ERROR: Input file value missing

I had no idea what went wrong. Any help would be greatly appreciated. Thank you very much.

Best,
Ed

Hi Ed,

I believe there is a typo in the documentation. For parcellate_bold, the parameter should be inputfile instead of inputfiles (for compute_bold_fc the parameter is inputfiles). I will fix the documentation shortly. Sorry about this!

Lining

Dear Lining:

Many thanks for your swift help indeed;)

Best,
Ed

Dear Lining:

Can you be so kind to let me know how to fix the error please?

ERROR: Study folder or sessions folder is not defined or missing.
       Check your inputs and re-run QuNex.

Below is the command I used:

qunex_container parcellate_bold \
  --sessionsfolder="${WORK_DIR}/${STUDY_NAME}/sessions" \
  --sessions="${SESSIONS}" \
  --inputfile="bold1_Atlas_s_hpss_res-mVWMWB_lpss.dtseries.nii,bold2_Atlas_s_hpss_res-mVWMWB_lpss.dtseries.nii" \
  --inputpath="/images/functional/" \
  --parcellationfile="${HOME}/projects/Pipeline/global/templates/ColeAnticevicNetPartition/CortexSubcortex_ColeAnticevic_NetPartition_wSubcorGSR_parcels_LR_ReorderedByNetworks.dlabel.nii" \
  --mask="" \
  --computepconn="yes" \
  --outname="ColeAnticevicNetPartition" \
  --outpath="/images/functional/" \
  --inputdatatype="dtseries" \
  --overwrite="yes" \
  --container="${QUNEX_CONTAINER}"

Thanks so much for your help in advance!

Best,
Ed

Hi Ed,

First of all, I don’t think parcellate_bold accepts multiple input files. For this error, could you please double check that your environment variables such as WORK_DIR and STUDY_NAME are defined? I would also be helpful if you can share the complete log with us.

Lining

Hi Lining:

The same error occurred even after I specified only one input file.

Kindly note that the environmental variables WORK_DIR and STUDY_NAME were defined. And for some reason, I couldn’t find any log file associated with parcellate_bold from the “${WORK_DIR}/${STUDY_NAME}/processing/logs/comlogs”.

Many thanks for your help!

Best,
Ed

If there’s no comlogs, can you share more complete logs printed into the terminal?

Hi Lining:

Actually that was pretty much it:

Generated by QuNex
------------------------------------------------------------------------
Version: 0.93.6
User: ehui
System: ehui
OS: RedHat Linux #140~18.04.1-Ubuntu SMP Fri Aug 5 11:43:34 UTC 2022
------------------------------------------------------------------------

        ██████\                  ║      ██\   ██\
       ██  __██\                 ║      ███\  ██ |
       ██ /  ██ |██\   ██\       ║      ████\ ██ | ██████\ ██\   ██\
       ██ |  ██ |██ |  ██ |      ║      ██ ██\██ |██  __██\\██\ ██  |
       ██ |  ██ |██ |  ██ |      ║      ██ \████ |████████ |\████  /
       ██ ██\██ |██ |  ██ |      ║      ██ |\███ |██   ____|██  ██\
       \██████ / \██████  |      ║      ██ | \██ |\███████\██  /\██\
        \___███\  \______/       ║      \__|  \__| \_______\__/  \__|
            \___|                ║


                       DEVELOPED & MAINTAINED BY:

                    Anticevic Lab, Yale University
               Mind & Brain Lab, University of Ljubljana
                     Murray Lab, Yale University

                      COPYRIGHT & LICENSE NOTICE:

Use of this software is subject to the terms and conditions defined in
'LICENSE.md' which is a part of the QuNex Suite source code package:
https://bitbucket.org/oriadev/qunex/src/master/LICENSE.md

 ---> Setting up Octave


 ........................ Running QuNex v0.93.6 ........................




ERROR: Study folder or sessions folder is not defined or missing.
       Check your inputs and re-run QuNex.

Many thanks!
Ed

Do you see any scripts in the processing/logs/batchlogs folder or your home folder?

No, the folder is empty. Thanks, Ed

Whenever you run something through qunex_container, it will always generate a script before running either in you home folder or the batchlogs folder. The name of the script will be something like qunex_container_command_[timestamp].sh

Hi Lining:

Weirdly there isn’t any script in any folders after running parcellate_bold. However, I did get log files in processing/logs/comlogs when I ran e.g. dwi_parcellate through qunex_container.

Many thanks,
Edward

Could you please try again with the latest qunex_container script? QuNex quick start using a Docker container — QuNex documentation

Hi Lining:

Apologies for my late response. I stumbled on the root cause of the problem. I have moved all the data to another drive which only has read access. Once I moved it to ${home} directory, all is working normal.

On the topic of drive with only read access. I have changed it to write/read but the entire qunex_container script wouldn’t run and complained the file system is a read only system. May I ask if you have come across such issue before?

Many thanks for your help as always!

Best,
Ed

Something we usually encounter when moving study folders around is absolute paths in session.txt, session_hcp.txt, and batch files.

Also for singularity containers you also want to make sure that the data folders are mounted and have rw permission.

https://apptainer.org/docs/user/main/bind_paths_and_mounts.html#user-defined-bind-paths