Friday, February 4, 2011

PyNN 0.7.0 released

PyNN 0.7.0 is available for download from  PyPI and from the INCF Software Center. Documentation is available at http://neuralensemble.org/PyNN.



This release sees a major extension of the API with the addition of the PopulationView and Assembly classes, which aim to make building large, structured networks much simpler and cleaner. A PopulationView allows a subset of the neurons from a Population to be encapsulated in an object. We call it a "view", rather than a "sub-population", to emphasize the fact that the neurons are not copied: they are the same neurons as in the parent Population, and any operations on either view or parent (setting parameter values, recording, etc.) will be reflected in the other.  An Assembly is a list of  Population and/or PopulationView objects, enabling multiple cell types to be encapsulated in a single object. PopulationView and Assembly objects behave in most ways like Population: you can record them, connect them using a Projection, you can have views of views...


The "low-level API" (rechristened "procedural API") has been reimplemented in terms of Population and Projection. For example, create() now returns a Population object rather than a list of IDs, and connect() returns a Projection object. This change should be almost invisible, since Population now behaves very much like a list of IDs (can be sliced, joined, etc.).


There has been a major change to cell addressing: Populations now always store cells in a one-dimensional array, which means cells no longer have an address but just an index. To specify the spatial structure of a Population, pass a Structure object to the constructor, e.g.


  p = Population((12,10), IF_cond_exp)

is now


   p = Population(120, IF_cond_exp, structure=Grid2D(1.2))


although the former syntax still works, for backwards compatibility. The reasons for doing this are:

  1. we can now have more interesting structures than just grids
  2. efficiency (less juggling addresses, flattening)
  3. simplicity (less juggling addresses, less code).

The API for setting initial values has changed: this is now done via the initialize() function or the Population.initialize() method, rather than by having v_init and similar parameters for cell models.
  
Other API changes:


- simplification of the record_X() methods.
- enhanced describe() methods: can now use Jinja2 or Cheetah templating engines to produce much nicer, better formatted network descriptions.
- connections and neuron positions can now be saved to various binary formats as well as to text files.
- added some new connectors: SmallWorldConnector and CSAConnector  (CSA = Connection Set Algebra).
- native neuron and synapse models are now supported using a NativeModelType subclass, rather than specified as strings. This simplifies the code internally and increases the range of PyNN functionality that can be used with native models (e.g. you can now record any variable from a native NEST or NEURON model). For NEST, there is a class factory native_cell_type(), for NEURON the NativeModelType subclasses have to be written by hand.


Backend changes:

  • the NEST backend has been updated to work with NEST version 2.0.0rc2.
  • the Brian backend has seen extensive work on performance and on bringing it to feature parity with the other backends.

Contributors


I'd like to thank everyone who has contributed to this release:  Daniel Brüderle, Eilif Muller, Mikael Djurfeldt, Michael Schmucker and especially Pierre Yger, who has done amazing work on the Brian backend, on implementing my wish list of features for the Assembly class, and in many other areas, while at the same time successfully completing and defending his PhD thesis. Thanks also to everyone who has reported bugs or requested improvements.



What is PyNN?

PyNN (pronounced 'pine' ) is a simulator-independent language for building neuronal network models.

In other words, you can write the code for a model once, using the PyNN API and the Python programming language, and then run it without modification on any simulator that PyNN supports (currently NEURON, NEST, PCSIM and Brian).

Even if you don't wish to run simulations on multiple simulators, you may benefit from writing your simulation code using PyNN's powerful, high-level interface. In this case, you can use any neuron or synapse model supported by your simulator, and are not restricted to the standard models.


The code is released under the CeCILL licence (GPL-compatible).


Monday, December 13, 2010

Open Research Computation: a new journal for publications describing scientific software

Cameron Neylon has just announced a new journal, "Open Research Computation", published by BioMed Central. The goals of the journal are to promote sharing of high-quality scientific software (e.g. there must be a test suite with 100% code coverage), promote discussion of best practice in research software development, and to enable researchers to be rewarded through publication for the time spent on developing software tools for others to use.

The editorial board contains many familiar names from the scientific Python community, including Titus Brown, Hans-Petter Langtangen, Jarrod Millman, Fernando Perez and Gaël Varoquaux, and others from the reproducible research community such as Peter Murray-Rust and Victoria Stodden.

The goals of Open Research Computation seem to be very well aligned with those of the NeuralEnsemble community, and I encourage you all to think about submitting manuscripts there.

Friday, November 26, 2010

Society for Neuroscience meeting 2010: a Python perspective

Last week I was at the annual meeting of the Society for Neuroscience (SfN) in San Diego. For those who aren't familiar with the meeting, it is huge, with over 30000 participants: it seemed as though every flight into San Diego on the day before the meeting was filled with people carrying poster tubes. Even as far away as Paris, the check-in line for every America-bound flight from Charles de Gaulle was bristling with posters.


