Skip to contents

Installation

We are planning to submit verywise to CRAN soon.

In the meantime, you can install the development version of verywise from GitHub using either pak or devtools (provided these packages are already installed on your system).

# Install pak (if not there yet)
if (!requireNamespace("pak"))
  install.packages('pak')

# Install verywise
pak::pak("SereDef/verywise")
# Install devtools (if not there yet)
if (!requireNamespace("devtools"))
  install.packages('devtools')

# Install verywise
devtools::install_github("SereDef/verywise")

This will also download a few other R packages that are needed, so give it a teensy-weensy little minute to do its thing.

Finally, you can attach the package in your session, to make it easier to use:

System and software requirements

In order for verywise to run smoothly, you will need:

  • R (version >= 4.0) installed.
  • FreeSurfer installed.
  • A Unix system: currently, verywise works on macOS and on most Linux distributions, but not on Windows. This is because we rely on functions from the FreeSurfer suite which require Unix.

We also highly recommend to:

  • Set FREESURFER_HOME and SUBJECTS_DIR environment variables. This is typically done when you configure Freesurfer, as described extensively here, and briefly in the FreeSurfer installation instructions below.
  • Make sure a symbolic link to the target template (usually, fsaverage) is in your SUBJECTS_DIR. This is typically done automatically by recon-all, as briefly described in the next article.
  • Run your analysis using a multi-core machine, as verywise is especially designed to take advantage of parallel processing to speed up computations.

Installing and setting up FreeSurfer

You can find extensive instructions on how to install and use FreeSurfer on their wiki.

Here is a quick summary of what needs to happen:

  1. Download and install FreeSurfer (instructions).
  2. Request a FreeSurfer license here.
  3. (Optionally) set up the FreeSurfer environment variables (FREESURFER_HOME and SUBJECTS_DIR) by adding the following lines to your shell configuration file (e.g., ~/.bashrc or ~/.zshrc):
export FREESURFER_HOME=/path/to/freesurfer
source $FREESURFER_HOME/SetUpFreeSurfer.sh

export SUBJECTS_DIR=/path/to/subjects_directory