tfardet/NNGT
1
0
Fork
You've already forked NNGT
0
Unified generation and analysis of networks in Python, with neuroscientific additions https://nngt.readthedocs.io/en/latest
  • Python 77.6%
  • Emacs Lisp 19.8%
  • Cython 1.3%
  • C++ 1.3%
Tanguy Fardet 4c1da2502d Version 2.8.0: support numpy >= 2
NNGT now equires matplotlib >= 3.6 and igraph >= 0.10.
**Improvements and bugfixes**
- improved colorbar for plots
- fix fallback if requested backend fails
- avoid zero width/height shapes
- improve shape falback if shapely is missing
**Compatibility**
- better matplotlib compatibility for graph-tool and igraph
- move to np.nan instead of NaN for numpy 2
- move to ``packaging`` instead of ``pkg_resources``
**Maintenance and cleanup**
- update build tests and args in setup.py and pyxbld
- remove use of old numpy random (randint/get_state)
- remove some unused imports
- ability to run compatibility tests for a subset of backends
- use venv for CI
- skip graph-tool in tests until it is fixed
- fix documentation
2024年06月22日 22:43:14 +02:00
.reuse Use pyproject.toml and make REUSE compliant 2023年03月04日 10:34:38 +01:00
doc Version 2.8.0: support numpy >= 2 2024年06月22日 22:43:14 +02:00
extra Make installation more resilient 2024年02月05日 22:56:02 +01:00
LICENSES Use pyproject.toml and make REUSE compliant 2023年03月04日 10:34:38 +01:00
nngt Version 2.8.0: support numpy >= 2 2024年06月22日 22:43:14 +02:00
testing Version 2.8.0: support numpy >= 2 2024年06月22日 22:43:14 +02:00
.build.yml Version 2.8.0: support numpy >= 2 2024年06月22日 22:43:14 +02:00
.coveragerc Use pyproject.toml and make REUSE compliant 2023年03月04日 10:34:38 +01:00
.gitignore Version 2.8.0: support numpy >= 2 2024年06月22日 22:43:14 +02:00
.gitmodules Use pyproject.toml and make REUSE compliant 2023年03月04日 10:34:38 +01:00
.readthedocs.yml Doc: fix build 2023年09月18日 09:18:32 +02:00
MANIFEST.in Use pyproject.toml and make REUSE compliant 2023年03月04日 10:34:38 +01:00
pyproject.toml Version 2.8.0: support numpy >= 2 2024年06月22日 22:43:14 +02:00
README.md Maintenance: scipy, graph-tool, mplbackend updates 2023年09月17日 22:08:40 +02:00
requirements.txt Improved config 2024年01月28日 09:00:43 +01:00
setup.py Version 2.8.0: support numpy >= 2 2024年06月22日 22:43:14 +02:00

NNGT: a unified interface for networks in python

Logo of NNGT: a conceptual sketch of a pyramidal neuron linked to three simple circular nodes to form a graph.

CI status REUSE compliant Coverage Status Documentation Status License: GPLv3+
DOI PyPI

The Neural Networks and Graphs' Topology (NNGT) module provides tools to generate and study graphs and detailed biological networks. It also lets user interface efficient graph libraries with highly distributed activity simulators to make the study of neuronal activity as easy and efficient as possible.

Source code is available and contributions are accepted on SourceHut (preferred), Codeberg, and GitHub.

For questions or issues, please check the mailing list and the issue tracker.

Principle

NNGT provides a unified interface that acts as a wrapper for 3 major graph libraries in Python: networkx, igraph, and graph-tool.

Use the same code, run it at home on the latest linux with graph-tool, then on your collaborator's laptop with networkx on Windows, no changes required!

In addition to this common interface, NNGT provides additional tools and methods to generate complex neuronal networks. Once the networks are created, they can be seamlessly sent to the nest-simulator, which will generate activity. This activity can then be analyzed together with the structure using NNGT.

Eventually, NNGT is also able to import neuronal networks generated using the DeNSE simulator for neuronal growth.

Install and use the library

NNGT requires Python 3.5+ since version 2.0, and is directly available on Pypi. To install it, make sure you have a valid Python installation, then do:

pip install nngt

If you want to use it with advanced geometry, geospatial or other tools, you can use the various extra to automatically download the relevant dependencies keep only one of the listed possibilities)

pip install nngt[matplotlib|nx|ig|geometry|geospatial]

To install all dependencies, use pip install nngt[full].

To use it, once installed, open a Python terminal or script file and type

import nngt

If you want to have the latest updates before they are released into a stable version, you can install directly from main via:

pip install --user git+https://git.sr.ht/~tfardet/NNGT@main

Support and bug reports

For general questions or support, you can write the mailing list.

If you stumble on bugs you can report them on the issue tracker.

Cloning/updating the repository

This repository includes the PyNCultures package from the SENeC initiative as its geometry module, using the git submodule feature. It also uses mpl_chord_diagram whithin the plot module. Thus, when cloning the repository, you must do:

git clone https://git.sr.ht/~tfardet/NNGT
cd NNGT && git submodule init && git submodule update

To update your local repository, do:

git pull
git submodule update --remote --merge

Features

Compatibility

  • Currently supports graph-tool (>= 2.46), igraph, and networkx (>= 2.4).
  • Interactions with NEST and DeNSE.

Status

  • Standard functions and graph generation algorithms.
  • Special methods for graph analysis on weighted directed networks.
  • Full support for node and edge attributes.
  • Extended I/O features as well as graphical representations.
  • Advanced methods to design neuronal networks.
  • Supports complex 2D structures with shapely.

See documentation on ReadTheDocs.