Author response:
Public Reviews:
Summary:
We sincerely thank the reviewers for their insightful and thorough feedback. Their comments cover both technical and conceptual aspects of our project, which we have attempted to address in our provisional responses.
First, we would like to clarify that any current lack of documentation or technical issues (such as local installation challenges) reflect the software's early stage. These aspects are receiving our full attention and are not intended to remain in their current state. As suggested, we plan to enhance the toolbox’s structure by separating it into a standalone library and a web application, alongside developing smaller satellite apps for SWC and MOD file management. We will also expand our documentation, provide a more detailed user guide, and add video tutorials for the GUI.
Second, we have clarified the rationale behind specific implementation choices in our software, explaining why certain features of the toolbox were designed and implemented in particular ways. Our goal is to maintain a strong focus on single-cell level modeling, addressing its various aspects in great detail. We are also working on new features, such as automated parameter optimization and support for multiple output formats, to further enrich the toolbox’s functionality.
Reviewer #1 (Public review):
Summary:
Dendrotweaks provides its users with a solid tool to implement, visualize, tune, validate, understand, and reduce single-neuron models that incorporate complex dendritic arbors with differential distribution of biophysical mechanisms. The visualization of dendritic segments and biophysical mechanisms therein provide users with an intuitive way to understand and appreciate dendritic physiology.
Strengths:
(1) The visualization tools are simplified, elegant, and intuitive.
(2) The ability to build single-neuron models using simple and intuitive interfaces.
(3) The ability to validate models with different measurements.
(4) The ability to systematically and progressively reduce morphologically-realistic neuronal models.
We thank the reviewer for their positive comments.
Weaknesses:
(1) Inability to account for neuron-to-neuron variability in structural, biophysical, and physiological properties in the model-building and validation processes.
We agree with the reviewer that it is important to account for neuron-to-neuron variability. The core approach of DendroTweaks and its distinctive feature is interactive exploration of how morpho-electric parameters affect neuronal activity. In light of this, variability can be achieved through interactive updating of the model parameters with widgets. In a sense, by adjusting a widget (e.g., channel distribution or kinetics), a user ends up with a new instance of a cell in the parameter space and receives almost real-time feedback on how this change affects neuronal activity. Implementing complex algorithms to account for neuron-to-neuron variability during the validation process would detract from the interactivity aspect of the GUI. That being said, we acknowledge the importance of this issue and we will explore the options to address it more comprehensively in our revised manuscript.
(2) Inability to account for the many-to-many mapping between ion channels and physiological outcomes. Reliance on hand-tuning provides a single biased model that does not respect pronounced neuron-to-neuron variability observed in electrophysiological measurements.
We acknowledge the challenge of accounting for degeneracy in the relation between ion channels and physiological outcomes and the importance of capturing neuron-to-neuron variability. One possible way to address this, as we mention in the Discussion, is to integrate automated parameter optimization algorithms alongside the existing interactive hand-tuning with widgets. We are currently exploring the possibility of integrating Jaxley (Deistler et al., 2024) into DendroTweaks in addition to NEURON. This would allow for automated and fast gradient-based parameter optimization, including optimization of heterogeneous channel distributions.
(3) Lack of a demonstration on how to connect reduced models into a network within the toolbox.
Building a network of reduced models is a promising direction, albeit it goes beyond the scope of this manuscript. We do not plan to add support for network models to the toolbox itself. In DendroTweaks, we focus on single-cell modeling, aiming to cover its various aspects in great detail. Of course, such refined single-cell models—both detailed and reduced—are likely to be integrated into networks but this will not take place within the DendroTweaks toolbox. To support the integration of DendroTweaks-produced model neurons into networks, we will focus on better compatibility with existing formats and standards and improve exporting capabilities. It is already possible to export reduced morphologies as SWC files, standardized ion channel models as MOD files and channel distributions as JSON files. Nevertheless, as a proof of concept, we plan to generate a simple network of exported reduced models outside the toolbox and include it as a separate Jupyter notebook.
(4) Lack of a set of tutorials, which is common across many "Tools and Resources" papers, that would be helpful in users getting acquainted with the toolbox.
This is a valid concern that we aim to address promptly. Currently, an online user guide is available at https://dendrotweaks.dendrites.gr/guide.html. This guide introduces users to the GUI elements and covers basic use cases. We are working on video tutorials and detailed documentation, which will be available soon (as part of the revised manuscript). The toolbox will be split into two parts: a Bokeh app and a standalone library. The library will offer the core functionality, such as reducing morphology and standardizing channels, without the GUI, enabling bulk processing. It will be installable through PyPI and integrated into the app code as an external library. We will provide thorough documentation for all classes and functions in the library.
Reviewer #2 (Public review):
The paper by Makarov et al. describes the software tool called DendroTweaks, intended for the examination of multi-compartmental biophysically detailed neuron models. It offers extensive capabilities for working with very complex distributed biophysical neuronal models and should be a useful addition to the growing ecosystem of tools for neuronal modeling.
Strengths
(1) This Python-based tool allows for visualization of a neuronal model's compartments.
(2) The tool works with morphology reconstructions in the widely used .swc and .asc formats.
(3) It can support many neuronal models using the NMODL language, which is widely used for neuronal modeling.
(4) It permits one to plot the properties of linear and non-linear conductances in every compartment of a neuronal model, facilitating examination of the model's details.
(5) DendroTweaks supports manipulation of the model parameters and morphological details, which is important for the exploration of the relations of the model composition and parameters with its electrophysiological activity.
(6) The paper is very well written - everything is clear, and the capabilities of the tool are described and illustrated with great attention to detail.
We thank the reviewer for their positive comments.
Weaknesses
(1) Not a really big weakness, but it would be really helpful if the authors showed how the performance of their tool scales. This can be done for an increasing number of compartments - how long does it take to carry out typical procedures in DendroTweaks, on a given hardware, for a cell model with 100 compartments, 200, 300, and so on? This information will be quite useful to understand the applicability of the software.
DendroTweaks functions as a layer on top of a simulation engine. As a result, currently its performance scales in proportion to the NEURON’s one. Note that the GUI displays the time taken to run a given simulation in NEURON at the bottom of the Simulation tab in the left menu. While GUI-related processing and rendering also consume time, this is not as straightforward to measure. Nonetheless, we will explore options to provide suggested benchmarking in the revised manuscript.
(2) Let me also add here a few suggestions (not weaknesses, but something that can be useful, and if the authors can easily add some of these for publication, that would strongly increase the value of the paper).
(3) It would be very helpful to add functionality to read major formats in the field, such as NeuroML and SONATA.
We agree with the reviewer that support for major formats will substantially improve and ensure reproducibility and reusability of the models. As mentioned in the Discussion, we plan to add support for NeuroML. Regarding SONATA, it is indeed possible to view our models as a network with a single morphologically-detailed biophysical node receiving inputs from multiple populations of virtual nodes. In future editions of the tool we plan to expand its support for additional file formats.
(4) Visualization is available as a static 2D projection of the cell's morphology. It would be nice to implement 3D interactive visualization.
We offer an option to rotate a cell around the vertical axis using a slider under the plot. This is a workaround, as implementing a true 3D visualization in Bokeh would require custom Bokeh elements, along with external JavaScript libraries. Despite these implementation difficulties, we advocate for a different approach than the one used in most of the morphology viewers mentioned in the Discussion. The core idea of DendroTweaks' morphology exploration is that each section is "clickable" allowing its geometric properties to be examined in a 2D Section view. Furthermore, we believe the Graph view presents the overall cell topology more clearly than a 3D visualization.
(5) It is nice that DendroTweaks can modify the models, such as revising the radii of the morphological segments or ionic conductances. It would be really useful then to have the functionality for writing the resulting models into files for subsequent reuse.
This functionality is already available. Users can export JSON files with channel distributions and SWC files after morphology reduction through the GUI. In the standalone version, users can modify and export SWC files, as well as export MOD files after standardization. Please note that in the online demo version export and import functionality is currently limited, but we plan to fully enable it when submitting our revisions. We are considering separating file managers as satellite apps—one for SWC and one for MOD files. It is worth mentioning that the MOD file manager along with parsing the files and generating Python classes for visualization purposes is already capable of producing Jaxley-compatible Python channel classes.
(6) If I didn't miss something, it seems that DendroTweaks supports the allocation of groups of synapses, where all synapses in a group receive the same type of Poisson spike train. It would be very useful to provide more flexibility. One option is to leverage the SONATA format, which has ample functionality for specifying such diverse inputs.
Currently, each group shares the same set of parameters for both biophysical properties of synapses (e.g., reversal potential, time constants) and presynaptic "population" activity (e.g., rate, onset). The parameter that controls an incoming Poisson spike train is the rate, which is indeed shared across all synapses in a group. The suggestion to allow for variability in input properties within a group is interesting and is worth implementing. We will explore this in the revised manuscript.
(7) "Each session can be saved as a .json file and reuploaded when needed" - do these files contain the whole history of the session or the exact snapshot of what is visualized when the file is saved? If the latter, which variables are saved, and which are not? Please clarify.
These files capture the exact snapshot of the model's latest state. They include model parameters such as channel distributions, equilibrium potentials, and temperature. Currently, stimuli (current clamps and synapses) are not saved. However, we plan to add an option to export stimuli parameters in the same JSON file. This will also be available as part of the revised manuscript.
References
Michael Deistler, Kyra L. Kadhim, Matthijs Pals, Jonas Beck, Ziwei Huang, Manuel Gloeckler, Janne K. Lappalainen, Cornelius Schröder, Philipp Berens, Pedro J. Gonçalves, Jakob H. Macke Differentiable simulation enables large-scale training of detailed biophysical models of neural dynamics bioRxiv 2024.08.21.608979; doi:https://doi.org/10.1101/2024.08.21.608979