Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A tutorial of how to build networks with brainGraph #37

Closed
Clancy-wu opened this issue May 11, 2024 · 3 comments
Closed

A tutorial of how to build networks with brainGraph #37

Clancy-wu opened this issue May 11, 2024 · 3 comments

Comments

@Clancy-wu
Copy link

Hope this finds you well.
I want to introduce my tutorial on building multiple networks and save the data table to excel csv file.
Since igraph has delete the function 'as_adjacency_matrix()' and some of you may come up with this problem in your new R (for example, I used R 4.4.0), I have updated my tutorial to overcome this issue and also showed how to build networks with brainGraph (https://github.com/Clancy-wu/brainGraph_tutorial)

The steps I used:
(1) use fmriprep+xcp_d to process functinal images, get MNI bold nii.gz
(2) use qsiprep to process difussion iamges, get tck file
(3) use pearsonr to construct functional network and use sift2_invnodevol_count to construct fiber network.
(4) split the functional and fiber networks to raw network, positive network, and negative network.
(5) use brainGraph to compute network properties and save results to csv file. Note that this netowrk files are .txt format.

The brainGraph is great, but not good enough. I think that most issues of it are actually from R software, not brainGraph itself.

@szhorvat
Copy link

szhorvat commented May 12, 2024

Since igraph has delete the function 'as_adjacency_matrix()'

This is incorrect. This function was not removed, and will not be removed from igraph.

@Clancy-wu
Copy link
Author

Yeah, you are right. I'm sorry for my unclear words.
The function 'as_adjacency_matrix()' was no longer to support attributions of character in version 2.0.0 (https://r.igraph.org/news/index.html).
I reports this function because when I install the brainGraph 3.0.0 in the R 4.4.0 with my ubuntu 20.04 system, the R terminal reminds me errors of using 'as_adjacency_matrix()' which can't be worked in igraph upper version 2.0.0.
Therefore, I recommend the following code to run brainGraph with new version of R:

'# remotes::install_version("igraph", version = "1.6.0")'
'library(igraph) # 1.6.0'
'packageVersion("igraph") # 1.6.0'

@Clancy-wu
Copy link
Author

Results comparison between GRETNA and brainGraph:

computation config

GRETNA (weighted)

image

GRETNA (binary)

image

brainGraph

image

Results Comparison

GRETNA (weighted)

image

GRETNA (binary)

image

brainGraph

image

Conclusion

(1) Density in brainGraph = Network Sparsity in GRETNA = rate threshold (contrast with fixed threshold)
(2) Results of brainGraph are same to GRETNA
(3) In brainGraph, the indicator with ‘wt’ represents ‘weighted’ and without ‘wt’ represents ‘binary’
(4) I recommend to use brainGraph rather than GRETNA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants