3 ms·
For those of you that want to be horrified / amused by code, check out the materials and methods of the article itself. It contains a link to the full source co
by orbifold 7y ago
For those of you that want to be horrified / amused by code, check out the materials and methods of the article itself. It contains a link to the full source code used to generate the modeling figures:
https://senselab.med.yale.edu/ModelDB/showmodel.cshtml?model=254217&file=/GidonEtAl2020_fig3andS9/_mod/Traub.mod#tabs-1 https://senselab.med.yale.edu/ModelDB/showmodel.cshtml?model...
The simulator used is called Neuron. Code for it is written in a custom language called Hoc and models are implemented in yet another domain specific language. Hardcoded parameters galore including whole sections of code that are prefaced with: this has been copied from this other publication.
https://senselab.med.yale.edu/ModelDB/showmodel.cshtml?model=254217&file=/GidonEtAl2020_fig3andS9/_mod/Traub.mod#tabs-2 https://senselab.med.yale.edu/ModelDB/showmodel.cshtml?model...
The dendritic tree geometry is specified as hardcoded set of point and branch declarations
https://senselab.med.yale.edu/ModelDB/showmodel.cshtml?model=254217&file=/GidonEtAl2020_fig3andS9/_morph/171122005.hoc#tabs-2 https://senselab.med.yale.edu/ModelDB/showmodel.cshtml?model...
(apparently that morphology was reconstructed from imaging data?)
- mattmanser 7y agoWhy horrified? A quick scan and it's actually nicely laid out and indented, split into logical sections and commented. Without wanting to spend a lot of time on it, why is it horrific? There's nothing intrinsically wrong with hardcoded values as they're biological constants, and nicely identified by the standard convention of using ALL_CAPS_VARIABLES. Edit: Scanning a bit more, he's probably referring to this file, which is pretty horrific: https://github.com/ModelDBRepository/254217/blob/master/_morph/171122005.hoc https://github.com/ModelDBRepository/254217/blob/master/_mor...
- cafebeen 7y agoAlas, the possibility of comments like this are one reason that some researchers hesitate to release their code. Even if there are issues, it's tremendously valuable that they shared this, so others can reproduce and build on their work. That said, most scientists would like to have better quality code in science as well, but I think the incentive structures and other demands that make it challenging...
- buboard 7y agoThe morphology files are automatically generated by a 3d reconstruction program called neurolucida. NEURON is an ancient program, written in 1983, using a custom parser for the ad-hoc language literally called hoc. It has a hardcoded limit in the number of lines a function can have (hence you have to split func1(), func2() etc) and a gazillion bugs. It uses a modified kinetic equation solver which compiles those .mod files to to a DLL that NEURON then uses to run. It uses some GUI library called InterViews from god knows where. It's generally a rather bad program nowadays, but written by the guy who invented a faster Crank-nicholson method to integrate the cable equations (Hines). Despite a few alternatives existing, NEURON is still the most popular because there are a lot of ion mechanism kinetic modules (the mod files) that you can download and reuse from previously published models, which have been hand-tuned to be quasi-realistic. NEURON is supposed to be used by neurophysiologists, not by programmers. I think a mass open source campaign to replace NEURON and ModelDB with something more modern, and clean up and convert every published model would be worth the effort. There are quite a few alternative programs (GENESIS, Neuroconstruct etc) that are either incomplete or abandoned because of lack of funding/interest.