Page 7 of 61

Some thoughts about NeuroML and standardization

I’m pleased to say that we have released Neuronvisio 0.8.5, which has several small improvements and better documentation. I’m pretty sure that there is always room to improve the documentation.

Anyway, first of all the cerebellum network rendered in Neuronvisio, with the model taken from the NeuroML website

cerebellum_network

Cerebellum Network, taken from the NeuroML example pack

The idea with this release was to demonstrate the ability of Neuronvisio to visualize also Network models which are instantiated in NEURON. To note, this ability has been there from version 0.1.0, but now we are beaming on it.

Neuronvisio is able to import 3 different files: hdf5 structured in Neuronvisio format, hoc files, and NeuroML.

The first file is our way to approach hdf5, which gives us the ability to save all the data of a simulation, plus the model itself in one single file, which can then be reloaded and moved. We do all the work here.

The other two are files format where Neuronvisio does not import directly, but let’s NEURON do the heavy-lifting, to avoid any duplication. The hoc format is classic NEURON interpreted script, while NeuroML is an effort to standardize the way neuronal model are encoded.

In particular I would like to stress the last point: Neuronvisio does not have an ad-hoc NeuroML importer, but re-use the one provided by NEURON. We now just exposing an easy way to load a NeuroML file directly in Neuronvisio with the load method from the Controls class

from neuronvisio.controls import Controls
controls = Controls() # starting the GUI
controls.load('path/to/my_model.xml') #or .h5 or .hoc

or directly launching the program, if you prefer

$ neuronvisio [path/to/my_model.xml] # or .h5 or .hoc

this gives us one powerful interface to simplify the life of a user.

Of course, if your model is in python, you can always run it within Ipython as standard python file

$ neuronvisio
In [1]: run path/to/my_model_in_python

The only problem is the NeuroML importer from NEURON does not handle properly the Network file of NeuroML, and this has been registered as issue #50 on our bug-tracker. This belong more to NEURON then Neuronvisio, but they don’t have a bug-tracker, so we logged on ours tracker and we will link any other place where the discussion will take place. NEURON has an amazing forum with quite instantaneous answers from the NEURON community, including Hines and Carnevale, and we will bring the issue over there.

So, we didn’t write our NeuroML importer, because there is no point to replicate what a software already does. That’s why we are now collaborating with the writing of the libNeuroML library, to have one good library that permits to load any NeuroML model properly, and then give the ability to the developer to map it to its own data-structure.

This is the same approach used in the SBML community, which I think is very powerful.

P.S.: So how did we manage to load the Network in NEURON and visualize it in Neuronvisio, if the NEURON (sorry, NEURON has to be written all capital to be precise…) NeuroML importer is not up to the job yet? We have used the neuroConstruct program, which is able to export a model to NEURON, and used the hoc files to load the model up.

Creating a new twitter bootstrap theme for jekyll

Yoda On OpenSource

Yoda is wise. And green, as well (ok, maybe not relevant but he is green!)

Now that I’ve finished my Ph.D. at the EBI, it was time to set up a personal page where people could find easily some of my contacts info to have a quick way to contact me. The decision was to use the good old github pages with a cname for hosting, and I’ve written how I’ve done it in this post.

Although a quick html page was a good compromise, I felt It was a bit too short and quick, not giving an enough informative picture. Moreover, I wanted the ability to create several pages to describe projects and other stuff which maybe will come up. Being already on github pages, I’ve decided to use jekyll. Jekyll is a text processor, which converts markup into HTML, having the ability to create a blog if same convention are followed. I love text processors, ’cause it means I can write stuff using an editor and focusing on the content. Then, at later stage, magic happens and the contents looks also good and very well formatted. Same other examples of this process are LaTeX, which is amazing to write scientific publications, and Sphinx, which it’s awesome for documentation (especially Python programs). Easier is the markup language, easier it will conquer the world. for example Markdown is awesome ’cause it feels like writing using decent default (or at least, default that resonate with me.) Ok, stop wandering around and let’s get back on track.

Getting started using Jekyll is quite complicated, because jekyll does not come with any preloaded site or anything, therefore you have to create everything. However, jekyllbootstrap is up to the rescue. Jekyllbootstrap, created by Jade Dominguez, is a series of preloaded template and clever series of addons to jekyll, including themes and external service to handle comments, which it makes possible to decrease the time to start to close to zero!

