bstr: BrainSuite Statistics Toolbox in R
Copyright (C) 2024 The Regents of the University of California
Created by Shantanu H. Joshi, Yeun Kim, Kayla A. Schroeder, and David W. Shattuck
bstr is licensed under an GPLv2-only license (https://spdx.org/licenses/GPL-2.0-only.html). Please see the enclosed LICENSE file for more details.
The BrainSuite Statistics toolbox in R (bstr) is a software package developed in R that performs statistical analysis of population-level neuroimaging data processed using BrainSuite [1]. Specifically, it provides statistical tools for conducting cortical thickness analysis, tensor based morphometry, and analysis of diffusion measures.
For more detailed installation instructions, usage examples, or to check for updated versions of bstr, please visit the bstr website: http://brainsuite.org/bstr/.
install.packages('devtools')
devtools::install_url('http://brainsuite.org/wp-content/uploads/2024/09/bstr_0.5.2.tar.gz')
Replace /path/to/
with the path to the folder where you downloaded bstr.
install.packages('devtools')
devtools::install_local('/path/to/bstr_0.5.2.tar.gz')
Note that on Windows, you will need to use double backslashes (\) in the path because backslash is an escape character. You can also replace the backslashes with forward slashes. Replace C:\\path\\to\\
or C:/path/to/
with the path to the folder where you downloaded bstr.
install.packages('devtools')
devtools::install_local('C:\\path\\to\\bstr_0.5.2.tar.gz')
or
install.packages('devtools')
devtools::install_local('C:/path/to/bstr_0.5.2.tar.gz')
Type
library(bstr)
then
get_brainsuite_install_path()
This should display the BrainSuite installation path.
Bstr performs statistical analysis on the outputs of the BrainSuite structural workflow, which performs cortical surface extraction [1], alignment to a reference atlas using surface-constrained volumetric registration (SVReg) [2], and, optionally, processing of diffusion MRI data using the BrainSuite diffusion pipeline (BDP) [3]. SVReg performs surface registration of triangular meshes based on curvature and volumetric registration based on image intensities. BDP performs distortion correction, alignment of diffusion MRI to T1-weighted MRI, and fitting of various diffusion models to the corrected diffusion data. Bstr is used to perform population-level statistical analysis of various neuroimaging measures produced by these components. Statistical analysis of voxel-wise and surface-based data is performed in the common coordinate space of the atlas by resampling the data from subject coordinates to a the atlas space using SVReg.
Bstr supports the following analysis methods:
Bstr is cross-platform and is available on macOS, Windows,and Linux based systems (all platforms with R support). Bstr is distributed under an open source license (GPLv2-only). Bstr supports functionality for automated report generation to visualize statistical results using R-shiny and R markdown. The volumetric analysis report contains the cluster table, visualizations of clusters on image slices, and shows both the unadjusted and the adjusted versions of p-values and t statistics, respectively. The ROI analysis report shows the demographic spreadsheet, automatic bar plots for ANOVA and regressions, and scatter plot for correlation analyses. Bstr also exports an R markdown report that contains reproducible R commands in both the Rmd file and in the html document [4]. This enables complete reproducibility of statistical results and only requires packaging the R markdown file along with the data.