2024-02-20
- Fix bug in
import_scnwhen importing data that includes subcortical gray matter - Export the atlas in
sim.rand.graph.parwhen controlling for clustering coefficient - Fix indexing bug in
within_module_deg_z_score - Refactor GUI code to avoid global variables (although
RGtk2andcairoDevicehave been archived)
- Add colors and labeling to
plotmethod forbrainGraph_residsobjects
2021-02-03
- Use edge weights to calculated weighted gateway coefficient, participation coefficient, and within-module degree z-score
2020-10-19
- Assigning dimnames to null.max.all in
mtpcno longer throws an error - Creating connected random graphs (from
analysis_random_graphs) will no longer throw an error from within the hidden functionget_rand_attrs graph_attr_dtno longer throws an error if subnet is a graph-level attribute
2020-09-28
- There are a few dozen new S3 methods for
bg_GLMobjects. Seemethods(class='bg_GLM')for the full list.coeff_determcalculates the coefficient of determination.coeff_tablereturns the coefficients table (same assummary.lm(x)$coefficients) for each region. - There are new GLM fitting functions (prefixed with
fastLmBG) that are significantly faster and work with matrix/array inputs. You can see these with the codeapropos('fastLm'). - New functions
randomiseandrandomise_3dcan be called directly (although not recommended), and thepartitionfunction is now exported. Each of these is for permutation-based analysis of linear models. Furthermore, there are new permutation methods (manly,draperStoneman, andstillWhite). - New object
brainGraphListfor a collection of all graphs at a single density/threshold. There are multiple S3 methods for this object, including the creation methodmake_brainGraphList. make_brainGraphis now a S3 method.- There are several new matrix utility functions.
invcalculates the the "unscaled covariance" matrix used in linear models.pinvcalculates the pseudoinverse.qrcalculates the QR decomposition for each matrix in a 3D array.colMax,colMin, andcolMaxAbscalculate the max, min, and max of the absolute value across matrix columns.is_binarydetermines if a matrix consists only of 0's and 1's.symmetrizeis now a S3 method.symm_meansymmetrizes a matrix using the mean of off-diagonal elements. - There are 4 new atlases:
hcp_mmp1.0(HCP multimodal atlas),power264,gordon333, andbrainnetome - New function
sim.rand.graph.hqsgenerates random graphs from random covariance matrices for structural covariance networks using the HQS algorithm. - New plotting function
slicerplots multiple graphs in a single figure. - Fewer package dependencies.
mean_distance_wtcalculates weighted shortest path lengths.
count_interlobaris replaced bycount_intermake_mediate_brainGraphis replaced by themake_brainGraphS3 method.plot_brainGraphis replaced by theplotS3 method forbrainGraphobjects.
2019-10-20
- The
mediationpackage no longer exportssummary.mediate, so it has to be removed frombrainGraph- Move
mediationto Suggests, as well
- Move
2019-06-29
- Fix bug in
import_scnso the Study.ID column is always read ascharacter - Remove deprecated function
brainGraph_init
2018-12-15
import_scnreplacesbrainGraph_init, with a few changes in behavior:- It is no longer necessary to abbreviate region names yourself; the function does it automatically
- Expects files with the name
${parcellation}_${hemi}_${modality}.csvin thedatadir- Here,
${parcellation}could beaparc, for example - Also,
${modality}could bethickness
- Here,
- If the atlas you are using includes
scgm, there should be aasegstats.csvfile
aopandloonow return S3 objects, with class nameIC- These also have
summaryandplotmethods - Furthermore, these objects return some more information
- These also have
- The
excludeargument toget.residis nowexclude.covto highlight that it is for specifying covariates to exclude from the GLM
2018-12-07
- Fix bug in
partition, changingmethodtopart.method - Add some checks in
robustnessso it doesn't throw an error
2018-09-04
- Fixed bug in
count_homologousthat affected a subset of atlases- Performance is modestly improved (approx. 2-3x faster)
count_interreplacescount_interlobar; the new function calculates inter- and intra-group edge counts, where a group of vertices can be a lobe, hemisphere, network (for thedosenbach160atlas), or class (for thedestrieuxatlases)- The return object is now more informative; the function returns a matrix of all inter- and intra-group edge counts, in addition to a data.table containing a summary (that matches the output of previous versions)
rich_corenow calculates the rich core for weighted networks- In addition, the function runs considerably faster:
- for smaller sparse graphs, it is ~40-80x faster
- for larger dense graphs, it is more than 2,000x faster
- In addition, the function runs considerably faster:
robustnessnow returns a data.table containing much more information (in addition to the max. connected component ratio)- This makes plotting outputs simpler; see Chapter 14 of the User Guide
- When
type='edge', the function is about 2-3x faster than previous versions
plot.mtpc: the stats displayed in the caption have been "transposed", such thatS.critandA.critare in the top row
2018-09-01
- Fixed regression bug in
NBS(introduced byv2.0.0) which only occurred ifalternative='less'when calculating the minimum statistic of permuted networks
- Updated code that symmetrizes matrices:
- Introduced new function,
symm_mean, that more quickly symmetrizes a matrix about the diagonal by assigningmean(c(A[i, j], A[j, i]))to the off-diagonal elements - Uses
pminandpmaxfor symmetrizing matrices based on the off-diagonal minimum and maximum, respectively
- Introduced new function,
- Optimized code in a few functions for faster execution:
sim.rand.graph.clustis about 2x faster due to improvement in thechoose.edgeshelper functioncentr_levandedge_asymmetryare also faster
2018-07-21
hubness: new function for determining which vertices are hubsset_brainGraph_attr- New argument
clust.methodlets the user choose which clustering (community detection) method to use.- The default is still the
louvainalgorithm. - If you select
spinglass, but the graph is unconnected, thenlouvainis used instead. - If there are any negative edge weights, and you choose anything other than
walktraporspinglass, thewalktrapmethod is used.
- The default is still the
- Now calculates
num.hubsusing the newhubnessfunction, and calculates separate values for weighted and unweighted networks
- New argument
2018-07-06
- Fixed bugs in
rich_club_normthat would throw an error if certain graph attributes weren't present
rich_club_all- new function that is a wrapper forrich_club_coeff, applying over all possible degree values
2018-06-25
- Fixed regression bug in
plot.brainGraph, which occurred when choosingplane='sagittal'
2018-06-22
- Fixed regression bug when fitting GLM models with a
F contrast - Fixed minor bug in
make_nbs_brainGraphwhich did not properly assign thep.nbsattribute to all vertices
- The elements of the
NBSoutput object,p.matandT.mat, are now 3-dimensional arrays (with extent equal to the # of contrasts) instead of lists of matrices
2018-06-20
- Fixed a bug in
brainGraph_permutethat I didn't catch before
2018-06-20
brainGraph_bootandcorr.matrix:- Incorrectly calculated
E.global.wtbefore; now it transforms edge weights - To do so, includes argument
xfm.type - Fixed bug when calling
corr.matrix(addedrand=TRUE) - Also had to update the return object of
corr.matrixfor this purpose
- Incorrectly calculated
mtpc- Previously gave some incorrect results when
alt='less'; fixed - The
plotmethod also now gives correct values whenalt='less'
- Previously gave some incorrect results when
brainGraph_GLMnow returns the correct null.thresh whenalt != 'greater'plot.brainGraph: fixed bug that occurred whenplane='sagittal'and ahemivalue was not suppliedplot_rich_norm: didn't plot values for all degrees present in the networks under certain scenarios
set_brainGraph_attrnow calculates a graph-levelLp.wt, which equals:
Lpv.wt <- distances(g)
Lpv.wt[is.infinite(Lpv.wt)] <- NA
g$Lp.wt <- mean(Lpv.wt[upper.tri(Lpv.wt)], na.rm=T)
plot_rich_norm: new argumentsmoothlets you plot with a smoother in the case of single-subject data, as opposed to the previous default of a line plot for all subjects
- GLM-related and other functions will now:
- Allow for the
Study.IDcolumn to be numeric; they will convert it to class character - Creates a character vector of integers if
Study.IDis not present in the data
- Allow for the
- The
summary.mtpcmethod now also prints the value ofclust.size
2018-05-28
- Moved
RGtk2andcairoDeviceto Suggests (from Depends) to allow installation on headless servers- Thanks to
@michaelhallquistfor the pull request!
- Thanks to
- Functions
boot_global,permute.group, andplot_group_meansare no longer accessible (deprecated since v2.0.0)
2018-05-03 (mostly changes to structural covariance network functionality)
- Fixed a bug in
mtpcthat was introduced inv2.0.1
brainGraph_GLM_designhas a new argumentfactorizewhich specifies whether or not to convert all character columns (excluding Study.ID) to factor variables. The default isTRUE. Previously, character columns were ignored.get.resid- In the function call, you can choose whether or not to test a linear model for all groups together or separately, via the
methodargument - The
plotmethod now returns a list of ggplot objects, and is similar to theplotmethods forbg_GLMandmtpc
- In the function call, you can choose whether or not to test a linear model for all groups together or separately, via the
corr.matrix- The
residsargument must be the output ofget.resid(not a data.table as before) - Correlations will be calculated separately for all subject groups (as this information is stored in the output of
get.resid); you no longer need to loop (orlapply) across groups - In the function call, you can choose whether to correlate the residuals or raw structural values, via the
whatargument - The
exclusionsargument was renamed toexclude.regto highlight that you should specify region names to be excluded (if any) - You can explicitly choose whether to calculate Pearson or Spearman correlations, via the
typeargument (previously, this behavior was "hidden")
- The
brainGraph_init: themodalityargument now will accept any character string; the default is still thickness. The files with the string you supply still must be present on your system.- Due to
corr.matrixexpecting different input, the following functions also require, for theirresidsargument, the output ofget.resid(instead of a data.table):aopbrainGraph_bootbrainGraph_permuteloo
2018-04-28
gateway_coeff: no longer throws an error for very sparse graphs; instead, it returns a vector withNaNvalues for unconnected verticesmake_mediate_brainGraph: did not return correct values (for the treatment condition) whenINT=TRUE(it recycled the values for the control condition)make_intersection_brainGraph- Previously exited with error if any of the input graphs did not contain vertices meeting the desired
subgraphcondition - Now returns an empty graph if none of the input graphs meet the
subgraphcondition
- Previously exited with error if any of the input graphs did not contain vertices meeting the desired
NBS:- When getting the indices for which matrix elements to transpose (so that result is symmetric), the result was slightly wrong for
alt='greater' - Calculation of edge counts in
summarymethod contained an error
- When getting the indices for which matrix elements to transpose (so that result is symmetric), the result was slightly wrong for
- All
summarymethods now provide aDT.sumelement in the returned list; previously it was inconsistent
2018-04-26
- In
mtpc, the stats table that is returned previously was not always unique mtpcdid not return a list with a named elementclust.size(it was unnamed)- In
plot.mtpc, if the user selected a contrast other than the first, it would not plot the correct null statistics (green dots)
2018-02-23
Release on CRAN; bugfix release.
- Fixed a bug in
create_matsin which the ordering (along the 3rd dimension) of the arrays inA.norm.subdid not match the ordering of the input matrix files (and therefore the ordering along the 3rd dimension of the arraysAandA.norm).- In the case that the input matrix files were already ordered by Group and Study.ID, then this is not a "bug", in that the ordering was already correct. So, if your subject groups are
groups <- c('Control', 'Patient'), and the matrix files are separated on the filesystem by group, there is no change in behavior. - This bug only appeared when
threshold.by='consistency'orthreshold.by='consensus'(the default option).
- In the case that the input matrix files were already ordered by Group and Study.ID, then this is not a "bug", in that the ordering was already correct. So, if your subject groups are
2018-02-07
- Fixed error in
mtpcwhen creating the MTPC statisticsdata.table
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.
- Mediation analysis is now possible through
brainGraph_mediate. - I have introduced some simple S3 classes and methods. All of the classes have
plot(exceptNBS) andsummarymethods. 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 |
- Multiple contrasts (in the same function call), as well as F-contrasts, are now allowed in the GLM-based functions:
brainGraph_GLM,mtpc,NBS, andget.resid.- There is a new function argument,
con.type, for this purpose. - Since both contrast types are now specified in the form of a contrast matrix, the argument
con.vechas been replaced bycon.mat.
- There is a new function argument,
- Designs with 3-way interactions (e.g.,
2 x 2 x 2) are now allowed for GLM-based analyses. - Permutations for GLM-based analyses are now done using the Freedman-Lane method (the same as in FSL's randomise and in PALM).
- Plot the "diagnostics" from GLM analyses through the
plot.bg_GLMmethod to the output ofbrainGraph_GLM. - Plot the statistics from MTPC analyses through the
plot.mtpcmethod formtpcresults. aophas a new argumentcontrol.valueallowing you to specify the control group; all comparisons will be to that group.- Removes the need to loop through patient groups in the console (if you have more than 1).
- Most of the GLM-based functions have a new argument,
long, which will not return all of the permutation results iflong=FALSE.
boot_globalwas renamed tobrainGraph_boot.check.residwas removed; you now just call theplotmethod to outputs ofget.resid.permute.group:- Function was renamed to
brainGraph_permute. - The arguments are slightly re-ordered
- Argument
permSetwas renamed toperms. - New argument
auclets you explicitly define whether or not you want statistics for the area under the curve (AUC).
- Function was renamed to
plot_bootwas removed; you now just call theplotmethod to outputs ofbrainGraph_boot.plot_brainGraph_mnihas been removed; this functionality can be changed by themniargument toplot.brainGraph(i.e., the plot method for objects of classbrainGraph)plot_group_meanswas renamed toplot_volumetric, as it works specifically for structural covariance networks.plot_perm_diffswas removed; you now just call theplotmethod to outputs ofbrainGraph_permute.
NBSnow automatically symmetrizes the input matrices. This is partly for speed and partly becauseigraphsymmetrizes the matrices anyway.- There is a new function argument,
symm.by(which is the same as that forcreate_mats) for this purpose.
- There is a new function argument,
corr.matrix:- Now expects as its first input the residuals from
get.resid. - You may specify multiple
densities(orthresholds), - Returns a list including the binarized, thresholded matrices as an array (still named
r.thresh).
- Now expects as its first input the residuals from
get.residnow allows for any design matrix for getting LM residuals (similar tobrainGraph_GLM).- Must supply a
data.tableof covariates. - You may pass on arguments to
brainGraph_GLM_designfor creating the correct design matrix.
- Must supply a
mtpcaccepts 2 new arguments (in addition to explicitly naming required arguments that pass on tobrainGraph_GLM):clust.sizelets you change the "cluster size", the number of consecutive thresholds needed to deem a result significant (default:3)res.glmlets you input theres.glmlist element from a previousmtpcrun. This is only useful if you would like to compare results with different values forclust.size.
permute.group(see above section for changes)rich_club_normnow returns adata.table, which simplifies working with the data (and plotting).set_brainGraph_attr: multiple (explicit) arguments were removed; these are now passed on tomake_brainGraphand can still be specified in the function call.- I now use the
ggrepelpackage for anyggplotobjects with text labels.
2017-09-14
brainGraph_init: fixed bug regarding the use of a custom atlas
- Some function arguments have been modified to reflect the object type (e.g., changing
gtog.listif the function requires a list object). brainGraph_init:- New argument
custom.atlasallows you to use an atlas that is not in the package (you must also specifyatlas="custom"). - This requires that the atlas you specify already be loaded into the R environment and meet the specifications of the package's atlases
- It should be a
data.table, and have columns name, x.mni, y.mni, z.mni, lobe, hemi (at a minimum).
- It should be a
- New argument
permute.group: can now calculateev.cent
2017-08-31
boot_global: fixed bug in modularity calculation
boot_global:- can omit display of the progress bar (by setting
.progress=FALSE) - can now create weighted networks; to do so, you must choose a weighted metric in the function argument
measure - added some weighted metrics as options for
measure(strength, mod.wt, E.global.wt) - can specify the confidence level (for calculating confidence intervals) via the
confargument (default: 0.95)
- can omit display of the progress bar (by setting
set_brainGraph_attr:- New argument
xfm.type, which allows you to choose how edge weights should be transformed for calculating distance-based metrics. - The default is the reciprocal (which is what was hard-coded in previous versions).
- Other options are:
1-w(subtract weights from 1); and-log(w)(take the negative natural logarithm of weights).
- New argument
symmetrize_array: a convenience function that appliessymmetrize_matsalong the third dimension of an arrayxfm.weights: utility function to transform edge weights (necessary when calculating distance-based metrics).
graph_attr_dtandvertex_attr_dtwill now includeweighting, if presentset_brainGraph_attrhas 2 new arguments:weightingwill create a graph-level attribute indicating how the edges are weighted (e.g., 'fa' for FA-weighted tractography networks)thresholdwill create a graph-level attribute indicating the (numeric) threshold used to create the network (if applicable)
2017-06-10
mtpc: fixed a bug that would incorrectly calculateA.crit
apply_thresholds: threshold an additional set of matrices (e.g., FA-weighted matrices in DTI tractography) based on a set of matrices that have already been thresholded (e.g., streamline-weighted matrices in DTI tractography)
analysis_random_graphs: no longer requires a covars argument
2017-04-30
create_mats- fixed bug for deterministic tractography when the user would like to normalize the matrices by ROI size.
- Fixed bug for when
threshold.by='density'. Previously, it would keep the top X% for each subject
create_matsthreshold.by='consensus'is the name of the new default, as this is what is called "consensus-based" thresholding in the literature.threshold.by='consistency'is a new option, for performing consistency-based thresholding. See Roberts et al., 2017.
set_brainGraph_attrno longer calculates the graph's clique number, which takes exceedingly long in denser and/or larger graphs (e.g.,craddock200)
2017-04-29
plot_brainGraph: now returnsNA(instead of throwing an error) if the specified subgraph expression results in a network with 0 vertices.edge_asymmetryfixed bug when the input graph had only one contralateral connection (usually only encountered in the GUI with neighborhood plots)
create_mats: you can specifythreshold.by='mean', which will threshold the matrices such that a connection will be kept ifmean(A_ij) + 2*sd(A_ij) > mat.thresh, for each ofmat.thresh.
make_empty_brainGraph: this is not a new function, but rather was not exported in previous versionss_core: calculate the s-core membership of a graph's vertices (Eidsaa & Almaas, 2013)- Adds a vertex attributes called
s.coreto the graph throughset_brainGraph_attr. - Analogous to the k-core but for weighted networks.
- The vertex attribute for k-core has been changed from
corenesstok.coreto distinguish these metrics.
- Adds a vertex attributes called
2017-04-22
plot_brainGraph_guihad multiple issues and a few features have been changed:- Overall execution should be faster than in previous versions
- Lobe, neighborhood, and community selection are now in "scrolled windows" instead of drop-down lists. Multiple selections can be made either by pressing
Ctrland clicking, or by holdingShiftand moving the arrow keys - Fixed problem with vertex colors
- When choosing to plot neighborhoods, you can color the vertices based on which neighborhood they belong to (useful if multiple vertices are selected)
gateway_coeffreturned an error if the number of communities equals 1; this has been fixed
centr_betw_comm: calculate vertex communicability betweenness centrality (Estrada et al., 2009)communicability: calculate network communicability (Estrada & Hatano, 2008)mtpc: the multi-threshold permutation correction (MTPC) method for statistical inference of either vertex- or graph-level measures (Drakesmith et al., 2015)symmetrize_mats: symmetrize a connectivity matrix by either the maximum, minimum, or average of the off-diagonal elements. You may select one of these as an argument tocreate_mats.
brainGraph_GLMhas 2 new function arguments:levelallows you to perform inference for graph- or vertex-level measurespermslets you specify the permutation set explicitly
create_mats: AllA.norm.submatrices will be symmetrized, regardless of the value ofthreshold.by(previously they were only symmetrized if usingthreshold.by='density').- This should not pose a problem, as the default (to take the maximum of the off-diagonal elements) is also the default when creating graphs in
igraph.
- This should not pose a problem, as the default (to take the maximum of the off-diagonal elements) is also the default when creating graphs in
get.resid: no longer requires a covars argument, as it was redundantsim.rand.graph.par: the argument clustering is no longer TRUE by default
2017-04-10
First major release; Fifth CRAN release
plot_perm_diffspreviously didn't work with a low number of permutations, but now will work with any numbersim.rand.graph.parpreviously didn't work with graphs lacking adegreevertex attribute- Fixed problem with
plot_brainGraph_GUIwhen plotting in the sagittal view for neighborhood graphs
- Multiple functions now run significantly faster after I updated the code to be more efficient
permute.group.auchas been removed, and nowpermute.groupaccepts multiple densities and returns the same results. It can still take a single density for the old behavior- The
lobeandnetworkvertex attributes are now character vectors NBSnow handles more complex designs and contrasts throughbrainGraph_GLM_designandbrainGraph_GLM_fit. The function arguments are different from previous versionsSPMhas been removed and is replaced bybrainGraph_GLM- Added atlas
craddock200(with coordinates fromDPABI/DPARSF)
brainGraph_GLM: replacesSPMand allows for more complex designs and contrastsbrainGraph_GLM_design: function that creates a design matrix from adata.tablebrainGraph_GLM_fit: function that calculates the statistics from a design matrix and response vectorcreate_mats: replacesdti_create_matsand adds functionality for resting-state fMRI data; also can create matrices that will have a specific graph densitygateway_coeff: calculate the gateway coefficient (Vargas & Wahl, 2014); graphs will have vertex attributesGCorGC.wt(if weighted graph)plot_brainGraph_multi: function to write a PNG file of 3-panel brain graphs (see User Guide for example)
efficiencyreplacesgraph.efficiency; the old function name is still accessible (but may be removed eventually)set_brainGraph_attrreplacesset.brainGraph.attributes; the old function name is still accessible (but may be removed eventually)part_coeffreplacespart.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.normis nowrich_club_norm, etc. set_vertex_colorandset_edge_colorreplacecolor.verticesandcolor.edges(these functions are not exported, in any case)contract_brainGraphreplacesgraph.contract.brainmake_ego_brainGraphreplacesgraph_neighborhood_multiple(so it is a similar name to igraph's functionmake_ego_graph)write_brainnetreplaceswrite.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)
2016-10-10
Fourth CRAN release
sim.rand.graph.clustpreviously returned a list; now it correctly returns anigraphgraph objectaopandloo: regional contributions were calculated incorrectly (without an absolute value)rich.club.norm: changed the p-value calculation again; this shouldn't affect many results, particularly if N=1,000 (random graphs)NBS:- the
t.statedge attribute was, under certain situations, incorrectly assigning the values; this has been fixed in the latest version - fixed bug when permutations didn't result in any connected components
- fixed bug w/ data randomization; the bug didn't seem to affect the results
- the
SPM:- the permutation p-values were previously incorrect; has been fixed
- added an argument to remove
NAvalues
vec.transform: fixed bug which occurred when the input vector is the same number repeated (i.e., whenrange(x) = 0)
dti_create_mats: new function argumentalgocan be used to specify either 'probabilistic' or 'deterministic'. In the case of the latter, when dividing streamline count by ROI size, you can supply absolute streamline counts with themat.threshargument.- Changed instances of
.paralleltouse.parallel; also, added it as an argument toset.brainGraph.attributesto control all of the functions that it calls; also added the argument topart.coeffandwithin_module_deg_z_score - Added atlases
aal2.94,aal2.120, anddosenbach160 plot_brainGraph: can now specify the orientation plane, hemisphere to plot, showing a legend, and a character string of logical expressions for plotting subgraphs (previously was inplot_brainGraph_list)
auc_diff: calculates the area-under-the-curve across densities for two groupscor.diff.test: calculates the significance of the difference between correlation coefficientspermute.group.auc: does permutation testing across all densities, and returns the permutation distributions for the difference in AUC between two groupsrich.club.attrs: give a graph attributes based on rich-club analysis
- Removed the
x,y, andzcolumns from the atlas data files; now only the MNI coordinates are used. This should simplify adding a personal atlas to use with the package - Added a column,
name.fullto some of the atlas data files NBS:- New edge attribute
p, the p-value for that specific connection - Returns the
p.initvalue for record-keeping
- New edge attribute
brainGraph_init: can now provide acovarsdata table if you want to subset certain variables yourself, or if the file is named differently fromcovars.csvplot_brainGraph: can now manually specify a subtitle;plot_brainGraph_gui:- Option for specifying maximum values for edge widths
plot_corr_mat: color cells based on weighted community or networkplot_global:- legend position is now "bottom" by default
- can specify
xvarto be either "density" or "threshold"; if the latter, the x-axis is reversed - If data has a
Study.IDcolumn, theggplot2functionstat_smoothis used and the statistic is based on a generalized additive model
plot_perm_diffs: added argumentaucfor using the area-under-the-curve across densitiesplot_rich_norm:- Added argument
fdrto choose whether or not to use FDR-adjusted p-values - Should work for more than 2 groups
- Now works with multi-subject data; collapses by Group and plots the group mean
- Added argument
plot_vertex_measures: can facet by different variables (e.g., lobe, community, network, etc.)set.brainGraph.attributes:- calculate graph
strength, which is the mean of vertex strength (weighted networks) - Invert edge weights for distance-based measures
- calculate graph
write.brainnet:- Now allows for writing weighted adjacency matrices, using the
edge.wtfunction argument - Can color vertices by multiple variables
- Now allows for writing weighted adjacency matrices, using the
2016-04-22
Third CRAN release
rich.club.normhad a bug in calculating the p-values. If you have already gone through the process of creating random graphs and the objectphi.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.
- Now requires the package
RcppEigenfor fast linear model calculations; resulted in major speed improvements - Now requires the package
permutefor theNBSfunction group.graph.diffs:- Uses the function
fastLmPurefromRcppEigenfor speed/efficiency - Can specify multiple alternative hypotheses
- Linear model specification is more limited now, though
- Uses the function
- Added data table for the
destrieux.scgmatlas
SPM: new function that replaces and improves upon bothgroup.graph.diffsandpermute.vertexNBS: implements the network-based statisticanalysis_random_graphs: perform all the steps for getting small-world parameters and normalized rich-club coefficients and p-valuesplot_global: create a line plot across all densities of global graph measures in the same figurevertex_spatial_dist: calculates the mean edge distance for all edges of a given vertex
dti_create_mats: changed a few argumentsedge_spatial_dist: re-named fromspatial.distgroup.graph.diffs: returns a graph w/ spatial coord's for plottingplot_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
- You can now specify a condition for removing vertices (e.g.
- 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.byto group the plots by either "density" (default) or "threshold" (for multi-subject, e.g. DTI data)
- New argument
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
2015-12-24
Second CRAN release
aopandloocalculate measures of individual contribution (see Reference within the function help)- Now requires the package
ade4
- Now requires the package
plot_boot: new function based on the removed plotting code fromboot_globalplot_rich_norm: function to plot normalized rich club coefficient curves
-
boot_global:- added an OS check to get multicore functionality on Windows
- removed the code that created some plots
- updated to work with the newer version of
corr.matrix
-
brainGraph_init:- does a better job of dealing with subcortical gray matter data
- now also returns the "tidied" dataset
-
corr.matrix:- was basically reverted back for speed purposes
- minor syntax change
-
count_interlobarno longer takesatlas.dtas an argument -
dti_create_matsnow accepts argumentPfor "number of samples" -
edge_asymmetrynow works on Windows (changed from mclapply to foreach) -
get.resid:- got a complete overhaul; now works with data.table syntax
- now returns data.table of residuals with a Study.ID column
- fixed minor bug when
use.mean=FALSEbut covars has columns mean.lh and/or mean.rh; fixed minor bug w/ RH residual calculation - fixed bug when
use.mean=TRUE(syntax error for RH vertices)
-
graph.efficiency: now works on Windows (changed from mclapply to foreach) -
part.coeff: has a workaround to work on Windows -
permute.group:- updated to work with new version of
corr.matrix - no longer takes
atlas.dtas an argument
- updated to work with new version of
-
vertex_attr_dtis now essentially a wrapper forigraph's functionas_data_frame -
Exported
plot_perm_diffs -
Added argument checking for most functions
2015-12-08
Initial CRAN release