network_tda_tutorial

This repository is dedicated for the tutorial on network and topological neuroscience.

https://github.com/multinetlab-amsterdam/network_tda_tutorial

Science Score: 49.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 8 DOI reference(s) in README
  • Academic publication links
    Links to: springer.com, zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.0%) to scientific vocabulary

Keywords

fmri graph-theory neuroimaging neuroscience tda topological-data-analysis
Last synced: 6 months ago · JSON representation

Repository

This repository is dedicated for the tutorial on network and topological neuroscience.

Basic Info
  • Host: GitHub
  • Owner: multinetlab-amsterdam
  • License: gpl-3.0
  • Language: HTML
  • Default Branch: main
  • Homepage: https://lindadouw.com/
  • Size: 201 MB
Statistics
  • Stars: 68
  • Watchers: 3
  • Forks: 24
  • Open Issues: 2
  • Releases: 1
Topics
fmri graph-theory neuroimaging neuroscience tda topological-data-analysis
Created about 5 years ago · Last pushed about 2 years ago
Metadata Files
Readme License Citation

README.md

Notebook for Network and Topological Analysis in Neuroscience

Project Status: Active  The project has reached a stable, usable state and is being actively developed. GLP-3.0 License Python 3.7+

Stars Watchers

DOI

Authors: Eduarda Centeno & Fernando Santos

Contact information: e.centeno@amsterdamumc.nl or f.nobregasantos@amsterdamumc.nl


Table of contents

  1. General information
  2. Requirements
  3. How to install
  4. Notes
  5. Acknowledgements

General information:

The primary purpose of this project is to facilitate the computation of Network Neuroscience metrics using Graph Theory and Topological Data Analysis.


This repository is a supplement to the preprint A hands-on tutorial on network and topological neuroscience and the final version published at Brain Structure and Function. It was also published as a book chapter at the International Conference on Geometric Science of Information.

In 2023, this work received two awards: an award under the Open Educational Resources category at the OSCAwards ceremony, and it was ranked first for the Best Paper Award given by Brain Structure and Function. Moreover, it was part of the application for a third award: the Neuro Irv and Helga Cooper Foundation Open Science Trainee Prize.


We divided this notebook into two parts:

  1. The first part contains the standard computations of network and TDA metrics and visualizations.
  2. The second part is dedicated to the 3D visualizations developed by our group.

A video created with our 3D brain plots!


Requirements:

Here we will describe the core packages that will be necessary, but due to dependency compatibilities, we have provided a requirements.txt with all packages needed to be installed in a new Anaconda environment.

