[RESOLVED] Setting up connectivity analysis

Hi,

I am trying to set up a resting-state connectivity analysis with example data, particularly using parcellate_bold function:

I’ve done the following steps:

  1. hcp_pre_freesurfer
  2. hcp_freesurfer
  3. hcp_post_freesurfer
  4. hcp_fmri_volume
  5. hcp_fmri_surface
  6. map_hcp_data
  7. create_bold_brain_masks
  8. extract_nuisance_signal

Once done all of these steps for all of my subjects I’d like to do a connectivity analysis, particularly to assess connectivity between brain parcels. After reading the document and the solved question https://forum.qunex.yale.edu/t/resolved-how-to-set-up-a-connectivity-analysis/691, I still have some questions about the usage of this function:

  1. I can’t find the files mentioned by Lining(" It should be one of the dlabel files shipped with the qunex container. For example, you can use the Cole Anticevic parcellation using this path (in the container):/opt/qunex/qx_library/data/parcellations/cole_anticevic_net_partition/CortexSubcortex_ColeAnticevic_NetPartition_wSubcorGSR_parcels_LR_ReorderedByNetworks.dlabel.nii"). Do we need to download it by our own or it changed its location in the new version?

  2. How can I use my interest altas like AAL or Yeo?

  3. Are there any errors in the command which was attached below:

qunex_container parcellate_bold \
    --sessionsfolder="${STUDY_FOLDER}/sessions" \
    --batchfile="${STUDY_FOLDER}/processing/batch.txt" \    
    --inputfile='.dtseries.nii' \
    --inputpath='/home/aca/qunex/quickstart/sessions/HCPA001/images/functional/' \
    --inputdatatype='dtseries' \
    --parcellationfile='<dlabel_file_for_parcellation>' \
    --overwrite='no' \
    --extractdata='yes' \
    --outname='output' \
    --outpath='/home/aca/qunex/quickstart/sessions/HCPA001/images/functional/'
    --container="${QUNEX_CONTAINER}"

I’m unfamiliar with the connection analysis in Qunex, and I really appreciate everyone’s help and explanations!

Best,
Acacius

Hi Acacius,

The step sequence looks good.

  1. The .dlabel file should be in the container. I just entered a container interactively to inspect and the path
/opt/qunex/qx_library/data/parcellations/cole_anticevic_net_partition/CortexSubcortex_ColeAnticevic_NetPartition_wSubcorGSR_parcels_LR_ReorderedByNetworks.dlabel.nii

is correct in the container. This is the library repository and the location of the file: Sign in · GitLab.

  1. You should be able to swap the above .dlabel with your own atlas/parcellation. As long as it is in the appropriate format.

  2. Looks good at a glance.

I will get someone from our end that regularly uses this functionality to take a look at this as well and probably give you some additional (and more useful) information.

Best, Jure

Hi Jure,

Many thanks for your kindly help!

Best,
Acacius

Acacius, hi!

The steps 1-8 are all ok. Before doing functional connectivity analysis I would advise you to also compute brain movement related statistics using commands:

  • compute_bold_stats
  • create_stats_reports

These steps will allow you to identify frames with excessive movement and/or signal change that should be omitted or interpolated in functional connectivity analyses.

With these steps you should have all the information to do the last “cleaning” step before the functional connectivity analyses using the preprocess_bold command. This command enables you to perform additional spatial smoothing, highpass and lowpass temporal filtering and removal of nuisance signals such as movement parameters and their derivatives, ventricle, and white matter signals, and global signal.

If you are primarily interested in computing ROI based connectivity, i.e. computing correlation matrices between brain regions or parcels, then I suggest you use fc_compute_roifc command. This command allows you to specify regions of interest or parcels that you are interested in and then computes functional connectivity estimates between them. The ROI can be specified in many different ways and it is quite straightforward to make use of AAl or Yeo parcellation. The commands allows computing different kinds of functional connectivity estimates (e.g., Pearson’s r, Spearman’s rho, covariuance, mutual information), and saves them in different formats.

I suggest you have a look at the documentation for these commands and then ask further if something is not clear.

All the best,

Grega

Hi Grega,

Thanks for your suguestion. However, I meet some problems while runing “parcellate_bold”. Here is my command:

qunex_container parcellate_bold \
    --sessionsfolder="${STUDY_FOLDER}/sessions" \
    --batchfile="${STUDY_FOLDER}/processing/batch.txt" \    
    --inputfile=".dtseries.nii" \
    --inputpath="/home/aca/qunex/quickstart/sessions/HCPA001/images/functional/" \
    --inputdatatype="dtseries" \
    --parcellationfile="/opt/qunex/qx_library/data/parcellations/cole_anticevic_net_partition/CortexSubcortex_ColeAnticevic_NetPartition_wSubcorGSR_parcels_LR_ReorderedByNetworks.dlabel.nii" \
    --overwrite="no" \
    --extractdata="yes" \
    --outname="output" \
    --outpath="/home/aca/qunex/quickstart/sessions/HCPA001/images/functional/" \
    --container="${QUNEX_CONTAINER}"

and I got some errors:

ERROR: No Singularity/Apptainer image or Docker container name specified through the --container parameter!
--inputfile=.dtseries.nii: command not found

It seems like the “parcellate_bold” command have something wrong.

Best,
Acacius

Your missing one backslash at the end here, you need those if you want to break the command in multiple lines. So:

qunex_container parcellate_bold \
    --sessionsfolder="${STUDY_FOLDER}/sessions" \
    --batchfile="${STUDY_FOLDER}/processing/batch.txt" \    
    --inputfile=".dtseries.nii" \
    --inputpath="/home/aca/qunex/quickstart/sessions/HCPA001/images/functional/" \
    --inputdatatype="dtseries" \
    --parcellationfile="/opt/qunex/qx_library/data/parcellations/cole_anticevic_net_partition/CortexSubcortex_ColeAnticevic_NetPartition_wSubcorGSR_parcels_LR_ReorderedByNetworks.dlabel.nii" \
    --overwrite="no" \
    --extractdata="yes" \
    --outname="output" \
    --outpath="/home/aca/qunex/quickstart/sessions/HCPA001/images/functional/" \
    --container="${QUNEX_CONTAINER}"

Thanks. When I corrected it, an new error occur:

ERROR: No Singularity/Apptainer image or Docker container name specified through the --container parameter!
--inputfile=.dtseries.nii: command not found

Acacius,

If you follow my proposed workflow, there is no need for parcellate_bold command. The input to fc_compute_roifc can be volume (i.e. .nii.gz) or dense cifti (i.e. .dtseries.nii) files. fc_compute_roifc then computes representative ROI timeseries with the additional benefit of choosing whether you want the ROI or parcel to be represented by the mean or median signal across the ROI, or the first PCA component.

In regards to the error you are reporting, please check that there are no whitespace characters after the backslash. In your copied code there were spaces after the --batchfile line leading bash to interpret the newline character as terminating the command, and the --inputfile line as a new command.

All the best,

Grega

Got it! Many thanks to you and Jure!

Best,
Acacius

Is ${QUNEX_CONTAINER} pointing to the .sif image or the docker image?

Best, Jure

for Docker image

Best,
Acacius

It seems like something is wrong with the command setup. Can you please paste the code that sets all environment variables that are used and the actual command. Thanks!

Hi Jure,

Sorry for the late reply, My enviroment variables and commands to set up the pipeline are attached at below:

Enviroment Variables:

ca@aca-virtual-machine:~/qunex$ env
SHELL=/bin/bash
SESSION_MANAGER=local/aca-virtual-machine:@/tmp/.ICE-unix/1300,unix/aca-virtual-machine:/tmp/.ICE-unix/1300
QT_ACCESSIBILITY=1
COLORTERM=truecolor
XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/etc/xdg
SSH_AGENT_LAUNCHER=gnome-keyring
XDG_MENU_PREFIX=gnome-
GNOME_DESKTOP_SESSION_ID=this-is-deprecated
LC_ADDRESS=zh_CN.UTF-8
GNOME_SHELL_SESSION_MODE=ubuntu
LC_NAME=zh_CN.UTF-8
SSH_AUTH_SOCK=/run/user/1000/keyring/ssh
FSLWISH=/home/aca/fsl/bin/fslwish
XMODIFIERS=@im=ibus
DESKTOP_SESSION=ubuntu
LC_MONETARY=zh_CN.UTF-8
GTK_MODULES=gail:atk-bridge
DBUS_STARTER_BUS_TYPE=session
PWD=/home/aca/qunex
LOGNAME=aca
XDG_SESSION_DESKTOP=ubuntu
XDG_SESSION_TYPE=wayland
SYSTEMD_EXEC_PID=1300
XAUTHORITY=/run/user/1000/.mutter-Xwaylandauth.KEDQ22
HOME=/home/aca
USERNAME=aca
IM_CONFIG_PHASE=1
LC_PAPER=zh_CN.UTF-8
LANG=en_US.UTF-8
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:
XDG_CURRENT_DESKTOP=ubuntu:GNOME
VTE_VERSION=6800
WAYLAND_DISPLAY=wayland-0
GNOME_TERMINAL_SCREEN=/org/gnome/Terminal/screen/46aa6457_451f_402f_a554_06f1f1defaa9
FSLDIR=/home/aca/fsl
GNOME_SETUP_DISPLAY=:1
LESSCLOSE=/usr/bin/lesspipe %s %s
XDG_SESSION_CLASS=user
TERM=xterm-256color
LC_IDENTIFICATION=zh_CN.UTF-8
LESSOPEN=| /usr/bin/lesspipe %s
FSLTCLSH=/home/aca/fsl/bin/fsltclsh
USER=aca
GNOME_TERMINAL_SERVICE=:1.108
DISPLAY=:0
SHLVL=1
LC_TELEPHONE=zh_CN.UTF-8
QT_IM_MODULE=ibus
LC_MEASUREMENT=zh_CN.UTF-8
DBUS_STARTER_ADDRESS=unix:path=/run/user/1000/bus,guid=09dcda039fc906fb27613f2d67c8ed11
FSLMULTIFILEQUIT=TRUE
FSL_LOAD_NIFTI_EXTENSIONS=0
XDG_RUNTIME_DIR=/run/user/1000
LC_TIME=zh_CN.UTF-8
XDG_DATA_DIRS=/usr/share/ubuntu:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop
PATH=/home/aca/fsl/share/fsl/bin:/home/aca/fsl/share/fsl/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin
GDMSESSION=ubuntu
FSL_SKIP_GLOBAL=0
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus,guid=09dcda039fc906fb27613f2d67c8ed11
FSLOUTPUTTYPE=NIFTI_GZ
LC_NUMERIC=zh_CN.UTF-8
_=/usr/bin/env

Preprocessing Commands:

# -- Add to path
PATH=${HOME}/qunex:${PATH}
# -- Make executable
chmod a+x ${HOME}/qunex/qunex_container

# -- Set the name of the study
STUDY_FOLDER="${HOME}/qunex/quickstart"
# -- Location of the data
RAW_DATA="${HOME}/qunex/data"
# -- Batch parameters file
INPUT_BATCH_FILE="${RAW_DATA}/HCPA001_parameters.txt"
# -- Mapping file
INPUT_MAPPING_FILE="${RAW_DATA}/HCPA001_mapping.txt"
# -- Sessions to run
SESSIONS="HCPA001"
# -- Specify the container
# -- For Docker use the container name and tag:
QUNEX_CONTAINER="gitlab.qunex.yale.edu:5002/qunex/qunexcontainer:1.0.4"

# -- create study
qunex_container create_study \
    --studyfolder="${STUDY_FOLDER}" \
    --bind="${WORK_DIR}:${WORK_DIR}" \
    --container="${QUNEX_CONTAINER}"

# onboard the data, the masterinbox parameter defines
qunex_container import_dicom \
    --sessionsfolder="${STUDY_FOLDER}/sessions" \
    --sessions="${SESSIONS}" \
    --masterinbox="${RAW_DATA}" \
    --archive="leave" \ 
    --bind="${WORK_DIR}:${WORK_DIR}" \
    --container="${QUNEX_CONTAINER}"

# create a session info file with all relevant data for HCP
qunex_container create_session_info \
    --sessionsfolder="${STUDY_FOLDER}/sessions" \
    --sessions="${SESSIONS}" \
    --mapping="${INPUT_MAPPING_FILE}" \
    --container="${QUNEX_CONTAINER}"

# create the QuNex batch file
qunex_container create_batch \
    --sessionsfolder="${STUDY_FOLDER}/sessions" \
    --sessions="${SESSIONS}" \
    --targetfile="${STUDY_FOLDER}/processing/batch.txt" \
    --paramfile="${INPUT_BATCH_FILE}" \
    --container="${QUNEX_CONTAINER}"

# map the session from QuNex to HCP folder structure
qunex_container setup_hcp \
    --sessionsfolder="${STUDY_FOLDER}/sessions" \
    --batchfile="${STUDY_FOLDER}/processing/batch.txt" \
    --container="${QUNEX_CONTAINER}"

# hcp_pre_freesurfer
qunex_container hcp_pre_freesurfer \
    --sessionsfolder="${STUDY_FOLDER}/sessions" \
    --batchfile="${STUDY_FOLDER}/processing/batch.txt" \
    --container="${QUNEX_CONTAINER}"

# hcp_freesurfer
qunex_container hcp_freesurfer \
    --sessionsfolder="${STUDY_FOLDER}/sessions" \
    --batchfile="${STUDY_FOLDER}/processing/batch.txt" \
    --container="${QUNEX_CONTAINER}"

# hcp_post_freesurfer
qunex_container hcp_post_freesurfer \
    --sessionsfolder="${STUDY_FOLDER}/sessions" \
    --batchfile="${STUDY_FOLDER}/processing/batch.txt" \
    --container="${QUNEX_CONTAINER}"

# hcp_fmri_volume
qunex_container hcp_fmri_volume\
    --sessionsfolder="${STUDY_FOLDER}/sessions" \
    --batchfile="${STUDY_FOLDER}/processing/batch.txt" \
    --container="${QUNEX_CONTAINER}"

# hcp_fmri_surface
qunex_container hcp_fmri_surface\
    --sessionsfolder="${STUDY_FOLDER}/sessions" \
    --batchfile="${STUDY_FOLDER}/processing/batch.txt" \
    --container="${QUNEX_CONTAINER}"

# map_hcp_data
qunex_container map_hcp_data \
    --sessionsfolder="${STUDY_FOLDER}/sessions" \
    --batchfile="${STUDY_FOLDER}/processing/batch.txt" \
    --container="${QUNEX_CONTAINER}"

# create_bold_brain_masks
qunex_container create_bold_brain_masks \
    --sessionsfolder="${STUDY_FOLDER}/sessions" \
    --batchfile="${STUDY_FOLDER}/processing/batch.txt" \
    --container="${QUNEX_CONTAINER}"

#extract_nuisance_signal
qunex_container extract_nuisance_signal \
    --sessionsfolder="${STUDY_FOLDER}/sessions" \
    --batchfile="${STUDY_FOLDER}/processing/batch.txt" \
    --container="${QUNEX_CONTAINER}"

Best,
Acacius

And everything works fine (including extract_nuisance_signal)?

But after you follow all this with parcellate_bold, that does not work?

Hi Jure,

I modified my command according to the https://forum.qunex.yale.edu/t/resolved-how-to-set-up-a-connectivity-analysis/691/2, a new error jump out.

Here is my command:

qunex_container parcellate_bold \
    --sessionsfolder="${STUDY_FOLDER}/sessions" \
    --batchfile="${STUDY_FOLDER}/processing/batch.txt" \
    --overwrite="no" \
    --inputfile="bold1_Atlas_s_hpss_res-mVWMWB1d_lpss.dtseries.nii" \
    --inputpath="/home/aca/qunex/quickstart/sessions/HCPA001/images/functional" \
    --parcellationfile="/opt/qunex/qx_library/data/parcellations/cole_anticevic_net_partition/CortexSubcortex_ColeAnticevic_NetPartition_wSubcorGSR_parcels_LR_ReorderedByNetworks.dlabel.nii" \
    --inputdatatype="dtseries" \
    --outpath="images/functional" \
    --computepconn="yes" \
    --outname="parc" \
    --container="${QUNEX_CONTAINER}"

Error:

---> QuNex will run the command over 1 sessions. It will utilize:

    Maximum sessions run in parallel for a job: 1.
    Maximum elements run in parallel for a session: 1.
    Up to 1 processes will be utilized for a job.

    Job #1 will run sessions: HCPA001
