Package: brainGraph 3.0.3

brainGraph: Graph Theory Analysis of Brain MRI Data

A set of tools for performing graph theory analysis of brain MRI data. It works with data from a Freesurfer analysis (cortical thickness, volumes, local gyrification index, surface area), diffusion tensor tractography data (e.g., from FSL) and resting-state fMRI data (e.g., from DPABI). It contains a graphical user interface for graph visualization and data exploration, along with several functions for generating useful figures.

Authors:Christopher G. Watson [aut, cre]

brainGraph_3.0.3.tar.gz
brainGraph_3.0.3.zip(r-4.5)brainGraph_3.0.3.zip(r-4.4)brainGraph_3.0.3.zip(r-4.3)
brainGraph_3.0.3.tgz(r-4.4-any)brainGraph_3.0.3.tgz(r-4.3-any)
brainGraph_3.0.3.tar.gz(r-4.5-noble)brainGraph_3.0.3.tar.gz(r-4.4-noble)
brainGraph_3.0.3.tgz(r-4.4-emscripten)brainGraph_3.0.3.tgz(r-4.3-emscripten)
brainGraph.pdf |brainGraph.html
brainGraph/json (API)
NEWS

# Install 'brainGraph' in R:
install.packages('brainGraph', repos = c('https://cwatson.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/cwatson/braingraph/issues

Datasets:
  • aal116 - Coordinates for data from brain atlases
  • aal2.120 - Coordinates for data from brain atlases
  • aal2.94 - Coordinates for data from brain atlases
  • aal90 - Coordinates for data from brain atlases
  • brainnetome - Coordinates for data from brain atlases
  • brainsuite - Coordinates for data from brain atlases
  • craddock200 - Coordinates for data from brain atlases
  • destrieux - Coordinates for data from brain atlases
  • destrieux.scgm - Coordinates for data from brain atlases
  • dk - Coordinates for data from brain atlases
  • dk.scgm - Coordinates for data from brain atlases
  • dkt - Coordinates for data from brain atlases
  • dkt.scgm - Coordinates for data from brain atlases
  • dosenbach160 - Coordinates for data from brain atlases
  • gordon333 - Coordinates for data from brain atlases
  • hcp_mmp1.0 - Coordinates for data from brain atlases
  • hoa112 - Coordinates for data from brain atlases
  • lpba40 - Coordinates for data from brain atlases
  • power264 - Coordinates for data from brain atlases

On CRAN:

brain-connectivitybrain-imagingcomplex-networksconnectomeconnectomicsfmrigraph-theorymrinetwork-analysisneuroimagingneurosciencestatisticstractography

7.64 score 178 stars 2 packages 103 scripts 622 downloads 8 mentions 99 exports 19 dependencies

Last updated 9 months agofrom:a0d13aea83. Checks:OK: 1 NOTE: 6. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 16 2024
R-4.5-winNOTENov 16 2024
R-4.5-linuxNOTENov 16 2024
R-4.4-winNOTENov 16 2024
R-4.4-macNOTENov 16 2024
R-4.3-winNOTENov 16 2024
R-4.3-macNOTENov 16 2024

Exports:analysis_random_graphsaopapply_thresholdsas_atlasas_brainGraphListbg_to_mediatebrainGraph_bootbrainGraph_GLMbrainGraph_GLM_designbrainGraph_mediatebrainGraph_permutecentr_betw_commcentr_levcheck_sIDcoeff_determcoeff_tablecoeff_varcolMaxcolMaxAbscolMincommunicabilitycontract_brainGraphcor.diff.testcorr.matrixcount_homologouscount_intercovratio.bg_GLMcreate_atlascreate_matsdffits.bg_GLMdiag_sqedge_asymmetryedge_spatial_distefficiencyfastLmBGfastLmBG_3dfastLmBG_3dYfastLmBG_3dY_1pfastLmBG_ffastLmBG_tgateway_coeffget_thresholdsget.residgraph_attr_dtguess_atlashubnessimport_scninvis_binaryis.brainGraphis.brainGraphListloomake_auc_brainGraphmake_brainGraphmake_brainGraphListmake_ego_brainGraphmake_empty_brainGraphmake_intersection_brainGraphmean_distance_wtmtpcNBSnregionspad_zerospart_coeffpartitionpinvplot_brainGraph_guiplot_brainGraph_multiplot_globalplot_rich_normplot_vertex_measuresplot_volumetricqr_Q2qr_R2randomiserandomise_3dregion.namesrich_club_allrich_club_attrsrich_club_coeffrich_club_normrich_corerobustnesss_coreset_brainGraph_attrsim.rand.graph.clustsim.rand.graph.hqssim.rand.graph.parslicersmall.worldsymm_meansymmetrizevertex_attr_dtvertex_spatial_distvif.bg_GLMvulnerabilitywithin_module_deg_z_scorewrite_brainnetxfm.weights

Dependencies:abindclicodetoolscpp11data.tabledoParallelforeachglueigraphiteratorslatticelifecyclemagrittrMASSMatrixpermutepkgconfigrlangvctrs

Readme and manuals

Help Manual

Help pageTopics
Threshold additional set of matricesapply_thresholds
Atlas helper functionsas_atlas Atlas Helpers create_atlas guess_atlas
Set graph, vertex, and edge attributes common in MRI analysesAttributes set_brainGraph_attr xfm.weights
Bootstrapping for global graph measuresBootstrapping brainGraph_boot plot.brainGraph_boot summary.brainGraph_boot
Coordinates for data from brain atlasesaal116 aal2.120 aal2.94 aal90 Brain Atlases brainnetome brainsuite craddock200 destrieux destrieux.scgm dk dk.scgm dkt dkt.scgm dosenbach160 gordon333 hcp_mmp1.0 hoa112 lpba40 power264
Default options for brainGraphbrainGraph-package brainGraph brainGraph-options
Permutation test for group difference of graph measuresbrainGraph_permute plot.brainGraph_permute summary.brainGraph_permute
brainGraph generic methodsbrainGraph-methods groups.brainGraphList groups.corr_mats nregions region.names region.names.data.table
Create a list of brainGraph graphsas_brainGraphList brainGraphList Extract.brainGraphList is.brainGraphList make_brainGraphList make_brainGraphList.array make_brainGraphList.corr_mats nobs.brainGraphList print.brainGraphList [.brainGraphList
Calculate communicability betweenness centralitycentr_betw_comm
Calculate a vertex's leverage centralitycentr_lev
Test if an object is a character vector of numberscheck_sID pad_zeros
Calculate coefficient of variationcoeff_var coeff_var.default
Calculate communicabilitycommunicability
Contract graph vertices based on brain lobe and hemispherecontract_brainGraph
Calculate the p-value for differences in correlation coefficientscor.diff.test
Calculate correlation matrix and thresholdcorr.matrix Extract.corr_mats nregions.corr_mats plot.corr_mats region.names.corr_mats [.corr_mats
Count number of edges of a brain graphCount Edges count_homologous count_inter
Create connection matrices for tractography or fMRI datacreate_mats
Create a brainGraph objectCreating_Graphs is.brainGraph make_brainGraph make_brainGraph.bg_mediate make_brainGraph.igraph make_brainGraph.matrix make_empty_brainGraph summary.brainGraph
Create a graph list with GLM-specific attributesCreating_Graphs_GLM make_brainGraphList.bg_GLM make_brainGraphList.mtpc make_brainGraphList.NBS
Calculate an asymmetry index based on edge countsedge_asymmetry
Calculate graph global, local, or nodal efficiencyefficiency
Fit General Linear Models at each vertex of a graphbrainGraph_GLM GLM plot.bg_GLM print.bg_GLM summary.bg_GLM [.bg_GLM
Extract basic information from a bg_GLM objectcase.names.bg_GLM formula.bg_GLM GLM basic info labels.bg_GLM nobs.bg_GLM nregions.bg_GLM region.names.bg_GLM terms.bg_GLM variable.names.bg_GLM
Create a design matrix for linear model analysisbrainGraph_GLM_design GLM design
Fit design matrices to one or multiple outcomesfastLmBG fastLmBG_3d fastLmBG_3dY fastLmBG_3dY_1p fastLmBG_f fastLmBG_t GLM fits
Influence measures for a bg_GLM objectcooks.distance.bg_GLM covratio.bg_GLM dfbeta.bg_GLM dfbetas.bg_GLM dffits.bg_GLM GLM influence measures hatvalues.bg_GLM influence.bg_GLM rstandard.bg_GLM rstudent.bg_GLM
Model selection for bg_GLM objectsextractAIC.bg_GLM GLM model selection logLik.bg_GLM
Extract model fit statistics from a bg_GLM objectanova.bg_GLM coef.bg_GLM coeff_determ coeff_table confint.bg_GLM deviance.bg_GLM df.residual.bg_GLM fitted.bg_GLM GLM statistics residuals.bg_GLM sigma.bg_GLM vcov.bg_GLM
Create a data table with graph global and vertex measuresGraph Data Tables graph_attr_dt vertex_attr_dt
Calculate Euclidean distance of edges and verticesedge_spatial_dist Graph Distances vertex_spatial_dist
Calculate vertex hubnesshubness
Import data for structural connectivity analysisimport_scn
Approaches to estimate individual network contributionaop IndividualContributions loo plot.IC summary.IC
Calculate the inverse of the cross product of a design matrixinv inv.array inv.list inv.matrix inv.qr Inverse pinv
Calculate the AUC across densities of given attributesmake_auc_brainGraph
Create a graph of the union of multiple vertex neighborhoodsmake_ego_brainGraph
Create the intersection of graphs based on a logical conditionmake_intersection_brainGraph
Matrix/array utility functionscolMax colMaxAbs colMin diag_sq get_thresholds is_binary Matrix utilities qr.array qr_Q2 qr_R2 symmetrize symmetrize.array symmetrize.matrix symm_mean
Calculate weighted shortest path lengthsmean_distance_wt
Mediation analysis with brain graph measures as mediator variablesbg_to_mediate brainGraph_mediate Mediation summary.bg_mediate
Multi-threshold permutation correctioncase.names.mtpc df.residual.mtpc formula.mtpc labels.mtpc mtpc nobs.mtpc nregions.mtpc plot.mtpc region.names.mtpc summary.mtpc terms.mtpc variable.names.mtpc
Network-based statistic for brain MRI datacase.names.NBS df.residual.NBS formula.NBS labels.NBS NBS nobs.NBS nregions.NBS summary.NBS terms.NBS variable.names.NBS
GUI for plotting graphs overlaid on an MNI152 image or in a circleplot_brainGraph_gui
Save PNG of one or three views for all graphs in a brainGraphListplot_brainGraph_multi slicer
Plot global graph measures across densitiesplot_global
Plot normalized rich club coefficients against degree thresholdplot_rich_norm
Plot vertex-level graph measures at a single density or thresholdplot_vertex_measures
Plot group distributions of volumetric measures for a given brain regionplot_volumetric
Plot a brain graph with a specific spatial layoutplot.brainGraph
Plot a brainGraphList and write to PDFplot.brainGraphList
Plot a graph with results from GLM-based analysesplot.brainGraph_GLM plot.brainGraph_mediate plot.brainGraph_mtpc plot.brainGraph_NBS Plotting GLM graphs
Perform an analysis with random graphs for brain MRI dataanalysis_random_graphs Random Graphs sim.rand.graph.clust sim.rand.graph.hqs sim.rand.graph.par
GLM non-parametric permutation testingpartition randomise randomise_3d
Linear model residuals in structural covariance networkscase.names.brainGraph_resids Extract.brainGraph_resids get.resid groups.brainGraph_resids nobs.brainGraph_resids nregions.brainGraph_resids plot.brainGraph_resids region.names.brainGraph_resids Residuals summary.brainGraph_resids [.brainGraph_resids
Rich club calculationsRich Club rich_club_all rich_club_coeff rich_club_norm rich_core
Assign graph attributes based on rich-club analysisrich_club_attrs
Analysis of network robustnessrobustness
Calculate the s-core of a networks_core
Calculate graph small-worldnesssmall.world
Gateway coefficient, participation coefficient, and within-mod degree z-scoregateway_coeff part_coeff Vertex Roles within_module_deg_z_score
Variance inflation factors for 'bg_GLM' objectsvif.bg_GLM
Calculate graph vulnerabilityvulnerability
Write files to be used for visualization with BrainNet Viewerwrite_brainnet