- Python: 3.x
- Numpy: 1.18.5
- Matplotlib: 3.3.2
- Meshio: 4.0.16 --- https://pypi.org/project/meshio/
- Seaborn: 0.11.0
- Pandas: 1.1.3
- Networkx: 2.4
- Nxviz: 0.6.2  --- For CircosPlot to work fully, we recommend installing through https://github.com/eduardacenteno/nxviz/
- Community (python-louvain): 0.13 --- https://python-louvain.readthedocs.io/en/latest/api.html
- Gudhi: 3.4.1 --- http://gudhi.gforge.inria.fr/
- Plotly: 4.6.0
- Scikit-learn: 0.24.1
- Scipy: 1.5.0
- JupyterLab: 1.2.0 --- This is very important; otherwise, plotly will not work as we intended. (https://plotly.com/python/getting-started/)

How to install:

We recommend creating a new environment in Anaconda dedicated for the use of these notebooks (Primarly tested on Windows/Linux).

  1. Create a new Anaconda environment with the correct python version (in Anaconda prompt or navigator)

  2. Activate the new environment in the command line (Anaconda prompt)

conda activate envname

  1. Change to the notebook's directory

cd path\to\notebookfolder

  1. Install packages using pip in Anaconda prompt

** with environment-specific python.exe (Windows) path\to\anaconda3\envs\envname\python.exe -m pip install -r requirements.txt ** MacOS users do not need to give the path to the environment's python.exe pip install -r requirements.txt

  1. Add jupyter-plotly labextension (key for 3D visualization)

jupyter labextension install jupyterlab-plotly

Troubleshooting:

  1. Permission error and suggestion to use --user (possibly because the user did not use environment-specific python.exe)

    Try opening the prompt command as admin.

    Using pip install anaconda before installing packages will potentially solve the issue.

  2. Jupyter Lab is asking for Node.js 5+.

    Using conda install nodejs will potentially solve the issue.


Web-based options:

| Nbviewer | Jupyter Notebook | Jupyter Lab*| HTML | | --- | -- | --- | --- | | 1-network_analysis.ipynb | Binder | Binder | HTML | | 2-visualization_3d.ipynb | Binder | Binder | HTML |

* Binder is not building correctly plotly extensions in Jupyter Lab; therefore, 3D visualizations in the second notebook can only be seen using the jupyter notebook option!


Notes:

The jupyter notebooks can throw some warnings due to package updates and resulting deprecations. It is possible to use the following code lines to ignore these warnings:

``` import warnings

warnings.filterwarnings('ignore') ```


Acknowledgements:

The 1000FunctionalConnectomes dataset was downloaded from the The UCLA multimodal connectivity database.

Brown JA, Rudie JD, Bandrowski A, Van Horn JD, Bookheimer SY. The UCLA multimodal connectivity database: a web-based platform for brain connectivity matrix sharing and analysis. Frontiers in neuroinformatics. 2012 Nov 28;6:28. (http://dx.doi.org/10.3389/fninf.2012.00028)

Biswal BB, Mennes M, Zuo XN, Gohel S, Kelly C, Smith SM, Beckmann CF, Adelstein JS, Buckner RL, Colcombe S, Dogonowski AM. Toward discovery science of human brain function. Proceedings of the National Academy of Sciences. 2010 Mar 9;107(10):4734-9. Freely available dataset

Rule A, Birmingham A, Zuniga C, Altintas I, Huang SC, Knight R, Moshiri N, Nguyen MH, Rosenthal SB, Prez F, Rose PW. Ten simple rules for writing and sharing computational analyses in Jupyter Notebooks. https://github.com/jupyter-guide/ten-rules-jupyter

Owner

  • Name: MULTINETLAB
  • Login: multinetlab-amsterdam
  • Kind: organization
  • Email: l.douw@amsterdamumc.nl
  • Location: Amsterdam

GitHub Events

Total
  • Watch event: 12
  • Fork event: 2
Last Year
  • Watch event: 12
  • Fork event: 2

Dependencies

requirements.txt pypi
  • gudhi ==3.3.0
  • ipykernel *
  • jupyterlab *
  • latexcodec *
  • meshio ==4.0.16
  • nbclient *
  • nbconvert *
  • nbformat ==5.0.8
  • networkx ==2.4
  • nodejs *
  • npm *
  • numpy ==1.18.5
  • pandas ==1.1.3
  • pip *
  • plotly ==4.6.0
  • python-louvain ==0.13
  • scikit-learn >=0.23.1
  • scipy ==1.5.0
  • seaborn ==0.11.0
  • setuptools *
  • tqdm ==4.51.0
  • watermark ==2.1.0
requirements_full.txt pypi
  • Cython ==0.29.15
  • Jinja2 *
  • MarkupSafe ==1.1.1
  • Pillow *
  • PySocks ==1.7.1
  • PyYAML ==5.3.1
  • Pygments ==2.7.2
  • Send2Trash ==1.5.0
  • Sphinx ==3.2.1
  • Werkzeug ==1.0.1
  • anaconda *
  • argon2-cffi ==20.1.0
  • asn1crypto ==1.4.0
  • async-generator ==1.10
  • atomicwrites ==1.4.0
  • attrs ==20.2.0
  • backcall ==0.2.0
  • backports.functools-lru-cache ==1.6.1
  • bleach *
  • brotlipy ==0.7.0
  • certifi ==2020.11.8
  • cffi ==1.14.3
  • chardet ==3.0.4
  • colorama ==0.4.4
  • cryptography *
  • cycler ==0.10.0
  • decorator ==4.4.2
  • defusedxml ==0.6.0
  • entrypoints ==0.3
  • gudhi >=3.3.0
  • hypothesis ==5.8.3
  • idna ==2.10
  • importlib-metadata ==2.1.1
  • ipykernel ==5.3.4
  • ipympl ==0.3.1
  • ipython ==7.18.1
  • ipython-genutils ==0.2.0
  • ipywidgets ==7.5.1
  • jedi ==0.17.2
  • joblib ==0.17.0
  • json5 ==0.9.5
  • jsonschema ==3.2.0
  • jupyter-client ==6.1.7
  • jupyter-core ==4.6.3
  • jupyterlab ==1.2.0
  • jupyterlab-pygments ==0.1.2
  • jupyterlab-server ==1.0.6
  • kiwisolver ==1.2.0
  • latexcodec ==2.0.1
  • libarchive-c ==2.9
  • matplotlib ==3.3.2
  • meshio ==4.0.16
  • mistune ==0.8.4
  • more-itertools ==8.2.0
  • nbclient ==0.5.1
  • nbconvert ==6.0.7
  • nbformat ==5.0.8
  • nest-asyncio ==1.4.1
  • networkx ==2.4
  • nodejs ==0.1.1
  • notebook *
  • npm ==0.1.1
  • numpy ==1.18.5
  • olefile ==0.46
  • optional-django ==0.1.0
  • packaging ==20.4
  • palettable ==3.3.0
  • pandas ==1.1.3
  • pandocfilters ==1.4.2
  • parso ==0.7.1
  • pickleshare ==0.7.5
  • pip *
  • plotly ==4.6.0
  • pluggy ==0.13.1
  • prometheus-client ==0.8.0
  • prompt-toolkit ==3.0.8
  • py ==1.9.0
  • pyOpenSSL ==19.1.0
  • pycparser ==2.20
  • pyparsing ==2.4.7
  • pyrsistent ==0.17.3
  • pytest ==5.4.1
  • python-dateutil ==2.8.1
  • python-louvain ==0.13
  • pytz ==2020.1
  • pywin32-ctypes ==0.2.0
  • pywinpty ==0.5.7
  • pyzmq ==19.0.2
  • requests ==2.24.0
  • retrying ==1.3.3
  • rope ==0.18.0
  • rsa ==4.6
  • scikit-learn >=0.23.1
  • scipy ==1.5.0
  • seaborn ==0.11.0
  • six ==1.15.0
  • snowballstemmer ==2.0.0
  • sortedcontainers ==2.3.0
  • soupsieve ==2.0.1
  • sphinxcontrib-applehelp ==1.0.2
  • sphinxcontrib-devhelp ==1.0.2
  • sphinxcontrib-fulltoc ==1.2.0
  • sphinxcontrib-htmlhelp ==1.0.3
  • sphinxcontrib-jsmath ==1.0.1
  • sphinxcontrib-qthelp ==1.0.3
  • sphinxcontrib-serializinghtml ==1.1.4
  • spyder ==3.3.4
  • spyder-kernels ==0.4.4
  • statsmodels ==0.12.0
  • tensorboard ==2.3.0
  • tensorboard-plugin-wit ==1.7.0
  • tensorflow *
  • tensorflow-estimator >=2.3.0
  • termcolor ==1.1.0
  • testpath ==0.4.4
  • threadpoolctl ==2.1.0
  • toml ==0.10.1
  • tornado >=6.0.4
  • tqdm ==4.51.0
  • traitlets ==5.0.5
  • typed-ast ==1.4.1
  • urllib3 ==1.25.11
  • watermark ==2.1.0
  • wcwidth ==0.2.5
  • webencodings ==0.5.1
  • wheel ==0.36.0
  • widgetsnbextension ==3.5.1
  • win-inet-pton ==1.1.0
  • wincertstore ==0.2
  • zipp ==3.4.0