aca@aca-virtual-machine:~/qunex$ ---> unsetting the following environment variables: PATH MATLABPATH PYTHONPATH QUNEXVer TOOLS QUNEXREPO QUNEXPATH QUNEXEXTENSIONS QUNEXLIBRARY QUNEXLIBRARYETC TemplateFolder FSL_FIXDIR FREESURFERDIR FREESURFER_HOME FREESURFER_SCHEDULER FreeSurferSchedulerDIR WORKBENCHDIR DCMNIIDIR DICMNIIDIR MATLABDIR MATLABBINDIR OCTAVEDIR OCTAVEPKGDIR OCTAVEBINDIR RDIR HCPWBDIR AFNIDIR PYLIBDIR FSLDIR FSLBINDIR PALMDIR QUNEXMCOMMAND HCPPIPEDIR CARET7DIR GRADUNWARPDIR HCPPIPEDIR_Templates HCPPIPEDIR_Bin HCPPIPEDIR_Config HCPPIPEDIR_PreFS HCPPIPEDIR_FS HCPPIPEDIR_FS_CUSTOM HCPPIPEDIR_PostFS HCPPIPEDIR_fMRISurf HCPPIPEDIR_fMRIVol HCPPIPEDIR_tfMRI HCPPIPEDIR_dMRI HCPPIPEDIR_dMRITract HCPPIPEDIR_Global HCPPIPEDIR_tfMRIAnalysis HCPCIFTIRWDIR MSMBin HCPPIPEDIR_dMRITractFull HCPPIPEDIR_dMRILegacy AutoPtxFolder EDDYCUDA USEOCTAVE QUNEXENV CONDADIR MSMBINDIR MSMCONFIGDIR R_LIBS FSL_FIX_CIFTIRW FSFAST_HOME SUBJECTS_DIR MINC_BIN_DIR MNI_DIR MINC_LIB_DIR MNI_DATAPATH FSF_OUTPUT_FORMAT ANTSDIR CUDIMOT

========================================================================
Generated by QuNex
------------------------------------------------------------------------
Version: 1.0.4 [QIO]
User: root
System: 01b8cd61c252
OS: Debian Linux #53~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Jan 15 19:18:46 UTC 2
------------------------------------------------------------------------

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


                       DEVELOPED & MAINTAINED BY:

               Mind & Brain Lab, University of Ljubljana
                       Cho Lab, Yale University

                      COPYRIGHT & LICENSE NOTICE:

Use of this software is subject to the terms and conditions defined in
QuNex LICENSES which can be found in the LICENSES folder of the QuNex
repository or at https://qunex.yale.edu/qunex-registration
========================================================================

---> Setting up Octave 


.......................... Running QuNex v1.0.4 [QIO] ..........................



Using /home/aca/qunex/quickstart/processing/batch.txt for input.

WARNING: You are attempting to execute a QuNex command using a conflicting QuNex file hierarchy:

     Found: ---> /home/aca/qunex/quickstart/subjects
     Found: ---> /home/aca/qunex/quickstart/sessions

     To avoid the possibility of a backwards incompatible or duplicate 
     QuNex runs please review the study directory structure and consider
     resolving the conflict such that a consistent folder specification is used. 

     QuNex will proceed but please consider renaming your directories per latest specs:
          https://qunex.readthedocs.io/en/latest/wiki/Overview/DataHierarchy

NOTE: Weights file not used.

Running parcellate_bold with the following parameters:
--------------------------------------------------------------
   Study Folder: /home/aca/qunex/quickstart
   Sessions Folder: /home/aca/qunex/quickstart/sessions
   Sessions: HCPA001
   Study Log Folder: 
   Input File: bold1_Atlas_s_hpss_res-mVWMWB1d_lpss.dtseries.nii
   Input Path: /home/aca/qunex/quickstart/sessions/HCPA001/images/functional
   Single Input File: 
   ParcellationFile: /opt/qunex/qx_library/data/parcellations/cole_anticevic_net_partition/CortexSubcortex_ColeAnticevic_NetPartition_wSubcorGSR_parcels_LR_ReorderedByNetworks.dlabel.nii
   BOLD Parcellated Connectome Output Name: parc
   BOLD Parcellated Connectome Output Path: images/functional
   Input Data Type: dtseries
   Compute PConn File: yes
   Weights file specified to omit certain frames: no
   Weights file name: no
   Extract data in CSV format: no
   Overwrite prior run: no


--- Full QuNex call for command: parcellate_bold

. /opt/qunex/bash/qx_utilities/parcellate_bold.sh     --sessionsfolder='/home/aca/qunex/quickstart/sessions'     --sessions='HCPA001'     --inputfile='bold1_Atlas_s_hpss_res-mVWMWB1d_lpss.dtseries.nii'     --singleinputfile=''     --inputpath='/home/aca/qunex/quickstart/sessions/HCPA001/images/functional'     --inputdatatype='dtseries'     --parcellationfile='/opt/qunex/qx_library/data/parcellations/cole_anticevic_net_partition/CortexSubcortex_ColeAnticevic_NetPartition_wSubcorGSR_parcels_LR_ReorderedByNetworks.dlabel.nii'     --overwrite='no'     --outname='parc'     --outpath='images/functional'     --computepconn='yes'     --extractdata='no'     --useweights='no'     --weightsfile='no'

--------------------------------------------------------------




--------------------------------------------------------------

   Running parcellate_bold locally on 01b8cd61c252
   Command log:     /home/aca/qunex/quickstart/processing/logs/runlogs/Log-parcellate_bold_HCPA001_2025-03-06_05.55.48.044585.log  
   Command output: /home/aca/qunex/quickstart/processing/logs/comlogs/tmp_parcellate_bold_HCPA001_2025-03-06_05.55.48.044585.log 

--------------------------------------------------------------



-- qunex.sh: Specified Command-Line Options - Start --
   SessionsFolder: /home/aca/qunex/quickstart/sessions
   Session: HCPA001
   InputFile: bold1_Atlas_s_hpss_res-mVWMWB1d_lpss.dtseries.nii
   SingleInputFile: 
   InputPath: /home/aca/qunex/quickstart/sessions/HCPA001/images/functional
   ParcellationFile: /opt/qunex/qx_library/data/parcellations/cole_anticevic_net_partition/CortexSubcortex_ColeAnticevic_NetPartition_wSubcorGSR_parcels_LR_ReorderedByNetworks.dlabel.nii
   OutName: parc
   OutPath: images/functional
   InputDataType: dtseries
   Overwrite: no
   ComputePConn: yes
   UseWeights: no
   WeightsFile: no
   ExtractData: no
-- qunex.sh: Specified Command-Line Options - End --

------------------------- Start of work --------------------------------

--- Establishing paths for all input and output folders:

      Working with dtseries files...

      Dense BOLD Input:              /home/aca/qunex/quickstart/sessions/HCPA001//home/aca/qunex/quickstart/sessions/HCPA001/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d_lpss.dtseries.nii

      Parcellated BOLD Output:       /home/aca/qunex/quickstart/sessions/HCPA001/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d_lpss_parc.ptseries.nii

-- Checking if parcellation was completed...

-- Note: Prior parcellation data not found.

-- Computing parcellation on /home/aca/qunex/quickstart/sessions/HCPA001//home/aca/qunex/quickstart/sessions/HCPA001/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d_lpss.dtseries.nii...


While running:
/opt/workbench/workbench-2.0.0/bin_linux64/../exe_linux64/wb_command -cifti-parcellate /home/aca/qunex/quickstart/sessions/HCPA001//home/aca/qunex/quickstart/sessions/HCPA001/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d_lpss.dtseries.nii /opt/qunex/qx_library/data/parcellations/cole_anticevic_net_partition/CortexSubcortex_ColeAnticevic_NetPartition_wSubcorGSR_parcels_LR_ReorderedByNetworks.dlabel.nii COLUMN /home/aca/qunex/quickstart/sessions/HCPA001/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d_lpss_parc.ptseries.nii -only-numeric

ERROR: failed to open file '/home/aca/qunex/quickstart/sessions/HCPA001//home/aca/qunex/quickstart/sessions/HCPA001/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d_lpss.dtseries.nii', file does not exist, or folder permissions prevent seeing it

-- Using weights: no

-- Computing pconn using correlation...


While running:
/opt/workbench/workbench-2.0.0/bin_linux64/../exe_linux64/wb_command -cifti-correlation /home/aca/qunex/quickstart/sessions/HCPA001/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d_lpss_parc.ptseries.nii /home/aca/qunex/quickstart/sessions/HCPA001/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d_lpss_parc_r.pconn.nii

ERROR: failed to open file '/home/aca/qunex/quickstart/sessions/HCPA001/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d_lpss_parc.ptseries.nii', file does not exist, or folder permissions prevent seeing it

-- Computing GBC using correlation...


While running:
/opt/workbench/workbench-2.0.0/bin_linux64/../exe_linux64/wb_command -cifti-reduce /home/aca/qunex/quickstart/sessions/HCPA001/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d_lpss_parc_r.pconn.nii MEAN /home/aca/qunex/quickstart/sessions/HCPA001/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d_lpss_parc_r_GBC.pscalar.nii -only-numeric

ERROR: failed to open file '/home/aca/qunex/quickstart/sessions/HCPA001/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d_lpss_parc_r.pconn.nii', file does not exist, or folder permissions prevent seeing it

-- Computing pconn using covariance...


