fc_compute_wrapper
fc_compute_wrapper#
- qx_utilities.bash.fc_compute_wrapper(calculation, runtype, targetf, flist, sessionsfolder, sessions, inputfiles, inputpath, outname, target, gbc, roinfo, extractdata, mask, overwrite='no', covariance='false', rsmooth='', rdilate='', verbose='false', time='false', vstep='1200', method='mean', options='all', ignore='', mem='4')#
fc_compute_wrapper
This function implements Global Brain Connectivity (GBC) or seed-based functional connectivity (FC) on the dense or parcellated (e.g. Glasser parcellation).
For more detailed documentation run <help fc_compute_gbc3>, <help nimage.img_compute_gbc> or <help fc_compute_seedmaps_multiple> inside MATLAB.
Parameters
- --calculation (str):
Run <seed>, <gbc> or <dense> calculation for functional connectivity.
- --runtype (str):
Run calculation on a <list> (requires a list input), on 'individual' sessions (requires manual specification) or a 'group' of individual sessions (equivalent to a list, but with manual specification).
- --targetf (str):
Specify the absolute path for output folder. If using --runtype='individual' and left empty the output will default to --inputpath location for each session.
- --overwrite (str, default 'no'):
Whether to overwrite existing data (yes) or not (no). Note that previous data is deleted before the run, so in the case of a failed command run, previous results are lost.
- --covariance (str, default 'false'):
Whether to compute covariances instead of correlations ('true' / 'false').
- --flist (str):
Specify ∗.list file of session information. If specified then --sessionsfolder, --inputfile, --session and --outname are omitted.
- --sessionsfolder (str):
Path to study sessions folder.
- --sessions (str):
Comma separated list of sessions to run.
- --inputfiles (str):
Specify the comma separated file names you want to use (e.g. /bold1_Atlas_MSMAll.dtseries.nii,bold2_Atlas_MSMAll.dtseries.nii).
- --inputpath (str):
Specify path of the file you want to use relative to the master study folder and session directory (e.g. '/images/functional/').
- --outname (str):
Specify the suffix name of the output file name.
- --target (str, default detailed below):
Array of ROI codes that define target ROI. Defaults to FreeSurfer cortex codes.
- --rsmooth (str, default ''):
Radius for smoothing (no smoothing if empty).
- --rdilate (str, default ''):
Radius for dilating mask (no dilation if empty).
- --gbc-command (str):
Specify the the type of gbc to run. This is a string describing GBC to compute. E.g. 'mFz:0.1|mFz:0.2|aFz:0.1|aFz:0.2|pFz:0.1|pFz:0.2'
- mFz:t
computes mean Fz value across all voxels (over threshold t)
- aFz:t
computes mean absolute Fz value across all voxels (over threshold t)
- pFz:t
computes mean positive Fz value across all voxels (over threshold t)
- nFz:t
computes mean positive Fz value across all voxels (below threshold t)
- aD:t
computes proportion of voxels with absolute r over t
- pD:t
computes proportion of voxels with positive r over t
- nD:t
computes proportion of voxels with negative r below t
- mFzp:n
computes mean Fz value across n proportional ranges
- aFzp:n
computes mean absolute Fz value across n proportional ranges
- mFzs:n
computes mean Fz value across n strength ranges
- pFzs:n
computes mean Fz value across n strength ranges for positive correlations
- nFzs:n
computes mean Fz value across n strength ranges for negative correlations
- mDs:n
computes proportion of voxels within n strength ranges of r
- aDs:n
computes proportion of våoxels within n strength ranges of absolute r
- pDs:n
computes proportion of voxels within n strength ranges of positive r
- nDs:n
computes proportion of voxels within n strength ranges of negative r.
- --verbose (str, default 'false'):
Report what is going on.
- --time (str, default 'false'):
Whether to print timing information.
- --vstep (str, default '1200'):
How many voxels to process in a single step.
- --roinfo (str):
An ROI file for the seed connectivity.
- --method (str, default 'mean'):
Method for extracting timeseries - 'mean' or 'pca'.
- --options (str, default 'all'):
A string defining which session files to save. Default assumes all:
'r' ... save map of correlations
'f' ... save map of Fisher z values
'cv' ... save map of covariances
'z' ... save map of Z scores.
- --extractdata (str):
Specify if you want to save out the matrix as a CSV file (only available if the file is a ptseries).
- --ignore (str, default ''):
The column in ∗_scrub.txt file that matches bold file to be used for ignore mask. All if empty.
- --mask (str):
An array mask defining which frames to use (1) and which not (0). All if empty. If single value is specified then this number of frames is skipped.
- --mem-limit (str, default '4'):
Restrict memory. Memory limit expressed in gigabytes.
Examples
Run directly via:
${TOOLS}/${QUNEXREPO}/bash/qx_utilities/fc_compute_wrapper.sh \ --<parameter1> \ --<parameter2> \ --<parameter3> ... \ --<parameterN>
NOTE: --scheduler is not available via direct script call.
Run via:
qunex fc_compute_wrapper \ --<parameter1> \ --<parameter2> ... \ --<parameterN>
NOTE: scheduler is available via qunex call.
- --scheduler
A string for the cluster scheduler (e.g. PBS or SLURM) followed by relevant options.
For SLURM scheduler the string would look like this via the qunex call:
--scheduler='SLURM,jobname=<name_of_job>,time=<job_duration>,cpus-per-task=<cpu_number>,mem-per-cpu=<memory>,partition=<queue_to_send_job_to>'
qunex fc_compute_wrapper \ --sessionsfolder='<folder_with_sessions>' \ --calculation='seed' \ --runtype='individual' \ --sessions='<comma_separarated_list_of_cases>' \ --inputfiles='<files_to_compute_connectivity_on>' \ --inputpath='/images/functional' \ --extractdata='yes' \ --ignore='udvarsme' \ --roinfo='ROI_Names_File.names' \ --options='' \ --method='' \ --targetf='<path_for_output_file>' \ --mask='5' \ --covariance='false'
qunex fc_compute_wrapper \ --sessionsfolder='<folder_with_sessions>' \ --runtype='list' \ --flist='sessions.list' \ --extractdata='yes' \ --outname='<name_of_output_file>' \ --ignore='udvarsme' \ --roinfo='ROI_Names_File.names' \ --options='' \ --method='' \ --targetf='<path_for_output_file>' \ --mask='5' \ --covariance='false'
qunex fc_compute_wrapper \ --sessionsfolder='<folder_with_sessions>' \ --calculation='gbc' \ --runtype='individual' \ --sessions='<comma_separarated_list_of_cases>' \ --inputfiles='bold1_Atlas_MSMAll.dtseries.nii' \ --inputpath='/images/functional' \ --extractdata='yes' \ --outname='<name_of_output_file>' \ --ignore='udvarsme' \ --gbc-command='mFz:' \ --targetf='<path_for_output_file>' \ --mask='5' \ --target='' \ --rsmooth='0' \ --rdilate='0' \ --verbose='true' \ --time='true' \ --vstep='10000' \ --covariance='false'
qunex fc_compute_wrapper \ --sessionsfolder='<folder_with_sessions>' \ --calculation='gbc' \ --runtype='list' \ --flist='sessions.list' \ --extractdata='yes' \ --outname='<name_of_output_file>' \ --ignore='udvarsme' \ --gbc-command='mFz:' \ --targetf='<path_for_output_file>' \ --mask='5' \ --target='' \ --rsmooth='0' \ --rdilate='0' \ --verbose='true' \ --time='true' \ --vstep='10000' \ --covariance='false'