Open wingedRuslan opened 5 years ago
Thanks @wingedRuslan!!
This code comes from https://github.com/KirstieJane/NSPN_WhitakerVertes_PNAS2016 which is the code and data to reproduce "Adolescence is associated with genomically patterned consolidation of the hubs of the human brain connectome" (doi: 10.1073/pnas.1601745113).
You can read the application that funded @Islast to start the re-factoring work for this project at https://whitakerlab.github.io/resources/Mozilla-Science-Mini-Grant-June2017.
The supplementary materials for the PNAS paper (https://www.pnas.org/content/pnas/suppl/2016/07/21/1601745113.DCSupplemental/pnas.1601745113.sapp.pdf) contain a lot of useful information. Specifically the "Structural covariance and network analyses" section at the top of page 6 should answer some of your questions. Figure S6 is also quite useful.
a
: assortativityC
: clusteringE
: efficiencyL
: shortest pathM
: modularitysigma
: small world measureThis page is also really useful: https://sites.google.com/site/bctnet/measures/list. Some of this code has been translated into python, but networkx will also do quite a bit of the work for us!
Here's a link to the code (that hasn't been translated to the scona module yet) that explains how to get the different layout coordinates: https://github.com/WhitakerLab/scona/blob/2c0f8ec88338757e9bc0608e0002e618efed8148/scona/make_figures.py#L74. This wikipedia page looks ok: https://en.wikipedia.org/wiki/Anatomical_terms_of_neuroanatomy#Planes_and_axes, but this video might be interesting to watch too: https://www.youtube.com/watch?v=f_hxX_xvHQY.
G_edge
is a copy of G
but probably with a different threshold. If you show all the edges it looks super messy, so in the PNAS paper I used a 2% threshold: https://github.com/KirstieJane/NSPN_WhitakerVertes_PNAS2016/blob/5c9c46caf91768d4cadec2b24078b640f05d3d76/SCRIPTS/make_figures.py#L777
The sort_partition
function came from here: https://github.com/KirstieJane/NSPN_CODE/blob/ba8ac4cf42b1aec76030ce67945d95a625107ff0/networkx_functions.py#L16 🙀 🙀 🙀 That one was really tough to search for 😭.
I hope this is useful!
Here's a figure with continuous colours https://github.com/KirstieJane/NSPN_WhitakerVertes_PNAS2016/blob/master/CT_MT_ANALYSES/COMPLETE/FIGS/COVARS_none/Figure4_LowRes.jpg
[ ] 1)
graph_measures/calculate_global_measures
returnsdics
of average_clustering, average_shortest_path_length, assortativity, modularity, and efficiency of G , but thescripts/make_figures/plot_network_measures
plotsWhat are these values 'a', 'M', 'E', 'C', 'L', 'sigma'? I suppose 'E' - 'efficiency', 'M' - 'modularity' but others...
[ ] 2)
scripts/make_figures/plot_sagittal_network
What are the inputs G_edge, sagittal_pos, axial_pos?Also there is unresolved reference to
sort_partition
, this function is not defined within the project and is not available fromnetworkx
. So I just can't figure out why it is needed to calculate the number of modules