While running:
/opt/workbench/workbench-2.0.0/bin_linux64/../exe_linux64/wb_command -cifti-correlation /home/aca/qunex/quickstart/sessions/HCPA001/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d_lpss_parc.ptseries.nii /home/aca/qunex/quickstart/sessions/HCPA001/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d_lpss_parc_cov.pconn.nii -covariance

ERROR: failed to open file '/home/aca/qunex/quickstart/sessions/HCPA001/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d_lpss_parc.ptseries.nii', file does not exist, or folder permissions prevent seeing it

-- Computing GBC using covariance...


While running:
/opt/workbench/workbench-2.0.0/bin_linux64/../exe_linux64/wb_command -cifti-reduce /home/aca/qunex/quickstart/sessions/HCPA001/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d_lpss_parc_cov.pconn.nii MEAN /home/aca/qunex/quickstart/sessions/HCPA001/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d_lpss_parc_cov_GBC.pscalar.nii -only-numeric

ERROR: failed to open file '/home/aca/qunex/quickstart/sessions/HCPA001/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d_lpss_parc_cov.pconn.nii', file does not exist, or folder permissions prevent seeing it

-- Computing pconn using correlation w/ fisher-z transform...


While running:
/opt/workbench/workbench-2.0.0/bin_linux64/../exe_linux64/wb_command -cifti-correlation /home/aca/qunex/quickstart/sessions/HCPA001/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d_lpss_parc.ptseries.nii /home/aca/qunex/quickstart/sessions/HCPA001/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d_lpss_parc_r_Fz.pconn.nii -fisher-z

ERROR: failed to open file '/home/aca/qunex/quickstart/sessions/HCPA001/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d_lpss_parc.ptseries.nii', file does not exist, or folder permissions prevent seeing it

-- Computing GBC using correlation w/ fisher-z transform...


While running:
/opt/workbench/workbench-2.0.0/bin_linux64/../exe_linux64/wb_command -cifti-reduce /home/aca/qunex/quickstart/sessions/HCPA001/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d_lpss_parc_r_Fz.pconn.nii MEAN /home/aca/qunex/quickstart/sessions/HCPA001/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d_lpss_parc_r_Fz_GBC.pscalar.nii -only-numeric

ERROR: failed to open file '/home/aca/qunex/quickstart/sessions/HCPA001/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d_lpss_parc_r_Fz.pconn.nii', file does not exist, or folder permissions prevent seeing it

-- Checking outputs...

ERROR: Parcellated BOLD file /home/aca/qunex/quickstart/sessions/HCPA001/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d_lpss_parc.ptseries.nii is missing. Something went wrong.


 ---> ERROR during parcellate_bold. Check final QuNex error log output:

    /home/aca/qunex/quickstart/processing/logs/comlogs/error_parcellate_bold_HCPA001_2025-03-06_05.55.48.044585.log


QuNex FAILED!

It seems that it doesn’t have permission to read the files. For better debug, here is the comlog:

# Generated by QuNex 1.0.4 [QIO] on 2025-03-06_05.55.48.044585
#


-- qunex.sh: Specified Command-Line Options - Start --
   SessionsFolder: /home/aca/qunex/quickstart/sessions
   Session: HCPA001
   InputFile: bold1_Atlas_s_hpss_res-mVWMWB1d_lpss.dtseries.nii
   SingleInputFile: 
   InputPath: /home/aca/qunex/quickstart/sessions/HCPA001/images/functional
   ParcellationFile: /opt/qunex/qx_library/data/parcellations/cole_anticevic_net_partition/CortexSubcortex_ColeAnticevic_NetPartition_wSubcorGSR_parcels_LR_ReorderedByNetworks.dlabel.nii
   OutName: parc
   OutPath: images/functional
   InputDataType: dtseries
   Overwrite: no
   ComputePConn: yes
   UseWeights: no
   WeightsFile: no
   ExtractData: no
-- qunex.sh: Specified Command-Line Options - End --

------------------------- Start of work --------------------------------

--- Establishing paths for all input and output folders:

      Working with dtseries files...

      Dense BOLD Input:              /home/aca/qunex/quickstart/sessions/HCPA001//home/aca/qunex/quickstart/sessions/HCPA001/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d_lpss.dtseries.nii

      Parcellated BOLD Output:       /home/aca/qunex/quickstart/sessions/HCPA001/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d_lpss_parc.ptseries.nii

-- Checking if parcellation was completed...

-- Note: Prior parcellation data not found.

-- Computing parcellation on /home/aca/qunex/quickstart/sessions/HCPA001//home/aca/qunex/quickstart/sessions/HCPA001/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d_lpss.dtseries.nii...


While running:
/opt/workbench/workbench-2.0.0/bin_linux64/../exe_linux64/wb_command -cifti-parcellate /home/aca/qunex/quickstart/sessions/HCPA001//home/aca/qunex/quickstart/sessions/HCPA001/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d_lpss.dtseries.nii /opt/qunex/qx_library/data/parcellations/cole_anticevic_net_partition/CortexSubcortex_ColeAnticevic_NetPartition_wSubcorGSR_parcels_LR_ReorderedByNetworks.dlabel.nii COLUMN /home/aca/qunex/quickstart/sessions/HCPA001/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d_lpss_parc.ptseries.nii -only-numeric

ERROR: failed to open file '/home/aca/qunex/quickstart/sessions/HCPA001//home/aca/qunex/quickstart/sessions/HCPA001/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d_lpss.dtseries.nii', file does not exist, or folder permissions prevent seeing it

-- Using weights: no

-- Computing pconn using correlation...


While running:
/opt/workbench/workbench-2.0.0/bin_linux64/../exe_linux64/wb_command -cifti-correlation /home/aca/qunex/quickstart/sessions/HCPA001/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d_lpss_parc.ptseries.nii /home/aca/qunex/quickstart/sessions/HCPA001/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d_lpss_parc_r.pconn.nii

ERROR: failed to open file '/home/aca/qunex/quickstart/sessions/HCPA001/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d_lpss_parc.ptseries.nii', file does not exist, or folder permissions prevent seeing it

-- Computing GBC using correlation...


While running:
/opt/workbench/workbench-2.0.0/bin_linux64/../exe_linux64/wb_command -cifti-reduce /home/aca/qunex/quickstart/sessions/HCPA001/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d_lpss_parc_r.pconn.nii MEAN /home/aca/qunex/quickstart/sessions/HCPA001/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d_lpss_parc_r_GBC.pscalar.nii -only-numeric

ERROR: failed to open file '/home/aca/qunex/quickstart/sessions/HCPA001/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d_lpss_parc_r.pconn.nii', file does not exist, or folder permissions prevent seeing it

-- Computing pconn using covariance...


While running:
/opt/workbench/workbench-2.0.0/bin_linux64/../exe_linux64/wb_command -cifti-correlation /home/aca/qunex/quickstart/sessions/HCPA001/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d_lpss_parc.ptseries.nii /home/aca/qunex/quickstart/sessions/HCPA001/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d_lpss_parc_cov.pconn.nii -covariance

ERROR: failed to open file '/home/aca/qunex/quickstart/sessions/HCPA001/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d_lpss_parc.ptseries.nii', file does not exist, or folder permissions prevent seeing it

-- Computing GBC using covariance...


While running:
/opt/workbench/workbench-2.0.0/bin_linux64/../exe_linux64/wb_command -cifti-reduce /home/aca/qunex/quickstart/sessions/HCPA001/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d_lpss_parc_cov.pconn.nii MEAN /home/aca/qunex/quickstart/sessions/HCPA001/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d_lpss_parc_cov_GBC.pscalar.nii -only-numeric

ERROR: failed to open file '/home/aca/qunex/quickstart/sessions/HCPA001/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d_lpss_parc_cov.pconn.nii', file does not exist, or folder permissions prevent seeing it

-- Computing pconn using correlation w/ fisher-z transform...


While running:
/opt/workbench/workbench-2.0.0/bin_linux64/../exe_linux64/wb_command -cifti-correlation /home/aca/qunex/quickstart/sessions/HCPA001/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d_lpss_parc.ptseries.nii /home/aca/qunex/quickstart/sessions/HCPA001/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d_lpss_parc_r_Fz.pconn.nii -fisher-z

ERROR: failed to open file '/home/aca/qunex/quickstart/sessions/HCPA001/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d_lpss_parc.ptseries.nii', file does not exist, or folder permissions prevent seeing it

-- Computing GBC using correlation w/ fisher-z transform...


While running:
/opt/workbench/workbench-2.0.0/bin_linux64/../exe_linux64/wb_command -cifti-reduce /home/aca/qunex/quickstart/sessions/HCPA001/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d_lpss_parc_r_Fz.pconn.nii MEAN /home/aca/qunex/quickstart/sessions/HCPA001/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d_lpss_parc_r_Fz_GBC.pscalar.nii -only-numeric