Jekyllbootstrap gets shipped with the classic (yeah, it’s a classic nowadays) twitter bootstrap, which is a pretty cool frontend helper. Twitter bootstrap version 2.0 has seen a major improvement versus the 1.4 version, where responsive behaviour has been added to the frontend framework. Responsive behaviour is the ability to perform well on any kind of device, using some clever resizing tricks, where the web page changes format and font to adapt to an android or iphone screen, to a tablet, to a laptop screen or to a massive desktop video. All this comes for free, just using bootstrap, therefore it’s very handy to use it. You know, it’s 2012 and mobile should be treated as first web citizen.

I was already thinking to bring the 1.4 theme to 2.0, when I’ve actually found that Geoffrey Dagley had already taken care of it, creating a new repo for it.

So I’ve just installed and I had the theme set up. All was looking good, when I’ve actually find out that there was a problem with the tagline. The tagline was not computed from the metadata, but it was left there as placeholder. Therefore, being a good opensource citizen, I’ve forked the repo,  fixed the problem,  and opened a Pull Request to put it back to the original.

Then, given the fact Thoms Park created bootswatch, I’ve picked cyborg, one of the available theme, which is using the same twitter bootstrap markup, but it has different colors and font, and I’ve created a new theme for jekyll, in its own repo.

So after all this I’ve set up my new website in a bunch of days, corrected and sent a pull request to fix a problem on one of the theme, created a new theme based on bootstrap and bootswatch.

The commodity of jekyll is amazing, ’cause I can create a new file using the nice rake shorthand:

rake post title="a decent title for a new post"

which sets up the file for me and I have only to open it up in gedit and write it!

How does it look like? Check it out!

Michele's web new graphic

