zbrains
is developed by MICA-Lab, affiliated with McGill University, the Montreal Neurological Institute and Hospital "the Neuro," and the McConnell Brain Imaging Center (BIC).
This open access processing and analysis tool aims identify patient-specific anomalies in brain morphology and microstructure, using features with previously demonstrated potential to accurately localize epileptogenic lesions.
zbrains
uses a set of known software dependencies developed by other groups and aggregated in a published pipeline micapipe.
You must be inside the zbrains
repository to run the following commands.
cd /path/to/zbrains/repository
ZBRAINS=$(dirname "$(realpath "$0")")
source "${ZBRAINS}/functions/init.sh"
zbrains
requires input and output directories:
pth_dataset
points to the BIDS-format dataset path where micapipe, hippunfold, and zbrains directories will be storedmicapipe_dir
contains the output ofmicapipe
previously run on the BIDS dataset (also BIDS-format)hippunfold_dir
contains the output ofhippunfold
previously run on the BIDS dataset (also BIDS-format)zbrains_dir
points to the directory that will holdz-brains
outputs
# path for dataset in BIDS structure
pth_dataset="/path/to/BIDS_dataset"
micapipe_dir="name_of_micapipe_folder"
hippunfold_dir="name_of_hippunfold_folder"
zbrains_dir="name_of_z-brains_folder"
A .csv
file with ID and session for healthy controls are required
# csv file with ID and session for control participants to be processed
demo_controls='/path/to/control/participants.csv'
To process features for healthy controls as a batch, run the following. Note that column names of the healthy controls .csv
file must be specified under --column_map
.
./zbrains_batch --run proc \
--demo "${demo_controls}" \
--dataset "${pth_dataset}" \
--zbrains ${zbrains_dir} \
--micapipe ${micapipe_dir} \
--hippunfold ${hippunfold_dir} \
--column_map participant_id=ID session_id=SES \
--verbose 2 \
--scheduler_options "-n 20" #specify threads here
# specify the list of subject IDs along with corresponding session
subject_ids=(sub-PX001 sub-PX002)
session_ids=(ses-01 ses-01)
# csv file with ID and session for control participants for comparison
demo_controls='/path/to/control/participants.csv'
./zbrains --run analysis \
--sub "${sid}" \
--ses "${ses}" \
--dataset ${pth_dataset} \
--zbrains ${zbrains_dir} \
--demo_ref ${demo_controls} \
--dataset_ref ${pth_dataset} \
--zbrains_ref ${zbrains_dir} \
--column_map participant_id=ID session_id=SES \
--verbose 2