ERROR: failed to open file '/home/aca/qunex/quickstart/sessions/HCPA001/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d_lpss_parc_r_Fz.pconn.nii', file does not exist, or folder permissions prevent seeing it

-- Checking outputs...

ERROR: Parcellated BOLD file /home/aca/qunex/quickstart/sessions/HCPA001/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d_lpss_parc.ptseries.nii is missing. Something went wrong.

Yes, everything works well exclude “parcellate_bold”.

Hi Grega,

According to your suggestion, I jump through the “parcellate_bold” command and run through “compute_bold_stats, create_stats_report and preprocess_bold”, respectively. However, when I tried to continue executing the fc_compute_roifc command to construct the functional connectivity matrix based on AALv3 atlas, an error occurred.

These are my commands:

# compute_bold_stats
qunex_container compute_bold_stats \
    --sessionsfolder="${STUDY_FOLDER}/sessions" \
    --batchfile="${STUDY_FOLDER}/processing/batch.txt" \
    --container="${QUNEX_CONTAINER}"

#create_stats_report 
qunex_container create_stats_report \
    --sessionsfolder="${STUDY_FOLDER}/sessions" \
    --batchfile="${STUDY_FOLDER}/processing/batch.txt" \
    --container="${QUNEX_CONTAINER}"

#create_list
qunex_container create_list \
    --sessionsfolder="${STUDY_FOLDER}/sessions" \
    --batchfile="${STUDY_FOLDER}/processing/batch.txt" \
    --bolds="1,2" \
    --container="${QUNEX_CONTAINER}"

#fc_compute_roifc (Computes ROI functional connectivity matrices for group and/or individual subjects / sessions.)
qunex_container fc_compute_roifc \
    --sessionsfolder="${STUDY_FOLDER}/sessions" \
    --batchfile="${STUDY_FOLDER}/processing/batch.txt" \
    --flist="listname:/home/aca/qunex/quickstart/processing/listssession.list|session id:HCPA001|file:/home/aca/qunex/quickstart/sessions/HCPA001/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d_lpss.dtseries.nii|roi:/home/aca/qunex/data/AAL3v1.nii.gz" \
    --roiinfo="/home/aca/qunex/data/aal.name" \
    --options="sessions=all|roimethod=mean|eventdata=all|ignore=use,fidl|badevents=use|fcmeasure=r|saveind=none|savesessionid=false|fcname=|verbose=false|debug=false" \
    --frames_info="5" \
    --container="${QUNEX_CONTAINER}"

And this is the error log:

qunex_container fc_compute_roifc \
    --sessionsfolder="${STUDY_FOLDER}/sessions" \
    --batchfile="${STUDY_FOLDER}/processing/batch.txt" \
    --flist="listname:/home/aca/qunex/quickstart/processing/listssession.list|session id:HCPA001|file:/home/aca/qunex/quickstart/sessions/HCPA001/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d_lpss.dtseries.nii|roi:/home/aca/qunex/data/AAL3v1.nii.gz" \
    --roiinfo="/home/aca/qunex/data/aal.name" \
    --options="sessions=all|roimethod=mean|eventdata=all|ignore=use,fidl|badevents=use|fcmeasure=r|saveind=none|savesessionid=false|fcname=|verbose=false|debug=false" \
    --frames_info="5" \
    --container="${QUNEX_CONTAINER}"

---> QuNex will run the command over 1 sessions. It will utilize:

    Maximum sessions run in parallel for a job: 1.
    Maximum elements run in parallel for a session: 1.
    Up to 1 processes will be utilized for a job.

    Job #1 will run sessions: HCPA001
aca@aca-virtual-machine:~/qunex$ ---> unsetting the following environment variables: PATH MATLABPATH PYTHONPATH QUNEXVer TOOLS QUNEXREPO QUNEXPATH QUNEXEXTENSIONS QUNEXLIBRARY QUNEXLIBRARYETC TemplateFolder FSL_FIXDIR FREESURFERDIR FREESURFER_HOME FREESURFER_SCHEDULER FreeSurferSchedulerDIR WORKBENCHDIR DCMNIIDIR DICMNIIDIR MATLABDIR MATLABBINDIR OCTAVEDIR OCTAVEPKGDIR OCTAVEBINDIR RDIR HCPWBDIR AFNIDIR PYLIBDIR FSLDIR FSLBINDIR PALMDIR QUNEXMCOMMAND HCPPIPEDIR CARET7DIR GRADUNWARPDIR HCPPIPEDIR_Templates HCPPIPEDIR_Bin HCPPIPEDIR_Config HCPPIPEDIR_PreFS HCPPIPEDIR_FS HCPPIPEDIR_FS_CUSTOM HCPPIPEDIR_PostFS HCPPIPEDIR_fMRISurf HCPPIPEDIR_fMRIVol HCPPIPEDIR_tfMRI HCPPIPEDIR_dMRI HCPPIPEDIR_dMRITract HCPPIPEDIR_Global HCPPIPEDIR_tfMRIAnalysis HCPCIFTIRWDIR MSMBin HCPPIPEDIR_dMRITractFull HCPPIPEDIR_dMRILegacy AutoPtxFolder EDDYCUDA USEOCTAVE QUNEXENV CONDADIR MSMBINDIR MSMCONFIGDIR R_LIBS FSL_FIX_CIFTIRW FSFAST_HOME SUBJECTS_DIR MINC_BIN_DIR MNI_DIR MINC_LIB_DIR MNI_DATAPATH FSF_OUTPUT_FORMAT ANTSDIR CUDIMOT

========================================================================
Generated by QuNex
------------------------------------------------------------------------
Version: 1.0.4 [QIO]
User: root
System: 4f490b14dd77
OS: Debian Linux #53~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Jan 15 19:18:46 UTC 2
------------------------------------------------------------------------

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


                       DEVELOPED & MAINTAINED BY:

               Mind & Brain Lab, University of Ljubljana
                       Cho Lab, Yale University

                      COPYRIGHT & LICENSE NOTICE:

Use of this software is subject to the terms and conditions defined in
QuNex LICENSES which can be found in the LICENSES folder of the QuNex
repository or at https://qunex.yale.edu/qunex-registration
========================================================================

---> Setting up Octave 


.......................... Running QuNex v1.0.4 [QIO] ..........................


--- Full QuNex call for command: fc_compute_roifc

qunex fc_compute_roifc --sessionsfolder="/home/aca/qunex/quickstart/sessions" --flist="listname:/home/aca/qunex/quickstart/processing/listssession.list|session id:HCPA001|file:/home/aca/qunex/quickstart/sessions/HCPA001/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d_lpss.dtseries.nii|roi:/home/aca/qunex/data/AAL3v1.nii.gz" --roiinfo="/home/aca/qunex/data/aal.name" --options="sessions=all|roimethod=mean|eventdata=all|ignore=use,fidl|badevents=use|fcmeasure=r|saveind=none|savesessionid=false|fcname=|verbose=false|debug=false" --frames_info="5" --batchfile="/home/aca/qunex/quickstart/processing/batch.txt" --sessions="HCPA001"

---------------------------------------------------------



Running:
>>> fc_compute_roifc('listname:/home/aca/qunex/quickstart/processing/listssession.list|session id:HCPA001|file:/home/aca/qunex/quickstart/sessions/HCPA001/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d_lpss.dtseries.nii|roi:/home/aca/qunex/data/AAL3v1.nii.gz', '/home/aca/qunex/data/aal.name', '', '', 'sessions=all|roimethod=mean|eventdata=all|ignore=use,fidl|badevents=use|fcmeasure=r|saveind=none|savesessionid=false|fcname=|verbose=false|debug=false')

 ... listing files to process ... done.

Matlab Error! Processing Failed!

ERROR: The provided roi file is not a valid image file [/home/aca/qunex/data/aal.name]!


ERROR: fc_compute_roifc failed! Please check output / log!

It seems my roiinfo file is incorrect. But I have read and check the relevant document, I could not find out where the problems lie.
Here is my .name files:

/home/aca/qunex/data/AAL3v1.nii.gz
Precentral_L|1|
Precentral_R|2|
Frontal_Sup_2_L|3|
Frontal_Sup_2_R|4|
Frontal_Mid_2_L|5|
Frontal_Mid_2_R|6|
Frontal_Inf_Oper_L|7|
Frontal_Inf_Oper_R|8|
Frontal_Inf_Tri_L|9|
Frontal_Inf_Tri_R|10|
Frontal_Inf_Orb_2_L|11|
Frontal_Inf_Orb_2_R|12|
Rolandic_Oper_L|13|
Rolandic_Oper_R|14|
Supp_Motor_Area_L|15|
Supp_Motor_Area_R|16|
Olfactory_L|17|
Olfactory_R|18|
Frontal_Sup_Medial_L|19|
Frontal_Sup_Medial_R|20|
Frontal_Med_Orb_L|21|
Frontal_Med_Orb_R|22|
Rectus_L|23|
Rectus_R|24|
OFCmed_L|25|
OFCmed_R|26|
OFCant_L|27|
OFCant_R|28|
OFCpost_L|29|
OFCpost_R|30|
OFClat_L|31|
OFClat_R|32|
Insula_L|33|
Insula_R|34|
Cingulate_Ant_L|
Cingulate_Ant_R|
Cingulate_Mid_L|37|
Cingulate_Mid_R|38|
Cingulate_Post_L|39|
Cingulate_Post_R|40|
Hippocampus_L|41|
Hippocampus_R|42|
ParaHippocampal_L|43|
ParaHippocampal_R|44|
Amygdala_L|45|
Amygdala_R|46|
Calcarine_L|47|
Calcarine_R|48|
Cuneus_L|49|
Cuneus_R|50|
Lingual_L|51|
Lingual_R|52|
Occipital_Sup_L|53|
Occipital_Sup_R|54|
Occipital_Mid_L|55|
Occipital_Mid_R|56|
Occipital_Inf_L|57|
Occipital_Inf_R|58|
Fusiform_L|59|
Fusiform_R|60|
Postcentral_L|61|
Postcentral_R|62|
Parietal_Sup_L|63|
Parietal_Sup_R|64|
Parietal_Inf_L|65|
Parietal_Inf_R|66|
SupraMarginal_L|67|
SupraMarginal_R|68|
Angular_L|69|
Angular_R|70|
Precuneus_L|71|
Precuneus_R|72|
Paracentral_Lobule_L|73|
Paracentral_Lobule_R|74|
Caudate_L|75|
Caudate_R|76|
Putamen_L|77|
Putamen_R|78|
Pallidum_L|79|
Pallidum_R|80|
Thalamus_L|
Thalamus_R|
Heschl_L|83|
Heschl_R|84|
Temporal_Sup_L|85|
Temporal_Sup_R|86|
Temporal_Pole_Sup_L|87|
Temporal_Pole_Sup_R|88|
Temporal_Mid_L|89|
Temporal_Mid_R|90|
Temporal_Pole_Mid_L|91|
Temporal_Pole_Mid_R|92|
Temporal_Inf_L|93|
Temporal_Inf_R|94|
Cerebellum_Crus1_L|95|
Cerebellum_Crus1_R|96|
Cerebellum_Crus2_L|97|
Cerebellum_Crus2_R|98|
Cerebellum_3_L|99|
Cerebellum_3_R|100|
Cerebellum_4_5_L|101|
Cerebellum_4_5_R|102|
Cerebellum_6_L|103|
Cerebellum_6_R|104|
Cerebellum_7b_L|105|
Cerebellum_7b_R|106|
Cerebellum_8_L|107|
Cerebellum_8_R|108|
Cerebellum_9_L|109|
Cerebellum_9_R|110|
Cerebellum_10_L|111|
Cerebellum_10_R|112|
Vermis_1_2|113|
Vermis_3|114|
Vermis_4_5|115|
Vermis_6|116|
Vermis_7|117|
Vermis_8|118|
Vermis_9|119|
Vermis_10|120|
Thal_AV_L|121|
Thal_AV_R|122|
Thal_LP_L|123|
Thal_LP_R|124|
Thal_VA_L|125|
Thal_VA_R|126|
Thal_VL_L|127|
Thal_VL_R|128|
Thal_VPL_L|129|
Thal_VPL_R|130|
Thal_IL_L|131|
Thal_IL_R|132|
Thal_Re_L|133|
Thal_Re_R|134|
Thal_MDm_L|135|
Thal_MDm_R|136|
Thal_MDl_L|137|
Thal_MDl_R|138|
Thal_LGN_L|139|
Thal_LGN_R|140|
Thal_MGN_L|141|
Thal_MGN_R|142|
Thal_PuI_L|143|
Thal_PuI_R|144|
Thal_PuM_L|145|
Thal_PuM_R|146|
Thal_PuA_L|147|
Thal_PuA_R|148|
Thal_PuL_L|149|
Thal_PuL_R|150|
ACC_sub_L|151|
ACC_sub_R|152|
ACC_pre_L|153|
ACC_pre_R|154|
ACC_sup_L|155|
ACC_sup_R|156|
N_Acc_L|157|
N_Acc_R|158|
VTA_L|159|
VTA_R|160|
SN_pc_L|161|
SN_pc_R|162|
SN_pr_L|163|
SN_pr_R|164|
Red_N_L|165|
Red_N_R|166|
LC_L|167|
LC_R|168|
Raphe_D|169|
Raphe_M|170|

Could you help me check it out? Many thanks to you!

Best,
Acacius

Acacius, hi!

The problem is in mixing two types of file types. Your bold data is in CIFTI format (.dtseries.nii), but in your .names file, you are referencing a volume image. QuNex can work with either, but the two need to match in the same call. You have two options.

The first option is to use the current .names file that references AAL3v1.nii.gz, but you then need to provide as input volume files so bold1_Atlas_s_hpss_res-mVWMWB1d_lpss.nii.gz. If you have not processed volume files, you would need to first.

The second option is to create a the AAL map in CIFTI format. You can accomplish that using wb_command -cifti-create-dense-scalar to map data from volume to surface. You can simplify this process with using QuNex map2hcp command, e.g.:

qunex_container map2hcp \
    --volume=/home/aca/qunex/data/AAL3v1.nii.gz \
    --method=enclosing \
    --container="${QUNEX_CONTAINER}"

Once you have generated a AAL3v1.dscalar.nii file, you just replace the reference to /home/aca/qunex/data/AAL3v1.nii.gz with a reference to /home/aca/qunex/data/AAL3v1.dscalar.nii in the .names file.

Once the image file referenced in .names matches the input data, the command should work with some minimal adjustments. batchfile parameter is not needed, and you should omit roi specification in the flist parameter. roi parameter is used, when the input is in volume and you want to add a subject specific file that is used as an additional mask, usually specifying gray matter. Your inputs are CIFTI files, AAL mask is not subject specific and you don’t specify subject specific mask indeces in the .names file. The rest seems ok:

qunex_container fc_compute_roifc \
    --sessionsfolder="${STUDY_FOLDER}/sessions" \
    --flist="listname:/home/aca/qunex/quickstart/processing/listssession.list|session id:HCPA001|file:/home/aca/qunex/quickstart/sessions/HCPA001/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d_lpss.dtseries.nii" \
    --roiinfo="/home/aca/qunex/data/aal.name" \
    --options="sessions=all|roimethod=mean|eventdata=all|ignore=use,fidl|badevents=use|fcmeasure=r|saveind=none|savesessionid=false|fcname=|verbose=false|debug=false" \
    --frames_info="5" \
    --container="${QUNEX_CONTAINER}"

All the best,

Grega

Hi Grega,

Thanks for your answer. I have followed the option 2 and converted AAL atlas from nifti to cifitity format sucessfully, but still have some problems in “.name” files.

Here is my command:

qunex_container fc_compute_roifc \
    --sessionsfolder="${STUDY_FOLDER}/sessions" \
    --flist="listname:/home/aca/qunex/quickstart/processing/lists/session.list|session id:HCPA001|file:/home/aca/qunex/quickstart/sessions/HCPA001/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d_lpss.dtseries.nii" \
    --roiinfo="/home/aca/qunex/data/aal.name" \
    --options="sessions=all|roimethod=mean|eventdata=all|ignore=use,fidl|badevents=use|fcmeasure=r|saveind=none|savesessionid=false|fcname=|verbose=false|debug=false" \
    --frames_info="5" \
    --container="${QUNEX_CONTAINER}"

and here is the error information:

qunex_container fc_compute_roifc qunex_container fc_compute_roifc \
    --sessionsfolder="${STUDY_FOLDER}/sessions" \
    --flist="listname:/home/aca/qunex/quickstart/processing/lists/session.list|session id:HCPA001|file:/home/aca/qunex/quickstart/sessions/HCPA001/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d_lpss.dtseries.nii" \
    --roiinfo="/home/aca/qunex/data/aal.name" \
    --options="sessions=all|roimethod=mean|eventdata=all|ignore=use,fidl|badevents=use|fcmeasure=r|saveind=none|savesessionid=false|fcname=|verbose=false|debug=false" \
    --frames_info="5" \
    --container="${QUNEX_CONTAINER}"
