brainGraph 2.0.0

2018-02-05

2nd major release; 6th CRAN release. (The previous CRAN release was at v1.0.0)

For other updates and bug fixes, see the minor release notes below.

New functions/features

  1. Mediation analysis is now possible through brainGraph_mediate.
  2. I have introduced some simple S3 classes and methods. All of the classes have plot (except NBS) and summary methods. The classes and corresponding “creation functions” are:
Class Creation func. Description
brainGraph make_brainGraph Any graph with certain attributes
bg_GLM brainGraph_GLM Results of GLM analysis
NBS NBS Results of NBS analysis
mtpc mtpc Results of MTPC analysis
brainGraph_GLM make_glm_brainGraph Graphs from GLM analysis
brainGraph_NBS make_nbs_brainGraph Graphs from NBS analysis
brainGraph_mtpc make_glm_brainGraph Graphs from MTPC analysis
brainGraph_mediate make_mediate_brainGraph Graphs from mediation analysis
brainGraph_boot brainGraph_boot Results of bootstrap analysis
brainGraph_permute brainGraph_permute Results of permutation tests
brainGraph_resids get.resid Residuals for covariance networks
  1. Multiple contrasts (in the same function call), as well as F-contrasts, are now allowed in the GLM-based functions: brainGraph_GLM, mtpc, NBS, and get.resid.
  2. Designs with 3-way interactions (e.g., 2 x 2 x 2) are now allowed for GLM-based analyses.
  3. Permutations for GLM-based analyses are now done using the Freedman-Lane method (the same as in FSL’s randomise and in PALM).
  4. Plot the “diagnostics” from GLM analyses through the plot.bg_GLM method to the output of brainGraph_GLM.
  5. Plot the statistics from MTPC analyses through the plot.mtpc method for mtpc results.
  6. aop has a new argument control.value allowing you to specify the control group; all comparisons will be to that group.
  7. Most of the GLM-based functions have a new argument, long, which will not return all of the permutation results if long=FALSE.

Removed/renamed functions

Major changes

brainGraph 1.6.0

2017-09-14

Bug fix

Minor changes

brainGraph 1.5.0

2017-08-31

Bug fix

Major changes

New functions

Minor changes

brainGraph 1.4.0

2017-06-10

Bug fix

New functions

Minor changes

brainGraph 1.3.0

2017-04-30

Bug fix

Major changes

Minor changes

brainGraph 1.2.0

2017-04-29

Bug fix

Major changes

New functions

brainGraph 1.1.0

2017-04-22

Bug fix

New functions

Major changes

Minor changes

# brainGraph 1.0.0
2017-04-10
First major release; Fifth CRAN release
## Bug fix * plot_perm_diffs previously didn’t work with a low number of permutations, but now will work with any number * sim.rand.graph.par previously didn’t work with graphs lacking a degree vertex attribute * Fixed problem with plot_brainGraph_GUI when plotting in the sagittal view for neighborhood graphs
## Major changes * Multiple functions now run significantly faster after I updated the code to be more efficient * permute.group.auc has been removed, and now permute.group accepts multiple densities and returns the same results. It can still take a single density for the old behavior * The lobe and network vertex attributes are now character vectors * NBS now handles more complex designs and contrasts through brainGraph_GLM_design and brainGraph_GLM_fit. The function arguments are different from previous versions * SPM has been removed and is replaced by brainGraph_GLM * Added atlas craddock200 (with coordinates from DPABI/DPARSF)
## New functions * brainGraph_GLM: replaces SPM and allows for more complex designs and contrasts * brainGraph_GLM_design: function that creates a design matrix from a data.table * brainGraph_GLM_fit: function that calculates the statistics from a design matrix and response vector * create_mats: replaces dti_create_mats and adds functionality for resting-state fMRI data; also can create matrices that will have a specific graph density * gateway_coeff: calculate the gateway coefficient (Vargas & Wahl, 2014); graphs will have vertex attributes GC or GC.wt (if weighted graph) * plot_brainGraph_multi: function to write a PNG file of 3-panel brain graphs (see User Guide for example)
## Minor changes * efficiency replaces graph.efficiency; the old function name is still accessible (but may be removed eventually) * set_brainGraph_attr replaces set.brainGraph.attributes; the old function name is still accessible (but may be removed eventually) * part_coeff replaces part.coeff * All of the rich. functions have been renamed. The period/point/dot in each of those functions is replaced by the underscore. So, rich.club.norm is now rich_club_norm, etc. * set_vertex_color and set_edge_color replace color.vertices and color.edges (these functions are not exported, in any case) * contract_brainGraph replaces graph.contract.brain * make_ego_brainGraph replaces graph_neighborhood_multiple (so it is a similar name to igraph’s function make_ego_graph) * write_brainnet replaces write.brainnet * In the GUI, vertex order in circle plots now more closely reflect their anatomical position, being ordered by y- and x-coordinates (and within lobe)

