The goal of mascot is to provide easy access to recent macroscale structural connectomes of the Human brain obtained from diffusion MRI data through diffusion modeling and subsequent so-called tractography.
Installation
You can install the development version of mascot from GitHub with:
# install.packages("remotes")
remotes::install_github("astamm/mascot")Datasets
mascot provides access to two large white matter tractography datasets, both stored as fiber::bundle objects and fetched on demand — no bulky data files are bundled with the package itself.
HCP1065 population-averaged atlas
A whole-brain tractography atlas averaged across 1,065 healthy adults from the Human Connectome Project. It contains 87 white matter bundles, each represented as a single population-level streamline set.
# List all available bundles
available_bundles("HCP1065")
# Load one bundle directly by name
cst_left <- mascot::import_bundle(dataset = "HCP1065", bundle = "CST_left")
# Or use the convenience function
cst_left <- mascot::HCP1065_CST_L()License: CC BY-SA 4.0.
Citation:
Yeh FC. Population-based tract-to-region connectome of the human brain and its hierarchical topology. Nat Commun 13, 4933 (2022). https://doi.org/10.1038/s41467-022-32595-4
Users must also comply with the HCP data-use terms.
TractSeg per-subject bundles
72 white matter tracts segmented in each of 105 HCP Young Adult subjects using TractSeg, redistributed from the Zenodo archive (DOI: 10.5281/zenodo.1477956). Each bundle is downloaded on first use and cached locally.
# List all available TractSeg bundles
available_bundles("TractSeg")
# Import one bundle (downloads on first call, cached afterwards)
cst_left <- mascot::import_bundle(dataset = "TractSeg", bundle = "CST_left", subjects = 1L)
# Or use the convenience function
cst_left <- mascot::TractSeg_CST_left(subjects = 1L)License: CC BY-NC 4.0 — non-commercial use only.
Citation:
Wasserthal J, Neher P, Maier-Hein KH. TractSeg — Fast and accurate white matter tract segmentation. NeuroImage 183, 239–253 (2018). https://doi.org/10.1016/j.neuroimage.2018.07.070
Users must also comply with the HCP data-use terms.
Bundle objects
All bundles are returned as fiber::bundle objects with two slots:
-
@streamlines— a list ofstreamlineobjects, each carrying:-
@points- a matrix of 3D coordinates for the points along the streamline. -
@point_data- a list of numeric-only vectors of length containing point-level data (e.g., FA, MD, etc.) for each point along the streamline. -
@streamline_data- a list of scalars (of any type) containing streamline data that are not common across all streamlines in the bundle.
-
@streamline_data- a list of vectors containing streamline-level data that are common across all streamlines in the bundle.@bundle_data— a list of scalars (of any type) containing metadata about the bundle (name, source dataset, etc.).
See the fiber package documentation for full details on working with these objects.