aca@aca-virtual-machine:~/qunex$ ---> unsetting the following environment variables: PATH MATLABPATH PYTHONPATH QUNEXVer TOOLS QUNEXREPO QUNEXPATH QUNEXEXTENSIONS QUNEXLIBRARY QUNEXLIBRARYETC TemplateFolder FSL_FIXDIR FREESURFERDIR FREESURFER_HOME FREESURFER_SCHEDULER FreeSurferSchedulerDIR WORKBENCHDIR DCMNIIDIR DICMNIIDIR MATLABDIR MATLABBINDIR OCTAVEDIR OCTAVEPKGDIR OCTAVEBINDIR RDIR HCPWBDIR AFNIDIR PYLIBDIR FSLDIR FSLBINDIR PALMDIR QUNEXMCOMMAND HCPPIPEDIR CARET7DIR GRADUNWARPDIR HCPPIPEDIR_Templates HCPPIPEDIR_Bin HCPPIPEDIR_Config HCPPIPEDIR_PreFS HCPPIPEDIR_FS HCPPIPEDIR_FS_CUSTOM HCPPIPEDIR_PostFS HCPPIPEDIR_fMRISurf HCPPIPEDIR_fMRIVol HCPPIPEDIR_tfMRI HCPPIPEDIR_dMRI HCPPIPEDIR_dMRITract HCPPIPEDIR_Global HCPPIPEDIR_tfMRIAnalysis HCPCIFTIRWDIR MSMBin HCPPIPEDIR_dMRITractFull HCPPIPEDIR_dMRILegacy AutoPtxFolder EDDYCUDA USEOCTAVE QUNEXENV CONDADIR MSMBINDIR MSMCONFIGDIR R_LIBS FSL_FIX_CIFTIRW FSFAST_HOME SUBJECTS_DIR MINC_BIN_DIR MNI_DIR MINC_LIB_DIR MNI_DATAPATH FSF_OUTPUT_FORMAT ANTSDIR CUDIMOT

========================================================================
Generated by QuNex
------------------------------------------------------------------------
Version: 1.0.4 [QIO]
User: root
System: 50beb741b46a
OS: Debian Linux #53~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Jan 15 19:18:46 UTC 2
------------------------------------------------------------------------

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


                       DEVELOPED & MAINTAINED BY:

               Mind & Brain Lab, University of Ljubljana
                       Cho Lab, Yale University

                      COPYRIGHT & LICENSE NOTICE:

Use of this software is subject to the terms and conditions defined in
QuNex LICENSES which can be found in the LICENSES folder of the QuNex
repository or at https://qunex.yale.edu/qunex-registration
========================================================================

---> Setting up Octave 


.......................... Running QuNex v1.0.4 [QIO] ..........................


--- Full QuNex call for command: fc_compute_roifc

qunex fc_compute_roifc --sessionsfolder="/home/aca/qunex/quickstart/sessions" --flist="listname:/home/aca/qunex/quickstart/processing/lists/session.list|session id:HCPA001|file:/home/aca/qunex/quickstart/sessions/HCPA001/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d_lpss.dtseries.nii" --roiinfo="/home/aca/qunex/data/aal.name" --options="sessions=all|roimethod=mean|eventdata=all|ignore=use,fidl|badevents=use|fcmeasure=r|saveind=none|savesessionid=false|fcname=|verbose=false|debug=false" --frames_info="5"

---------------------------------------------------------



Running:
>>> fc_compute_roifc('listname:/home/aca/qunex/quickstart/processing/lists/session.list|session id:HCPA001|file:/home/aca/qunex/quickstart/sessions/HCPA001/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d_lpss.dtseries.nii', '/home/aca/qunex/data/aal.name', '', '', 'sessions=all|roimethod=mean|eventdata=all|ignore=use,fidl|badevents=use|fcmeasure=r|saveind=none|savesessionid=false|fcname=|verbose=false|debug=false')

 ... listing files to process ... done.

Matlab Error! Processing Failed!

ERROR: The provided roi file is not a valid image file [/home/aca/qunex/data/aal.name]!


ERROR: fc_compute_roifc failed! Please check output / log!

It seems “.name” files still have some problems. I have attached my “.name” file as below:

/home/aca/qunex/data/AAL3v1.dscalar.nii
Precentral_L|1|
Precentral_R|2|
Frontal_Sup_2_L|3|
Frontal_Sup_2_R|4|
Frontal_Mid_2_L|5|
Frontal_Mid_2_R|6|
Frontal_Inf_Oper_L|7|
Frontal_Inf_Oper_R|8|
Frontal_Inf_Tri_L|9|
Frontal_Inf_Tri_R|10|
Frontal_Inf_Orb_2_L|11|
Frontal_Inf_Orb_2_R|12|
Rolandic_Oper_L|13|
Rolandic_Oper_R|14|
Supp_Motor_Area_L|15|
Supp_Motor_Area_R|16|
Olfactory_L|17|
Olfactory_R|18|
Frontal_Sup_Medial_L|19|
Frontal_Sup_Medial_R|20|
Frontal_Med_Orb_L|21|
Frontal_Med_Orb_R|22|
Rectus_L|23|
Rectus_R|24|
OFCmed_L|25|
OFCmed_R|26|
OFCant_L|27|
OFCant_R|28|
OFCpost_L|29|
OFCpost_R|30|
OFClat_L|31|
OFClat_R|32|
Insula_L|33|
Insula_R|34|
Cingulate_Ant_L|35|
Cingulate_Ant_R|36|
Cingulate_Mid_L|37|
Cingulate_Mid_R|38|
Cingulate_Post_L|39|
Cingulate_Post_R|40|
Hippocampus_L|41|
Hippocampus_R|42|
ParaHippocampal_L|43|
ParaHippocampal_R|44|
Amygdala_L|45|
Amygdala_R|46|
Calcarine_L|47|
Calcarine_R|48|
Cuneus_L|49|
Cuneus_R|50|
Lingual_L|51|
Lingual_R|52|
Occipital_Sup_L|53|
Occipital_Sup_R|54|
Occipital_Mid_L|55|
Occipital_Mid_R|56|
Occipital_Inf_L|57|
Occipital_Inf_R|58|
Fusiform_L|59|
Fusiform_R|60|
Postcentral_L|61|
Postcentral_R|62|
Parietal_Sup_L|63|
Parietal_Sup_R|64|
Parietal_Inf_L|65|
Parietal_Inf_R|66|
SupraMarginal_L|67|
SupraMarginal_R|68|
Angular_L|69|
Angular_R|70|
Precuneus_L|71|
Precuneus_R|72|
Paracentral_Lobule_L|73|
Paracentral_Lobule_R|74|
Caudate_L|75|
Caudate_R|76|
Putamen_L|77|
Putamen_R|78|
Pallidum_L|79|
Pallidum_R|80|
Thalamus_L|81|
Thalamus_R|82|
Heschl_L|83|
Heschl_R|84|
Temporal_Sup_L|85|
Temporal_Sup_R|86|
Temporal_Pole_Sup_L|87|
Temporal_Pole_Sup_R|88|
Temporal_Mid_L|89|
Temporal_Mid_R|90|
Temporal_Pole_Mid_L|91|
Temporal_Pole_Mid_R|92|
Temporal_Inf_L|93|
Temporal_Inf_R|94|
Cerebellum_Crus1_L|95|
Cerebellum_Crus1_R|96|
Cerebellum_Crus2_L|97|
Cerebellum_Crus2_R|98|
Cerebellum_3_L|99|
Cerebellum_3_R|100|
Cerebellum_4_5_L|101|
Cerebellum_4_5_R|102|
Cerebellum_6_L|103|
Cerebellum_6_R|104|
Cerebellum_7b_L|105|
Cerebellum_7b_R|106|
Cerebellum_8_L|107|
Cerebellum_8_R|108|
Cerebellum_9_L|109|
Cerebellum_9_R|110|
Cerebellum_10_L|111|
Cerebellum_10_R|112|
Vermis_1_2|113|
Vermis_3|114|
Vermis_4_5|115|
Vermis_6|116|
Vermis_7|117|
Vermis_8|118|
Vermis_9|119|
Vermis_10|120|
Thal_AV_L|121|
Thal_AV_R|122|
Thal_LP_L|123|
Thal_LP_R|124|
Thal_VA_L|125|
Thal_VA_R|126|
Thal_VL_L|127|
Thal_VL_R|128|
Thal_VPL_L|129|
Thal_VPL_R|130|
Thal_IL_L|131|
Thal_IL_R|132|
Thal_Re_L|133|
Thal_Re_R|134|
Thal_MDm_L|135|
Thal_MDm_R|136|
Thal_MDl_L|137|
Thal_MDl_R|138|
Thal_LGN_L|139|
Thal_LGN_R|140|
Thal_MGN_L|141|
Thal_MGN_R|142|
Thal_PuI_L|143|
Thal_PuI_R|144|
Thal_PuM_L|145|
Thal_PuM_R|146|
Thal_PuA_L|147|
Thal_PuA_R|148|
Thal_PuL_L|149|
Thal_PuL_R|150|
ACC_sub_L|151|
ACC_sub_R|152|
ACC_pre_L|153|
ACC_pre_R|154|
ACC_sup_L|155|
ACC_sup_R|156|
N_Acc_L|157|
N_Acc_R|158|
VTA_L|159|
VTA_R|160|
SN_pc_L|161|
SN_pc_R|162|
SN_pr_L|163|
SN_pr_R|164|
Red_N_L|165|
Red_N_R|166|
LC_L|167|
LC_R|168|
Raphe_D|169|
Raphe_M|170|

