This is a command line interface (CLI) for running BrainSpace on BIDS-compliant datasets. BrainSpace is a toolbox for macroscale gradient mapping, a common method to reduce the dimensionality of neuroimaging data. Gradients are computed for volumetric files in NIFTI format, or surface files in GIFTI format. For more details on BrainSpace, see the BrainSpace documentation.
For local installation the recommended approach is through Poetry. To install through Poetry, run the following commands:
pip install poetry
poetry install
The basic usage of the ba_timeseries_gradients CLI is as follows for Poetry-based installations:
ba_timeseries_gradients [OPTIONS] BIDS_DIR OUTPUT_DIR ANALYSIS_LEVEL
The BIDS_DIR
is the path to the BIDS directory containing the dataset to be analyzed. The OUTPUT_DIR
is the path to the directory where the output will be saved. The ANALYSIS_LEVEL
is the level of analysis to be performed, which can currently only be group
.
For a full list of options, see:
ba_timeseries_gradients --help
It is highly recommended to include options to filter the dataset for specific files. See the BIDS arguments section in the help for more details.
You can also run the CLI through Docker. To do so, run the following command:
docker run \
--volume LOCAL_BIDS_DIR:BIDS_DIR \
--volume LOCAL_OUTPUT_DIR:OUTPUT_DIR \
ghcr.io/cmi-dair/ba-timeseries-gradients:main \
[OPTIONS] BIDS_DIR OUTPUT_DIR ANALYSIS_LEVEL
Similarly, the CLI can also be run in Singularity as follows:
singularity run \
--bind LOCAL_BIDS_DIR:BIDS_DIR \
--bind LOCAL_OUTPUT_DIR:OUTPUT_DIR \
docker://ghcr.io/cmi-dair/ba-timeseries-gradients:main \
[OPTIONS] BIDS_DIR OUTPUT_DIR ANALYSIS_LEVEL