| Title: | ggplot2 Visualisation Tools for AtlasTrack White Matter Tracts |
|---|---|
| Description: | Provides ggplot2-based two-dimensional visualisations of AtlasTrack white-matter tract polygons in three view sets - orthogonal, ggseg, and axial. Supports categorical tract plots and tract-level continuous values. |
| Authors: | Hollie Byrne [aut, cre], Rachel Visontay [aut], Emma Devine [aut], Lindsay Squeglia [aut], Louise Mewton [aut] |
| Maintainer: | Hollie Byrne <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.3 |
| Built: | 2026-10-11 15:00:02 UTC |
| Source: | https://github.com/hbyrne07/ggAtlasTrack |
Show ABCD DTI variable names matched to AtlasTrack tracts
atlastrack_abcd_lookup( version = c("6.0", "5.0", "all"), metric = "fa", shell = "fs", only_plotted = TRUE )atlastrack_abcd_lookup( version = c("6.0", "5.0", "all"), metric = "fa", shell = "fs", only_plotted = TRUE )
version |
ABCD data release version. One of |
metric |
DTI metric suffix to use. Defaults to |
shell |
ABCD 6.0 DTI shell to use. Defaults to |
only_plotted |
Logical. If |
A data frame mapping ABCD DTI variable names to AtlasTrack tract names.
atlastrack_abcd_lookup(metric = "fa") atlastrack_abcd_lookup(metric = "md") atlastrack_abcd_lookup(metric = "fa", shell = "is")atlastrack_abcd_lookup(metric = "fa") atlastrack_abcd_lookup(metric = "md") atlastrack_abcd_lookup(metric = "fa", shell = "is")
Convert ABCD DTI columns to AtlasTrack long format
atlastrack_abcd_to_long( data, version = c("6.0", "5.0"), metric = "fa", shell = "fs", id_cols = NULL, value_name = NULL, only_plotted = TRUE )atlastrack_abcd_to_long( data, version = c("6.0", "5.0"), metric = "fa", shell = "fs", id_cols = NULL, value_name = NULL, only_plotted = TRUE )
data |
A data frame containing ABCD DTI variables. |
version |
ABCD data release version. One of |
metric |
DTI metric suffix to use. Defaults to |
shell |
ABCD 6.0 DTI shell to use. Defaults to |
id_cols |
Optional character vector of identifier columns to keep,
such as |
value_name |
Name of the output value column. If |
only_plotted |
Logical. If |
A long-format data frame containing identifier columns,
tract_name, tract_label, the ABCD variable name, and the DTI value.
## Not run: abcd_fa_long <- atlastrack_abcd_to_long( abcd_data, version = "6.0", metric = "fa", shell = "fs", id_cols = c("src_subject_id", "eventname") ) abcd_md_long <- atlastrack_abcd_to_long( abcd_data, version = "6.0", metric = "md", shell = "fs", id_cols = c("src_subject_id", "eventname") ) ## End(Not run)## Not run: abcd_fa_long <- atlastrack_abcd_to_long( abcd_data, version = "6.0", metric = "fa", shell = "fs", id_cols = c("src_subject_id", "eventname") ) abcd_md_long <- atlastrack_abcd_to_long( abcd_data, version = "6.0", metric = "md", shell = "fs", id_cols = c("src_subject_id", "eventname") ) ## End(Not run)
A lookup table mapping ABCD 5.0 and ABCD 6.0 DTI variable names
to the tract_name values used by ggAtlasTrack.
atlastrack_abcd_tract_lookupatlastrack_abcd_tract_lookup
A data frame with columns:
ABCD 5.0 FA variable name.
ABCD 6.0 FA variable name.
AtlasTrack tract name used by ggAtlasTrack.
Descriptive AtlasTrack tract label.
Logical indicator for whether the tract is available in the plotting atlas.
The stored variable names are based on fractional anisotropy (fa) columns.
Helper functions such as atlastrack_abcd_lookup() and
atlastrack_abcd_to_long() can generate equivalent names for other
DTI metrics, such as mean diffusivity (md), longitudinal diffusivity
(ld), and transverse diffusivity (td), by replacing the metric suffix.
ABCD DTI variable names were matched to AtlasTrack tract labels.
atlastrack_abcd_tract_lookupatlastrack_abcd_tract_lookup
Convert ABCD 6.0 DTI columns to AtlasTrack long format
atlastrack_abcd6_to_long( data, metric = "fa", shell = "fs", id_cols = NULL, value_name = NULL, only_plotted = TRUE )atlastrack_abcd6_to_long( data, metric = "fa", shell = "fs", id_cols = NULL, value_name = NULL, only_plotted = TRUE )
data |
A data frame containing ABCD 6.0 DTI variables. |
metric |
DTI metric suffix to use. Defaults to |
shell |
ABCD 6.0 DTI shell to use. Defaults to |
id_cols |
Optional character vector of identifier columns to keep. |
value_name |
Name of the output value column. If |
only_plotted |
Logical. If |
A long-format data frame.
## Not run: abcd_fa_long <- atlastrack_abcd6_to_long( abcd_data, metric = "fa", shell = "fs", id_cols = c("src_subject_id", "eventname") ) ## End(Not run)## Not run: abcd_fa_long <- atlastrack_abcd6_to_long( abcd_data, metric = "fa", shell = "fs", id_cols = c("src_subject_id", "eventname") ) ## End(Not run)
A list containing ggseg-style background layers for plotting AtlasTrack.
atlastrack_backgroundatlastrack_background
A list with three sf objects:
Grey matter / cortical background polygons.
White matter cut-out polygons.
Ventricle polygons.
Plot AtlasTrack white-matter tracts
atlastrack_plot( data = NULL, value = NULL, tract_name = "tract_name", view_set = c("orthogonal", "split", "axial"), show_ventricles = TRUE, tract_labels = c("abbrev", "full"), low = "#E8EEF7", high = "#2166AC", limits = NULL, legend_title = NULL )atlastrack_plot( data = NULL, value = NULL, tract_name = "tract_name", view_set = c("orthogonal", "split", "axial"), show_ventricles = TRUE, tract_labels = c("abbrev", "full"), low = "#E8EEF7", high = "#2166AC", limits = NULL, legend_title = NULL )
data |
Optional data frame containing tract-level values. |
value |
Optional unquoted column name in |
tract_name |
Name of the tract-name column in |
view_set |
View set to plot. One of |
show_ventricles |
Logical. Whether to show ventricles. |
tract_labels |
Label style for the categorical tract legend. One of |
low |
Low colour for continuous values. |
high |
High colour for continuous values. |
limits |
Optional numeric limits for continuous scale. |
legend_title |
Optional legend title. |
A ggplot object.
List available AtlasTrack tract names
atlastrack_tract_names()atlastrack_tract_names()
A data frame containing AtlasTrack tract abbreviations and full names.
A preprocessed sf object containing two-dimensional AtlasTrack
white-matter tract polygons for ggseg-style plotting.
atlastrack_tractsatlastrack_tracts
An sf object with columns including:
Numeric AtlasTrack tract identifier.
AtlasTrack tract name.
View set, either "ggseg" or "orthogonal".
Displayed panel name.
Original anatomical view.
Slice coordinate in MNI space.
Panel order within view set.
Atlas name.
Atlas type.
Hemisphere label.
Panel side/view label.
Region label used for plotting.
Region label.
Polygon geometry.
Metadata describing the available AtlasTrack 2D plotting views.
atlastrack_viewsatlastrack_views
A data frame with columns:
View set, either "ggseg" or "orthogonal".
Displayed panel name.
Original anatomical view.
Slice coordinate in MNI space.
Panel order within view set.
Show available AtlasTrack views
atlastrack_views_available()atlastrack_views_available()
A data frame of available view sets and display views.