In addition to that, I downloaded a new atlas(Gordon 2016) to try “fc_compute_roifc” command. I have some confusion about how to save my result files:

  1. How to save the result files to a specific path(e.g. :/home/aca/Desktop)?
  2. I saw some researchers using “saveind:txt” to save their data in some old qunex version, but I didn’t see it in command documentation. Is it being removed or replace?

Here is my command:

qunex_container fc_compute_roifc \
    --sessionsfolder="${STUDY_FOLDER}/sessions" \
    --flist="listname:/home/aca/qunex/quickstart/processing/lists/session.list|session id:HCPA001|file:/home/aca/qunex/quickstart/sessions/HCPA001/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d_lpss.dtseries.nii|roi:/home/aca/qunex/data/null_lL_WG33/S900.sulc_MSMAll.32k_fs_LR.dscalar.nii" \
    --roiinfo="/home/aca/qunex/data/null_lL_WG33/Gordon333_FreesurferSubcortical.32k_fs_LR.dlabel.nii" \
    --options="sessions=all|roimethod=mean|eventdata=all|ignore=use,fidl|badevents=use|fcmeasure=r|debug=false|saveind=mat" \
    --frames_info="5" \
    --container="${QUNEX_CONTAINER}"

And here is the error info:

aca@aca-virtual-machine:~/qunex$ ---> unsetting the following environment variables: PATH MATLABPATH PYTHONPATH QUNEXVer TOOLS QUNEXREPO QUNEXPATH QUNEXEXTENSIONS QUNEXLIBRARY QUNEXLIBRARYETC TemplateFolder FSL_FIXDIR FREESURFERDIR FREESURFER_HOME FREESURFER_SCHEDULER FreeSurferSchedulerDIR WORKBENCHDIR DCMNIIDIR DICMNIIDIR MATLABDIR MATLABBINDIR OCTAVEDIR OCTAVEPKGDIR OCTAVEBINDIR RDIR HCPWBDIR AFNIDIR PYLIBDIR FSLDIR FSLBINDIR PALMDIR QUNEXMCOMMAND HCPPIPEDIR CARET7DIR GRADUNWARPDIR HCPPIPEDIR_Templates HCPPIPEDIR_Bin HCPPIPEDIR_Config HCPPIPEDIR_PreFS HCPPIPEDIR_FS HCPPIPEDIR_FS_CUSTOM HCPPIPEDIR_PostFS HCPPIPEDIR_fMRISurf HCPPIPEDIR_fMRIVol HCPPIPEDIR_tfMRI HCPPIPEDIR_dMRI HCPPIPEDIR_dMRITract HCPPIPEDIR_Global HCPPIPEDIR_tfMRIAnalysis HCPCIFTIRWDIR MSMBin HCPPIPEDIR_dMRITractFull HCPPIPEDIR_dMRILegacy AutoPtxFolder EDDYCUDA USEOCTAVE QUNEXENV CONDADIR MSMBINDIR MSMCONFIGDIR R_LIBS FSL_FIX_CIFTIRW FSFAST_HOME SUBJECTS_DIR MINC_BIN_DIR MNI_DIR MINC_LIB_DIR MNI_DATAPATH FSF_OUTPUT_FORMAT ANTSDIR CUDIMOT

========================================================================
Generated by QuNex
------------------------------------------------------------------------
Version: 1.0.4 [QIO]
User: root
System: a8c44f22505d
OS: Debian Linux #53~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Jan 15 19:18:46 UTC 2
------------------------------------------------------------------------

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


                       DEVELOPED & MAINTAINED BY:

               Mind & Brain Lab, University of Ljubljana
                       Cho Lab, Yale University

                      COPYRIGHT & LICENSE NOTICE:

Use of this software is subject to the terms and conditions defined in
QuNex LICENSES which can be found in the LICENSES folder of the QuNex
repository or at https://qunex.yale.edu/qunex-registration
========================================================================

---> Setting up Octave 


.......................... Running QuNex v1.0.4 [QIO] ..........................


--- Full QuNex call for command: fc_compute_roifc

qunex fc_compute_roifc --sessionsfolder="/home/aca/qunex/quickstart/sessions" --flist="listname:/home/aca/qunex/quickstart/processing/lists/session.list|session id:HCPA001|file:/home/aca/qunex/quickstart/sessions/HCPA001/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d_lpss.dtseries.nii|roi:/home/aca/qunex/data/null_lL_WG33/S900.sulc_MSMAll.32k_fs_LR.dscalar.nii" --roiinfo="/home/aca/qunex/data/null_lL_WG33/Gordon333_FreesurferSubcortical.32k_fs_LR.dlabel.nii" --options="sessions=all|roimethod=mean|eventdata=all|ignore=use,fidl|badevents=use|fcmeasure=r|debug=false|saveind=mat" --frames_info="5"

---------------------------------------------------------



Running:
>>> fc_compute_roifc('listname:/home/aca/qunex/quickstart/processing/lists/session.list|session id:HCPA001|file:/home/aca/qunex/quickstart/sessions/HCPA001/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d_lpss.dtseries.nii|roi:/home/aca/qunex/data/null_lL_WG33/S900.sulc_MSMAll.32k_fs_LR.dscalar.nii', '/home/aca/qunex/data/null_lL_WG33/Gordon333_FreesurferSubcortical.32k_fs_LR.dlabel.nii', '', '', 'sessions=all|roimethod=mean|eventdata=all|ignore=use,fidl|badevents=use|fcmeasure=r|debug=false|saveind=mat')


Checking ...
 ... listing files to process
 ... reading file list: 
     - session id: HCPA001
       ... found ROI image (/home/aca/qunex/data/null_lL_WG33/S900.sulc_MSMAll.32k_fs_LR.dscalar.nii)
       ... found image file (/home/aca/qunex/quickstart/sessions/HCPA001/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d_lpss.dtseries.nii)

 ... done ... done.

---------------------------------
Processing session HCPA001     ... reading image file(s) ... 488 frames read, done.
     ... creating ROI mask
     ... generating extraction sets
         -> timeseries: 1 good events, 488 good frames
     ... computing fc matrices
         ... set timeseries
         ... extracted ts
         ... computed fc matrix
     ... saving results
         ... saving mat file
Matlab Error! Processing Failed!
save: unable to open output file './roifc_/home/aca/qunex/quickstart/processing/lists/session_HCPA001_r'


ERROR: fc_compute_roifc failed! Please check output / log!

Thank you again for the help!

Best,
Acacius

Acacius, hi!

The problem with the ROI definition is the extension name. The correct extension for the names files is .names. As the file does not end with names, the code tries to open it as an image mask, and fails as it is not an image file.

If you want to save the individual files to a specific folder and not back into each session’s images/functional folder you need to provide your desired destination as --targetf parameter and then specify the option: itargetf:gfolder. With the latter you specify that individual results should also be saved in the group target folder.

To specify a text format for the output, you can use the following options for saveind:

  • long – save the resulting data in a long format .tsv file
  • wide_single – save the resulting data in a single wide format .tsv file
  • wide_separate – save the resulting data in a wide format .tsv file, one file per each measure of interest.

In these cases, the files will have .tsv extension, but will be text files.

You can specify multiple formats separated by a comma, e.g. saveind:mat,long,wide_single.

The full command in this case would be:

qunex_container fc_compute_roifc \
    --sessionsfolder="${STUDY_FOLDER}/sessions" \
    --flist="listname:/home/aca/qunex/quickstart/processing/lists/session.list|session id:HCPA001|file:/home/aca/qunex/quickstart/sessions/HCPA001/images/functional/bold1_Atlas_s_hpss_res-mVWMWB1d_lpss.dtseries.nii|roi:/home/aca/qunex/data/null_lL_WG33/S900.sulc_MSMAll.32k_fs_LR.dscalar.nii" \
    --roiinfo="/home/aca/qunex/data/null_lL_WG33/Gordon333_FreesurferSubcortical.32k_fs_LR.dlabel.nii" \
    --targetf="/home/aca/Desktop" \
    --options="sessions=all|roimethod=mean|eventdata=all|ignore=use,fidl|badevents=use|fcmeasure=r|debug=false|saveind=mat,long,wide_single|itargetf:gfolder" \
    --frames_info="5" \
    --container="${QUNEX_CONTAINER}"