Skip to main content

Python utilities for NeuroML

Project description

pyNeuroML

GitHub CI PyPI PyPI - Python Version GitHub GitHub pull requests GitHub issues Documentation Status GitHub Org's stars Twitter Follow Gitter

All Contributors

A single package in Python unifying scripts and modules for reading, writing, simulating and analysing NeuroML2/LEMS models.

Builds on: libNeuroML & PyLEMS and wraps functionality from jNeuroML.

Installation

Dependencies

pyNeuroML relies on additional software to carry out its functions:

  • Java Runtime environment (JRE)
  • dot (from Graphviz)
  • lxml

On most Linux systems, these can be installed using the default package manager. On Ubuntu based distributions:

sudo apt-get install python-lxml graphviz openjdk-11-jdk

Pip

pyNeuroML can be installed with pip (preferably in a virtual environment):

pip install pyneuroml

Fedora

The NeuroFedora community initiative provides pyNeuroML for use on the Fedora Linux Distribution. Fedora users can install pyNeuroML using the following commands:

sudo dnf copr enable @neurofedora/neurofedora-extra
sudo dnf install python3-pyneuroml

This will also pull in all the necessary dependencies (Java, lxml, graphviz). Please see the project documentation for more information.

Installation from source

Clone the repository:

git clone https://github.com/NeuroML/pyNeuroML.git
cd pyNeuroML

It should be possible to install pyNeuroML using just:

pip install .

To develop pyNeuroML, you can use the dev extra and the development branch:

git clone https://github.com/NeuroML/pyNeuroML.git
cd pyNeuroML
git checkout development
pip install .[dev]

Current/planned features

1) Single Python package for NeuroML2/LEMS

One Python package which can be installed using pip & a user has everything they need to work with NeuroML2/LEMS files:

  • libNeuroML
  • PyLEMS
  • A bundled version of jNeuroML which can be used to run simulations

2) Run models using jNeuroML or PyLEMS

Ability to run NeuroML2/LEMS models using jLEMS/jNeuroML (with bundled jar) or PyLEMS (todo...)

Uses similar command line interface to jNeuroML, i.e. based on jnml

Try:

pynml -h

to list current options.

3) Access to export & import options of jNeuroML

All export & import options of jNeuroML available through easy command line interface (see here for progress) & through Python methods.

Example of export of NeuroML2/LEMS to NEURON and execution of generated code using single method is here.

4) Helper Python scripts

Lots of helper scripts for commonly used functions, e.g. generating a firing frequency vs injected current plot, generating a LEMS file for use with a NeuroML2 file,

5) Analysis of ion channels

Generation of plots of activation rates for ion channels from NeuroML2 channel file (example):

pynml-channelanalysis NaConductance.channel.nml

Generation of plots of activation rates for ion channels from NEURON mod file (example):

pynml-modchananalysis NaConductance -modFile NaConductance.mod

See here for more.

6) Home for existing functionality distributed in various places

Incorporate ChannelML2NeuroML2beta.xsl for updating ChannelML (coming soon...)

7) NEURON to NeuroML2

Scripts for converting NEURON to NeuroML2

  • Export morphologies (plus channels, soon). See here.

  • mod files - make best guess at initial NeuroML2 form (todo)

8) Export of images/movies from cell/networks

Files can be generated for POV-Ray which can be used to generate high resolution images and even sequences of images for creating movies. try:

pynml-povray -h

9) Tuning cell models in NeuroML 2

Builds on Neurotune and pyelectro. See here for example.

9) Planned functionality

Built in viewer of cells in 3D? Mayavi? More closely tied to PyNN?

Contributors

Padraig Gleeson
Padraig Gleeson

๐Ÿ› ๐Ÿ’ป ๐Ÿ–‹ ๐Ÿ”ฃ ๐Ÿ“– ๐ŸŽจ ๐Ÿ“‹ ๐Ÿค” ๐Ÿš‡ ๐Ÿšง ๐Ÿง‘โ€๐Ÿซ ๐Ÿ“ฆ ๐Ÿ“† ๐Ÿ’ฌ ๐Ÿ”ฌ ๐Ÿ‘€ ๐Ÿ”ง โœ… ๐Ÿ“ข ๐Ÿ““
Ankur Sinha
Ankur Sinha

๐Ÿ› ๐Ÿ’ป ๐Ÿ–‹ ๐Ÿ”ฃ ๐Ÿ“– ๐ŸŽจ ๐Ÿ“‹ ๐Ÿค” ๐Ÿง‘โ€๐Ÿซ ๐Ÿ“ฆ ๐Ÿ’ฌ ๐Ÿ”ฌ
Boris Marin
Boris Marin

๐Ÿ› ๐Ÿ’ป ๐Ÿ–‹ ๐Ÿ”ฃ ๐Ÿ“– ๐ŸŽจ ๐Ÿ“‹ ๐Ÿค” ๐Ÿš‡ ๐Ÿšง ๐Ÿ“ฆ ๐Ÿ’ฌ ๐Ÿ”ฌ ๐Ÿ‘€ ๐Ÿ”ง ๐Ÿ““
Richard C Gerkin
Richard C Gerkin

๐Ÿ› ๐Ÿ’ป ๐Ÿค” ๐Ÿšง ๐Ÿ“ฆ ๐Ÿ”ฌ ๐Ÿ‘€ ๐Ÿ”ง ๐Ÿ““
David Lung
David Lung

๐Ÿ› ๐Ÿ’ป ๐Ÿšง ๐Ÿ”ง ๐Ÿ““
Mark Watts
Mark Watts

๐Ÿ› ๐Ÿ’ป
Chaitanya Chintaluri
Chaitanya Chintaluri

๐Ÿ› ๐Ÿ’ป
34383c
34383c

๐Ÿ› ๐Ÿ’ป
Johannes Rieke
Johannes Rieke

๐Ÿ› ๐Ÿ’ป
Andrรกs Ecker
Andrรกs Ecker

๐Ÿ› ๐Ÿ’ป
Rokas Stanislovas
Rokas Stanislovas

๐Ÿ› ๐Ÿ’ป
Robert Vickerstaff
Robert Vickerstaff

๐Ÿ’ป โš ๏ธ
Add your contributions

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyNeuroML-1.2.0.tar.gz (28.3 MB view details)

Uploaded Source

Built Distribution

pyNeuroML-1.2.0-py3-none-any.whl (27.2 MB view details)

Uploaded Python 3

File details

Details for the file pyNeuroML-1.2.0.tar.gz.

File metadata

  • Download URL: pyNeuroML-1.2.0.tar.gz
  • Upload date:
  • Size: 28.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.8

File hashes

Hashes for pyNeuroML-1.2.0.tar.gz
Algorithm Hash digest
SHA256 e8498e7367bf172cb8887df0057392bc595be560023019a12f8fc05e9ded28ee
MD5 1b2180ce2a4762ae794d15693c20e94e
BLAKE2b-256 36fee57695198fd1e27698062b4188ab6f493c959103f96783f1012fbf0a9d46

See more details on using hashes here.

File details

Details for the file pyNeuroML-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: pyNeuroML-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 27.2 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.8

File hashes

Hashes for pyNeuroML-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0485c6bf09ab93d36afbaebf078e13dafb8cf5a7a424f00d46b39ffcc06bc71e
MD5 644c26d674ac5625669f30883435d8de
BLAKE2b-256 dfb7056da2b50766cd2164387ca8e84309c9ac96dd82bdb8c84609a2e7b0a597

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page