Skip to main content

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.

Release files for NNGT 2.8.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for NNGT 2.8.0
File
NNGT-2.8.0-cp312-cp312-manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64 Details
NNGT-2.8.0-cp311-cp311-manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ x86-64 Details
NNGT-2.8.0-cp310-cp310-manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.28+ x86-64 Details
NNGT-2.8.0-cp39-cp39-manylinux_2_28_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.28+ x86-64 Details
NNGT-2.8.0-cp38-cp38-manylinux_2_28_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.28+ x86-64 Details
NNGT-2.8.0-cp37-cp37m-manylinux_2_28_x86_64.whl CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.28+ x86-64 Details

Total release size:10.5 MB

Release files / NNGT-2.8.0-cp312-cp312-manylinux_2_28_x86_64.whl

Download URL NNGT-2.8.0-cp312-cp312-manylinux_2_28_x86_64.whl
Size 1.8 MB
Tags CPython 3.12 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
44b8f3b2b3647ac8b4de39cb7c1ec6250a48f93b21662c1e231fb2a4adec53bc
BLAKE2b-256 checksum
How to use checksums
371b366cfca37de1efdb07e11148874600905b77bc1796513a82cffd027fa76f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.12.3

Release files / NNGT-2.8.0-cp311-cp311-manylinux_2_28_x86_64.whl

Download URL NNGT-2.8.0-cp311-cp311-manylinux_2_28_x86_64.whl
Size 1.8 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
43b832b0d4ba31c8e4d95949b3392004496971a5c18341411f1017a5ffb415a4
BLAKE2b-256 checksum
How to use checksums
2f391f3eca5523e2763294190248ae3a89dcf5382e7c0655baa37198e8e64460
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.12.3

Release files / NNGT-2.8.0-cp310-cp310-manylinux_2_28_x86_64.whl

Download URL NNGT-2.8.0-cp310-cp310-manylinux_2_28_x86_64.whl
Size 1.7 MB
Tags CPython 3.10 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
efcc1fd675d203d72691d685da95a4a381c8b97942662c74c085a4cc18728908
BLAKE2b-256 checksum
How to use checksums
629755ea97768fdcfa522d26c150561228b8831ff618d8aca886c0801dddbbc1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.12.3

Release files / NNGT-2.8.0-cp39-cp39-manylinux_2_28_x86_64.whl

Download URL NNGT-2.8.0-cp39-cp39-manylinux_2_28_x86_64.whl
Size 1.7 MB
Tags CPython 3.9 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
e25313d6e26ea45543ccedd8b89b2fd33bdfcd174bd6407b4fad5d58b4404cd9
BLAKE2b-256 checksum
How to use checksums
d15fbd83f5eb0414a2ac2c99a13e95ff676729ce47ac92c121277553a16190cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.12.3

Release files / NNGT-2.8.0-cp38-cp38-manylinux_2_28_x86_64.whl

Download URL NNGT-2.8.0-cp38-cp38-manylinux_2_28_x86_64.whl
Size 1.8 MB
Tags CPython 3.8 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
199768bcbf2f852b6d568a15265fd39f13d38e7aea2cd14b4f6d5aa0a2a9ab94
BLAKE2b-256 checksum
How to use checksums
ca5a86dfd98b1885ecf0692e39e06eff19c8ad68ea9b7d3968b63b8ce8d752a6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.12.3

Release files / NNGT-2.8.0-cp37-cp37m-manylinux_2_28_x86_64.whl

Download URL NNGT-2.8.0-cp37-cp37m-manylinux_2_28_x86_64.whl
Size 1.6 MB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
15e3145d966a370d55e3f5a2214b20299a560967cfd813ab28418ded3cee9319
BLAKE2b-256 checksum
How to use checksums
d5be3f9d80f25389d24598bd99dc00d841836bb1a13be6fd71f23c34d2525d52
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.12.3
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page