brainGraph 0.72.0

2016-10-10

Fourth CRAN release

Bug fix

Major changes

New functions

Minor changes

# brainGraph 0.62.0
2016-04-22
Third CRAN release
## Bug fix * rich.club.norm had a bug in calculating the p-values. If you have already gone through the process of creating random graphs and the object phi.norm, you can fix with the following code: (add another loop if you have single-subject graphs, e.g. DTI data)
for (i in seq_along(groups)) { for (j in seq_along(densities)) { max.deg <- max(V(g[[i]][[j]])$degree) phi.norm[[i]][[j]]$p <- sapply(seq_len(max.deg), function(x) sum(phi.norm[[i]][[j]]$phi.rand[, x] >= phi.norm[[i]][[j]]$phi.orig[x]) / N) } }
where N is the number of random graphs generated. * dti_create_mats: there was a bug when sub.thresh equals 0; it would take matrix entries, even if they were below the mat.thresh values. This has been fixed. Argument checking has also been added.
## Major changes * Now requires the package RcppEigen for fast linear model calculations; resulted in major speed improvements * Now requires the package permute for the NBS function * group.graph.diffs: * Uses the function fastLmPure from RcppEigen for speed/efficiency * Can specify multiple alternative hypotheses * Linear model specification is more limited now, though * Added data table for the destrieux.scgm atlas
## New functions * SPM: new function that replaces and improves upon both group.graph.diffs and permute.vertex * NBS: implements the network-based statistic * analysis_random_graphs: perform all the steps for getting small-world parameters and normalized rich-club coefficients and p-values * plot_global: create a line plot across all densities of global graph measures in the same figure * vertex_spatial_dist: calculates the mean edge distance for all edges of a given vertex
## Minor changes * dti_create_mats: changed a few arguments * edge_spatial_dist: re-named from spatial.dist * group.graph.diffs: returns a graph w/ spatial coord’s for plotting * plot_brainGraph_list: * You can now specify a condition for removing vertices (e.g. hemi == "R" will keep only right hemisphere vertices; includes complex logical expressions (i.e., with multiple ‘&’ and ‘|’ conditions) * Vertex sizing and coloring is a bit more flexible * New vertex attribute Lp (average path length for each vertex) * plot_brainGraph_gui: * Added a checkbox for displaying a color legend or not * Can color vertices by weighted community membership * Added an Other option for adjusting edge widths by a custom attribute * More options for adjusting vertex sizes when the graph is weighted * Made the GUI window more compact to fit lower screen resolutions * plot_rich_norm: * New argument facet.by to group the plots by either “density” (default) or “threshold” (for multi-subject, e.g. DTI data) * set.brainGraph.attributes: New calculations for weighted graphs: * Modularity and community membership * Participation coefficient and within-module degree z-score * Vertex-level transitivity * Vertex-level shortest path lengths

brainGraph 0.55.0

2015-12-24

Second CRAN release

New functions

Minor changes


brainGraph 0.48.0

2015-12-08

Initial CRAN release