The first few SfN meetings I went to, I exhausted myself trying to see every poster and every talk that could possibly be of interest (while lugging round several kilograms of abstract books and free journal samples from Publishers' Row). This time I focused on the early visual system (there was a particularly good symposium on colour vision) and on neuroinformatics (in particular database and simulation software) (and Publishers' Row this year was at the far, far end of the enormous poster/exhibitors hall - I never got that far).


Anyway, this is a report on the meeting from a software (and particularly Python software) perspective.


NEURON and Python workshop


On Saturday morning, I took part in a workshop/seminar on NEURON+Python, organised by Tom McTavish, Ted Carnevale and Tom Morse from Yale. This was apparently hugely over-subscribed, which certainly reflects the large NEURON user community, but it is clear that all the participants were intrigued by the potential power that Python brings to this well-established simulator (in a related note, I was just told that the article we wrote about NEURON and Python is one of the 25 most-cited articles in the Frontiers in Neuroscience journal series).


The format was part traditional presentations, part interactive tutorial using Sage notebooks.


Tom McTavish gave an interative introduction to Python, and then to using Python with the NEURON simulator. Tom Morse talked about ModelDB, and Ted Carnevale discussed using Python and Hoc (NEURON's original scripting language) together. Tom Foutz presented Neuron3D, a Mayavi-based tool for working with 3D views of neurons, nuclei and electrodes in NEURON. This looked very nice, and reminded me of a couple of tools presented at the last CodeJam meeting, Mike Hull's morphforge and Michele Mattioni's NeuronVisio, both of which also use Mayavi. Mike was in San Diego at the meeting, so I introduced him to Tom, and they started hatching plans for some collaboration - watch this space. I talked about a miscellaneous bunch of stuff related to neuronal simulation and Python, including PyNN, Sumatra, NeuroTools, NeuralEnsemble.org and nrnutils.

Materials from the workshop will be available soon on the NEURON forum.


Posters


A search for "python" in the Neuroscience Meeting Planner gives nine abstracts, all of which refer to the programming language (it appears no-one is reporting research into the nervous system of the family Pythonidae). ("Matlab" gives 36 abstracts, so it's clear we've a way to go). I guess many more people probably use Python in their research, but at least this gives an idea of how many thought it was important enough to mention in the abstract.


The topics covered included neuroscience education (25.27), the role of relative ion channel densities in neuronal firing properties in tadpoles (46.8), the CARMEN e-science platform for neurophysiology data (107.1), web-based model presentation using NEURON and Sage (208.27), the eagerly-anticipated 2.0 release of the NEST simulator (208.28), modelling olfactory neurons (369.6), analysis of spectroscopy data in Alzheimer's disease (746.20), inference of brain connectivity (918.13), and boosting your research productivity using NeuroDebian (918.15).


I'll say more about CARMEN and NeuroDebian below.


Although I didn't visit the poster, the abstract on modelling the olfactory bulb external tufted cell (369.6) interests me because they implemented versions of the model in both Python and Matlab. The importance of implementing neuroscience models in at least two simulation environments as a way of checking the numerical methods of a given simulator don't impact the qualitative results and of improving the reproducibility of the model is a subject I've been banging on about for some time, so it's great to see that other people are also doing this. (Great to see this cell type being modelled, incidentally. When I find time to return to olfactory bulb modelling, I'll certainly follow up on this work).


I really liked Tom McTavish's poster (208.27) on using Sage to interact with NEURON models over the web. Another subject I often go on about is enhancing the reusability of neuronal models: building new models based on well-tested and well-understood existing components, rather than building from scratch every time, is something I think there is too little of in neuroscience at the moment, so tools that improve the accessibility, comprehensibility and testability of neuroscience models are to be welcomed. There is nothing NEURON-specific about Sage, of course: I think this is a tool that would be useful for any Python-supporting neuroscience simulator.


INCF booth


The International Neuroinformatics Coordinating Facility (INCF) had a booth at SfN, at which they had a program of live demonstrations of neuroinformatics software and resources (they also had a very comfy sofa), including a demo of a Python client for XNAT-based neuroimaging databases by Yannick Schwartz and colleagues from LNAO at NeuroSpin.

Neurodebian booth


Neurodebian is "a platform that provides a staging area for neuroscience software packages on their way into Debian". They had a booth at SfN, and I swung by to discuss packaging PyNN for Debian. I now have a short list of things to do to make PyNN suitable for packaging, so hopefully the 0.7.0 release will be available in NeuroDebian. Overall, they have an impressive selection of packages. I am almost convinced to try running NeuroDebian on our cluster, instead of Ubuntu. One package I need that is missing is mpi4py, but the Neurodebian guys are now planning to add that. Here is their own report on the meeting.


Other stuff


Some non-Python stuff is definitely worth a mention. I've been following the CARMEN project for some time. This is a UK-funded project to develop a portal for sharing of neuroscience data and analyses. They have now opened their portal to academic users. They are also responsible for a number of advances and fledgling standards in electrophysiology data sharing, including the MINI specification (Minimum Information about a Neuroscience Investigation) and the NDF (Neurophysiology Data translation Format) (not to be confused with NDF (Neurospaces Description Format) :-). 


Gwen Jacobs was presenting the Yogo Data Management Framework, "a set of software tools created to rapidly build scientific data-management applications". I think this sort of tool - enabling straightforward customization of database systems for the needs of individual labs - is going to be essential in bringing some of the vast quantity of neuroscience data generated every year into a form where it can be shared, reanalyzed and reused. Although the system we're developing in my group, Helmholtz, is much more neuroscience-specific and less general than Yogo (and much less polished, at the moment), it was interesting to see that we've made many of the same architectural decisions, including building on top of a rapid-development web framework (Ruby on Rails for Yogo, Django in our case).


Finally, if you haven't already done so, check out the demo video for the Whole Brain Catalog, the software for which is open-source, and, I just saw, exposes a RESTful API.

Monday, September 27, 2010

The Debian Neuroscience Repository

NeuroDebian (http://neuro.debian.net/) "aims to provide a turnkey
software platform for nearly all aspects of the neuroscientific
research  process". 

There's nothing specifically simulation-related there yet, as far as I can see, but it seems like this would be a good thing for NeuralEnsemble members to get involved with.

Mailing lists:

* neurodebian-users: Discussions and support of NeuroDebian users
 http://lists.alioth.debian.org/mailman/listinfo/neurodebian-users

* neurodebian-upstream: General discussions and knowledge sharing
 among developers of the neuroscience software
 http://lists.alioth.debian.org/mailman/listinfo/neurodebian-upstream

* neurodebian-devel: Technical mailing list for discussions on
 NeuroDebian development
 http://lists.alioth.debian.org/mailman/listinfo/neurodebian-devel

Saturday, July 10, 2010

Sumatra 0.2 released

We would like to announce the release of version 0.2 of Sumatra, a tool for automated tracking of simulations and computational analyses so as to be able to easily replicate them at a later date.


The main changes are:
  • expanded the focus from just simulations to any command-line driven computation, e.g. analyses, graphing. This simply involved changes to the documentation and some renaming, e.g. SimProject is now just Project.
  • RecordStores can now contain records from multiple projects and multiple users. This makes it possible to keep all your records in a single database, and for different people to collaborate on the same project.
  • added support for the Git version control system. Sumatra requires your code to be stored in a version control system to ensure reproducibility, and now supports Git, Subversion and Mercurial.
  • removed the concept of record groups, since grouping can easily be achieved using tags.
  • Sumatra can now pass the record label to your main script, by appending it either to the command line or to the parameter file. This is very useful for separating the output files of different experiments into their own directories such that Sumatra can correctly link to them. 
  • you can now tag a simulation/analysis at the same time you run it, using smt run, rather than having to remember to do this afterwards with smt tag.
  • added a @capture decorator, to make it easier to use Sumatra in your own Python scripts.
  • the web interface will now display the contents of any CSV files generated during your experiment as an HTML table.
  • added ConfigParserParameterSet. If you pass parameters to your simulation/analysis in a separate file, then Sumatra can store these parameters for future searching, provided it understands  the parameter file format. The new class adds support for parameters stored in ConfigParser-style files (the existing supported formats are simple one-per-line key=value files and hierarchical, JSON-like NeuroTools parameter sets).
Sumatra 0.2 may be downloaded from the INCF Software Center or from PyPI.

Wednesday, June 9, 2010

Program & reg. deadline extension - FACETS CodeJam #4

A preliminary program for the 4th annual FACETS CodeJam meeting (http://neuralensemble.org/codejam4) which will take place June 22nd-24th, 2010 in Marseille, France is now available here:

http://neuralensemble.org/meetings/CJ4_Preliminary_Program_v2.pdf

In addition, the registration deadline has been extended to June 13th, 2010. What are you waiting for? Register now!

The goal of the FACETS CodeJam workshops is to catalyze open-source, collaborative software development in computational and systems neuroscience and neuroinformatics, by bringing together researchers, students and engineers to share ideas, present their work, and write code together. The general format of the workshops is to dedicate the mornings to invited and contributed talks, leaving the afternoons free for discussions and code sprints.

For the 4th FACETS CodeJam, the main theme of the meeting will be workflows: what are the best practices for combining different tools (simulators, analysis tools, visualization tools, databases etc.) to ensure the efficient and reproducible flow of data and information from experiment conception to publication and archiving?

The meeting is being organised by:
Andrew Davison (UNIC-CNRS, Gif-sur-Yvette, France)
Abigail Morrison (BCCN-Freiburg, Germany)
Eilif Muller (BBP-EPFL, Lausanne, Switzerland)
Laurent Perrinet (INCM-CNRS, Marseille, France)

Please consult the meeting website at

http://neuralensemble.org/codejam4

for registration and further information.