P.S.: If Gedit doesn’t recognise Markdown, it’s due to some crazy mime-type problem. Check out this tweet for help:
[tweet https://twitter.com/mattions/status/209684943981379586]

How to push to two different git repositories in one go

Branching illustration

Branching it’s good:
http://git-scm.com/

With the new release of Neuronvisio (0.8.3) we have improved the documentation, gave the software a new home (http://neuronvisio.org) and created a new fork under the NeuralEnsemble orgs.

I think for Python and Neuroscience it would be good to have a website similar to http://pinaxproject.com/ecosystem, to give visibility to the different projects and avoid to re-invent the wheel, however for now using the same space in NeuroEnsemble orgs it’s a good start. I didn’t want to move or transfer my repository there directly,  but I wanted to have a mirror of my repo https://github.com/mattions/neuronvisio in that space, without having to manually update it. I’ve looked how to open a mirror fork on github, but to no avail. So I came up with a possible solution, using the ability of git to push to different repositories.

My solution was to create a new remote point, called all in the local git config (.git/config in your repo) with the following format:

[remote "all"]
url = git@github.com:mattions/neuronvisio.git
url = git@github.com:NeuralEnsemble/neuronvisio.git

This way I can push to both the repos with a single command

git push all

Both the repos will be updated in one go. Neat.

Tools for a computational scientist

So, how do you keep track of your work?

If you are in a wet lab, usually you end up using a lab book, where all the experiments are recorded. You can replicate the experiment, and do something new. It’s pretty cool system, although I think it’s not great for computational scientist. In computational science there is the same problem of recording what is going on, and what happened before. On top of that there is also the problem of sharing the program with other people to address reproducibility. Therefore the problem can be broken down to two different sub problems:

  • record the changes happening in a computational project, in particular to the code used to run the project
  • record the results of different execution and link them with a certain state of the code.
A classic approach is “do nothing”. The code sits on your hard drive somewhere. Maybe it is organized in folders, and descriptive file name. However there is not history attached, you have no idea what’s going on, and which is the latest version. As you guessed this is not a cool position, ’cause you spend time thinking how to track your work instead of doing your work, and you have the feeling that you don’t know what’s going on. This is bad. 
Fortunately, this can be solved 🙂
This is one of the problem which could be solved using a Version Control System, which are exactly invented to track changes in text files (and more).
I found very useful to work with Git, which is an amazing Distributed Version Control System (DVCS). The most important benefit that you get one using a version control system, and in particular git is that you have the ability to be more brave. This is because Git makes very easy to create a branch and test something new as you go on.
Branches

Branch in Git are quick and cheap! Easy to experiment!

Did you ever find yourself in a situation where you wanted to try something new, which could break a lot of different things in your repository, however you didn’t want to mess with your current code?
Well, Git gives you the ability to create a branch very cheaply, to test your new crazy idea and see if it works, in a completely isolated environment from the code that is sitting on your master branch. This means you can try new things, which tends to be quite important in science, because we don’t usually know where we are going, and try more than one solution opens up a lot of different possibilities.
The other good thing is you have a log, with whatever happened, and you can try to go back to the version that was working and restart from there. For example, this is the commits log from neuronvisio.
I’ve ran a hands-on crash course at the EBI about Git, (the repo). The course was very well-welcomed and people started to understand the power of using fast tools to free some mental space.
Another big plus for Git is the ability to host your project on github, which makes collaboration super-easy. These are the contributors for Neuronvisio for example.
Using a version controlled system is a good idea, and integrating it with Sumatra is also a very good idea. Sumatra automatically tracks all the parameters and versions of the programs used. I’ll talk about it in a later post, for now have a look to the slides:
Sumatra and git [slideshare id=3802681&w=425&h=355&sc=no]

Integrating the different leads

Blooming

Spring knocking!

To try to put all the stuff that I have on the net in a consistent way, so to give the people one address where to go to look up my stuff, I’ve decided to get a new personal domain, michelemattioni.me.  I’ve moved this blog to a new address blog.michelemattioni.me. On top of that, I’ve changed the name of the blog to Trains of Thoughts. After 6 years of activity, I guess it was time.

For the technical side, if you are interested, the blog is still hosted on wordpress.com and you can get them to map the old address to any domain or subdomain for 13$/year. I’ve considered the idea to move all the blog and go for a self-hosted strategy, but I’ve decided it was too time-consuming, so I took this solution.

To register my domains and dealing with the DNS, I’m using dnsimple.com (my referral) for the domain I own. It’s a nice DNS provider, which simplify a lot of the DNS woodo action that you need to take when setting up new stuff.

The landing page is hosted using github pages, which is very neat way to keep the site under git and update it with just a push. I plan to use bootstrap to handle the graphic and to add some content to the page.

For the time being, this is the old version (current version):

old version of michelemattioni.me

First version of michelemattioni.me

What to expect from Ideatransform

Image

With Ideatransform kicking in in less than 5 hours, I want to write down what I expect from the meeting

  • I expect a lot of fun. Enjoying the WE is one of my goal
  • I expect to meet a lot of interesting people, among developers, designers, doers and mentors
  • I also would like to pitch the SustainableSouk idea, build a team and create a first MVC, in the classic LeanStartup way.

Although looking for a Co-founder is always a tricky business, and going solo is a possibility, I would like to build this project in a super open and easy way.

The excitement is high, let’s see how it rolls!

Kitegen comes back to fly

[slideshow]

I’m very happy to read (link in Italian) that Kitegen has started the automatic testing for take off and landing at Sommariva site.

I just report the main points written in the post which I think they are interesting, without going into a full english translation:

  • first of all, they have managed to perform a take off with only 1.5 m/s wind speed at the ground, which is remarkable given the fact this wind speed is very small. Considering that the wind speed in Europe is around 3 m/s this is a great achievement.
  • the next step they are planning is to test how long the kite can fly without interruption, to achieve 5000 hours of continuous flight 5000 hours per year. H/T Stefano

All in all, it seems the control software is getting ready for the field, and I can’t wait to see the development during spring and summer!

Goodies: Link to the video!

Making playlist with Android

Droid Music

If you would like to make a playlist based on the content on the folder on your droid, just open a terminal, go to the folder where the music is and run

$ls | sort | grep mp3 > "$(basename "$(pwd)")".m3u

and magically you have the playlist..
which looks like this:

04 - Pennywise - Fuck authority.ofn.mp3
07 - A Perfect Government.mp3
07 - Pearl Jam - Do The Evolution.mp3
13 - Goldfinger - 99 Red Balloons .mp3
Nirvana - 03 - Come As You Are.mp3
Oasis - Live Forever.mp3
Offspring - Smash - 05 - Genocide.mp3
System Of A Down - Aeralis.mp3
System Of A Down - Spiders.mp3
03 Whatever Happened to My Rock 'N Roll.wma

the last one is a wma, and if you don’t have time/will to convert it to mp3 can be added with:

$ls | sort | grep wma >> "$(basename "$(pwd)")".m3u

Tip found here