Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Plotting tool for brain atlases, in ggplot

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md
NotificationsYou must be signed in to change notification settings

ggseg/ggseg

Repository files navigation

R build statusCRAN statusdownloadscodecovLifecycle: maturingCodecov test coverage

Contains ggplot2 geom for plotting brain atlases using simple features.The largest component of the package is the data for the two built-inatlases. Plotting results of analyses on regions or networks ofteninvolves swapping between statistical tools, like R, and software forbrain imaging to correctly visualise analysis results.

This package aims to make it possible to plot results directly throughR.

Atlases

There are currently four atlases available in the package:

  1. dk - Desikan-Killiany atlas (aparc).
  2. aseg - Automatic subcortical segmentation.

Note: As of version 1.5.3,ggseg was split into two packages: onefor 2d polygon plots in ggplot, and another for 3d mesh plots throughplotly. This was done to reduce package size, dependencies, and also tosimplify maintenance. If you want the 3d plotting tool, please go theggseg3d repository.

You may find more atlases and functions to create new atlases in thecompanion packageggsegExtra.

Installation

The package can be installed from CRAN.

install.packages("ggseg")

Alternatively, ggseg may also be installed through its ggseg r-universe:

# Enable this universeoptions(repos= c(ggseg='https://ggseg.r-universe.dev',CRAN='https://cloud.r-project.org'))# Install some packagesinstall.packages('ggseg')

The development version of the package can be installed using devtools.

install.packages("remotes")remotes::install_github("ggseg/ggseg")

The functions are now installed, and you may load them when you want touse them. All functions are documented in standard R fashion.

Use

library(ggseg)library(ggplot2)plot(dk)

plot(aseg)

While default atlas plots will give you an idea of how the atlases look,you will likely want to project your own data onto the plot.

library(dplyr)#>#> Attaching package: 'dplyr'#> The following objects are masked from 'package:stats':#>#>     filter, lag#> The following objects are masked from 'package:base':#>#>     intersect, setdiff, setequal, unionsome_data<- tibble(region= rep(c("transverse temporal","insula","precentral","superior parietal"),2),p= sample(seq(0,.5,.001),8),groups= c(rep("g1",4), rep("g2",4)))some_data|>  group_by(groups)|>  ggplot()+  geom_brain(atlas=dk,position= position_brain(hemi~side),             aes(fill=p))+  facet_wrap(~groups)#> merging atlas and data by 'region'

The package also has several vignettes, to help you get started usingit. You can access ithere

You can also see one of the creators blog for introductions to its usehere

Report bugs or requests

Don’t hesitate to ask for support usinggithubissues, or requesting newatlases. While we would love getting help in creating new atlases, youmay also request atlases through the issues, and we will try to get toit.

Funding

This tool is partly funded by:

EU Horizon 2020 Grant: Healthy minds 0-100 years: Optimising the useof European brain imaging cohorts (Lifebrain).

Grant agreement number: 732592.

Call: Societal challenges: Health, demographic change and well-being

About

Plotting tool for brain atlases, in ggplot

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp